diff --git a/plugins/spine/dist/SpineCanvasPlugin.js b/plugins/spine/dist/SpineCanvasPlugin.js index 2e2289e10..fca026fef 100644 --- a/plugins/spine/dist/SpineCanvasPlugin.js +++ b/plugins/spine/dist/SpineCanvasPlugin.js @@ -1,352 +1,21794 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 4399: -/***/ ((module) => { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; +window["SpinePlugin"] = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ 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 ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 68); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { /** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Taken from klasse by mattdesl https://github.com/mattdesl/klasse + +function hasGetterOrSetter (def) +{ + return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); +} + +function getProperty (definition, k, isClassDescriptor) +{ + // This may be a lightweight object, OR it might be a property that was defined previously. + + // For simple class descriptors we can just assume its NOT previously defined. + var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); + + if (!isClassDescriptor && def.value && typeof def.value === 'object') + { + def = def.value; + } + + // This might be a regular property, or it may be a getter/setter the user defined in a class. + if (def && hasGetterOrSetter(def)) + { + if (typeof def.enumerable === 'undefined') + { + def.enumerable = true; + } + + if (typeof def.configurable === 'undefined') + { + def.configurable = true; + } + + return def; + } + else + { + return false; + } +} + +function hasNonConfigurable (obj, k) +{ + var prop = Object.getOwnPropertyDescriptor(obj, k); + + if (!prop) + { + return false; + } + + if (prop.value && typeof prop.value === 'object') + { + prop = prop.value; + } + + if (prop.configurable === false) + { + return true; + } + + return false; +} + +/** + * Extends the given `myClass` object's prototype with the properties of `definition`. * + * @function extend + * @ignore + * @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) + { + if (!definition.hasOwnProperty(k)) + { + continue; + } + + var def = getProperty(definition, k, isClassDescriptor); + + if (def !== false) + { + // If Extends is used, we will check its prototype to see if the final variable exists. + + var parent = extend || ctor; + + if (hasNonConfigurable(parent.prototype, k)) + { + // Just skip the final property + if (Class.ignoreFinals) + { + continue; + } + + // We cannot re-define a property that is configurable=false. + // So we will consider them final and throw an error. This is by + // default so it is clear to the developer what is happening. + // You can set ignoreFinals to true if you need to extend a class + // which has configurable=false; it will simply not re-define final properties. + throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); + } + + Object.defineProperty(ctor.prototype, k, def); + } + else + { + ctor.prototype[k] = definition[k]; + } + } +} + +/** + * Applies the given `mixins` to the prototype of `myClass`. + * + * @function mixin + * @ignore + * @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) + { + return; + } + + if (!Array.isArray(mixins)) + { + mixins = [ mixins ]; + } + + for (var i = 0; i < mixins.length; i++) + { + extend(myClass, mixins[i].prototype || mixins[i]); + } +} + +/** + * Creates a new class with the given descriptor. + * The constructor, defined by the name `initialize`, + * is an optional function. If unspecified, an anonymous + * function will be used which calls the parent class (if + * one exists). + * + * You can also use `Extends` and `Mixins` to provide subclassing + * and inheritance. + * + * @class Phaser.Class * @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 {Object} definition a dictionary of functions for the class + * @example * - * @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. + * var MyClass = new Phaser.Class({ * - * @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. + * initialize: function() { + * this.foo = 2.0; + * }, * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private + * bar: function() { + * return this.foo + 5; + * } + * }); */ -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; +function Class (definition) +{ + if (!definition) + { + definition = {}; } - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; + // The variable name here dictates what we see in Chrome debugger + var initialize; + var Extends; + + if (definition.initialize) + { + if (typeof definition.initialize !== 'function') + { + throw new Error('initialize must be a function'); + } + + initialize = definition.initialize; + + // Usually we should avoid 'delete' in V8 at all costs. + // However, its unlikely to make any performance difference + // here since we only call this on class creation (i.e. not object creation). + delete definition.initialize; + } + else if (definition.Extends) + { + var base = definition.Extends; + + initialize = function () + { + base.apply(this, arguments); + }; + } + else + { + initialize = function () {}; } - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; + if (definition.Extends) + { + initialize.prototype = Object.create(definition.Extends.prototype); + initialize.prototype.constructor = initialize; - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) - 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]; - } + Extends = definition.Extends; - listeners[i].fn.apply(listeners[i].context, args); - } + delete definition.Extends; } - } - - 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]); - } + else + { + initialize.prototype.constructor = initialize; } - // - // 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); - } + // Grab the mixins, if they are specified... + var mixins = null; - return this; -}; + if (definition.Mixins) + { + mixins = definition.Mixins; + delete definition.Mixins; + } -/** - * 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; + // First, mixin if we can. + mixin(initialize, mixins); - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } + // Now we grab the actual definition which defines the overrides. + extend(initialize, definition, true, Extends); - 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; + return initialize; } +Class.extend = extend; +Class.mixin = mixin; +Class.ignoreFinals = false; + +module.exports = Class; + /***/ }), +/* 1 */ +/***/ (function(module, exports) { -/***/ 5159: -/***/ ((module) => { +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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__(34); + +/** + * @classdesc + * A representation of a vector in 2D space. + * + * A two-component vector. + * + * @class Vector2 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. + * @param {number} [y=x] - The y component. + */ +var Vector2 = new Class({ + + initialize: + + function Vector2 (x, y) + { + /** + * The x component of this Vector. + * + * @name Phaser.Math.Vector2#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The y component of this Vector. + * + * @name Phaser.Math.Vector2#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; + } + }, + + /** + * Make a clone of this Vector2. + * + * @method Phaser.Math.Vector2#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} A clone of this Vector2. + */ + 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.Types.Math.Vector2Like} 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 (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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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); + }, + + /** + * Project this Vector onto another. + * + * @method Phaser.Math.Vector2#project + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} src - The vector to project onto. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + project: function (src) + { + var scalar = this.dot(src) / src.dot(src); + + return this.copy(src).scale(scalar); + } + +}); + +/** + * 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; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index. + * @param {number} 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) + { + 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 2013-2023 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 (!obj || 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; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. + * + * The key is a string, which can be split based on the use of the period character. + * + * For example: + * + * ```javascript + * const source = { + * lives: 3, + * render: { + * screen: { + * width: 1024 + * } + * } + * } + * + * const lives = GetValue(source, 'lives', 1); + * const width = GetValue(source, 'render.screen.width', 800); + * const height = GetValue(source, 'render.screen.height', 600); + * ``` + * + * In the code above, `lives` will be 3 because it's defined at the top level of `source`. + * The `width` value will be 1024 because it can be found inside the `render.screen` object. + * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. + * + * @function Phaser.Utils.Objects.GetValue + * @since 3.0.0 + * + * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. + * @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. + * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. + * + * @return {*} The value of the requested key. + */ +var GetValue = function (source, key, defaultValue, altSource) +{ + if ((!source && !altSource) || typeof source === 'number') + { + return defaultValue; + } + else if (source && source.hasOwnProperty(key)) + { + return source[key]; + } + else if (altSource && altSource.hasOwnProperty(key)) + { + return altSource[key]; + } + else if (key.indexOf('.') !== -1) + { + var keys = key.split('.'); + var parentA = source; + var parentB = altSource; + var valueA = defaultValue; + var valueB = defaultValue; + var valueAFound = true; + var valueBFound = true; + + // Use for loop here so we can break early + for (var i = 0; i < keys.length; i++) + { + if (parentA && parentA.hasOwnProperty(keys[i])) + { + // Yes parentA has a key property, let's carry on down + valueA = parentA[keys[i]]; + parentA = parentA[keys[i]]; + } + else + { + valueAFound = false; + } + + if (parentB && parentB.hasOwnProperty(keys[i])) + { + // Yes parentB has a key property, let's carry on down + valueB = parentB[keys[i]]; + parentB = parentB[keys[i]]; + } + else + { + valueBFound = false; + } + } + + if (valueAFound) + { + return valueA; + } + else if (valueBFound) + { + return valueB; + } + else + { + return defaultValue; + } + } + else + { + return defaultValue; + } +}; + +module.exports = GetValue; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FILE_CONST = { + + /** + * The Loader is idle. + * + * @name Phaser.Loader.LOADER_IDLE + * @type {number} + * @since 3.0.0 + */ + LOADER_IDLE: 0, + + /** + * The Loader is actively loading. + * + * @name Phaser.Loader.LOADER_LOADING + * @type {number} + * @since 3.0.0 + */ + LOADER_LOADING: 1, + + /** + * The Loader is processing files is has loaded. + * + * @name Phaser.Loader.LOADER_PROCESSING + * @type {number} + * @since 3.0.0 + */ + LOADER_PROCESSING: 2, + + /** + * The Loader has completed loading and processing. + * + * @name Phaser.Loader.LOADER_COMPLETE + * @type {number} + * @since 3.0.0 + */ + LOADER_COMPLETE: 3, + + /** + * The Loader is shutting down. + * + * @name Phaser.Loader.LOADER_SHUTDOWN + * @type {number} + * @since 3.0.0 + */ + LOADER_SHUTDOWN: 4, + + /** + * The Loader has been destroyed. + * + * @name Phaser.Loader.LOADER_DESTROYED + * @type {number} + * @since 3.0.0 + */ + LOADER_DESTROYED: 5, + + /** + * File is in the load queue but not yet started. + * + * @name Phaser.Loader.FILE_PENDING + * @type {number} + * @since 3.0.0 + */ + FILE_PENDING: 10, + + /** + * File has been started to load by the loader (onLoad called) + * + * @name Phaser.Loader.FILE_LOADING + * @type {number} + * @since 3.0.0 + */ + FILE_LOADING: 11, + + /** + * File has loaded successfully, awaiting processing. + * + * @name Phaser.Loader.FILE_LOADED + * @type {number} + * @since 3.0.0 + */ + FILE_LOADED: 12, + + /** + * File failed to load. + * + * @name Phaser.Loader.FILE_FAILED + * @type {number} + * @since 3.0.0 + */ + FILE_FAILED: 13, + + /** + * File is being processed (onProcess callback) + * + * @name Phaser.Loader.FILE_PROCESSING + * @type {number} + * @since 3.0.0 + */ + FILE_PROCESSING: 14, + + /** + * The File has errored somehow during processing. + * + * @name Phaser.Loader.FILE_ERRORED + * @type {number} + * @since 3.0.0 + */ + FILE_ERRORED: 16, + + /** + * File has finished processing. + * + * @name Phaser.Loader.FILE_COMPLETE + * @type {number} + * @since 3.0.0 + */ + FILE_COMPLETE: 17, + + /** + * File has been destroyed. + * + * @name Phaser.Loader.FILE_DESTROYED + * @type {number} + * @since 3.0.0 + */ + FILE_DESTROYED: 18, + + /** + * File was populated from local data and doesn't need an HTTP request. + * + * @name Phaser.Loader.FILE_POPULATED + * @type {number} + * @since 3.0.0 + */ + FILE_POPULATED: 19, + + /** + * File is pending being destroyed. + * + * @name Phaser.Loader.FILE_PENDING_DESTROY + * @type {number} + * @since 3.60.0 + */ + FILE_PENDING_DESTROY: 20 + +}; + +module.exports = FILE_CONST; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GEOM_CONST = __webpack_require__(29); + +/** + * @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 {number} + * @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; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + DIFFERENCE: 11, + + /** + * Exclusion blend mode. For Canvas only. + * Like difference, but with lower contrast. + * + * @name Phaser.BlendModes.EXCLUSION + * @type {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + LUMINOSITY: 16, + + /** + * Alpha erase blend mode. For Canvas and WebGL. + * + * @name Phaser.BlendModes.ERASE + * @type {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + LIGHTER: 25, + + /** + * Copy blend mode. For Canvas only. + * Only the new shape is shown. + * + * @name Phaser.BlendModes.COPY + * @type {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + XOR: 27 + +}; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + }, + + /** + * Sets the components of this Vector to be the `Math.min` result from the given vector. + * + * @method Phaser.Math.Vector3#min + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + min: function (v) + { + this.x = Math.min(this.x, v.x); + this.y = Math.min(this.y, v.y); + this.z = Math.min(this.z, v.z); + + return this; + }, + + /** + * Sets the components of this Vector to be the `Math.max` result from the given vector. + * + * @method Phaser.Math.Vector3#max + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + max: function (v) + { + this.x = Math.max(this.x, v.x); + this.y = Math.max(this.y, v.y); + this.z = Math.max(this.z, v.z); + + 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); + }, + + /** + * Adds the two given Vector3s and sets the results into this Vector3. + * + * @method Phaser.Math.Vector3#addVectors + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} a - The first Vector to add. + * @param {Phaser.Math.Vector3} b - The second Vector to add. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addVectors: function (a, b) + { + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + + return this; + }, + + /** + * 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; + }, + + /** + * Sets the components of this Vector3 from the position of the given Matrix4. + * + * @method Phaser.Math.Vector3#setFromMatrixPosition + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + setFromMatrixPosition: function (m) + { + return this.fromArray(m.val, 12); + }, + + /** + * Sets the components of this Vector3 from the Matrix4 column specified. + * + * @method Phaser.Math.Vector3#setFromMatrixColumn + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from. + * @param {number} index - The column index. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + setFromMatrixColumn: function (mat4, index) + { + return this.fromArray(mat4.val, index * 4); + }, + + /** + * Sets the components of this Vector3 from the given array, based on the offset. + * + * Vector3.x = array[offset] + * Vector3.y = array[offset + 1] + * Vector3.z = array[offset + 2] + * + * @method Phaser.Math.Vector3#fromArray + * @since 3.50.0 + * + * @param {number[]} array - The array of values to get this Vector from. + * @param {number} [offset=0] - The offset index into the array. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + fromArray: function (array, offset) + { + if (offset === undefined) { offset = 0; } + + this.x = array[offset]; + this.y = array[offset + 1]; + this.z = array[offset + 2]; + + 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; + }, + + /** + * Add the given value to each component of this Vector. + * + * @method Phaser.Math.Vector3#addScalar + * @since 3.50.0 + * + * @param {number} s - The amount to add to this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScalar: function (s) + { + this.x += s; + this.y += s; + this.z += s; + + return this; + }, + + /** + * Add and scale a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector3#addScale + * @since 3.50.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. + * @param {number} scale - The amount to scale `v` by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScale: function (v, scale) + { + this.x += v.x * scale; + this.y += v.y * scale; + this.z += v.z * scale || 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; + }, + + /** + * Takes a Matrix3 and applies it to this Vector3. + * + * @method Phaser.Math.Vector3#applyMatrix3 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + applyMatrix3: function (mat3) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat3.val; + + this.x = m[0] * x + m[3] * y + m[6] * z; + this.y = m[1] * x + m[4] * y + m[7] * z; + this.z = m[2] * x + m[5] * y + m[8] * z; + + return this; + }, + + /** + * Takes a Matrix4 and applies it to this Vector3. + * + * @method Phaser.Math.Vector3#applyMatrix4 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + applyMatrix4: function (mat4) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat4.val; + + var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]); + + 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; + + 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 Matrix4. + * + * @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; + }, + + /** + * Multiplies this Vector3 by the given view and projection matrices. + * + * @method Phaser.Math.Vector3#projectViewMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix. + * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + projectViewMatrix: function (viewMatrix, projectionMatrix) + { + return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix); + }, + + /** + * Multiplies this Vector3 by the given inversed projection matrix and world matrix. + * + * @method Phaser.Math.Vector3#unprojectViewMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix. + * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + unprojectViewMatrix: function (projectionMatrix, worldMatrix) + { + return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix); + }, + + /** + * 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; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CheckMatrix = __webpack_require__(26); +var TransposeMatrix = __webpack_require__(60); + +/** + * 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/}. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(27); + +/** + * Determines the browser type and version running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.browser` from within any Scene. + * + * @typedef {object} Phaser.Device.Browser + * @since 3.0.0 + * + * @property {boolean} chrome - Set to true if running in Chrome. + * @property {boolean} edge - Set to true if running in Microsoft Edge browser. + * @property {boolean} firefox - Set to true if running in Firefox. + * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge). + * @property {boolean} mobileSafari - Set to true if running in Mobile Safari. + * @property {boolean} opera - Set to true if running in Opera. + * @property {boolean} safari - Set to true if running in Safari. + * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle) + * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+) + * @property {number} chromeVersion - If running in Chrome this will contain the major version number. + * @property {number} firefoxVersion - If running in Firefox this will contain the major version number. + * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion. + * @property {number} safariVersion - If running in Safari this will contain the major version number. + * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx} + */ +var Browser = { + + chrome: false, + chromeVersion: 0, + edge: false, + firefox: false, + firefoxVersion: 0, + ie: false, + ieVersion: 0, + mobileSafari: false, + opera: false, + safari: false, + safariVersion: 0, + silk: false, + trident: false, + tridentVersion: 0, + es2019: false + +}; + +function init () +{ + var ua = navigator.userAgent; + + if ((/Edg\/\d+/).test(ua)) + { + Browser.edge = true; + Browser.es2019 = true; + } + else if ((/OPR/).test(ua)) { + Browser.opera = true; + Browser.es2019 = true; + } + else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) + { + Browser.chrome = true; + Browser.chromeVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.chromeVersion > 69); + } + else if ((/Firefox\D+(\d+)/).test(ua)) + { + Browser.firefox = true; + Browser.firefoxVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.firefoxVersion > 10); + } + else if ((/AppleWebKit/).test(ua) && OS.iOS) + { + Browser.mobileSafari = true; + } + else if ((/MSIE (\d+\.\d+);/).test(ua)) + { + Browser.ie = true; + Browser.ieVersion = parseInt(RegExp.$1, 10); + } + else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) + { + Browser.safari = true; + Browser.safariVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.safariVersion > 10); + } + else if ((/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/).test(ua)) + { + Browser.ie = true; + Browser.trident = true; + Browser.tridentVersion = parseInt(RegExp.$1, 10); + Browser.ieVersion = parseInt(RegExp.$3, 10); + } + + // Silk gets its own if clause because its ua also contains 'Safari' + if ((/Silk/).test(ua)) + { + Browser.silk = true; + } + + return Browser; +} + +module.exports = init(); + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(6); + +// @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; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(3); + +/** + * 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; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(3); + +/** + * Convert the given angle from degrees, to the equivalent angle in radians. + * + * @function Phaser.Math.DegToRad + * @since 3.0.0 + * + * @param {number} 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; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Vector3 = __webpack_require__(14); + +/** + * @ignore + */ +var EPSILON = 0.000001; + +/** + * @classdesc + * A four-dimensional matrix. + * + * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji + * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + * + * @class Matrix4 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from. + */ +var Matrix4 = new Class({ + + initialize: + + function Matrix4 (m) + { + /** + * The matrix values. + * + * @name Phaser.Math.Matrix4#val + * @type {Float32Array} + * @since 3.0.0 + */ + this.val = new Float32Array(16); + + if (m) + { + // Assume Matrix4 with val: + this.copy(m); + } + else + { + // Default to identity + this.identity(); + } + }, + + /** + * Make a clone of this Matrix4. + * + * @method Phaser.Math.Matrix4#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix4} A clone of this Matrix4. + */ + clone: function () + { + return new Matrix4(this); + }, + + /** + * This method is an alias for `Matrix4.copy`. + * + * @method Phaser.Math.Matrix4#set + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from. + * + * @return {this} This Matrix4. + */ + set: function (src) + { + return this.copy(src); + }, + + /** + * Sets all values of this Matrix4. + * + * @method Phaser.Math.Matrix4#setValues + * @since 3.50.0 + * + * @param {number} m00 - The m00 value. + * @param {number} m01 - The m01 value. + * @param {number} m02 - The m02 value. + * @param {number} m03 - The m03 value. + * @param {number} m10 - The m10 value. + * @param {number} m11 - The m11 value. + * @param {number} m12 - The m12 value. + * @param {number} m13 - The m13 value. + * @param {number} m20 - The m20 value. + * @param {number} m21 - The m21 value. + * @param {number} m22 - The m22 value. + * @param {number} m23 - The m23 value. + * @param {number} m30 - The m30 value. + * @param {number} m31 - The m31 value. + * @param {number} m32 - The m32 value. + * @param {number} m33 - The m33 value. + * + * @return {this} This Matrix4 instance. + */ + setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) + { + var out = this.val; + + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + + return this; + }, + + /** + * Copy the values of a given Matrix into this Matrix. + * + * @method Phaser.Math.Matrix4#copy + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from. + * + * @return {this} This Matrix4. + */ + copy: function (src) + { + var a = src.val; + + return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + }, + + /** + * Set the values of this Matrix from the given array. + * + * @method Phaser.Math.Matrix4#fromArray + * @since 3.0.0 + * + * @param {number[]} a - The array to copy the values from. Must have at least 16 elements. + * + * @return {this} This Matrix4. + */ + fromArray: function (a) + { + return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + }, + + /** + * Reset this Matrix. + * + * Sets all values to `0`. + * + * @method Phaser.Math.Matrix4#zero + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix4} This Matrix4. + */ + zero: function () + { + return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + }, + + /** + * Generates a transform matrix based on the given position, scale and rotation. + * + * @method Phaser.Math.Matrix4#transform + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} position - The position vector. + * @param {Phaser.Math.Vector3} scale - The scale vector. + * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion. + * + * @return {this} This Matrix4. + */ + transform: function (position, scale, rotation) + { + var rotMatrix = _tempMat1.fromQuat(rotation); + + var rm = rotMatrix.val; + + var sx = scale.x; + var sy = scale.y; + var sz = scale.z; + + return this.setValues( + rm[0] * sx, + rm[1] * sx, + rm[2] * sx, + 0, + + rm[4] * sy, + rm[5] * sy, + rm[6] * sy, + 0, + + rm[8] * sz, + rm[9] * sz, + rm[10] * sz, + 0, + + position.x, + position.y, + position.z, + 1 + ); + }, + + /** + * Set the `x`, `y` and `z` values of this Matrix. + * + * @method Phaser.Math.Matrix4#xyz + * @since 3.0.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} z - The z value. + * + * @return {this} This Matrix4. + */ + xyz: function (x, y, z) + { + this.identity(); + + var out = this.val; + + out[12] = x; + out[13] = y; + out[14] = z; + + return this; + }, + + /** + * Set the scaling values of this Matrix. + * + * @method Phaser.Math.Matrix4#scaling + * @since 3.0.0 + * + * @param {number} x - The x scaling value. + * @param {number} y - The y scaling value. + * @param {number} z - The z scaling value. + * + * @return {this} This Matrix4. + */ + scaling: function (x, y, z) + { + this.zero(); + + var out = this.val; + + out[0] = x; + out[5] = y; + out[10] = z; + out[15] = 1; + + return this; + }, + + /** + * Reset this Matrix to an identity (default) matrix. + * + * @method Phaser.Math.Matrix4#identity + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + identity: function () + { + return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + }, + + /** + * Transpose this Matrix. + * + * @method Phaser.Math.Matrix4#transpose + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + transpose: function () + { + var a = this.val; + + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + var a12 = a[6]; + var a13 = a[7]; + var a23 = a[11]; + + a[1] = a[4]; + a[2] = a[8]; + a[3] = a[12]; + a[4] = a01; + a[6] = a[9]; + a[7] = a[13]; + a[8] = a02; + a[9] = a12; + a[11] = a[14]; + a[12] = a03; + a[13] = a13; + a[14] = a23; + + return this; + }, + + /** + * Copies the given Matrix4 into this Matrix and then inverses it. + * + * @method Phaser.Math.Matrix4#getInverse + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4. + * + * @return {this} This Matrix4. + */ + getInverse: function (m) + { + this.copy(m); + + return this.invert(); + }, + + /** + * Invert this Matrix. + * + * @method Phaser.Math.Matrix4#invert + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + invert: function () + { + var a = 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 this; + } + + det = 1 / det; + + return this.setValues( + (a11 * b11 - a12 * b10 + a13 * b09) * det, + (a02 * b10 - a01 * b11 - a03 * b09) * det, + (a31 * b05 - a32 * b04 + a33 * b03) * det, + (a22 * b04 - a21 * b05 - a23 * b03) * det, + (a12 * b08 - a10 * b11 - a13 * b07) * det, + (a00 * b11 - a02 * b08 + a03 * b07) * det, + (a32 * b02 - a30 * b05 - a33 * b01) * det, + (a20 * b05 - a22 * b02 + a23 * b01) * det, + (a10 * b10 - a11 * b08 + a13 * b06) * det, + (a01 * b08 - a00 * b10 - a03 * b06) * det, + (a30 * b04 - a31 * b02 + a33 * b00) * det, + (a21 * b02 - a20 * b04 - a23 * b00) * det, + (a11 * b07 - a10 * b09 - a12 * b06) * det, + (a00 * b09 - a01 * b07 + a02 * b06) * det, + (a31 * b01 - a30 * b03 - a32 * b00) * det, + (a20 * b03 - a21 * b01 + a22 * b00) * det + ); + }, + + /** + * Calculate the adjoint, or adjugate, of this Matrix. + * + * @method Phaser.Math.Matrix4#adjoint + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + adjoint: function () + { + var a = 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]; + + return this.setValues( + (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)), + -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)), + (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)), + -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)), + -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)), + (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)), + -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)), + (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)), + (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)), + -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)), + (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)), + -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)), + -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)), + (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)), + -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)), + (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)) + ); + }, + + /** + * Calculate the determinant of this Matrix. + * + * @method Phaser.Math.Matrix4#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 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 + return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + }, + + /** + * Multiply this Matrix by the given Matrix. + * + * @method Phaser.Math.Matrix4#multiply + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by. + * + * @return {this} This Matrix4. + */ + multiply: function (src) + { + var a = 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 b = src.val; + + // Cache only the current line of the second matrix + var b0 = b[0]; + var b1 = b[1]; + var b2 = b[2]; + var b3 = b[3]; + + a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[4]; + b1 = b[5]; + b2 = b[6]; + b3 = b[7]; + + a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[8]; + b1 = b[9]; + b2 = b[10]; + b3 = b[11]; + + a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[12]; + b1 = b[13]; + b2 = b[14]; + b3 = b[15]; + + a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + return this; + }, + + /** + * 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 - The source Matrix4 that this Matrix4 is multiplied by. + * + * @return {this} This Matrix4. + */ + multiplyLocal: function (src) + { + var a = this.val; + var b = src.val; + + return this.setValues( + a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12], + a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13], + a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14], + a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15], + + a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12], + a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13], + a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14], + a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15], + + a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12], + a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13], + a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14], + a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15], + + a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12], + a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13], + a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14], + a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15] + ); + }, + + /** + * Multiplies the given Matrix4 object with this Matrix. + * + * This is the same as calling `multiplyMatrices(m, this)`. + * + * @method Phaser.Math.Matrix4#premultiply + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one. + * + * @return {this} This Matrix4. + */ + premultiply: function (m) + { + return this.multiplyMatrices(m, this); + }, + + /** + * Multiplies the two given Matrix4 objects and stores the results in this Matrix. + * + * @method Phaser.Math.Matrix4#multiplyMatrices + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply. + * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply. + * + * @return {this} This Matrix4. + */ + multiplyMatrices: function (a, b) + { + var am = a.val; + var bm = b.val; + + var a11 = am[0]; + var a12 = am[4]; + var a13 = am[8]; + var a14 = am[12]; + var a21 = am[1]; + var a22 = am[5]; + var a23 = am[9]; + var a24 = am[13]; + var a31 = am[2]; + var a32 = am[6]; + var a33 = am[10]; + var a34 = am[14]; + var a41 = am[3]; + var a42 = am[7]; + var a43 = am[11]; + var a44 = am[15]; + + var b11 = bm[0]; + var b12 = bm[4]; + var b13 = bm[8]; + var b14 = bm[12]; + var b21 = bm[1]; + var b22 = bm[5]; + var b23 = bm[9]; + var b24 = bm[13]; + var b31 = bm[2]; + var b32 = bm[6]; + var b33 = bm[10]; + var b34 = bm[14]; + var b41 = bm[3]; + var b42 = bm[7]; + var b43 = bm[11]; + var b44 = bm[15]; + + return this.setValues( + a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41, + a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41, + a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41, + a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41, + a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42, + a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42, + a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42, + a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42, + a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43, + a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43, + a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43, + a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43, + a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44, + a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44, + a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44, + a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44 + ); + }, + + /** + * Translate this Matrix using the given Vector. + * + * @method Phaser.Math.Matrix4#translate + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. + * + * @return {this} This Matrix4. + */ + translate: function (v) + { + return this.translateXYZ(v.x, v.y, v.z); + }, + + /** + * 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 {this} 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. + * + * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. + * + * @method Phaser.Math.Matrix4#scale + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. + * + * @return {this} This Matrix4. + */ + scale: function (v) + { + return this.scaleXYZ(v.x, v.y, v.z); + }, + + /** + * 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 {this} 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. + * + * @method Phaser.Math.Matrix4#makeRotationAxis + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis. + * @param {number} angle - The rotation angle in radians. + * + * @return {this} This Matrix4. + */ + makeRotationAxis: function (axis, angle) + { + // Based on http://www.gamedev.net/reference/articles/article1199.asp + + var c = Math.cos(angle); + var s = Math.sin(angle); + var t = 1 - c; + var x = axis.x; + var y = axis.y; + var z = axis.z; + var tx = t * x; + var ty = t * y; + + return this.setValues( + tx * x + c, tx * y - s * z, tx * z + s * y, 0, + tx * y + s * z, ty * y + c, ty * z - s * x, 0, + tx * z - s * y, ty * z + s * x, t * z * z + c, 0, + 0, 0, 0, 1 + ); + }, + + /** + * Apply a rotation transformation to this Matrix. + * + * @method Phaser.Math.Matrix4#rotate + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * @param {Phaser.Math.Vector3} axis - The axis to rotate upon. + * + * @return {this} This Matrix4. + */ + rotate: function (rad, axis) + { + var a = this.val; + var x = axis.x; + var y = axis.y; + var z = axis.z; + var len = Math.sqrt(x * x + y * y + z * z); + + if (Math.abs(len) < EPSILON) + { + return this; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + + var s = Math.sin(rad); + var c = Math.cos(rad); + var t = 1 - c; + + 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]; + + // Construct the elements of the rotation matrix + var b00 = x * x * t + c; + var b01 = y * x * t + z * s; + var b02 = z * x * t - y * s; + + var b10 = x * y * t - z * s; + var b11 = y * y * t + c; + var b12 = z * y * t + x * s; + + var b20 = x * z * t + y * s; + var b21 = y * z * t - x * s; + var b22 = z * z * t + c; + + // Perform rotation-specific matrix multiplication + return this.setValues( + a00 * b00 + a10 * b01 + a20 * b02, + a01 * b00 + a11 * b01 + a21 * b02, + a02 * b00 + a12 * b01 + a22 * b02, + a03 * b00 + a13 * b01 + a23 * b02, + a00 * b10 + a10 * b11 + a20 * b12, + a01 * b10 + a11 * b11 + a21 * b12, + a02 * b10 + a12 * b11 + a22 * b12, + a03 * b10 + a13 * b11 + a23 * b12, + a00 * b20 + a10 * b21 + a20 * b22, + a01 * b20 + a11 * b21 + a21 * b22, + a02 * b20 + a12 * b21 + a22 * b22, + a03 * b20 + a13 * b21 + a23 * b22, + a30, a31, a32, a33 + ); + }, + + /** + * Rotate this matrix on its X axis. + * + * @method Phaser.Math.Matrix4#rotateX + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * + * @return {this} This Matrix4. + */ + rotateX: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + 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]; + + // Perform axis-specific matrix multiplication + a[4] = a10 * c + a20 * s; + a[5] = a11 * c + a21 * s; + a[6] = a12 * c + a22 * s; + a[7] = a13 * c + a23 * s; + a[8] = a20 * c - a10 * s; + a[9] = a21 * c - a11 * s; + a[10] = a22 * c - a12 * s; + a[11] = a23 * c - a13 * s; + + return this; + }, + + /** + * Rotate this matrix on its Y axis. + * + * @method Phaser.Math.Matrix4#rotateY + * @since 3.0.0 + * + * @param {number} rad - The angle to rotate by, in radians. + * + * @return {this} This Matrix4. + */ + rotateY: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + + // Perform axis-specific matrix multiplication + a[0] = a00 * c - a20 * s; + a[1] = a01 * c - a21 * s; + a[2] = a02 * c - a22 * s; + a[3] = a03 * c - a23 * s; + a[8] = a00 * s + a20 * c; + a[9] = a01 * s + a21 * c; + a[10] = a02 * s + a22 * c; + a[11] = a03 * s + a23 * c; + + return this; + }, + + /** + * Rotate this matrix on its Z axis. + * + * @method Phaser.Math.Matrix4#rotateZ + * @since 3.0.0 + * + * @param {number} rad - The angle to rotate by, in radians. + * + * @return {this} This Matrix4. + */ + rotateZ: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + 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]; + + // Perform axis-specific matrix multiplication + a[0] = a00 * c + a10 * s; + a[1] = a01 * c + a11 * s; + a[2] = a02 * c + a12 * s; + a[3] = a03 * c + a13 * s; + a[4] = a10 * c - a00 * s; + a[5] = a11 * c - a01 * s; + a[6] = a12 * c - a02 * s; + a[7] = a13 * c - a03 * s; + + return this; + }, + + /** + * Set the values of this Matrix from the given rotation Quaternion and translation Vector. + * + * @method Phaser.Math.Matrix4#fromRotationTranslation + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from. + * @param {Phaser.Math.Vector3} v - The Vector to set translation from. + * + * @return {this} This Matrix4. + */ + fromRotationTranslation: function (q, v) + { + // Quaternion math + 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; + + return this.setValues( + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + v.x, + v.y, + v.z, + 1 + ); + }, + + /** + * Set the values of this Matrix from the given Quaternion. + * + * @method Phaser.Math.Matrix4#fromQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. + * + * @return {this} This Matrix4. + */ + 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; + + return this.setValues( + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + 0, + 0, + 0, + 1 + ); + }, + + /** + * Generate a frustum matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#frustum + * @since 3.0.0 + * + * @param {number} left - The left bound of the frustum. + * @param {number} right - The right bound of the frustum. + * @param {number} bottom - The bottom bound of the frustum. + * @param {number} top - The top bound of the frustum. + * @param {number} near - The near bound of the frustum. + * @param {number} far - The far bound of the frustum. + * + * @return {this} This Matrix4. + */ + frustum: function (left, right, bottom, top, near, far) + { + var rl = 1 / (right - left); + var tb = 1 / (top - bottom); + var nf = 1 / (near - far); + + return this.setValues( + (near * 2) * rl, + 0, + 0, + 0, + + 0, + (near * 2) * tb, + 0, + 0, + + (right + left) * rl, + (top + bottom) * tb, + (far + near) * nf, + -1, + + 0, + 0, + (far * near * 2) * nf, + 0 + ); + }, + + /** + * Generate a perspective projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#perspective + * @since 3.0.0 + * + * @param {number} fovy - Vertical field of view in radians + * @param {number} aspect - Aspect ratio. Typically viewport width /height. + * @param {number} near - Near bound of the frustum. + * @param {number} far - Far bound of the frustum. + * + * @return {this} This Matrix4. + */ + perspective: function (fovy, aspect, near, far) + { + var f = 1.0 / Math.tan(fovy / 2); + var nf = 1 / (near - far); + + return this.setValues( + f / aspect, + 0, + 0, + 0, + + 0, + f, + 0, + 0, + + 0, + 0, + (far + near) * nf, + -1, + + 0, + 0, + (2 * far * near) * nf, + 0 + ); + }, + + /** + * Generate a perspective projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#perspectiveLH + * @since 3.0.0 + * + * @param {number} width - The width of the frustum. + * @param {number} height - The height of the frustum. + * @param {number} near - Near bound of the frustum. + * @param {number} far - Far bound of the frustum. + * + * @return {this} This Matrix4. + */ + perspectiveLH: function (width, height, near, far) + { + return this.setValues( + (2 * near) / width, + 0, + 0, + 0, + + 0, + (2 * near) / height, + 0, + 0, + + 0, + 0, + -far / (near - far), + 1, + + 0, + 0, + (near * far) / (near - far), + 0 + ); + }, + + /** + * Generate an orthogonal projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#ortho + * @since 3.0.0 + * + * @param {number} left - The left bound of the frustum. + * @param {number} right - The right bound of the frustum. + * @param {number} bottom - The bottom bound of the frustum. + * @param {number} top - The top bound of the frustum. + * @param {number} near - The near bound of the frustum. + * @param {number} far - The far bound of the frustum. + * + * @return {this} This Matrix4. + */ + ortho: function (left, right, bottom, top, near, far) + { + var lr = left - right; + var bt = bottom - top; + var nf = near - far; + + // Avoid division by zero + lr = (lr === 0) ? lr : 1 / lr; + bt = (bt === 0) ? bt : 1 / bt; + nf = (nf === 0) ? nf : 1 / nf; + + return this.setValues( + -2 * lr, + 0, + 0, + 0, + + 0, + -2 * bt, + 0, + 0, + + 0, + 0, + 2 * nf, + 0, + + (left + right) * lr, + (top + bottom) * bt, + (far + near) * nf, + 1 + ); + }, + + /** + * Generate a right-handed look-at matrix with the given eye position, target and up axis. + * + * @method Phaser.Math.Matrix4#lookAtRH + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} eye - Position of the viewer. + * @param {Phaser.Math.Vector3} target - Point the viewer is looking at. + * @param {Phaser.Math.Vector3} up - vec3 pointing up. + * + * @return {this} This Matrix4. + */ + lookAtRH: function (eye, target, up) + { + var m = this.val; + + _z.subVectors(eye, target); + + if (_z.getLengthSquared() === 0) + { + // eye and target are in the same position + _z.z = 1; + } + + _z.normalize(); + _x.crossVectors(up, _z); + + if (_x.getLengthSquared() === 0) + { + // up and z are parallel + + if (Math.abs(up.z) === 1) + { + _z.x += 0.0001; + } + else + { + _z.z += 0.0001; + } + + _z.normalize(); + _x.crossVectors(up, _z); + } + + _x.normalize(); + _y.crossVectors(_z, _x); + + m[0] = _x.x; + m[1] = _x.y; + m[2] = _x.z; + m[4] = _y.x; + m[5] = _y.y; + m[6] = _y.z; + m[8] = _z.x; + m[9] = _z.y; + m[10] = _z.z; + + return this; + }, + + /** + * Generate a look-at matrix with the given eye position, focal point, and up axis. + * + * @method Phaser.Math.Matrix4#lookAt + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} eye - Position of the viewer + * @param {Phaser.Math.Vector3} center - Point the viewer is looking at + * @param {Phaser.Math.Vector3} up - vec3 pointing up. + * + * @return {this} This Matrix4. + */ + lookAt: function (eye, center, up) + { + var eyex = eye.x; + var eyey = eye.y; + var eyez = eye.z; + + var upx = up.x; + var upy = up.y; + var upz = up.z; + + var centerx = center.x; + var centery = center.y; + var centerz = center.z; + + if (Math.abs(eyex - centerx) < EPSILON && + Math.abs(eyey - centery) < EPSILON && + Math.abs(eyez - centerz) < EPSILON) + { + return this.identity(); + } + + var z0 = eyex - centerx; + var z1 = eyey - centery; + var z2 = eyez - centerz; + + var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); + + z0 *= len; + z1 *= len; + z2 *= len; + + var x0 = upy * z2 - upz * z1; + var x1 = upz * z0 - upx * z2; + var x2 = upx * z1 - upy * z0; + + len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); + + if (!len) + { + x0 = 0; + x1 = 0; + x2 = 0; + } + else + { + len = 1 / len; + x0 *= len; + x1 *= len; + x2 *= len; + } + + var y0 = z1 * x2 - z2 * x1; + var y1 = z2 * x0 - z0 * x2; + var y2 = z0 * x1 - z1 * x0; + + len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); + + if (!len) + { + y0 = 0; + y1 = 0; + y2 = 0; + } + else + { + len = 1 / len; + y0 *= len; + y1 *= len; + y2 *= len; + } + + return this.setValues( + x0, + y0, + z0, + 0, + + x1, + y1, + z1, + 0, + + x2, + y2, + z2, + 0, + + -(x0 * eyex + x1 * eyey + x2 * eyez), + -(y0 * eyex + y1 * eyey + y2 * eyez), + -(z0 * eyex + z1 * eyey + z2 * eyez), + 1 + ); + }, + + /** + * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. + * + * @method Phaser.Math.Matrix4#yawPitchRoll + * @since 3.0.0 + * + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. + * + * @return {this} This Matrix4. + */ + yawPitchRoll: function (yaw, pitch, roll) + { + this.zero(); + _tempMat1.zero(); + _tempMat2.zero(); + + var m0 = this.val; + var m1 = _tempMat1.val; + var m2 = _tempMat2.val; + + // Rotate Z + var s = Math.sin(roll); + var c = Math.cos(roll); + + m0[10] = 1; + m0[15] = 1; + m0[0] = c; + m0[1] = s; + m0[4] = -s; + m0[5] = c; + + // Rotate X + s = Math.sin(pitch); + c = Math.cos(pitch); + + m1[0] = 1; + m1[15] = 1; + m1[5] = c; + m1[10] = c; + m1[9] = -s; + m1[6] = s; + + // Rotate Y + s = Math.sin(yaw); + c = Math.cos(yaw); + + m2[5] = 1; + m2[15] = 1; + m2[0] = c; + m2[2] = -s; + m2[8] = s; + m2[10] = c; + + this.multiplyLocal(_tempMat1); + this.multiplyLocal(_tempMat2); + + return this; + }, + + /** + * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. + * + * @method Phaser.Math.Matrix4#setWorldMatrix + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix. + * @param {Phaser.Math.Vector3} position - The position of the world matrix. + * @param {Phaser.Math.Vector3} scale - The scale of the world matrix. + * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix. + * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix. + * + * @return {this} This Matrix4. + */ + setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix) + { + this.yawPitchRoll(rotation.y, rotation.x, rotation.z); + + _tempMat1.scaling(scale.x, scale.y, scale.z); + _tempMat2.xyz(position.x, position.y, position.z); + + this.multiplyLocal(_tempMat1); + this.multiplyLocal(_tempMat2); + + if (viewMatrix) + { + this.multiplyLocal(viewMatrix); + } + + if (projectionMatrix) + { + this.multiplyLocal(projectionMatrix); + } + + return this; + }, + + /** + * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4. + * + * @method Phaser.Math.Matrix4#multiplyToMat4 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one. + * @param {Phaser.Math.Matrix4} out - The receiving Matrix. + * + * @return {Phaser.Math.Matrix4} This `out` Matrix4. + */ + multiplyToMat4: function (src, out) + { + var a = this.val; + var b = src.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 = b[0]; + var b01 = b[1]; + var b02 = b[2]; + var b03 = b[3]; + var b10 = b[4]; + var b11 = b[5]; + var b12 = b[6]; + var b13 = b[7]; + var b20 = b[8]; + var b21 = b[9]; + var b22 = b[10]; + var b23 = b[11]; + var b30 = b[12]; + var b31 = b[13]; + var b32 = b[14]; + var b33 = b[15]; + + return out.setValues( + b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, + b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31, + b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32, + b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33, + + b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, + b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, + b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, + b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, + + b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, + b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, + b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, + b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, + + b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, + b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, + b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, + b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 + ); + }, + + /** + * Takes the rotation and position vectors and builds this Matrix4 from them. + * + * @method Phaser.Math.Matrix4#fromRotationXYTranslation + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} rotation - The rotation vector. + * @param {Phaser.Math.Vector3} position - The position vector. + * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`) + * + * @return {this} This Matrix4. + */ + fromRotationXYTranslation: function (rotation, position, translateFirst) + { + var x = position.x; + var y = position.y; + var z = position.z; + + var sx = Math.sin(rotation.x); + var cx = Math.cos(rotation.x); + + var sy = Math.sin(rotation.y); + var cy = Math.cos(rotation.y); + + var a30 = x; + var a31 = y; + var a32 = z; + + // Rotate X + + var b21 = -sx; + + // Rotate Y + + var c01 = 0 - b21 * sy; + + var c02 = 0 - cx * sy; + + var c21 = b21 * cy; + + var c22 = cx * cy; + + // Translate + if (!translateFirst) + { + // a30 = cy * x + 0 * y + sy * z; + a30 = cy * x + sy * z; + a31 = c01 * x + cx * y + c21 * z; + a32 = c02 * x + sx * y + c22 * z; + } + + return this.setValues( + cy, + c01, + c02, + 0, + 0, + cx, + sx, + 0, + sy, + c21, + c22, + 0, + a30, + a31, + a32, + 1 + ); + }, + + /** + * Returns the maximum axis scale from this Matrix4. + * + * @method Phaser.Math.Matrix4#getMaxScaleOnAxis + * @since 3.50.0 + * + * @return {number} The maximum axis scale. + */ + getMaxScaleOnAxis: function () + { + var m = this.val; + + var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2]; + var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6]; + var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10]; + + return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); + } + +}); + +/** + * @ignore + */ +var _tempMat1 = new Matrix4(); + +/** + * @ignore + */ +var _tempMat2 = new Matrix4(); + +/** + * @ignore + */ +var _x = new Vector3(); + +/** + * @ignore + */ +var _y = new Vector3(); + +/** + * @ignore + */ +var _z = new Vector3(); + +module.exports = Matrix4; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(3); + +/** + * 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 {number} The given angle converted to degrees. + */ +var RadToDeg = function (radians) +{ + return radians * CONST.RAD_TO_DEG; +}; + +module.exports = RadToDeg; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Scenes.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(186), + BOOT: __webpack_require__(187), + CREATE: __webpack_require__(188), + DESTROY: __webpack_require__(189), + PAUSE: __webpack_require__(190), + POST_UPDATE: __webpack_require__(191), + PRE_RENDER: __webpack_require__(192), + PRE_UPDATE: __webpack_require__(193), + READY: __webpack_require__(194), + REMOVED_FROM_SCENE: __webpack_require__(195), + RENDER: __webpack_require__(196), + RESUME: __webpack_require__(197), + SHUTDOWN: __webpack_require__(198), + SLEEP: __webpack_require__(199), + START: __webpack_require__(200), + TRANSITION_COMPLETE: __webpack_require__(201), + TRANSITION_INIT: __webpack_require__(202), + TRANSITION_OUT: __webpack_require__(203), + TRANSITION_START: __webpack_require__(204), + TRANSITION_WAKE: __webpack_require__(205), + UPDATE: __webpack_require__(206), + WAKE: __webpack_require__(207) + +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(9); +var Events = __webpack_require__(46); +var GetFastValue = __webpack_require__(8); +var GetURL = __webpack_require__(47); +var MergeXHRSettings = __webpack_require__(48); +var XHRLoader = __webpack_require__(221); +var XHRSettings = __webpack_require__(49); + +/** + * @classdesc + * The base File class used by all File Types that the Loader can support. + * 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. + * + * @class File + * @memberof Phaser.Loader + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File. + * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type. + */ +var File = new Class({ + + initialize: + + function File (loader, fileConfig) + { + /** + * A reference to the Loader that is going to load this file. + * + * @name Phaser.Loader.File#loader + * @type {Phaser.Loader.LoaderPlugin} + * @since 3.0.0 + */ + this.loader = loader; + + /** + * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. + * + * @name Phaser.Loader.File#cache + * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)} + * @since 3.7.0 + */ + this.cache = GetFastValue(fileConfig, 'cache', false); + + /** + * The file type string (image, json, etc) for sorting within the Loader. + * + * @name Phaser.Loader.File#type + * @type {string} + * @since 3.0.0 + */ + this.type = GetFastValue(fileConfig, 'type', false); + + if (!this.type) + { + throw new Error('Invalid File type: ' + this.type); + } + + /** + * Unique cache key (unique within its file type) + * + * @name Phaser.Loader.File#key + * @type {string} + * @since 3.0.0 + */ + this.key = GetFastValue(fileConfig, 'key', false); + + var loadKey = this.key; + + if (loader.prefix && loader.prefix !== '') + { + this.key = loader.prefix + loadKey; + } + + if (!this.key) + { + throw new Error('Invalid File key: ' + this.key); + } + + var url = GetFastValue(fileConfig, 'url'); + + if (url === undefined) + { + url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); + } + else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) + { + url = loader.path + url; + } + + /** + * The URL of the file, not including baseURL. + * + * 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 {object|string} + * @since 3.0.0 + */ + this.url = url; + + /** + * The final URL this file will load from, including baseURL and path. + * Set automatically when the Loader calls 'load' on this file. + * + * @name Phaser.Loader.File#src + * @type {string} + * @since 3.0.0 + */ + this.src = ''; + + /** + * The merged XHRSettings for this file. + * + * @name Phaser.Loader.File#xhrSettings + * @type {Phaser.Types.Loader.XHRSettingsObject} + * @since 3.0.0 + */ + this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined)); + + if (GetFastValue(fileConfig, 'xhrSettings', false)) + { + this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {})); + } + + /** + * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. + * + * @name Phaser.Loader.File#xhrLoader + * @type {?XMLHttpRequest} + * @since 3.0.0 + */ + this.xhrLoader = null; + + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.File#state + * @type {number} + * @since 3.0.0 + */ + this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING; + + /** + * The total size of this file. + * Set by onProgress and only if loading via XHR. + * + * @name Phaser.Loader.File#bytesTotal + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.bytesTotal = 0; + + /** + * Updated as the file loads. + * Only set if loading via XHR. + * + * @name Phaser.Loader.File#bytesLoaded + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.bytesLoaded = -1; + + /** + * A percentage value between 0 and 1 indicating how much of this file has loaded. + * Only set if loading via XHR. + * + * @name Phaser.Loader.File#percentComplete + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.percentComplete = -1; + + /** + * For CORs based loading. + * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) + * + * @name Phaser.Loader.File#crossOrigin + * @type {(string|undefined)} + * @since 3.0.0 + */ + this.crossOrigin = undefined; + + /** + * The processed file data, stored here after the file has loaded. + * + * @name Phaser.Loader.File#data + * @type {*} + * @since 3.0.0 + */ + this.data = undefined; + + /** + * A config object that can be used by file types to store transitional data. + * + * @name Phaser.Loader.File#config + * @type {*} + * @since 3.0.0 + */ + this.config = GetFastValue(fileConfig, 'config', {}); + + /** + * If this is a multipart file, i.e. an atlas and its json together, then this is a reference + * to the parent MultiFile. Set and used internally by the Loader or specific file types. + * + * @name Phaser.Loader.File#multiFile + * @type {?Phaser.Loader.MultiFile} + * @since 3.7.0 + */ + this.multiFile; + + /** + * Does this file have an associated linked file? Such as an image and a normal map. + * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't + * actually bound by data, where-as a linkFile is. + * + * @name Phaser.Loader.File#linkFile + * @type {?Phaser.Loader.File} + * @since 3.7.0 + */ + this.linkFile; + }, + + /** + * Links this File with another, so they depend upon each other for loading and processing. + * + * @method Phaser.Loader.File#setLink + * @since 3.7.0 + * + * @param {Phaser.Loader.File} fileB - The file to link to this one. + */ + setLink: function (fileB) + { + this.linkFile = fileB; + + fileB.linkFile = this; + }, + + /** + * Resets the XHRLoader instance this file is using. + * + * @method Phaser.Loader.File#resetXHR + * @since 3.0.0 + */ + resetXHR: function () + { + if (this.xhrLoader) + { + this.xhrLoader.onload = undefined; + this.xhrLoader.onerror = undefined; + this.xhrLoader.onprogress = undefined; + } + }, + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + * + * @method Phaser.Loader.File#load + * @since 3.0.0 + */ + load: function () + { + if (this.state === CONST.FILE_POPULATED) + { + // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL + this.loader.nextFile(this, true); + } + else + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) + { + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + // 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 + + this.xhrLoader = XHRLoader(this, this.loader.xhr); + } + } + }, + + /** + * Called when the file finishes loading, is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onLoad + * @since 3.0.0 + * + * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. + * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load. + */ + onLoad: function (xhr, event) + { + var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme) + { + return xhr.responseURL.indexOf(scheme) === 0; + }); + + var localFileOk = (isLocalFile && event.target.status === 0); + + var success = !(event.target && event.target.status !== 200) || localFileOk; + + // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called. + if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) + { + success = false; + } + + this.state = CONST.FILE_LOADED; + + this.resetXHR(); + + this.loader.nextFile(this, success); + }, + + /** + * Called if the file errors while loading, is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onError + * @since 3.0.0 + * + * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. + * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. + */ + onError: function () + { + this.resetXHR(); + + this.loader.nextFile(this, false); + }, + + /** + * Called during the file load progress. Is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onProgress + * @fires Phaser.Loader.Events#FILE_PROGRESS + * @since 3.0.0 + * + * @param {ProgressEvent} event - The DOM ProgressEvent. + */ + onProgress: function (event) + { + if (event.lengthComputable) + { + this.bytesLoaded = event.loaded; + this.bytesTotal = event.total; + + this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1); + + this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete); + } + }, + + /** + * Usually overridden by the FileTypes and is called by Loader.nextFile. + * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. + * + * @method Phaser.Loader.File#onProcess + * @since 3.0.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.onProcessComplete(); + }, + + /** + * Called when the File has completed processing. + * Checks on the state of its multifile, if set. + * + * @method Phaser.Loader.File#onProcessComplete + * @since 3.7.0 + */ + onProcessComplete: function () + { + this.state = CONST.FILE_COMPLETE; + + if (this.multiFile) + { + this.multiFile.onFileComplete(this); + } + + this.loader.fileProcessComplete(this); + }, + + /** + * Called when the File has completed processing but it generated an error. + * Checks on the state of its multifile, if set. + * + * @method Phaser.Loader.File#onProcessError + * @since 3.7.0 + */ + onProcessError: function () + { + // eslint-disable-next-line no-console + console.error('Failed to process file: %s "%s"', this.type, this.key); + + this.state = CONST.FILE_ERRORED; + + if (this.multiFile) + { + this.multiFile.onFileFailed(this); + } + + this.loader.fileProcessComplete(this); + }, + + /** + * Checks if a key matching the one used by this file exists in the target Cache or not. + * This is called automatically by the LoaderPlugin to decide if the file can be safely + * loaded or will conflict. + * + * @method Phaser.Loader.File#hasCacheConflict + * @since 3.7.0 + * + * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`. + */ + hasCacheConflict: function () + { + return (this.cache && this.cache.exists(this.key)); + }, + + /** + * Adds this file to its target cache upon successful loading and processing. + * This method is often overridden by specific file types. + * + * @method Phaser.Loader.File#addToCache + * @since 3.7.0 + */ + addToCache: function () + { + if (this.cache && this.data) + { + this.cache.add(this.key, this.data); + } + }, + + /** + * Called once the file has been added to its cache and is now ready for deletion from the Loader. + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.File#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.7.0 + */ + pendingDestroy: function (data) + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + if (data === undefined) { data = this.data; } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type, data); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); + + this.loader.flagForRemoval(this); + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this File and any references it holds. + * + * @method Phaser.Loader.File#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.loader = null; + this.cache = null; + this.xhrSettings = null; + this.multiFile = null; + this.linkFile = null; + this.data = null; + } + +}); + +/** + * Static method for creating object URL using URL API and setting it as image 'src' attribute. + * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. + * + * @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. + */ +File.createObjectURL = function (image, blob, defaultType) +{ + if (typeof URL === 'function') + { + image.src = URL.createObjectURL(blob); + } + else + { + var reader = new FileReader(); + + reader.onload = function () + { + image.removeAttribute('crossOrigin'); + image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1]; + }; + + reader.onerror = image.onerror; + + reader.readAsDataURL(blob); + } +}; + +/** + * Static method for releasing an existing object URL which was previously created + * by calling {@link File#createObjectURL} method. + * + * @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) +{ + if (typeof URL === 'function') + { + URL.revokeObjectURL(image.src); + } +}; + +module.exports = File; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var types = {}; + +/** + * @namespace Phaser.Loader.FileTypesManager + */ + +var FileTypesManager = { + + /** + * Static method called when a LoaderPlugin is created. + * + * Loops through the local types object and injects all of them as + * properties into the LoaderPlugin instance. + * + * @method Phaser.Loader.FileTypesManager.install + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. + */ + install: function (loader) + { + for (var key in types) + { + loader[key] = types[key]; + } + }, + + /** + * Static method called directly by the File Types. + * + * The key is a reference to the function used to load the files via the Loader, i.e. `image`. + * + * @method Phaser.Loader.FileTypesManager.register + * @since 3.0.0 + * + * @param {string} key - The key that will be used as the method name in the LoaderPlugin. + * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. + */ + register: function (key, factoryFunction) + { + types[key] = factoryFunction; + }, + + /** + * Removed all associated file types. + * + * @method Phaser.Loader.FileTypesManager.destroy + * @since 3.0.0 + */ + destroy: function () + { + types = {}; + } + +}; + +module.exports = FileTypesManager; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. This is an example matrix: + * + * ``` + * [ + * [ 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) || !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; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the operating system of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.os` from within any Scene. + * + * @typedef {object} Phaser.Device.OS + * @since 3.0.0 + * + * @property {boolean} android - Is running on android? + * @property {boolean} chromeOS - Is running on chromeOS? + * @property {boolean} cordova - Is the game running under Apache Cordova? + * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK? + * @property {boolean} desktop - Is running on a desktop? + * @property {boolean} ejecta - Is the game running under Ejecta? + * @property {boolean} electron - Is the game running under GitHub Electron? + * @property {boolean} iOS - Is running on iOS? + * @property {boolean} iPad - Is running on iPad? + * @property {boolean} iPhone - Is running on iPhone? + * @property {boolean} kindle - Is running on an Amazon Kindle? + * @property {boolean} linux - Is running on linux? + * @property {boolean} macOS - Is running on macOS? + * @property {boolean} node - Is the game running under Node.js? + * @property {boolean} nodeWebkit - Is the game running under Node-Webkit? + * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView + * @property {boolean} windows - Is running on windows? + * @property {boolean} windowsPhone - Is running on a Windows Phone? + * @property {number} iOSVersion - If running in iOS this will contain the major version number. + * @property {number} pixelRatio - PixelRatio of the host device? + */ +var OS = { + + android: false, + chromeOS: false, + cordova: false, + crosswalk: false, + desktop: false, + ejecta: false, + electron: false, + iOS: false, + iOSVersion: 0, + iPad: false, + iPhone: false, + kindle: false, + linux: false, + macOS: false, + node: false, + nodeWebkit: false, + pixelRatio: 1, + webApp: false, + windows: false, + windowsPhone: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return OS; + } + + var ua = navigator.userAgent; + + if ((/Windows/).test(ua)) + { + OS.windows = true; + } + else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua))) + { + // Because iOS 13 identifies as Mac OS: + if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2) + { + OS.iOS = true; + OS.iPad = true; + + (navigator.appVersion).match(/Version\/(\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + } + else + { + OS.macOS = true; + } + } + else if ((/Android/).test(ua)) + { + OS.android = true; + } + else if ((/Linux/).test(ua)) + { + OS.linux = true; + } + else if ((/iP[ao]d|iPhone/i).test(ua)) + { + OS.iOS = true; + + (navigator.appVersion).match(/OS (\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + + OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1; + OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1; + } + else if ((/Kindle/).test(ua) || (/\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua)) + { + OS.kindle = true; + + // This will NOT detect early generations of Kindle Fire, I think there is no reliable way... + // E.g. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true" + } + else if ((/CrOS/).test(ua)) + { + OS.chromeOS = true; + } + + if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua)) + { + OS.android = false; + OS.iOS = false; + OS.macOS = false; + OS.windows = true; + OS.windowsPhone = true; + } + + var silk = (/Silk/).test(ua); + + if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS) + { + OS.desktop = true; + } + + // Windows Phone / Table reset + if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua)))) + { + OS.desktop = false; + } + + // WebApp mode in iOS + if (navigator.standalone) + { + OS.webApp = true; + } + + if (typeof importScripts !== 'function') + { + if (window.cordova !== undefined) + { + OS.cordova = true; + } + + if (window.ejecta !== undefined) + { + OS.ejecta = true; + } + } + + if (typeof process !== 'undefined' && process.versions && process.versions.node) + { + OS.node = true; + } + + if (OS.node && typeof process.versions === 'object') + { + OS.nodeWebkit = !!process.versions['node-webkit']; + + OS.electron = !!process.versions.electron; + } + + if ((/Crosswalk/).test(ua)) + { + OS.crosswalk = true; + } + + OS.pixelRatio = window['devicePixelRatio'] || 1; + + return OS; +} + +module.exports = init(); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(298))) + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Contains = __webpack_require__(316); +var GetPoint = __webpack_require__(65); +var GetPoints = __webpack_require__(317); +var GEOM_CONST = __webpack_require__(29); +var Line = __webpack_require__(318); +var Random = __webpack_require__(323); + +/** + * @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 {number} + * @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 {number} 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; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {number} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {number} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {number} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {number} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {number} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {number} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MathWrap = __webpack_require__(13); + +/** + * 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; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Wrap = __webpack_require__(13); + +/** + * 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; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Factorial = __webpack_require__(36); + +/** + * 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; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(2); + +/** + * 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; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 Matrix3 = __webpack_require__(44); +var NOOP = __webpack_require__(1); +var Vector3 = __webpack_require__(14); + +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=0] - The x component. + * @param {number} [y=0] - The y component. + * @param {number} [z=0] - The z component. + * @param {number} [w=1] - 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 + * @private + * @since 3.50.0 + */ + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_y + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_z + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_w + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * This callback is invoked, if set, each time a value in this quaternion is changed. + * The callback is passed one argument, a reference to this quaternion. + * + * @name Phaser.Math.Quaternion#onChangeCallback + * @type {function} + * @since 3.50.0 + */ + this.onChangeCallback = NOOP; + + this.set(x, y, z, w); + }, + + /** + * The x component of this Quaternion. + * + * @name Phaser.Math.Quaternion#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + x: { + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + + this.onChangeCallback(this); + } + }, + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + y: { + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + + this.onChangeCallback(this); + } + }, + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + z: { + get: function () + { + return this._z; + }, + + set: function (value) + { + this._z = value; + + this.onChangeCallback(this); + } + }, + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + w: { + get: function () + { + return this._w; + }, + + set: function (value) + { + this._w = value; + + this.onChangeCallback(this); + } + }, + + /** + * 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) + { + return this.set(src); + }, + + /** + * Set the components of this Quaternion and optionally call the `onChangeCallback`. + * + * @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. + * @param {boolean} [update=true] - Call the `onChangeCallback`? + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + set: function (x, y, z, w, update) + { + if (update === undefined) { update = true; } + + 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; + } + + if (update) + { + this.onChangeCallback(this); + } + + 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; + + this.onChangeCallback(this); + + 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; + + this.onChangeCallback(this); + + 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; + + this.onChangeCallback(this); + + 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; + } + + this.onChangeCallback(this); + + 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; + + return this.set( + ax + t * (v.x - ax), + ay + t * (v.y - ay), + az + t * (v.z - az), + aw + t * (v.w - aw) + ); + }, + + /** + * 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) + { + return this.set(0, 0, 0, 1); + } + 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 () + { + return this.set(0, 0, 0, 1); + }, + + /** + * 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); + + return this.set( + s * axis.x, + s * axis.y, + s * axis.z, + Math.cos(rad) + ); + }, + + /** + * 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; + + return this.set( + ax * bw + aw * bx + ay * bz - az * by, + ay * bw + aw * by + az * bx - ax * bz, + az * bw + aw * bz + ax * by - ay * bx, + aw * bw - ax * bx - ay * by - az * bz + ); + }, + + /** + * 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 + return this.set( + scale0 * ax + scale1 * bx, + scale0 * ay + scale1 * by, + scale0 * az + scale1 * bz, + scale0 * aw + scale1 * bw + ); + }, + + /** + * 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; + + return this.set( + -a0 * invDot, + -a1 * invDot, + -a2 * invDot, + a3 * invDot + ); + }, + + /** + * 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; + + this.onChangeCallback(this); + + 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); + + return this.set( + ax * bw + aw * bx, + ay * bw + az * bx, + az * bw - ay * bx, + aw * bw - ax * bx + ); + }, + + /** + * 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); + + return this.set( + ax * bw - az * by, + ay * bw + aw * by, + az * bw + ax * by, + aw * bw - ay * by + ); + }, + + /** + * 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); + + return this.set( + ax * bw + ay * bz, + ay * bw - ax * bz, + az * bw + aw * bz, + aw * bw - az * bz + ); + }, + + /** + * 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; + }, + + /** + * Set this Quaternion from the given Euler, based on Euler order. + * + * @method Phaser.Math.Quaternion#setFromEuler + * @since 3.50.0 + * + * @param {Phaser.Math.Euler} euler - The Euler to convert from. + * @param {boolean} [update=true] - Run the `onChangeCallback`? + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setFromEuler: function (euler, update) + { + var x = euler.x / 2; + var y = euler.y / 2; + var z = euler.z / 2; + + var c1 = Math.cos(x); + var c2 = Math.cos(y); + var c3 = Math.cos(z); + + var s1 = Math.sin(x); + var s2 = Math.sin(y); + var s3 = Math.sin(z); + + switch (euler.order) + { + case 'XYZ': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'YXZ': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + + case 'ZXY': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'ZYX': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + + case 'YZX': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'XZY': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + } + + return this; + }, + + /** + * Sets the rotation of this Quaternion from the given Matrix4. + * + * @method Phaser.Math.Quaternion#setFromRotationMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setFromRotationMatrix: function (mat4) + { + var m = mat4.val; + + var m11 = m[0]; + var m12 = m[4]; + var m13 = m[8]; + var m21 = m[1]; + var m22 = m[5]; + var m23 = m[9]; + var m31 = m[2]; + var m32 = m[6]; + var m33 = m[10]; + + var trace = m11 + m22 + m33; + var s; + + if (trace > 0) + { + s = 0.5 / Math.sqrt(trace + 1.0); + + this.set( + (m32 - m23) * s, + (m13 - m31) * s, + (m21 - m12) * s, + 0.25 / s + ); + } + else if (m11 > m22 && m11 > m33) + { + s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); + + this.set( + 0.25 * s, + (m12 + m21) / s, + (m13 + m31) / s, + (m32 - m23) / s + ); + } + else if (m22 > m33) + { + s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); + + this.set( + (m12 + m21) / s, + 0.25 * s, + (m23 + m32) / s, + (m13 - m31) / s + ); + } + else + { + s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); + + this.set( + (m13 + m31) / s, + (m23 + m32) / s, + 0.25 * s, + (m21 - m12) / s + ); + } + + 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; + } + + this.onChangeCallback(this); + + return this; + } + +}); + +module.exports = Quaternion; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Loader.Events + */ + +module.exports = { + + ADD: __webpack_require__(211), + COMPLETE: __webpack_require__(212), + FILE_COMPLETE: __webpack_require__(213), + FILE_KEY_COMPLETE: __webpack_require__(214), + FILE_LOAD_ERROR: __webpack_require__(215), + FILE_LOAD: __webpack_require__(216), + FILE_PROGRESS: __webpack_require__(217), + POST_PROCESS: __webpack_require__(218), + PROGRESS: __webpack_require__(219), + START: __webpack_require__(220) + +}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a File and a baseURL value this returns the URL the File will use to download from. + * + * @function Phaser.Loader.GetURL + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - The File object. + * @param {string} baseURL - A default base URL. + * + * @return {string} The URL the File will use. + */ +var GetURL = function (file, baseURL) +{ + if (!file.url) + { + return false; + } + + if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) + { + return file.url; + } + else + { + return baseURL + file.url; + } +}; + +module.exports = GetURL; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Extend = __webpack_require__(17); +var XHRSettings = __webpack_require__(49); + +/** + * Takes two XHRSettings Objects and creates a new XHRSettings object from them. + * + * The new object is seeded by the values given in the global settings, but any setting in + * the local object overrides the global ones. + * + * @function Phaser.Loader.MergeXHRSettings + * @since 3.0.0 + * + * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object. + * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object. + * + * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object. + */ +var MergeXHRSettings = function (global, local) +{ + var output = (global === undefined) ? XHRSettings() : Extend({}, global); + + if (local) + { + for (var setting in local) + { + if (local[setting] !== undefined) + { + output[setting] = local[setting]; + } + } + } + + return output; +}; + +module.exports = MergeXHRSettings; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Creates an XHRSettings Object with default values. + * + * @function Phaser.Loader.XHRSettings + * @since 3.0.0 + * + * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'. + * @param {boolean} [async=true] - Should the XHR request use async or not? + * @param {string} [user=''] - Optional username for the XHR request. + * @param {string} [password=''] - Optional password for the XHR request. + * @param {number} [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, 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. + // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". + + return { + + // Ignored by the Loader, only used by File. + responseType: responseType, + + async: async, + + // credentials + user: user, + password: password, + + // timeout in ms (0 = no timeout) + timeout: timeout, + + // setRequestHeader + headers: undefined, + header: undefined, + headerValue: undefined, + requestedWith: false, + + // overrideMimeType + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials + + }; +}; + +module.exports = XHRSettings; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @private + * @default 0 + * @since 3.0.0 + */ + _depth: 0, + + /** + * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type. + * + * 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) + { + if (this.displayList) + { + this.displayList.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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type. + * + * @return {this} This Game Object instance. + */ + setDepth: function (value) + { + if (value === undefined) { value = 0; } + + this.depth = value; + + return this; + } + +}; + +module.exports = Depth; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(3); +var TransformMatrix = __webpack_require__(55); +var TransformXY = __webpack_require__(43); +var WrapAngle = __webpack_require__(32); +var WrapAngleDegrees = __webpack_require__(33); +var Vector2 = __webpack_require__(2); + +// 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 = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Transform#hasTransformComponent + * @type {boolean} + * @readonly + * @default true + * @since 3.60.0 + */ + hasTransformComponent: true, + + /** + * 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 {number} + * @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; + }, + + /** + * Copies an object's coordinates to this Game Object's position. + * + * @method Phaser.GameObjects.Components.Transform#copyPosition + * @since 3.50.0 + * + * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. + * + * @return {this} This Game Object instance. + */ + copyPosition: function (source) + { + if (source.x !== undefined) { this.x = source.x; } + if (source.y !== undefined) { this.y = source.y; } + if (source.z !== undefined) { this.z = source.z; } + if (source.w !== undefined) { this.w = source.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; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var MATH_CONST = __webpack_require__(3); +var Vector2 = __webpack_require__(2); + +/** + * @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 temporary quad value cache. + * + * @name Phaser.GameObjects.Components.TransformMatrix#quad + * @type {Float32Array} + * @since 3.60.0 + */ + this.quad = new Float32Array(8); + }, + + /** + * 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) ? matrix : out.matrix; + + destinationMatrix[0] = (sourceA * localA) + (sourceB * localC); + destinationMatrix[1] = (sourceA * localB) + (sourceB * localD); + destinationMatrix[2] = (sourceC * localA) + (sourceD * localC); + destinationMatrix[3] = (sourceC * localB) + (sourceD * localD); + destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. + * + * @return {Phaser.Types.Math.Vector2Like} 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; + }, + + /** + * Performs the 8 calculations required to create the vertices of + * a quad based on this matrix and the given x/y/xw/yh values. + * + * The result is stored in `TransformMatrix.quad`, which is returned + * from this method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setQuad + * @since 3.60.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} xw - The xw value. + * @param {number} yh - The yh value. + * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. + * + * @return {Float32Array} The quad Float32Array. + */ + setQuad: function (x, y, xw, yh, roundPixels, quad) + { + if (quad === undefined) { quad = this.quad; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var e = matrix[4]; + var f = matrix[5]; + + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; + + if (roundPixels) + { + quad.forEach(function (value, index) + { + quad[index] = Math.round(value); + }); + } + + return quad; + }, + + /** + * 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.quad = null; + this.decomposedMatrix = null; + } + +}); + +module.exports = TransformMatrix; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var ComponentsToJSON = __webpack_require__(58); +var DataManager = __webpack_require__(226); +var EventEmitter = __webpack_require__(233); +var Events = __webpack_require__(59); +var SceneEvents = __webpack_require__(23); + +/** + * @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); + + /** + * A reference to the Scene to which this Game Object belongs. + * + * Game Objects can only belong to one Scene. + * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + * + * @name Phaser.GameObjects.GameObject#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene = scene; + + /** + * Holds a reference to the Display List that contains this Game Object. + * + * This is set automatically when this Game Object is added to a Scene or Layer. + * + * You should treat this property as being read-only. + * + * @name Phaser.GameObjects.GameObject#displayList + * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} + * @default null + * @since 3.50.0 + */ + this.displayList = null; + + /** + * 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 {(number|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 {number} + * @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 {number} + * @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; + + this.on(Events.ADDED_TO_SCENE, this.addedToScene, this); + this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this); + + // 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 {(number|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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 () + { + this.scene.sys.input.disable(this); + + 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) + { + var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; + + return !(!listWillRender || 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 {number[]} 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)); + + child = parent; + + if (!parent.parentContainer) + { + break; + } + else + { + parent = parent.parentContainer; + } + } + + if (this.displayList) + { + indexes.unshift(this.displayList.getIndex(child)); + } + else + { + indexes.unshift(this.scene.sys.displayList.getIndex(child)); + } + + return indexes; + }, + + /** + * Adds this Game Object to the given Display List. + * + * If no Display List is specified, it will default to the Display List owned by the Scene to which + * this Game Object belongs. + * + * A Game Object can only exist on one Display List at any given time, but may move freely between them. + * + * If this Game Object is already on another Display List when this method is called, it will first + * be removed from it, before being added to the new list. + * + * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. + * + * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly + * disable it from rendering, consider using the `setVisible` method, instead. + * + * @method Phaser.GameObjects.GameObject#addToDisplayList + * @fires Phaser.Scenes.Events#ADDED_TO_SCENE + * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.53.0 + * + * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List. + * + * @return {this} This Game Object. + */ + addToDisplayList: function (displayList) + { + if (displayList === undefined) { displayList = this.scene.sys.displayList; } + + if (this.displayList && this.displayList !== displayList) + { + this.removeFromDisplayList(); + } + + // Don't repeat if it's already on this list + if (!displayList.exists(this)) + { + this.displayList = displayList; + + displayList.add(this, true); + + displayList.queueDepthSort(); + + this.emit(Events.ADDED_TO_SCENE, this, this.scene); + + displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene); + } + + return this; + }, + + /** + * Adds this Game Object to the Update List belonging to the Scene. + * + * When a Game Object is added to the Update List it will have its `preUpdate` method called + * every game frame. This method is passed two parameters: `delta` and `time`. + * + * If you wish to run your own logic within `preUpdate` then you should always call + * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, + * such as Sprite animations. + * + * @method Phaser.GameObjects.GameObject#addToUpdateList + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + addToUpdateList: function () + { + if (this.scene && this.preUpdate) + { + this.scene.sys.updateList.add(this); + } + + return this; + }, + + /** + * Removes this Game Object from the Display List it is currently on. + * + * A Game Object can only exist on one Display List at any given time, but may move freely removed + * and added back at a later stage. + * + * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. + * + * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly + * disable it from rendering, consider using the `setVisible` method, instead. + * + * @method Phaser.GameObjects.GameObject#removeFromDisplayList + * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + removeFromDisplayList: function () + { + var displayList = this.displayList || this.scene.sys.displayList; + + if (displayList && displayList.exists(this)) + { + displayList.remove(this, true); + + displayList.queueDepthSort(); + + this.displayList = null; + + this.emit(Events.REMOVED_FROM_SCENE, this, this.scene); + + displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene); + } + + return this; + }, + + /** + * Removes this Game Object from the Scene's Update List. + * + * When a Game Object is on the Update List, it will have its `preUpdate` method called + * every game frame. Calling this method will remove it from the list, preventing this. + * + * Removing a Game Object from the Update List will stop most internal functions working. + * For example, removing a Sprite from the Update List will prevent it from being able to + * run animations. + * + * @method Phaser.GameObjects.GameObject#removeFromUpdateList + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + removeFromUpdateList: function () + { + if (this.scene && this.preUpdate) + { + this.scene.sys.updateList.remove(this); + } + + return this; + }, + + /** + * 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] - `True` if this Game Object is being destroyed by the Scene, `false` if not. + */ + destroy: function (fromScene) + { + // This Game Object has already been destroyed + if (!this.scene || this.ignoreDestroy) + { + return; + } + + if (fromScene === undefined) { fromScene = false; } + + if (this.preDestroy) + { + this.preDestroy.call(this); + } + + this.emit(Events.DESTROY, this, fromScene); + + this.removeAllListeners(); + + if (this.postPipelines) + { + this.resetPostPipeline(true); + } + + this.removeFromDisplayList(); + this.removeFromUpdateList(); + + if (this.input) + { + this.scene.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; + } + + this.active = false; + this.visible = false; + + this.scene = undefined; + this.parentContainer = undefined; + } + +}); + +/** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * + * @constant {number} RENDER_MASK + * @memberof Phaser.GameObjects.GameObject + * @default + */ +GameObject.RENDER_MASK = 15; + +module.exports = GameObject; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(234), + DESTROY: __webpack_require__(235), + REMOVED_FROM_SCENE: __webpack_require__(236), + VIDEO_COMPLETE: __webpack_require__(237), + VIDEO_CREATED: __webpack_require__(238), + VIDEO_ERROR: __webpack_require__(239), + VIDEO_LOOP: __webpack_require__(240), + VIDEO_PLAY: __webpack_require__(241), + VIDEO_SEEKED: __webpack_require__(242), + VIDEO_SEEKING: __webpack_require__(243), + VIDEO_STOP: __webpack_require__(244), + VIDEO_TIMEOUT: __webpack_require__(245), + VIDEO_UNLOCKED: __webpack_require__(246) + +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(300); +var Smoothing = __webpack_require__(302); + +// The pool into which the canvas elements are placed. +var pool = []; + +// Automatically apply smoothing(false) to created Canvas elements +var _disableContextSmoothing = false; + +/** + * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements. + * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, + * which is useless for some of the Phaser pipelines / renderer. + * + * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created. + * Which means all instances of Phaser Games on the same page can share the one single pool. + * + * @namespace Phaser.Display.Canvas.CanvasPool + * @since 3.0.0 + */ +var CanvasPool = function () +{ + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent? + * + * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool + */ + var create = function (parent, width, height, canvasType, selfParent) + { + if (width === undefined) { width = 1; } + if (height === undefined) { height = 1; } + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + if (selfParent === undefined) { selfParent = false; } + + var canvas; + var container = first(canvasType); + + if (container === null) + { + container = { + parent: parent, + canvas: document.createElement('canvas'), + type: canvasType + }; + + if (canvasType === CONST.CANVAS) + { + pool.push(container); + } + + canvas = container.canvas; + } + else + { + container.parent = parent; + + canvas = container.canvas; + } + + if (selfParent) + { + container.parent = canvas; + } + + canvas.width = width; + canvas.height = height; + + if (_disableContextSmoothing && canvasType === CONST.CANVAS) + { + Smoothing.disable(canvas.getContext('2d')); + } + + return canvas; + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create2D + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created canvas. + */ + var create2D = function (parent, width, height) + { + return create(parent, width, height, CONST.CANVAS); + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.createWebGL + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created WebGL canvas. + */ + var createWebGL = function (parent, width, height) + { + return create(parent, width, height, CONST.WEBGL); + }; + + /** + * Gets the first free canvas index from the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.first + * @since 3.0.0 + * + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * + * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases. + */ + var first = function (canvasType) + { + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + + if (canvasType === CONST.WEBGL) + { + return null; + } + + for (var i = 0; i < pool.length; i++) + { + var container = pool[i]; + + if (!container.parent && container.type === canvasType) + { + return container; + } + } + + return null; + }; + + /** + * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use. + * The canvas has its width and height set to 1, and its parent attribute nulled. + * + * @function Phaser.Display.Canvas.CanvasPool.remove + * @since 3.0.0 + * + * @param {*} parent - The canvas or the parent of the canvas to free. + */ + var remove = function (parent) + { + // Check to see if the parent is a canvas object + var isCanvas = parent instanceof HTMLCanvasElement; + + pool.forEach(function (container) + { + if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent)) + { + container.parent = null; + container.canvas.width = 1; + container.canvas.height = 1; + } + }); + }; + + /** + * Gets the total number of used canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.total + * @since 3.0.0 + * + * @return {number} The number of used canvases. + */ + var total = function () + { + var c = 0; + + pool.forEach(function (container) + { + if (container.parent) + { + c++; + } + }); + + return c; + }; + + /** + * Gets the total number of free canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.free + * @since 3.0.0 + * + * @return {number} The number of free canvases. + */ + var free = function () + { + return pool.length - total(); + }; + + /** + * Disable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing + * @since 3.0.0 + */ + var disableSmoothing = function () + { + _disableContextSmoothing = true; + }; + + /** + * Enable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing + * @since 3.0.0 + */ + var enableSmoothing = function () + { + _disableContextSmoothing = false; + }; + + return { + create2D: create2D, + create: create, + createWebGL: createWebGL, + disableSmoothing: disableSmoothing, + enableSmoothing: enableSmoothing, + first: first, + free: free, + pool: pool, + remove: remove, + total: total + }; +}; + +// If we export the called function here, it'll only be invoked once (not every time it's required). +module.exports = CanvasPool(); + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(66); +var Point = __webpack_require__(11); + +/** + * 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; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Clamp = __webpack_require__(4); +var Extend = __webpack_require__(17); + +/** + * @classdesc + * A Frame is a section of a Texture. + * + * @class Frame + * @memberof Phaser.Textures + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of. + * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture. + * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of. + * @param {number} x - The x coordinate of the top-left of this Frame. + * @param {number} y - The y coordinate of the top-left of this Frame. + * @param {number} width - The width of this Frame. + * @param {number} height - The height of this Frame. + */ +var Frame = new Class({ + + initialize: + + function Frame (texture, name, sourceIndex, x, y, width, height) + { + /** + * The Texture this Frame is a part of. + * + * @name Phaser.Textures.Frame#texture + * @type {Phaser.Textures.Texture} + * @since 3.0.0 + */ + this.texture = texture; + + /** + * The name of this Frame. + * The name is unique within the Texture. + * + * @name Phaser.Textures.Frame#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The TextureSource this Frame is part of. + * + * @name Phaser.Textures.Frame#source + * @type {Phaser.Textures.TextureSource} + * @since 3.0.0 + */ + this.source = texture.source[sourceIndex]; + + /** + * The index of the TextureSource in the Texture sources array. + * + * @name Phaser.Textures.Frame#sourceIndex + * @type {number} + * @since 3.0.0 + */ + this.sourceIndex = sourceIndex; + + /** + * A reference to the Texture Source WebGL Texture that this Frame is using. + * + * @name Phaser.Textures.Frame#glTexture + * @type {?WebGLTexture} + * @default null + * @since 3.11.0 + */ + this.glTexture = this.source.glTexture; + + /** + * X position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutX + * @type {number} + * @since 3.0.0 + */ + this.cutX; + + /** + * Y position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutY + * @type {number} + * @since 3.0.0 + */ + this.cutY; + + /** + * The width of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutWidth + * @type {number} + * @since 3.0.0 + */ + this.cutWidth; + + /** + * The height of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutHeight + * @type {number} + * @since 3.0.0 + */ + this.cutHeight; + + /** + * The X rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The Y rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The rendering width of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#width + * @type {number} + * @since 3.0.0 + */ + this.width; + + /** + * The rendering height of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#height + * @type {number} + * @since 3.0.0 + */ + this.height; + + /** + * Half the width, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfWidth + * @type {number} + * @since 3.0.0 + */ + this.halfWidth; + + /** + * Half the height, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfHeight + * @type {number} + * @since 3.0.0 + */ + this.halfHeight; + + /** + * The x center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerX + * @type {number} + * @since 3.0.0 + */ + this.centerX; + + /** + * The y center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerY + * @type {number} + * @since 3.0.0 + */ + this.centerY; + + /** + * The horizontal pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotX = 0; + + /** + * The vertical pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotY = 0; + + /** + * Does this Frame have a custom pivot point? + * + * @name Phaser.Textures.Frame#customPivot + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.customPivot = false; + + /** + * **CURRENTLY UNSUPPORTED** + * + * Is this frame is rotated or not in the Texture? + * Rotation allows you to use rotated frames in texture atlas packing. + * It has nothing to do with Sprite rotation. + * + * @name Phaser.Textures.Frame#rotated + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.rotated = false; + + /** + * Over-rides the Renderer setting. + * -1 = use Renderer Setting + * 0 = No rounding + * 1 = Round + * + * @name Phaser.Textures.Frame#autoRound + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.autoRound = -1; + + /** + * Any Frame specific custom data can be stored here. + * + * @name Phaser.Textures.Frame#customData + * @type {object} + * @since 3.0.0 + */ + this.customData = {}; + + /** + * WebGL UV u0 value. + * + * @name Phaser.Textures.Frame#u0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u0 = 0; + + /** + * WebGL UV v0 value. + * + * @name Phaser.Textures.Frame#v0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v0 = 0; + + /** + * WebGL UV u1 value. + * + * @name Phaser.Textures.Frame#u1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u1 = 0; + + /** + * WebGL UV v1 value. + * + * @name Phaser.Textures.Frame#v1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v1 = 0; + + /** + * The un-modified source frame, trim and UV data. + * + * @name Phaser.Textures.Frame#data + * @type {object} + * @private + * @since 3.0.0 + */ + this.data = { + cut: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + trim: false, + sourceSize: { + w: 0, + h: 0 + }, + spriteSourceSize: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + radius: 0, + drawImage: { + x: 0, + y: 0, + width: 0, + height: 0 + } + }; + + this.setSize(width, height, x, y); + }, + + /** + * Sets the width, height, x and y of this Frame. + * + * This is called automatically by the constructor + * and should rarely be changed on-the-fly. + * + * @method Phaser.Textures.Frame#setSize + * @since 3.7.0 + * + * @param {number} width - The width of the frame before being trimmed. + * @param {number} height - The height of the frame before being trimmed. + * @param {number} [x=0] - The x coordinate of the top-left of this Frame. + * @param {number} [y=0] - The y coordinate of the top-left of this Frame. + * + * @return {this} This Frame object. + */ + setSize: function (width, height, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.cutX = x; + this.cutY = y; + this.cutWidth = width; + this.cutHeight = height; + + this.width = width; + this.height = height; + + this.halfWidth = Math.floor(width * 0.5); + this.halfHeight = Math.floor(height * 0.5); + + this.centerX = Math.floor(width / 2); + this.centerY = Math.floor(height / 2); + + var data = this.data; + var cut = data.cut; + + cut.x = x; + cut.y = y; + cut.w = width; + cut.h = height; + cut.r = x + width; + cut.b = y + height; + + data.sourceSize.w = width; + data.sourceSize.h = height; + + data.spriteSourceSize.w = width; + data.spriteSourceSize.h = height; + + data.radius = 0.5 * Math.sqrt(width * width + height * height); + + var drawImage = data.drawImage; + + drawImage.x = x; + drawImage.y = y; + drawImage.width = width; + drawImage.height = height; + + return this.updateUVs(); + }, + + /** + * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data. + * + * @method Phaser.Textures.Frame#setTrim + * @since 3.0.0 + * + * @param {number} actualWidth - The width of the frame before being trimmed. + * @param {number} actualHeight - The height of the frame before being trimmed. + * @param {number} destX - The destination X position of the trimmed frame for display. + * @param {number} destY - The destination Y position of the trimmed frame for display. + * @param {number} destWidth - The destination width of the trimmed frame for display. + * @param {number} destHeight - The destination height of the trimmed frame for display. + * + * @return {this} This Frame object. + */ + setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight) + { + var data = this.data; + var ss = data.spriteSourceSize; + + // Store actual values + + data.trim = true; + + data.sourceSize.w = actualWidth; + data.sourceSize.h = actualHeight; + + ss.x = destX; + ss.y = destY; + ss.w = destWidth; + ss.h = destHeight; + ss.r = destX + destWidth; + ss.b = destY + destHeight; + + // Adjust properties + this.x = destX; + this.y = destY; + + this.width = destWidth; + this.height = destHeight; + + this.halfWidth = destWidth * 0.5; + this.halfHeight = destHeight * 0.5; + + this.centerX = Math.floor(destWidth / 2); + this.centerY = Math.floor(destHeight / 2); + + return this.updateUVs(); + }, + + /** + * Takes a crop data object and, based on the rectangular region given, calculates the + * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. + * + * This is called directly by the Game Object Texture Components `setCrop` method. + * Please use that method to crop a Game Object. + * + * @method Phaser.Textures.Frame#setCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. + * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height. + * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width. + * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + setCropUVs: function (crop, x, y, width, height, flipX, flipY) + { + // Clamp the input values + + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + var rw = this.realWidth; + var rh = this.realHeight; + + x = Clamp(x, 0, rw); + y = Clamp(y, 0, rh); + + width = Clamp(width, 0, rw - x); + height = Clamp(height, 0, rh - y); + + var ox = cx + x; + var oy = cy + y; + var ow = width; + var oh = height; + + var data = this.data; + + if (data.trim) + { + var ss = data.spriteSourceSize; + + // Need to check for intersection between the cut area and the crop area + // If there is none, we set UV to be empty, otherwise set it to be the intersection area + + width = Clamp(width, 0, cw - x); + height = Clamp(height, 0, ch - y); + + var cropRight = x + width; + var cropBottom = y + height; + + var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom); + + if (intersects) + { + var ix = Math.max(ss.x, x); + var iy = Math.max(ss.y, y); + var iw = Math.min(ss.r, cropRight) - ix; + var ih = Math.min(ss.b, cropBottom) - iy; + + ow = iw; + oh = ih; + + if (flipX) + { + ox = cx + (cw - (ix - ss.x) - iw); + } + else + { + ox = cx + (ix - ss.x); + } + + if (flipY) + { + oy = cy + (ch - (iy - ss.y) - ih); + } + else + { + oy = cy + (iy - ss.y); + } + + x = ix; + y = iy; + + width = iw; + height = ih; + } + else + { + ox = 0; + oy = 0; + ow = 0; + oh = 0; + } + } + else + { + if (flipX) + { + ox = cx + (cw - x - width); + } + + if (flipY) + { + oy = cy + (ch - y - height); + } + } + + var tw = this.source.width; + var th = this.source.height; + + // Map the given coordinates into UV space, clamping to the 0-1 range. + + crop.u0 = Math.max(0, ox / tw); + crop.v0 = Math.max(0, oy / th); + crop.u1 = Math.min(1, (ox + ow) / tw); + crop.v1 = Math.min(1, (oy + oh) / th); + + crop.x = x; + crop.y = y; + + crop.cx = ox; + crop.cy = oy; + crop.cw = ow; + crop.ch = oh; + + crop.width = width; + crop.height = height; + + crop.flipX = flipX; + crop.flipY = flipY; + + return crop; + }, + + /** + * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object. + * Called automatically by `setFrame`. + * + * @method Phaser.Textures.Frame#updateCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + updateCropUVs: function (crop, flipX, flipY) + { + return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY); + }, + + /** + * Directly sets the canvas and WebGL UV data for this frame. + * + * Use this if you need to override the values that are generated automatically + * when the Frame is created. + * + * @method Phaser.Textures.Frame#setUVs + * @since 3.50.0 + * + * @param {number} width - Width of this frame for the Canvas data. + * @param {number} height - Height of this frame for the Canvas data. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * + * @return {this} This Frame object. + */ + setUVs: function (width, height, u0, v0, u1, v1) + { + // Canvas data + + var cd = this.data.drawImage; + + cd.width = width; + cd.height = height; + + // WebGL data + + this.u0 = u0; + this.v0 = v0; + + this.u1 = u1; + this.v1 = v1; + + return this; + }, + + /** + * Updates the internal WebGL UV cache and the drawImage cache. + * + * @method Phaser.Textures.Frame#updateUVs + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVs: function () + { + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + + // Canvas data + + var cd = this.data.drawImage; + + cd.width = cw; + cd.height = ch; + + // WebGL data + + var tw = this.source.width; + var th = this.source.height; + + this.u0 = cx / tw; + this.v0 = cy / th; + + this.u1 = (cx + cw) / tw; + this.v1 = (cy + ch) / th; + + return this; + }, + + /** + * Updates the internal WebGL UV cache. + * + * @method Phaser.Textures.Frame#updateUVsInverted + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVsInverted: function () + { + var tw = this.source.width; + var th = this.source.height; + + this.u0 = (this.cutX + this.cutHeight) / tw; + this.v0 = this.cutY / th; + + this.u1 = this.cutX / tw; + this.v1 = (this.cutY + this.cutWidth) / th; + + return this; + }, + + /** + * Clones this Frame into a new Frame object. + * + * @method Phaser.Textures.Frame#clone + * @since 3.0.0 + * + * @return {Phaser.Textures.Frame} A clone of this Frame. + */ + clone: function () + { + var clone = new Frame(this.texture, this.name, this.sourceIndex); + + clone.cutX = this.cutX; + clone.cutY = this.cutY; + clone.cutWidth = this.cutWidth; + clone.cutHeight = this.cutHeight; + + clone.x = this.x; + clone.y = this.y; + + clone.width = this.width; + clone.height = this.height; + + clone.halfWidth = this.halfWidth; + clone.halfHeight = this.halfHeight; + + clone.centerX = this.centerX; + clone.centerY = this.centerY; + + clone.rotated = this.rotated; + + clone.data = Extend(true, clone.data, this.data); + + clone.updateUVs(); + + return clone; + }, + + /** + * Destroys this Frame by nulling its reference to the parent Texture and and data objects. + * + * @method Phaser.Textures.Frame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.source = null; + this.texture = null; + this.glTexture = null; + this.customData = null; + this.data = null; + }, + + /** + * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realWidth + * @type {number} + * @readonly + * @since 3.0.0 + */ + realWidth: { + + get: function () + { + return this.data.sourceSize.w; + } + + }, + + /** + * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realHeight + * @type {number} + * @readonly + * @since 3.0.0 + */ + realHeight: { + + get: function () + { + return this.data.sourceSize.h; + } + + }, + + /** + * The radius of the Frame (derived from sqrt(w * w + h * h) / 2) + * + * @name Phaser.Textures.Frame#radius + * @type {number} + * @readonly + * @since 3.0.0 + */ + radius: { + + get: function () + { + return this.data.radius; + } + + }, + + /** + * Is the Frame trimmed or not? + * + * @name Phaser.Textures.Frame#trimmed + * @type {boolean} + * @readonly + * @since 3.0.0 + */ + trimmed: { + + get: function () + { + return this.data.trim; + } + + }, + + /** + * The Canvas drawImage data object. + * + * @name Phaser.Textures.Frame#canvasData + * @type {object} + * @readonly + * @since 3.0.0 + */ + canvasData: { + + get: function () + { + return this.data.drawImage; + } + + } + +}); + +module.exports = Frame; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BuildGameObject = __webpack_require__(69); +var Class = __webpack_require__(0); +var GetValue = __webpack_require__(7); +var ResizeEvent = __webpack_require__(183); +var ScenePlugin = __webpack_require__(184); +var Spine = __webpack_require__(208); +var SpineFile = __webpack_require__(209); +var SpineGameObject = __webpack_require__(225); +var SpineContainer = __webpack_require__(256); +var NOOP = __webpack_require__(1); + +/** + * @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.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: [ + * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } + * ] + * } + * ``` + * + * 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, + * create: create, + * pack: { + * files: [ + * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' } + * ] + * } + * } + * ``` + * + * 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. + * + * ## A note about inlined data: + * + * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader + * at all. Instead, call the functions directly as required: + * + * scene.cache.json.add + * scene.cache.custom.spine.add + * scene.textures.addBase64 + * + * ## Using the plugin + * + * 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 two Game Object Factory methods, allowing you to create Spine Game Objects + * and Spine Containers: + * + * ```javascript + * 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 + * 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 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. + * + * 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 + * @extends Phaser.Plugins.ScenePlugin + * @constructor + * @since 3.19.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. + * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + */ +var SpinePlugin = new Class({ + + Extends: ScenePlugin, + + initialize: + + function SpinePlugin (scene, pluginManager, pluginKey) + { + ScenePlugin.call(this, scene, pluginManager, pluginKey); + + var game = pluginManager.game; + + /** + * A read-only flag that indicates if the game is running under WebGL or Canvas. + * + * @name SpinePlugin#isWebGL + * @type {boolean} + * @readonly + * @since 3.19.0 + */ + this.isWebGL = (game.config.renderType === 2); + + /** + * 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. + * + * @name SpinePlugin#cache + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.cache = game.cache.addCustom('spine'); + + /** + * 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. + * + * @name SpinePlugin#spineTextures + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.spineTextures = game.cache.addCustom('spineTextures'); + + /** + * A reference to the global JSON Cache. + * + * @name SpinePlugin#json + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.json = game.cache.json; + + /** + * A reference to the global Texture Manager. + * + * @name SpinePlugin#textures + * @type {Phaser.Textures.TextureManager} + * @since 3.19.0 + */ + this.textures = game.textures; + + /** + * A flag that sets if the Skeleton Renderers will render debug information over the top + * of the skeleton or not. + * + * @name SpinePlugin#drawDebug + * @type {boolean} + * @since 3.19.0 + */ + this.drawDebug = false; + + /** + * The underlying WebGL context of the Phaser renderer. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#gl + * @type {WebGLRenderingContext} + * @since 3.19.0 + */ + this.gl; + + /** + * A reference to either the Canvas or WebGL Renderer that this Game is using. + * + * @name SpinePlugin#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.19.0 + */ + this.renderer; + + /** + * An instance of the Spine WebGL Scene Renderer. + * + * There is only one instance of the Scene Renderer shared across the whole plugin. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#sceneRenderer + * @type {spine.webgl.SceneRenderer} + * @since 3.19.0 + */ + this.sceneRenderer; + + /** + * An instance of the Spine Skeleton Renderer. + * + * @name SpinePlugin#skeletonRenderer + * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)} + * @since 3.19.0 + */ + this.skeletonRenderer; + + /** + * An instance of the Spine Skeleton Debug Renderer. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#skeletonDebugRenderer + * @type {spine.webgl.skeletonDebugRenderer} + * @since 3.19.0 + */ + this.skeletonDebugRenderer; + + /** + * A reference to the Spine runtime. + * This is the runtime created by Esoteric Software. + * + * @name SpinePlugin#plugin + * @type {spine} + * @since 3.19.0 + */ + this.plugin = Spine; + + /** + * An internal vector3 used by the screen to world method. + * + * @name SpinePlugin#temp1 + * @private + * @type {spine.webgl.Vector3} + * @since 3.19.0 + */ + this.temp1; + + /** + * An internal vector3 used by the screen to world method. + * + * @name SpinePlugin#temp2 + * @private + * @type {spine.webgl.Vector3} + * @since 3.19.0 + */ + this.temp2; + + if (this.isWebGL) + { + this.runtime = Spine.webgl; + + this.renderer = game.renderer; + this.gl = game.renderer.gl; + + this.getAtlas = this.getAtlasWebGL; + } + else + { + this.runtime = Spine.canvas; + + this.renderer = game.renderer; + + 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 add = function (x, y, key, animationName, loop) + { + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 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(); + }; + + var addContainer = function (x, y, children) + { + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; + var container = new SpineContainer(this.scene, spinePlugin, 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); + }, + + /** + * Internal boot handler. + * + * @method SpinePlugin#boot + * @private + * @since 3.19.0 + */ + boot: function () + { + if (this.isWebGL) + { + this.bootWebGL(); + this.onResize(); + this.game.scale.on(ResizeEvent, this.onResize, this); + } + else + { + this.bootCanvas(); + } + + var eventEmitter = this.systems.events; + + eventEmitter.once('shutdown', this.shutdown, this); + eventEmitter.once('destroy', this.destroy, this); + + this.game.events.once('destroy', this.gameDestroy, this); + }, + + /** + * Internal boot handler for the Canvas Renderer. + * + * @method SpinePlugin#bootCanvas + * @private + * @since 3.19.0 + */ + bootCanvas: function () + { + this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context); + }, + + /** + * Internal boot handler for the WebGL Renderer. + * + * @method SpinePlugin#bootWebGL + * @private + * @since 3.19.0 + */ + bootWebGL: function () + { + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! + + var setBlendMode = function (srcBlend, dstBlend) + { + if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend) + { + var gl = this.context.gl; + + this.srcBlend = srcBlend; + this.dstBlend = dstBlend; + + if (this.isDrawing) + { + this.flush(); + gl.blendFunc(this.srcBlend, this.dstBlend); + } + } + }; + + var sceneRenderer = this.renderer.spineSceneRenderer; + + if (!sceneRenderer) + { + sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); + sceneRenderer.batcher.setBlendMode = setBlendMode; + sceneRenderer.shapes.setBlendMode = setBlendMode; + + this.renderer.spineSceneRenderer = sceneRenderer; + } + + // All scene share the same instance + this.sceneRenderer = sceneRenderer; + this.skeletonRenderer = sceneRenderer.skeletonRenderer; + this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; + + this.temp1 = new Spine.webgl.Vector3(0, 0, 0); + this.temp2 = new Spine.webgl.Vector3(0, 0, 0); + }, + + /** + * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, + * then returns it. You do not normally need to invoke this method directly. + * + * @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) + { + var atlasEntry = this.cache.get(key); + + if (!atlasEntry) + { + console.warn('No atlas data for: ' + key); + return; + } + + var atlas; + var spineTextures = this.spineTextures; + + if (spineTextures.has(key)) + { + atlas = spineTextures.get(key); + } + else + { + var textures = this.textures; + + atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) + { + return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); + }); + } + + return atlas; + }, + + /** + * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, + * then returns it. You do not normally need to invoke this method directly. + * + * @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) + { + var atlasEntry = this.cache.get(key); + + if (!atlasEntry) + { + console.warn('No atlas data for: ' + key); + return; + } + + var atlas; + var spineTextures = this.spineTextures; + + if (spineTextures.has(key)) + { + atlas = spineTextures.get(key); + } + else + { + var textures = this.textures; + + var gl = this.sceneRenderer.context.gl; + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); + + atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) + { + return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); + }); + } + + return atlas; + }, + + /** + * 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 () + * { + * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true); + * } + * ``` + * + * 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. + * + * 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 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', + * jsonURL: 'boy.json', + * atlasURL: 'boy.atlas', + * preMultipliedAlpha: true + * }); + * ``` + * + * If you need to load multiple Spine atlas files, provide them as an array: + * + * ```javascript + * function preload () + * { + * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true); + * } + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details. + * + * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the data from the Spine plugin. + * + * 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 "alien" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * 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#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} [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. + * @param {object} [settings] - An external Settings configuration object { prefix: '' } + * + * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + */ + spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings) + { + var multifile; + settings = settings || {}; + + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + multifile = new SpineFile(this, key[i]); + + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + + this.addFile(multifile.files); + } + } + else + { + multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); + + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + + 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) + { + var temp1 = this.temp1; + var temp2 = this.temp2; + var camera = this.sceneRenderer.camera; + + temp1.set(x + skeleton.x, y - skeleton.y, 0); + + var width = camera.viewportWidth; + var height = camera.viewportHeight; + + camera.screenToWorld(temp1, width, height); + + if (bone && bone.parent !== null) + { + bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0)); + + return new Spine.Vector2(temp2.x, temp2.y); + } + else if (bone) + { + return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y); + } + else + { + return new Spine.Vector2(temp1.x, temp1.y); + } + }, + + /** + * Returns a Spine Vector2 based on the given x and y values. + * + * @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) + { + return new Spine.Vector2(x, y); + }, + + /** + * 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) + { + return new Spine.webgl.Vector3(x, y, z); + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawBones = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawRegionAttachments = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawBoundingBoxes = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawMeshHull = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawMeshTriangles = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawPaths = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawSkeletonXY = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawClipping = value; + + return this; + }, + + /** + * 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) + { + this.sceneRenderer.skeletonRenderer.vertexEffect = effect; + + return this; + }, + + /** + * 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) + { + var atlasKey = key; + var jsonKey = key; + var split = (key.indexOf('.') !== -1); + + if (split) + { + var parts = key.split('.'); + + atlasKey = parts.shift(); + jsonKey = parts.join('.'); + } + + var atlasData = this.cache.get(atlasKey); + var atlas = this.getAtlas(atlasKey); + + if (!atlas) + { + return null; + } + + if (!this.spineTextures.has(atlasKey)) + { + this.spineTextures.add(atlasKey, atlas); + } + + var preMultipliedAlpha = atlasData.preMultipliedAlpha; + + var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); + + var skeletonJson = new Spine.SkeletonJson(atlasLoader); + + var data; + + if (skeletonJSON) + { + data = skeletonJSON; + } + else + { + var json = this.json.get(atlasKey); + + data = (split) ? GetValue(json, jsonKey) : json; + } + + if (data) + { + var skeletonData = skeletonJson.readSkeletonData(data); + + var skeleton = new Spine.Skeleton(skeletonData); + + return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; + } + else + { + return null; + } + }, + + /** + * 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) + { + var stateData = new Spine.AnimationStateData(skeleton.data); + + var state = new Spine.AnimationState(stateData); + + return { stateData: stateData, state: state }; + }, + + /** + * 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) + { + var offset = new Spine.Vector2(); + var size = new Spine.Vector2(); + + skeleton.getBounds(offset, size, []); + + return { offset: offset, size: size }; + }, + + /** + * Internal handler for when the renderer resizes. + * + * Only called if running in WebGL. + * + * @method SpinePlugin#onResize + * @since 3.19.0 + */ + onResize: function () + { + var renderer = this.renderer; + var sceneRenderer = this.sceneRenderer; + + var viewportWidth = renderer.width; + var viewportHeight = renderer.height; + + sceneRenderer.camera.position.x = viewportWidth / 2; + sceneRenderer.camera.position.y = viewportHeight / 2; + + sceneRenderer.camera.setViewport(viewportWidth, 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 + * @private + * @since 3.19.0 + */ + shutdown: function () + { + 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 + * @private + * @since 3.19.0 + */ + destroy: function () + { + this.shutdown(); + + this.game = null; + this.scene = null; + this.systems = null; + + this.cache = null; + this.spineTextures = null; + this.json = null; + this.textures = 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.pluginManager.removeGameObject('spine', true, true); + this.pluginManager.removeGameObject('spineContainer', true, true); + + this.pluginManager = null; + + var sceneRenderer = this.renderer.spineSceneRenderer; + + if (sceneRenderer) + { + sceneRenderer.dispose(); + } + + this.renderer.spineSceneRenderer = null; + this.sceneRenderer = null; + } + +}); + +SpinePlugin.SpineGameObject = SpineGameObject; +SpinePlugin.SpineContainer = SpineContainer; + +/** + * 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. + * @param {string} [animationName] - The name of the animation to set on this Skeleton. + * @param {boolean} [loop=false] - Should the animation playback be looped or not? + * + * @return {SpineGameObject} The Game Object that was created. + */ + +/** + * 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', + * scale: 1.5, + * skinName: 'square_Green', + * animationName: 'jelly-idle', loop: true, + * slotName: 'hat', attachmentName: 'images/La_14' + * }); + * ``` + * + * @method SpinePlugin#make + * @since 3.19.0 + * + * @param {any} config - The configuration object this Game Object will use to create itself. + * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + * + * @return {SpineGameObject} The Game Object that was created. + */ + +module.exports = SpinePlugin; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(12); +var GetAdvancedValue = __webpack_require__(70); + +/** + * 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; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH = __webpack_require__(71); +var GetValue = __webpack_require__(7); + +/** + * 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 - 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 GetAdvancedValue = function (source, key, defaultValue) +{ + var value = GetValue(source, key, null); + + if (value === null) + { + return defaultValue; + } + else if (Array.isArray(value)) + { + return MATH.RND.pick(value); + } + else if (typeof value === 'object') + { + if (value.hasOwnProperty('randInt')) + { + return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]); + } + else if (value.hasOwnProperty('randFloat')) + { + return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]); + } + } + else if (typeof value === 'function') + { + return value(key); + } + + return value; +}; + +module.exports = GetAdvancedValue; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(3); +var Extend = __webpack_require__(17); + +/** + * @namespace Phaser.Math + */ + +var PhaserMath = { + + // Collections of functions + Angle: __webpack_require__(72), + Distance: __webpack_require__(81), + Easing: __webpack_require__(89), + Fuzzy: __webpack_require__(134), + Interpolation: __webpack_require__(139), + Pow2: __webpack_require__(147), + Snap: __webpack_require__(151), + + // Expose the RNG Class + RandomDataGenerator: __webpack_require__(155), + + // Single functions + Average: __webpack_require__(156), + Bernstein: __webpack_require__(35), + Between: __webpack_require__(157), + CatmullRom: __webpack_require__(37), + CeilTo: __webpack_require__(158), + Clamp: __webpack_require__(4), + DegToRad: __webpack_require__(20), + Difference: __webpack_require__(159), + Euler: __webpack_require__(160), + Factorial: __webpack_require__(36), + FloatBetween: __webpack_require__(19), + FloorTo: __webpack_require__(161), + FromPercent: __webpack_require__(162), + GetSpeed: __webpack_require__(163), + IsEven: __webpack_require__(164), + IsEvenStrict: __webpack_require__(165), + Linear: __webpack_require__(38), + LinearXY: __webpack_require__(166), + MaxAdd: __webpack_require__(167), + Median: __webpack_require__(168), + MinSub: __webpack_require__(169), + Percent: __webpack_require__(170), + RadToDeg: __webpack_require__(22), + RandomXY: __webpack_require__(171), + RandomXYZ: __webpack_require__(172), + RandomXYZW: __webpack_require__(173), + Rotate: __webpack_require__(174), + RotateAround: __webpack_require__(41), + RotateAroundDistance: __webpack_require__(175), + RotateTo: __webpack_require__(176), + RoundAwayFromZero: __webpack_require__(42), + RoundTo: __webpack_require__(177), + SinCosTableGenerator: __webpack_require__(178), + SmootherStep: __webpack_require__(40), + SmoothStep: __webpack_require__(39), + ToXY: __webpack_require__(179), + TransformXY: __webpack_require__(43), + Within: __webpack_require__(180), + Wrap: __webpack_require__(13), + + // Vector classes + Vector2: __webpack_require__(2), + Vector3: __webpack_require__(14), + Vector4: __webpack_require__(181), + Matrix3: __webpack_require__(44), + Matrix4: __webpack_require__(21), + Quaternion: __webpack_require__(45), + RotateVec3: __webpack_require__(182) + +}; + +// Merge in the consts + +PhaserMath = Extend(false, PhaserMath, CONST); + +// Export it + +module.exports = PhaserMath; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Angle + */ + +module.exports = { + + Between: __webpack_require__(30), + BetweenPoints: __webpack_require__(73), + BetweenPointsY: __webpack_require__(74), + BetweenY: __webpack_require__(75), + CounterClockwise: __webpack_require__(18), + Normalize: __webpack_require__(31), + Random: __webpack_require__(76), + RandomDegrees: __webpack_require__(77), + Reverse: __webpack_require__(78), + RotateTo: __webpack_require__(79), + ShortestBetween: __webpack_require__(80), + Wrap: __webpack_require__(32), + WrapDegrees: __webpack_require__(33) + +}; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(19); + +/** + * 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; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(19); + +/** + * 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; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Normalize = __webpack_require__(31); + +/** + * 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; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(3); + +/** + * 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; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * @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; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Distance + */ + +module.exports = { + + Between: __webpack_require__(82), + BetweenPoints: __webpack_require__(83), + BetweenPointsSquared: __webpack_require__(84), + Chebyshev: __webpack_require__(85), + Power: __webpack_require__(86), + Snake: __webpack_require__(87), + Squared: __webpack_require__(88) + +}; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing + */ + +module.exports = { + + Back: __webpack_require__(90), + Bounce: __webpack_require__(94), + Circular: __webpack_require__(98), + Cubic: __webpack_require__(102), + Elastic: __webpack_require__(106), + Expo: __webpack_require__(110), + Linear: __webpack_require__(114), + Quadratic: __webpack_require__(116), + Quartic: __webpack_require__(120), + Quintic: __webpack_require__(124), + Sine: __webpack_require__(128), + Stepped: __webpack_require__(132) + +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Back + */ + +module.exports = { + + In: __webpack_require__(91), + Out: __webpack_require__(92), + InOut: __webpack_require__(93) + +}; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Bounce + */ + +module.exports = { + + In: __webpack_require__(95), + Out: __webpack_require__(96), + InOut: __webpack_require__(97) + +}; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Circular + */ + +module.exports = { + + In: __webpack_require__(99), + Out: __webpack_require__(100), + InOut: __webpack_require__(101) + +}; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Cubic + */ + +module.exports = { + + In: __webpack_require__(103), + Out: __webpack_require__(104), + InOut: __webpack_require__(105) + +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(107), + Out: __webpack_require__(108), + InOut: __webpack_require__(109) + +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(111), + Out: __webpack_require__(112), + InOut: __webpack_require__(113) + +}; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 113 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(115); + + +/***/ }), +/* 115 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(117), + Out: __webpack_require__(118), + InOut: __webpack_require__(119) + +}; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(121), + Out: __webpack_require__(122), + InOut: __webpack_require__(123) + +}; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(125), + Out: __webpack_require__(126), + InOut: __webpack_require__(127) + +}; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(129), + Out: __webpack_require__(130), + InOut: __webpack_require__(131) + +}; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 130 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 131 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(133); + + +/***/ }), +/* 133 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Fuzzy + */ + +module.exports = { + + Ceil: __webpack_require__(135), + Equal: __webpack_require__(34), + Floor: __webpack_require__(136), + GreaterThan: __webpack_require__(137), + LessThan: __webpack_require__(138) + +}; + + +/***/ }), +/* 135 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 136 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 137 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 138 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Interpolation + */ + +module.exports = { + + Bezier: __webpack_require__(140), + CatmullRom: __webpack_require__(141), + CubicBezier: __webpack_require__(142), + Linear: __webpack_require__(143), + QuadraticBezier: __webpack_require__(144), + SmoothStep: __webpack_require__(145), + SmootherStep: __webpack_require__(146) + +}; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bernstein = __webpack_require__(35); + +/** + * 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; + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CatmullRom = __webpack_require__(37); + +/** + * 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; + + +/***/ }), +/* 142 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Linear = __webpack_require__(38); + +/** + * 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; + + +/***/ }), +/* 144 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmoothStep = __webpack_require__(39); + +/** + * 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; + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmootherStep = __webpack_require__(40); + +/** + * 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; + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Pow2 + */ + +module.exports = { + + GetNext: __webpack_require__(148), + IsSize: __webpack_require__(149), + IsValue: __webpack_require__(150) + +}; + + +/***/ }), +/* 148 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 149 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 150 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Snap + */ + +module.exports = { + + Ceil: __webpack_require__(152), + Floor: __webpack_require__(153), + To: __webpack_require__(154) + +}; + + +/***/ }), +/* 152 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 153 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 154 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(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; + + +/***/ }), +/* 156 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 157 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The random integer. + */ +var Between = function (min, max) +{ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +module.exports = Between; + + +/***/ }), +/* 158 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 159 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(4); +var Class = __webpack_require__(0); +var Matrix4 = __webpack_require__(21); +var NOOP = __webpack_require__(1); + +var tempMatrix = new Matrix4(); + +/** + * @classdesc + * + * @class Euler + * @memberof Phaser.Math + * @constructor + * @since 3.50.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + */ +var Euler = new Class({ + + initialize: + + function Euler (x, y, z, order) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (z === undefined) { z = 0; } + if (order === undefined) { order = Euler.DefaultOrder; } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this.onChangeCallback = NOOP; + }, + + x: { + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + + this.onChangeCallback(this); + } + }, + + y: { + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + + this.onChangeCallback(this); + } + }, + + z: { + get: function () + { + return this._z; + }, + + set: function (value) + { + this._z = value; + + this.onChangeCallback(this); + } + }, + + order: { + get: function () + { + return this._order; + }, + + set: function (value) + { + this._order = value; + + this.onChangeCallback(this); + } + }, + + set: function (x, y, z, order) + { + if (order === undefined) { order = this._order; } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this.onChangeCallback(this); + + return this; + }, + + copy: function (euler) + { + return this.set(euler.x, euler.y, euler.z, euler.order); + }, + + setFromQuaternion: function (quaternion, order, update) + { + if (order === undefined) { order = this._order; } + if (update === undefined) { update = false; } + + tempMatrix.fromQuat(quaternion); + + return this.setFromRotationMatrix(tempMatrix, order, update); + }, + + setFromRotationMatrix: function (matrix, order, update) + { + if (order === undefined) { order = this._order; } + if (update === undefined) { update = false; } + + var elements = matrix.val; + + // Upper 3x3 of matrix is un-scaled rotation matrix + var m11 = elements[0]; + var m12 = elements[4]; + var m13 = elements[8]; + var m21 = elements[1]; + var m22 = elements[5]; + var m23 = elements[9]; + var m31 = elements[2]; + var m32 = elements[6]; + var m33 = elements[10]; + + var x = 0; + var y = 0; + var z = 0; + var epsilon = 0.99999; + + switch (order) + { + case 'XYZ': + { + y = Math.asin(Clamp(m13, -1, 1)); + + if (Math.abs(m13) < epsilon) + { + x = Math.atan2(-m23, m33); + z = Math.atan2(-m12, m11); + } + else + { + x = Math.atan2(m32, m22); + } + + break; + } + + case 'YXZ': + { + x = Math.asin(-Clamp(m23, -1, 1)); + + if (Math.abs(m23) < epsilon) + { + y = Math.atan2(m13, m33); + z = Math.atan2(m21, m22); + } + else + { + y = Math.atan2(-m31, m11); + } + + break; + } + + case 'ZXY': + { + x = Math.asin(Clamp(m32, -1, 1)); + + if (Math.abs(m32) < epsilon) + { + y = Math.atan2(-m31, m33); + z = Math.atan2(-m12, m22); + } + else + { + z = Math.atan2(m21, m11); + } + + break; + } + + case 'ZYX': + { + y = Math.asin(-Clamp(m31, -1, 1)); + + if (Math.abs(m31) < epsilon) + { + x = Math.atan2(m32, m33); + z = Math.atan2(m21, m11); + } + else + { + z = Math.atan2(-m12, m22); + } + + break; + } + + case 'YZX': + { + z = Math.asin(Clamp(m21, -1, 1)); + + if (Math.abs(m21) < epsilon) + { + x = Math.atan2(-m23, m22); + y = Math.atan2(-m31, m11); + } + else + { + y = Math.atan2(m13, m33); + } + + break; + } + + case 'XZY': + { + z = Math.asin(-Clamp(m12, -1, 1)); + + if (Math.abs(m12) < epsilon) + { + x = Math.atan2(m32, m22); + y = Math.atan2(m13, m11); + } + else + { + x = Math.atan2(-m23, m33); + } + + break; + } + } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + if (update) + { + this.onChangeCallback(this); + } + + return this; + } + +}); + +Euler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ]; + +Euler.DefaultOrder = 'XYZ'; + +module.exports = Euler; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [place=0] - The place to round to. + * @param {number} [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; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + min; +}; + +module.exports = FromPercent; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 164 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 166 */ +/***/ (function(module, exports) { + +/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Interpolates two given Vectors and returns a new Vector between them. + * + * Does not modify either of the passed Vectors. + * + * @function Phaser.Math.LinearXY + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} vector1 - Starting vector + * @param {Phaser.Math.Vector2} vector2 - Ending vector + * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * + * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + */ +var LinearXY = function (vector1, vector2, t) +{ + if (t === undefined) { t = 0; } + + return vector1.clone().lerp(vector2, t); +}; + +module.exports = LinearXY; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 168 */ +/***/ (function(module, exports) { + +/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the median of the given values. The values are sorted and the middle value is returned. + * In case of an even number of values, the average of the two middle values is returned. + * + * @function Phaser.Math.Median + * @since 3.54.0 + * + * @param {number[]} values - The values to average. + * + * @return {number} The median value. + */ +var Median = function (values) +{ + var valuesNum = values.length; + if (valuesNum === 0) + { + return 0; + } + + values.sort(function (a, b) { return a - b; }); + + var halfIndex = Math.floor(valuesNum / 2); + + return valuesNum % 2 === 0 + ? (values[halfIndex] + values[halfIndex - 1]) / 2 + : values[halfIndex]; +}; + +module.exports = Median; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 170 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 171 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 172 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 173 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; } + + 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; + + +/***/ }), +/* 174 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 175 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 176 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 177 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. + * @param {number} [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; + + +/***/ }), +/* 178 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(2); + +/** + * 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 {number} index - The position within the grid to get the x/y value for. + * @param {number} width - The width of the grid. + * @param {number} 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; + } + } + + return out.set(x, y); +}; + +module.exports = ToXY; + + +/***/ }), +/* 180 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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) + { + 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; + } + +}); + +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; + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(14); +var Matrix4 = __webpack_require__(21); +var Quaternion = __webpack_require__(45); + +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; + + +/***/ }), +/* 183 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scale Manager Resize Event. + * + * This event is dispatched whenever the Scale Manager detects a resize event from the browser. + * It sends three parameters to the callback, each of them being Size components. You can read + * the `width`, `height`, `aspectRatio` and other properties of these components to help with + * scaling your own game content. + * + * @event Phaser.Scale.Events#RESIZE + * @type {string} + * @since 3.16.1 + * + * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. + * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. + * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. + * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. + * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. + */ +module.exports = 'resize'; + + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +var BasePlugin = __webpack_require__(185); +var Class = __webpack_require__(0); +var SceneEvents = __webpack_require__(23); + +/** + * @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. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + */ +var ScenePlugin = new Class({ + + Extends: BasePlugin, + + initialize: + + function ScenePlugin (scene, pluginManager, pluginKey) + { + 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; + + /** + * The key under which this plugin was installed into the Scene Systems. + * + * 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#pluginKey + * @type {string} + * @readonly + * @since 3.54.0 + */ + this.pluginKey = pluginKey; + + 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; + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2013-2023 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; + + +/***/ }), +/* 186 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @type {string} + * @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'; + + +/***/ }), +/* 187 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('boot', listener)`. + * + * @event Phaser.Scenes.Events#BOOT + * @type {string} + * @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'; + + +/***/ }), +/* 188 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('create', listener)`. + * + * @event Phaser.Scenes.Events#CREATE + * @type {string} + * @since 3.17.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. + */ +module.exports = 'create'; + + +/***/ }), +/* 189 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 190 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('pause', listener)`. + * + * @event Phaser.Scenes.Events#PAUSE + * @type {string} + * @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'; + + +/***/ }), +/* 191 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('postupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#POST_UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 192 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to this event from a Scene using `this.events.on('prerender', listener)`. + * + * A Scene will only render if it is visible. + * + * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. + * + * @event Phaser.Scenes.Events#PRE_RENDER + * @type {string} + * @since 3.53.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'prerender'; + + +/***/ }), +/* 193 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('preupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#PRE_UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 194 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('ready', listener)`. + * + * @event Phaser.Scenes.Events#READY + * @type {string} + * @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'; + + +/***/ }), +/* 195 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @type {string} + * @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'; + + +/***/ }), +/* 196 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('render', listener)`. + * + * A Scene will only render if it is visible. + * + * By the time this event is dispatched, the Scene will have already been rendered. + * + * @event Phaser.Scenes.Events#RENDER + * @type {string} + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'render'; + + +/***/ }), +/* 197 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('resume', listener)`. + * + * @event Phaser.Scenes.Events#RESUME + * @type {string} + * @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'; + + +/***/ }), +/* 198 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 199 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('sleep', listener)`. + * + * @event Phaser.Scenes.Events#SLEEP + * @type {string} + * @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'; + + +/***/ }), +/* 200 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('start', listener)`. + * + * @event Phaser.Scenes.Events#START + * @type {string} + * @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'; + + +/***/ }), +/* 201 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @since 3.5.0 + * + * @param {Phaser.Scene} scene -The Scene on which the transitioned completed. + */ +module.exports = 'transitioncomplete'; + + +/***/ }), +/* 202 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 203 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 204 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 205 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 206 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped. + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('update', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 207 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('wake', listener)`. + * + * @event Phaser.Scenes.Events#WAKE + * @type {string} + * @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'; + + +/***/ }), +/* 208 */ +/***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ @@ -1051,7 +22493,7 @@ var spine; .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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; return AttachmentTimeline; }()); @@ -1851,7 +23293,7 @@ var spine; var slot = slots[i]; if (slot.attachmentState == setupState) { var attachmentName = slot.data.attachmentName; - slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); } } this.unkeyedState += 2; @@ -1964,7 +23406,7 @@ var spine; 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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; }; @@ -8655,9 +30097,7 @@ var spine; } ctx.scale(1, -1); ctx.translate(-w / 2, -h / 2); - if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) { - ctx.globalAlpha = color.a; - } + ctx.globalAlpha = color.a; ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h); if (this.debugRendering) ctx.strokeRect(0, 0, w, h); @@ -8703,9 +30143,7 @@ var spine; var color = this.tempColor; color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha); var ctx = this.ctx; - if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) { - ctx.globalAlpha = color.a; - } + ctx.globalAlpha = color.a; for (var j = 0; j < triangles.length; j += 3) { var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8; var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7]; @@ -8834,23 +30272,22 @@ module.exports = spine; /***/ }), - -/***/ 3524: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Class = __webpack_require__(7473); -var GetFastValue = __webpack_require__(4597); -var ImageFile = __webpack_require__(6732); -var IsPlainObject = __webpack_require__(2482); -var JSONFile = __webpack_require__(704); -var MultiFile = __webpack_require__(3137); -var TextFile = __webpack_require__(1192); +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(8); +var ImageFile = __webpack_require__(210); +var IsPlainObject = __webpack_require__(6); +var JSONFile = __webpack_require__(222); +var MultiFile = __webpack_require__(223); +var TextFile = __webpack_require__(224); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig @@ -9095,1648 +30532,1506 @@ module.exports = SpineFile; /***/ }), - -/***/ 4513: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 210 */ +/***/ (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} + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(2494); -var Class = __webpack_require__(7473); -var GetValue = __webpack_require__(5851); -var ResizeEvent = __webpack_require__(3527); -var ScenePlugin = __webpack_require__(5722); -var Spine = __webpack_require__(5159); -var SpineFile = __webpack_require__(3524); -var SpineGameObject = __webpack_require__(8332); -var SpineContainer = __webpack_require__(5782); -var NOOP = __webpack_require__(1984); +var Class = __webpack_require__(0); +var CONST = __webpack_require__(9); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(8); +var IsPlainObject = __webpack_require__(6); +var GetURL = __webpack_require__(47); /** * @classdesc - * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. + * A single Image File suitable for loading by the Loader. * - * Find more details about Spine itself at http://esotericsoftware.com/. + * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. * - * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin - * 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. + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. * - * 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: [ - * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } - * ] - * } - * ``` - * - * 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, - * create: create, - * pack: { - * files: [ - * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' } - * ] - * } - * } - * ``` - * - * 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 two Game Object Factory methods, allowing you to create Spine Game Objects - * and Spine Containers: - * - * ```javascript - * 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 - * 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 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. - * - * 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 - * @extends Phaser.Plugins.ScenePlugin + * @class ImageFile + * @extends Phaser.Loader.File + * @memberof Phaser.Loader.FileTypes * @constructor - * @since 3.19.0 + * @since 3.0.0 * - * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. - * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. - * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object. + * @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] - Extra XHR Settings specifically for this file. + * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets. */ -var SpinePlugin = new Class({ +var ImageFile = new Class({ - Extends: ScenePlugin, + Extends: File, initialize: - function SpinePlugin (scene, pluginManager, pluginKey) + function ImageFile (loader, key, url, xhrSettings, frameConfig) { - ScenePlugin.call(this, scene, pluginManager, pluginKey); + var extension = 'png'; + var normalMapURL; - var game = pluginManager.game; - - /** - * A read-only flag that indicates if the game is running under WebGL or Canvas. - * - * @name SpinePlugin#isWebGL - * @type {boolean} - * @readonly - * @since 3.19.0 - */ - this.isWebGL = (game.config.renderType === 2); - - /** - * 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. - * - * @name SpinePlugin#cache - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.cache = game.cache.addCustom('spine'); - - /** - * 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. - * - * @name SpinePlugin#spineTextures - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.spineTextures = game.cache.addCustom('spineTextures'); - - /** - * A reference to the global JSON Cache. - * - * @name SpinePlugin#json - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.json = game.cache.json; - - /** - * A reference to the global Texture Manager. - * - * @name SpinePlugin#textures - * @type {Phaser.Textures.TextureManager} - * @since 3.19.0 - */ - this.textures = game.textures; - - /** - * A flag that sets if the Skeleton Renderers will render debug information over the top - * of the skeleton or not. - * - * @name SpinePlugin#drawDebug - * @type {boolean} - * @since 3.19.0 - */ - this.drawDebug = false; - - /** - * The underlying WebGL context of the Phaser renderer. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#gl - * @type {WebGLRenderingContext} - * @since 3.19.0 - */ - this.gl; - - /** - * A reference to either the Canvas or WebGL Renderer that this Game is using. - * - * @name SpinePlugin#renderer - * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} - * @since 3.19.0 - */ - this.renderer; - - /** - * An instance of the Spine WebGL Scene Renderer. - * - * There is only one instance of the Scene Renderer shared across the whole plugin. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#sceneRenderer - * @type {spine.webgl.SceneRenderer} - * @since 3.19.0 - */ - this.sceneRenderer; - - /** - * An instance of the Spine Skeleton Renderer. - * - * @name SpinePlugin#skeletonRenderer - * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)} - * @since 3.19.0 - */ - this.skeletonRenderer; - - /** - * An instance of the Spine Skeleton Debug Renderer. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#skeletonDebugRenderer - * @type {spine.webgl.skeletonDebugRenderer} - * @since 3.19.0 - */ - this.skeletonDebugRenderer; - - /** - * A reference to the Spine runtime. - * This is the runtime created by Esoteric Software. - * - * @name SpinePlugin#plugin - * @type {spine} - * @since 3.19.0 - */ - this.plugin = Spine; - - /** - * An internal vector3 used by the screen to world method. - * - * @name SpinePlugin#temp1 - * @private - * @type {spine.webgl.Vector3} - * @since 3.19.0 - */ - this.temp1; - - /** - * An internal vector3 used by the screen to world method. - * - * @name SpinePlugin#temp2 - * @private - * @type {spine.webgl.Vector3} - * @since 3.19.0 - */ - this.temp2; - - if (this.isWebGL) + if (IsPlainObject(key)) { - this.runtime = Spine.webgl; + var config = key; - this.renderer = game.renderer; - this.gl = game.renderer.gl; + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + normalMapURL = GetFastValue(config, 'normalMap'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + frameConfig = GetFastValue(config, 'frameConfig'); + } - this.getAtlas = this.getAtlasWebGL; + if (Array.isArray(url)) + { + normalMapURL = url[1]; + url = url[0]; + } + + var fileConfig = { + type: 'image', + cache: loader.textureManager, + extension: extension, + responseType: 'blob', + key: key, + url: url, + xhrSettings: xhrSettings, + config: frameConfig + }; + + File.call(this, loader, fileConfig); + + // Do we have a normal map to load as well? + if (normalMapURL) + { + var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig); + + normalMap.type = 'normalMap'; + + this.setLink(normalMap); + + loader.addFile(normalMap); + } + + this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; + + if (this.useImageElementLoad) + { + this.load = this.loadImage; + this.onProcess = this.onProcessImage; + } + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + File.revokeObjectURL(_this.data); + + _this.onProcessComplete(); + }; + + this.data.onerror = function () + { + File.revokeObjectURL(_this.data); + + _this.onProcessError(); + }; + + File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); + }, + + /** + * Handles image load processing. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage + * @private + * @since 3.60.0 + */ + onProcessImage: function () + { + var result = this.state; + + this.state = CONST.FILE_PROCESSING; + + if (result === CONST.FILE_LOADED) + { + this.onProcessComplete(); } else { - this.runtime = Spine.canvas; - - this.renderer = game.renderer; - - this.getAtlas = this.getAtlasCanvas; + this.onProcessError(); } + }, - // Headless mode? - if (!this.renderer) + /** + * Loads the image using either XHR or an Image tag. + * + * @method Phaser.Loader.FileTypes.ImageFile#loadImage + * @private + * @since 3.60.0 + */ + loadImage: function () + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) { - this.renderer = { - width: game.scale.width, - height: game.scale.height, - preRender: NOOP, - postRender: NOOP, - render: NOOP, - destroy: NOOP + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + _this.state = CONST.FILE_LOADED; + + _this.loader.nextFile(_this, true); }; + + this.data.onerror = function () + { + _this.loader.nextFile(_this, false); + }; + + this.data.src = this.src; } - - var add = function (x, y, key, animationName, loop) - { - var spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineGameObject(this.scene, spinePlugin, 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(); - }; - - var addContainer = function (x, y, children) - { - var spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; - var container = new SpineContainer(this.scene, spinePlugin, 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); }, /** - * Internal boot handler. + * Adds this file to its target cache upon successful loading and processing. * - * @method SpinePlugin#boot - * @private - * @since 3.19.0 + * @method Phaser.Loader.FileTypes.ImageFile#addToCache + * @since 3.7.0 */ - boot: function () + addToCache: function () { - if (this.isWebGL) + // Check if we have a linked normal map + var linkFile = this.linkFile; + + if (linkFile) { - this.bootWebGL(); - this.onResize(); - this.game.scale.on(ResizeEvent, this.onResize, this); - } - else - { - this.bootCanvas(); - } - - var eventEmitter = this.systems.events; - - eventEmitter.once('shutdown', this.shutdown, this); - eventEmitter.once('destroy', this.destroy, this); - - this.game.events.once('destroy', this.gameDestroy, this); - }, - - /** - * Internal boot handler for the Canvas Renderer. - * - * @method SpinePlugin#bootCanvas - * @private - * @since 3.19.0 - */ - bootCanvas: function () - { - this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context); - }, - - /** - * Internal boot handler for the WebGL Renderer. - * - * @method SpinePlugin#bootWebGL - * @private - * @since 3.19.0 - */ - bootWebGL: function () - { - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! - - var setBlendMode = function (srcBlend, dstBlend) - { - if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend) + // We do, but has it loaded? + if (linkFile.state >= CONST.FILE_COMPLETE) { - var gl = this.context.gl; - - this.srcBlend = srcBlend; - this.dstBlend = dstBlend; - - if (this.isDrawing) + // Both files have loaded + if (this.type === 'normalMap') { - this.flush(); - gl.blendFunc(this.srcBlend, this.dstBlend); + // linkFile.data = Image + // this.data = Normal Map + this.cache.addImage(this.key, linkFile.data, this.data); + } + else + { + // linkFile.data = Normal Map + // this.data = Image + this.cache.addImage(this.key, this.data, linkFile.data); } } - }; - var sceneRenderer = this.renderer.spineSceneRenderer; - - if (!sceneRenderer) - { - sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - sceneRenderer.batcher.setBlendMode = setBlendMode; - sceneRenderer.shapes.setBlendMode = setBlendMode; - - this.renderer.spineSceneRenderer = sceneRenderer; - } - - // All scene share the same instance - this.sceneRenderer = sceneRenderer; - this.skeletonRenderer = sceneRenderer.skeletonRenderer; - this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; - - this.temp1 = new Spine.webgl.Vector3(0, 0, 0); - this.temp2 = new Spine.webgl.Vector3(0, 0, 0); - }, - - /** - * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, - * then returns it. You do not normally need to invoke this method directly. - * - * @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) - { - var atlasEntry = this.cache.get(key); - - if (!atlasEntry) - { - console.warn('No atlas data for: ' + key); - return; - } - - var atlas; - var spineTextures = this.spineTextures; - - if (spineTextures.has(key)) - { - atlas = spineTextures.get(key); + // Nothing to do here, we'll use the linkFile `addToCache` call + // to process this pair } else { - var textures = this.textures; - - atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) - { - return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); - }); + this.cache.addImage(this.key, this.data); } - - return atlas; - }, - - /** - * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, - * then returns it. You do not normally need to invoke this method directly. - * - * @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) - { - var atlasEntry = this.cache.get(key); - - if (!atlasEntry) - { - console.warn('No atlas data for: ' + key); - return; - } - - var atlas; - var spineTextures = this.spineTextures; - - if (spineTextures.has(key)) - { - atlas = spineTextures.get(key); - } - else - { - var textures = this.textures; - - var gl = this.sceneRenderer.context.gl; - - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - - atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) - { - return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); - }); - } - - return atlas; - }, - - /** - * 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 () - * { - * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true); - * } - * ``` - * - * 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. - * - * 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 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', - * jsonURL: 'boy.json', - * atlasURL: 'boy.atlas', - * preMultipliedAlpha: true - * }); - * ``` - * - * If you need to load multiple Spine atlas files, provide them as an array: - * - * ```javascript - * function preload () - * { - * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true); - * } - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details. - * - * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the data from the Spine plugin. - * - * 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 "alien" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * 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#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} [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. - * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. - */ - 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); - } - } - else - { - multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); - - 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) - { - var temp1 = this.temp1; - var temp2 = this.temp2; - var camera = this.sceneRenderer.camera; - - temp1.set(x + skeleton.x, y - skeleton.y, 0); - - var width = camera.viewportWidth; - var height = camera.viewportHeight; - - camera.screenToWorld(temp1, width, height); - - if (bone && bone.parent !== null) - { - bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0)); - - return new Spine.Vector2(temp2.x, temp2.y); - } - else if (bone) - { - return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y); - } - else - { - return new Spine.Vector2(temp1.x, temp1.y); - } - }, - - /** - * Returns a Spine Vector2 based on the given x and y values. - * - * @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) - { - return new Spine.Vector2(x, y); - }, - - /** - * 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) - { - return new Spine.webgl.Vector3(x, y, z); - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawBones = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawRegionAttachments = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawBoundingBoxes = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawMeshHull = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawMeshTriangles = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawPaths = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawSkeletonXY = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawClipping = value; - - return this; - }, - - /** - * 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) - { - this.sceneRenderer.skeletonRenderer.vertexEffect = effect; - - return this; - }, - - /** - * 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) - { - var atlasKey = key; - var jsonKey = key; - var split = (key.indexOf('.') !== -1); - - if (split) - { - var parts = key.split('.'); - - atlasKey = parts.shift(); - jsonKey = parts.join('.'); - } - - var atlasData = this.cache.get(atlasKey); - var atlas = this.getAtlas(atlasKey); - - if (!atlas) - { - return null; - } - - if (!this.spineTextures.has(atlasKey)) - { - this.spineTextures.add(atlasKey, atlas); - } - - var preMultipliedAlpha = atlasData.preMultipliedAlpha; - - var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); - - var skeletonJson = new Spine.SkeletonJson(atlasLoader); - - var data; - - if (skeletonJSON) - { - data = skeletonJSON; - } - else - { - var json = this.json.get(atlasKey); - - data = (split) ? GetValue(json, jsonKey) : json; - } - - if (data) - { - var skeletonData = skeletonJson.readSkeletonData(data); - - var skeleton = new Spine.Skeleton(skeletonData); - - return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; - } - else - { - return null; - } - }, - - /** - * 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) - { - var stateData = new Spine.AnimationStateData(skeleton.data); - - var state = new Spine.AnimationState(stateData); - - return { stateData: stateData, state: state }; - }, - - /** - * 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) - { - var offset = new Spine.Vector2(); - var size = new Spine.Vector2(); - - skeleton.getBounds(offset, size, []); - - return { offset: offset, size: size }; - }, - - /** - * Internal handler for when the renderer resizes. - * - * Only called if running in WebGL. - * - * @method SpinePlugin#onResize - * @since 3.19.0 - */ - onResize: function () - { - var renderer = this.renderer; - var sceneRenderer = this.sceneRenderer; - - var viewportWidth = renderer.width; - var viewportHeight = renderer.height; - - sceneRenderer.camera.position.x = viewportWidth / 2; - sceneRenderer.camera.position.y = viewportHeight / 2; - - sceneRenderer.camera.setViewport(viewportWidth, 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 - * @private - * @since 3.19.0 - */ - shutdown: function () - { - 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 - * @private - * @since 3.19.0 - */ - destroy: function () - { - this.shutdown(); - - this.game = null; - this.scene = null; - this.systems = null; - - this.cache = null; - this.spineTextures = null; - this.json = null; - this.textures = 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.pluginManager.removeGameObject('spine', true, true); - this.pluginManager.removeGameObject('spineContainer', true, true); - - this.pluginManager = null; - - var sceneRenderer = this.renderer.spineSceneRenderer; - - if (sceneRenderer) - { - sceneRenderer.dispose(); - } - - this.renderer.spineSceneRenderer = null; - this.sceneRenderer = null; } }); -SpinePlugin.SpineGameObject = SpineGameObject; -SpinePlugin.SpineContainer = SpineContainer; - /** - * Creates a new Spine Game Object and adds it to the Scene. + * Adds an Image, or array of Images, to the current load queue. * - * 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. + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: * * ```javascript - * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); + * function preload () + * { + * this.load.image('logo', 'images/phaserLogo.png'); + * } * ``` * - * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it. + * 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 animation name is also optional and can be set later via `SpineGameObject.setAnimation`. + * 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. * - * Should you wish for more control over the object creation, such as setting a slot attachment or skin - * name, then use `SpinePlugin.make` instead. + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * 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 Texture Manager first, before loading a new one. * - * @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. - * @param {string} [animationName] - The name of the animation to set on this Skeleton. - * @param {boolean} [loop=false] - Should the animation playback be looped or not? - * - * @return {SpineGameObject} The Game Object that was created. - */ - -/** - * 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. + * Instead of passing arguments you can pass a configuration object, such as: * * ```javascript - * let jelly = this.make.spine({ - * x: 500, y: 500, key: 'jelly', - * scale: 1.5, - * skinName: 'square_Green', - * animationName: 'jelly-idle', loop: true, - * slotName: 'hat', attachmentName: 'images/La_14' + * this.load.image({ + * key: 'logo', + * url: 'images/AtariLogo.png' * }); * ``` * - * @method SpinePlugin#make - * @since 3.19.0 + * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details. * - * @param {any} config - The configuration object this Game Object will use to create itself. - * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - * - * @return {SpineGameObject} The Game Object that was created. - */ - -module.exports = SpinePlugin; - - -/***/ }), - -/***/ 5782: -/***/ ((module, __unused_webpack_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__(7473); -var Container = __webpack_require__(7361); -var SpineContainerRender = __webpack_require__(2437); - -/** - * @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 must only add ever Spine Game Objects, or other Spine Containers, 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: + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: * * ```javascript - * this.add.spineContainer(); + * this.load.image('logo', 'images/AtariLogo.png'); + * // and later in your game ... + * this.add.image(x, y, 'logo'); * ``` * - * or + * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * 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 "alien" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * 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.make.spineContainer(); + * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * - * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the - * container children. You can, however, mask children of Spine Containers if they are embedded within other - * Spine Containers. In short, if you need masking, don't mix and match the types. + * Or, if you are using a config object use the `normalMap` property: * - * See the Container documentation for further details about what Containers can do. + * ```javascript + * this.load.image({ + * key: 'logo', + * url: 'images/AtariLogo.png', + * normalMap: 'images/AtariLogo-n.png' + * }); + * ``` * - * @class SpineContainer - * @extends Phaser.GameObjects.Container - * @constructor - * @since 3.50.0 + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. * - * @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. + * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. + * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images + * via the Image tag instead. + * + * Note: The ability to load this type of file will only be available if the Image 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#image + * @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 {this} The Loader instance. */ -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 SpineContainer#plugin - * @type {SpinePlugin} - * @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; - } - -}); - -module.exports = SpineContainer; - - -/***/ }), - -/***/ 8064: -/***/ ((module) => { - -/** - * @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 {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, camera, parentMatrix) +FileTypesManager.register('image', function (key, url, xhrSettings) { - var children = container.list; - - if (children.length === 0) + if (Array.isArray(key)) { - return; - } - - camera.addToRenderList(container); - - 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); + 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 ImageFile(this, key[i])); + } } else { - transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + this.addFile(new ImageFile(this, key, url, xhrSettings)); } - var containerHasBlendMode = (container.blendMode !== -1); + return this; +}); - 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, camera, transformMatrix); - - // Restore original values - child.setAlpha(childAlpha); - child.setScrollFactor(childScrollFactorX, childScrollFactorY); - } - - if (container.mask) - { - container.mask.postRenderCanvas(renderer); - } -}; - -module.exports = SpineContainerCanvasRenderer; +module.exports = ImageFile; /***/ }), - -/***/ 2437: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 211 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var renderWebGL = __webpack_require__(1984); -var renderCanvas = __webpack_require__(1984); - -if (false) -{} - -if (true) -{ - renderCanvas = __webpack_require__(8064); -} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas - -}; - - -/***/ }), - -/***/ 6576: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Complete Event. + * The Loader Plugin Add File Event. * - * @event SpinePluginEvents#COMPLETE - * @since 3.19.0 + * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. + * + * Listen to it from a Scene using: `this.load.on('addfile', listener)`. + * + * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. + * + * @event Phaser.Loader.Events#ADD + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The unique key of the file that was added to the Loader. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader. + */ +module.exports = 'addfile'; + + +/***/ }), +/* 212 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Complete Event. + * + * This event is dispatched when the Loader has fully processed everything in the load queue. + * By this point every loaded file will now be in its associated cache and ready for use. + * + * Listen to it from a Scene using: `this.load.on('complete', listener)`. + * + * @event Phaser.Loader.Events#COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + * @param {number} totalComplete - The total number of files that successfully loaded. + * @param {number} totalFailed - The total number of files that failed to load. */ module.exports = 'complete'; /***/ }), - -/***/ 8621: -/***/ ((module) => { +/* 213 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Dispose Event. + * The File Load Complete Event. * - * @event SpinePluginEvents#DISPOSE - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. + * + * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. + * + * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. + * + * 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. + * + * @event Phaser.Loader.Events#FILE_COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The key of the file that just loaded and finished processing. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ -module.exports = 'dispose'; +module.exports = 'filecomplete'; /***/ }), - -/***/ 8944: -/***/ ((module) => { +/* 214 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The End Event. + * The File Load Complete Event. * - * @event SpinePluginEvents#END - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. + * + * It uses a special dynamic event name constructed from the key and type of the file. + * + * For example, if you have loaded an `image` with a key of `monster`, you can listen for it + * using the following: + * + * ```javascript + * this.load.on('filecomplete-image-monster', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a texture `atlas` with a key of `Level1`: + * + * ```javascript + * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: + * + * ```javascript + * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. + * + * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. + * + * @event Phaser.Loader.Events#FILE_KEY_COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The key of the file that just loaded and finished processing. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ -module.exports = 'end'; +module.exports = 'filecomplete-'; /***/ }), - -/***/ 7494: -/***/ ((module) => { +/* 215 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Custom Event Event. + * The File Load Error Event. * - * @event SpinePluginEvents#EVENT - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when a file fails to load. + * + * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. + * + * @event Phaser.Loader.Events#FILE_LOAD_ERROR + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which errored during load. */ -module.exports = 'event'; +module.exports = 'loaderror'; /***/ }), - -/***/ 1908: -/***/ ((module) => { +/* 216 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Interrupted Event. + * The File Load Event. * - * @event SpinePluginEvents#INTERRUPTED - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when a file finishes loading, + * but _before_ it is processed and added to the internal Phaser caches. + * + * Listen to it from a Scene using: `this.load.on('load', listener)`. + * + * @event Phaser.Loader.Events#FILE_LOAD + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. */ -module.exports = 'interrupted'; +module.exports = 'load'; /***/ }), - -/***/ 5591: -/***/ ((module) => { +/* 217 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Start Event. + * The File Load Progress Event. * - * @event SpinePluginEvents#START - * @since 3.19.0 + * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and + * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. + * + * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. + * + * @event Phaser.Loader.Events#FILE_PROGRESS + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which errored during load. + * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. + */ +module.exports = 'fileprogress'; + + +/***/ }), +/* 218 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Post Process Event. + * + * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. + * It is dispatched before the internal lists are cleared and each File is destroyed. + * + * Use this hook to perform any last minute processing of files that can only happen once the + * Loader has completed, but prior to it emitting the `complete` event. + * + * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. + * + * @event Phaser.Loader.Events#POST_PROCESS + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + */ +module.exports = 'postprocess'; + + +/***/ }), +/* 219 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Progress Event. + * + * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. + * + * Listen to it from a Scene using: `this.load.on('progress', listener)`. + * + * @event Phaser.Loader.Events#PROGRESS + * @type {string} + * @since 3.0.0 + * + * @param {number} progress - The current progress of the load. A value between 0 and 1. + */ +module.exports = 'progress'; + + +/***/ }), +/* 220 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Start Event. + * + * This event is dispatched when the Loader starts running. At this point load progress is zero. + * + * This event is dispatched even if there aren't any files in the load queue. + * + * Listen to it from a Scene using: `this.load.on('start', listener)`. + * + * @event Phaser.Loader.Events#START + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. */ module.exports = 'start'; /***/ }), - -/***/ 5146: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var MergeXHRSettings = __webpack_require__(48); + /** - * @namespace SpinePluginEvents + * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings + * and starts the download of it. It uses the Files own XHRSettings and merges them + * with the global XHRSettings object to set the xhr values before download. + * + * @function Phaser.Loader.XHRLoader + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - The File to download. + * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object. + * + * @return {XMLHttpRequest} The XHR object. */ +var XHRLoader = function (file, globalXHRSettings) +{ + var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings); -module.exports = { + var xhr = new XMLHttpRequest(); - COMPLETE: __webpack_require__(6576), - DISPOSE: __webpack_require__(8621), - END: __webpack_require__(8944), - EVENT: __webpack_require__(7494), - INTERRUPTED: __webpack_require__(1908), - START: __webpack_require__(5591) + xhr.open('GET', file.src, config.async, config.user, config.password); + 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); + } + + if (config.requestedWith) + { + xhr.setRequestHeader('X-Requested-With', config.requestedWith); + } + + if (config.overrideMimeType) + { + 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); + xhr.onerror = file.onError.bind(file, xhr); + xhr.onprogress = file.onProgress.bind(file); + + // This is the only standard method, the ones above are browser additions (maybe not universal?) + // xhr.onreadystatechange + + xhr.send(); + + return xhr; }; +module.exports = XHRLoader; + /***/ }), - -/***/ 8332: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(9); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(8); +var GetValue = __webpack_require__(7); +var IsPlainObject = __webpack_require__(6); + +/** + * @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); + + // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it. + if (IsPlainObject(url)) + { + 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; + + try + { + var json = JSON.parse(this.xhrLoader.responseText); + } + catch (e) + { + this.onProcessError(); + + throw e; + } + + 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; + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(9); +var Events = __webpack_require__(46); + +/** + * @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) + { + var finalFiles = []; + + // Clean out any potential 'null' or 'undefined' file entries + files.forEach(function (file) + { + if (file) + { + finalFiles.push(file); + } + }); + + /** + * 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 {number} + * @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 = finalFiles; + + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.MultiFile#state + * @type {number} + * @since 3.60.0 + */ + this.state = CONST.FILE_PENDING; + + /** + * 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 {number} + * @since 3.7.0 + */ + + this.pending = finalFiles.length; + + /** + * The number of files that failed to load. + * + * @name Phaser.Loader.MultiFile#failed + * @type {number} + * @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 < finalFiles.length; i++) + { + finalFiles[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++; + + // eslint-disable-next-line no-console + console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); + } + }, + + /** + * Called once all children of this multi file have been added to their caches and is now + * ready for deletion from the Loader. + * + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.MultiFile#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.60.0 + */ + pendingDestroy: function () + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); + + this.loader.flagForRemoval(this); + + for (var i = 0; i < this.files.length; i++) + { + this.files[i].pendingDestroy(); + } + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this Multi File and any references it holds. + * + * @method Phaser.Loader.MultiFile#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.loader = null; + this.files = null; + this.config = null; + } + +}); + +module.exports = MultiFile; + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(9); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(8); +var IsPlainObject = __webpack_require__(6); + +/** + * @classdesc + * A single Text File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. + * + * @class TextFile + * @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.TextFileConfig)} 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 `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + */ +var TextFile = new Class({ + + Extends: File, + + initialize: + + function TextFile (loader, key, url, xhrSettings) + { + var type = 'text'; + var extension = 'txt'; + var cache = loader.cacheManager.text; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + type = GetFastValue(config, 'type', type); + cache = GetFastValue(config, 'cache', cache); + } + + var fileConfig = { + type: type, + cache: cache, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings + }; + + File.call(this, loader, fileConfig); + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.TextFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = this.xhrLoader.responseText; + + this.onProcessComplete(); + } + +}); + +/** + * Adds a Text file, or array of Text 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.text('story', 'files/IntroStory.txt'); + * } + * ``` + * + * 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 Text Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Text 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 Text Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.text({ + * key: 'story', + * url: 'files/IntroStory.txt' + * }); + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.text('story', 'files/IntroStory.txt'); + * // and later in your game ... + * var data = this.cache.text.get('story'); + * ``` + * + * 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 `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the text from the Text 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 "story" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Text 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#text + * @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 {this} The Loader instance. + */ +FileTypesManager.register('text', function (key, url, 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 TextFile(this, key[i])); + } + } + else + { + this.addFile(new TextFile(this, key, url, xhrSettings)); + } + + return this; +}); + +module.exports = TextFile; + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(6412); -var Clamp = __webpack_require__(2915); -var Class = __webpack_require__(7473); -var ComponentsComputedSize = __webpack_require__(1991); -var ComponentsDepth = __webpack_require__(3131); -var ComponentsFlip = __webpack_require__(9660); -var ComponentsScrollFactor = __webpack_require__(4627); -var ComponentsTransform = __webpack_require__(3212); -var ComponentsVisible = __webpack_require__(8414); -var CounterClockwise = __webpack_require__(3426); -var DegToRad = __webpack_require__(7149); -var GameObject = __webpack_require__(2273); -var RadToDeg = __webpack_require__(4208); -var SpineEvents = __webpack_require__(5146); -var SpineGameObjectRender = __webpack_require__(2762); +var AngleBetween = __webpack_require__(30); +var Clamp = __webpack_require__(4); +var Class = __webpack_require__(0); +var ComponentsComputedSize = __webpack_require__(50); +var ComponentsDepth = __webpack_require__(51); +var ComponentsFlip = __webpack_require__(52); +var ComponentsScrollFactor = __webpack_require__(53); +var ComponentsTransform = __webpack_require__(54); +var ComponentsVisible = __webpack_require__(56); +var CounterClockwise = __webpack_require__(18); +var DegToRad = __webpack_require__(20); +var GameObject = __webpack_require__(57); +var RadToDeg = __webpack_require__(22); +var SpineEvents = __webpack_require__(247); +var SpineGameObjectRender = __webpack_require__(254); /** * @classdesc @@ -10784,9 +32079,10 @@ var SpineGameObjectRender = __webpack_require__(2762); * ``` * * 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. + * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup + * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable + * to get an accurate bounds. You can 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 @@ -10797,6 +32093,7 @@ var SpineGameObjectRender = __webpack_require__(2762); * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. * * @class SpineGameObject + * @extends Phaser.GameObjects.GameObject * @constructor * @since 3.19.0 * @@ -11230,9 +32527,9 @@ var SpineGameObject = new Class({ * @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. * @param {boolean} [loop=false] - Should the animation, if set, loop or not? + * @param {object} [skeletonJSON] - The JSON data for the Skeleton. * * @return {this} This Game Object. */ @@ -12328,602 +33625,17 @@ module.exports = SpineGameObject; /***/ }), - -/***/ 2753: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 226 */ +/***/ (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 CounterClockwise = __webpack_require__(3426); -var RadToDeg = __webpack_require__(4208); -var Wrap = __webpack_require__(8445); - -/** - * 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 SpineGameObject#renderCanvas - * @since 3.19.0 - * @private - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix) -{ - var context = renderer.currentContext; - - var plugin = src.plugin; - var skeleton = src.skeleton; - var skeletonRenderer = plugin.skeletonRenderer; - - var camMatrix = renderer._tempMatrix1; - var spriteMatrix = renderer._tempMatrix2; - var calcMatrix = renderer._tempMatrix3; - - camera.addToRenderList(src); - - spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.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); - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - - skeleton.x = calcMatrix.tx; - skeleton.y = calcMatrix.ty; - - skeleton.scaleX = calcMatrix.scaleX; - - // Inverse or we get upside-down skeletons - skeleton.scaleY = calcMatrix.scaleY * -1; - - 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) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - - skeleton.updateWorldTransform(); - - skeletonRenderer.ctx = context; - skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug); - - context.save(); - - skeletonRenderer.draw(skeleton); - - context.restore(); -}; - -module.exports = SpineGameObjectCanvasRenderer; - - -/***/ }), - -/***/ 2762: -/***/ ((module, __unused_webpack_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 renderWebGL = __webpack_require__(1984); -var renderCanvas = __webpack_require__(1984); -var renderDirect = __webpack_require__(1984); - -if (false) -{} - -if (true) -{ - renderCanvas = __webpack_require__(2753); -} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas, - renderDirect: renderDirect - -}; - - -/***/ }), - -/***/ 8599: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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'; - - -/***/ }), - -/***/ 3570: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 7950: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5389: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4679: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 6903: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 9638: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2505: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8616: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 1868: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2075: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 918: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8136: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5113: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2029: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 527: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5215: -/***/ ((module, __unused_webpack_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__(8599), - BOOT: __webpack_require__(3570), - CONTEXT_LOST: __webpack_require__(7950), - CONTEXT_RESTORED: __webpack_require__(5389), - DESTROY: __webpack_require__(4679), - FOCUS: __webpack_require__(6903), - HIDDEN: __webpack_require__(9638), - PAUSE: __webpack_require__(2505), - POST_RENDER: __webpack_require__(8616), - POST_STEP: __webpack_require__(1868), - PRE_RENDER: __webpack_require__(2075), - PRE_STEP: __webpack_require__(918), - READY: __webpack_require__(8136), - RESUME: __webpack_require__(5113), - STEP: __webpack_require__(2029), - VISIBLE: __webpack_require__(527) - -}; - - -/***/ }), - -/***/ 1081: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var Events = __webpack_require__(6748); +var Class = __webpack_require__(0); +var Events = __webpack_require__(227); /** * @callback DataEachCallback @@ -13170,6 +33882,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.0.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @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. * @@ -13208,6 +33923,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to increase the value for. * @param {*} [data] - The value to increase for the given key. * @@ -13247,6 +33965,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to toggle the value for. * * @return {Phaser.Data.DataManager} This DataManager object. @@ -13620,157 +34341,12 @@ module.exports = DataManager; /***/ }), - -/***/ 9044: -/***/ ((module) => { +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { /** * @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'; - - -/***/ }), - -/***/ 7801: -/***/ ((module) => { - -/** - * @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-'; - - -/***/ }), - -/***/ 4873: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Data Manager Destroy Event. - * - * The Data Manager will listen for the destroy event from its parent, and then close itself down. - * - * @event Phaser.Data.Events#DESTROY - * @since 3.50.0 - */ -module.exports = 'destroy'; - - -/***/ }), - -/***/ 9966: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4586: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 6748: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13780,7161 +34356,1285 @@ module.exports = 'setdata'; module.exports = { - CHANGE_DATA: __webpack_require__(9044), - CHANGE_DATA_KEY: __webpack_require__(7801), - DESTROY: __webpack_require__(4873), - REMOVE_DATA: __webpack_require__(9966), - SET_DATA: __webpack_require__(4586) + CHANGE_DATA: __webpack_require__(228), + CHANGE_DATA_KEY: __webpack_require__(229), + DESTROY: __webpack_require__(230), + REMOVE_DATA: __webpack_require__(231), + SET_DATA: __webpack_require__(232) }; /***/ }), - -/***/ 7499: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 228 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var GameEvents = __webpack_require__(5215); -var RenderEvents = __webpack_require__(8604); +/** + * 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 229 */ +/***/ (function(module, exports) { /** - * @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. + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Change Data Key Event. * - * 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. + * This event is dispatched by a Data Manager when an item in the data store is changed. * - * 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. + * 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.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.on('changedata-gold')`. * - * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, - * combine Geometry Masks and Blend Modes together. + * @event Phaser.Data.Events#CHANGE_DATA_KEY + * @type {string} + * @since 3.16.1 * - * 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. + * @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-'; + + +/***/ }), +/* 230 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Data Manager Destroy Event. * - * 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. + * The Data Manager will listen for the destroy event from its parent, and then close itself down. + * + * @event Phaser.Data.Events#DESTROY + * @type {string} + * @since 3.50.0 + */ +module.exports = 'destroy'; + + +/***/ }), +/* 231 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.on('removedata', listener)`. + * + * @event Phaser.Data.Events#REMOVE_DATA + * @type {string} + * @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'; + + +/***/ }), +/* 232 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.on('setdata', listener)`. + * + * @event Phaser.Data.Events#SET_DATA + * @type {string} + * @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'; + + +/***/ }), +/* 233 */ +/***/ (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. * - * @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. + * @private */ -var BitmapMask = new Class({ +function Events() {} - initialize: +// +// 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); - function BitmapMask (scene, renderable) - { - var renderer = scene.sys.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 masks 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; - - /** - * 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; - - /** - * The Scene which this Bitmap Mask will be used in. - * - * @name Phaser.Display.Masks.BitmapMask#scene - * @type {Phaser.Scene} - * @since 3.60.0 - */ - this.scene = scene; - - this.createMask(); - - scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (renderer) - { - renderer.on(RenderEvents.RESIZE, this.createMask, this); - } - }, - - /** - * Creates the WebGL Texture2D objects and Framebuffers required for this - * mask. If this mask has already been created, then `clearMask` is called first. - * - * @method Phaser.Display.Masks.BitmapMask#createMask - * @since 3.50.0 - */ - createMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl) - { - return; - } - - if (this.mainTexture) - { - this.clearMask(); - } - - 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); - }, - - /** - * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes - * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references. - * - * This is called when this mask is destroyed, or if you try to creat a new - * mask from this object when one is already set. - * - * @method Phaser.Display.Masks.BitmapMask#clearMask - * @since 3.50.0 - */ - clearMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl || !this.mainTexture) - { - return; - } - - 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; - }, - - /** - * 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.BITMAPMASK_PIPELINE.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.BITMAPMASK_PIPELINE.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.clearMask(); - - this.scene.sys.game.events.off(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (this.renderer) - { - this.renderer.off(RenderEvents.RESIZE, this.createMask, this); - } - - this.bitmapMask = null; - this.prevFramebuffer = null; - this.renderer = null; - } - -}); - -module.exports = BitmapMask; - - -/***/ }), - -/***/ 6726: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + // + // 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; +} /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); - -/** - * @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). + * Representation of a single event listener. * - * 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 + * @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 - * @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. + * @private */ -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. - * - * This is a WebGL only feature. - * - * @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. - * - * This is a WebGL only feature. - * - * @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, 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--; - - // Force flush before disabling stencil test - renderer.flush(); - - var current = renderer.currentMask; - - if (renderer.maskStack.length === 0) - { - // If this is the only mask in the stack, flush and disable - current.mask = null; - - gl.disable(gl.STENCIL_TEST); - } - else - { - var prev = renderer.maskStack[renderer.maskStack.length - 1]; - - prev.mask.applyStencil(renderer, prev.camera, false); - - if (renderer.currentCameraMask.mask !== prev.mask) - { - current.mask = prev.mask; - current.camera = prev.camera; - } - else - { - current.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, 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; - - -/***/ }), - -/***/ 2494: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; +} /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} + * 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 BlendModes = __webpack_require__(8351); -var GetAdvancedValue = __webpack_require__(8361); + 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; +} /** - * Builds a Game Object using the provided configuration object. + * Clear event by name. * - * @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. + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private */ -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; - - -/***/ }), - -/***/ 2273: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) emitter._events = new Events(); + else delete emitter._events[evt]; +} /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var ComponentsToJSON = __webpack_require__(6125); -var DataManager = __webpack_require__(1081); -var EventEmitter = __webpack_require__(4399); -var Events = __webpack_require__(3389); -var SceneEvents = __webpack_require__(204); - -/** - * @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. + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. * - * @class GameObject - * @memberof Phaser.GameObjects - * @extends Phaser.Events.EventEmitter * @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; +} + + +/***/ }), +/* 234 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @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'; + + +/***/ }), +/* 235 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} * @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`. + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. + * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. */ -var GameObject = new Class({ - - Extends: EventEmitter, - - initialize: - - function GameObject (scene, type) - { - EventEmitter.call(this); - - /** - * A reference to the Scene to which this Game Object belongs. - * - * Game Objects can only belong to one Scene. - * - * You should consider this property as being read-only. You cannot move a - * Game Object to another Scene by simply changing it. - * - * @name Phaser.GameObjects.GameObject#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * Holds a reference to the Display List that contains this Game Object. - * - * This is set automatically when this Game Object is added to a Scene or Layer. - * - * You should treat this property as being read-only. - * - * @name Phaser.GameObjects.GameObject#displayList - * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} - * @default null - * @since 3.50.0 - */ - this.displayList = null; - - /** - * 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 {(number|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 {number} - * @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 {number} - * @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; - - this.on(Events.ADDED_TO_SCENE, this.addedToScene, this); - this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this); - - // 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 {(number|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 () - { - this.scene.sys.input.disable(this); - - 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) - { - var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; - - return !(!listWillRender || 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 {number[]} 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)); - - child = parent; - - if (!parent.parentContainer) - { - break; - } - else - { - parent = parent.parentContainer; - } - } - - if (this.displayList) - { - indexes.unshift(this.displayList.getIndex(child)); - } - else - { - indexes.unshift(this.scene.sys.displayList.getIndex(child)); - } - - return indexes; - }, - - /** - * Adds this Game Object to the given Display List. - * - * If no Display List is specified, it will default to the Display List owned by the Scene to which - * this Game Object belongs. - * - * A Game Object can only exist on one Display List at any given time, but may move freely between them. - * - * If this Game Object is already on another Display List when this method is called, it will first - * be removed from it, before being added to the new list. - * - * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. - * - * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly - * disable it from rendering, consider using the `setVisible` method, instead. - * - * @method Phaser.GameObjects.GameObject#addToDisplayList - * @fires Phaser.Scenes.Events#ADDED_TO_SCENE - * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE - * @since 3.53.0 - * - * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List. - * - * @return {this} This Game Object. - */ - addToDisplayList: function (displayList) - { - if (displayList === undefined) { displayList = this.scene.sys.displayList; } - - if (this.displayList && this.displayList !== displayList) - { - this.removeFromDisplayList(); - } - - // Don't repeat if it's already on this list - if (!displayList.exists(this)) - { - this.displayList = displayList; - - displayList.add(this, true); - - displayList.queueDepthSort(); - - this.emit(Events.ADDED_TO_SCENE, this, this.scene); - - displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene); - } - - return this; - }, - - /** - * Adds this Game Object to the Update List belonging to the Scene. - * - * When a Game Object is added to the Update List it will have its `preUpdate` method called - * every game frame. This method is passed two parameters: `delta` and `time`. - * - * If you wish to run your own logic within `preUpdate` then you should always call - * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, - * such as Sprite animations. - * - * @method Phaser.GameObjects.GameObject#addToUpdateList - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - addToUpdateList: function () - { - if (this.scene && this.preUpdate) - { - this.scene.sys.updateList.add(this); - } - - return this; - }, - - /** - * Removes this Game Object from the Display List it is currently on. - * - * A Game Object can only exist on one Display List at any given time, but may move freely removed - * and added back at a later stage. - * - * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. - * - * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly - * disable it from rendering, consider using the `setVisible` method, instead. - * - * @method Phaser.GameObjects.GameObject#removeFromDisplayList - * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE - * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - removeFromDisplayList: function () - { - var displayList = this.displayList || this.scene.sys.displayList; - - if (displayList.exists(this)) - { - displayList.remove(this, true); - - displayList.queueDepthSort(); - - this.displayList = null; - - this.emit(Events.REMOVED_FROM_SCENE, this, this.scene); - - displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene); - } - - return this; - }, - - /** - * Removes this Game Object from the Scene's Update List. - * - * When a Game Object is on the Update List, it will have its `preUpdate` method called - * every game frame. Calling this method will remove it from the list, preventing this. - * - * Removing a Game Object from the Update List will stop most internal functions working. - * For example, removing a Sprite from the Update List will prevent it from being able to - * run animations. - * - * @method Phaser.GameObjects.GameObject#removeFromUpdateList - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - removeFromUpdateList: function () - { - if (this.scene && this.preUpdate) - { - this.scene.sys.updateList.remove(this); - } - - return this; - }, - - /** - * 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] - `True` if this Game Object is being destroyed by the Scene, `false` if not. - */ - destroy: function (fromScene) - { - // This Game Object has already been destroyed - if (!this.scene || this.ignoreDestroy) - { - return; - } - - if (fromScene === undefined) { fromScene = false; } - - if (this.preDestroy) - { - this.preDestroy.call(this); - } - - this.emit(Events.DESTROY, this, fromScene); - - this.removeAllListeners(); - - if (this.postPipelines) - { - this.resetPostPipeline(true); - } - - this.removeFromDisplayList(); - this.removeFromUpdateList(); - - if (this.input) - { - this.scene.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; - } - - this.active = false; - this.visible = false; - - this.scene = undefined; - this.parentContainer = undefined; - } - -}); - -/** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. - * - * @constant {number} RENDER_MASK - * @memberof Phaser.GameObjects.GameObject - * @default - */ -GameObject.RENDER_MASK = 15; - -module.exports = GameObject; +module.exports = 'destroy'; /***/ }), - -/***/ 4344: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 236 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -// 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; - - -/***/ }), - -/***/ 4518: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -// 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; - - -/***/ }), - -/***/ 5173: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BlendModes = __webpack_require__(8351); - -/** - * 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 {number} - * @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; - - -/***/ }), - -/***/ 1991: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * 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 + * @type {string} + * @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. */ - -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; +module.exports = 'removedfromscene'; /***/ }), - -/***/ 8305: -/***/ ((module) => { +/* 237 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. + * The Video Game Object Complete Event. * - * @namespace Phaser.GameObjects.Components.Crop - * @since 3.12.0 + * 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback. */ - -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; +module.exports = 'complete'; /***/ }), - -/***/ 3131: -/***/ ((module) => { +/* 238 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. + * The Video Game Object Created Event. * - * @namespace Phaser.GameObjects.Components.Depth - * @since 3.0.0 + * 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + * @param {number} width - The width of the video. + * @param {number} height - The height of the video. */ - -var Depth = { - - /** - * Private internal value. Holds the depth of the Game Object. - * - * @name Phaser.GameObjects.Components.Depth#_depth - * @type {number} - * @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) - { - if (this.displayList) - { - this.displayList.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 {number} 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; +module.exports = 'created'; /***/ }), - -/***/ 1626: -/***/ ((module) => { +/* 239 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Provides methods used for setting the FX values of a Game Object. - * Should be applied as a mixin and not used directly. + * The Video Game Object Error Event. * - * @namespace Phaser.GameObjects.Components.FX - * @webglOnly - * @since 3.60.0 + * 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 + * @type {string} + * @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. */ - -var FX = { - - /** - * The amount of extra padding to be applied to this Game Object - * when it is being rendered by a SpriteFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shaddow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * @name Phaser.GameObjects.Components.FX#fxPadding - * @type {number} - * @default 0 - * @since 3.60.0 - */ - fxPadding: 0, - - /** - * Sets the amount of extra padding to be applied to this Game Object - * when it is being rendered by a SpriteFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shaddow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * @method Phaser.GameObjects.Components.FX#setFXPadding - * @webglOnly - * @since 3.60.0 - * - * @param {number} [padding=0] - The amount of padding to add to the texture. - * - * @return {this} This Game Object instance. - */ - setFXPadding: function (padding) - { - if (padding === undefined) { padding = 0; } - - this.fxPadding = padding; - - return this; - }, - - /** - * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. - * - * This happens when the pipeline uses its `copySprite` method. - * - * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFXCopy - * @webglOnly - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. - */ - onFXCopy: function () - { - }, - - /** - * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. - * - * This happens when the pipeline uses its `drawSprite` method. - * - * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFX - * @webglOnly - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. - */ - onFX: function () - { - } - -}; - -module.exports = FX; +module.exports = 'error'; /***/ }), - -/***/ 9660: -/***/ ((module) => { +/* 240 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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; - - -/***/ }), - -/***/ 3671: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Rectangle = __webpack_require__(2150); -var RotateAround = __webpack_require__(9876); -var Vector2 = __webpack_require__(2529); - -/** - * Provides methods used for obtaining the bounds of a Game Object. - * Should be applied as a mixin and not used directly. + * The Video Game Object Loop Event. * - * @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; - - -/***/ }), - -/***/ 2246: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BitmapMask = __webpack_require__(7499); -var GeometryMask = __webpack_require__(6726); - -/** - * Provides methods used for getting and setting the mask of a Game Object. + * 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. * - * @namespace Phaser.GameObjects.Components.Mask - * @since 3.0.0 + * 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped. */ - -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. - * - * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. - * - * 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|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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 instanceof Phaser.GameObjects.Graphics || this instanceof Phaser.GameObjects.Shape)) - { - // eslint-disable-next-line consistent-this - graphics = this; - } - - return new GeometryMask(this.scene, graphics); - } - -}; - -module.exports = Mask; +module.exports = 'loop'; /***/ }), - -/***/ 5085: -/***/ ((module) => { +/* 241 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. + * The Video Game Object Play Event. * - * @namespace Phaser.GameObjects.Components.Origin - * @since 3.0.0 + * 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback. */ - -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; +module.exports = 'play'; /***/ }), - -/***/ 77: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 242 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var DegToRad = __webpack_require__(7149); -var GetBoolean = __webpack_require__(1864); -var GetValue = __webpack_require__(5851); -var TWEEN_CONST = __webpack_require__(3747); -var Vector2 = __webpack_require__(2529); - -/** - * 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 {number} - * @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(tweenData.end, 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; - - -/***/ }), - -/***/ 986: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var DeepCopy = __webpack_require__(3911); -var PIPELINE_CONST = __webpack_require__(5412); -var SpliceOne = __webpack_require__(8935); - -/** - * 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. - * - * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default. - * - * @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, - - /** - * Does this Game Object have any Post Pipelines set? - * - * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline - * @type {boolean} - * @webglOnly - * @since 3.50.0 - */ - hasPostPipeline: false, - - /** - * The WebGL Post FX Pipelines this Game Object uses for post-render effects. - * - * The pipelines are processed in the order in which they appear in this array. - * - * If you modify this array directly, be sure to set the - * `hasPostPipeline` property accordingly. - * - * @name Phaser.GameObjects.Components.Pipeline#postPipelines - * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} - * @webglOnly - * @since 3.50.0 - */ - postPipelines: null, - - /** - * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses. - * - * @name Phaser.GameObjects.Components.Pipeline#pipelineData - * @type {object} - * @webglOnly - * @since 3.50.0 - */ - pipelineData: null, - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * - * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`. - * - * @method Phaser.GameObjects.Components.Pipeline#initPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - initPipeline: function (pipeline) - { - if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; } - - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return false; - } - - var pipelines = renderer.pipelines; - - this.postPipelines = []; - this.pipelineData = {}; - - if (pipelines) - { - var instance = pipelines.get(pipeline); - - if (instance) - { - this.defaultPipeline = instance; - this.pipeline = instance; - - return true; - } - } - - return false; - }, - - /** - * Sets the main WebGL Pipeline of this Game Object. - * - * Also sets the `pipelineData` property, if the parameter is given. - * - * Both the pipeline and post pipelines share the same pipeline data object. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. - * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. - * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. - * - * @return {this} This Game Object instance. - */ - setPipeline: function (pipeline, pipelineData, copyData) - { - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return this; - } - - var pipelines = renderer.pipelines; - - if (pipelines) - { - var instance = pipelines.get(pipeline); - - if (instance) - { - this.pipeline = instance; - } - - if (pipelineData) - { - this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; - } - } - - return this; - }, - - /** - * Sets one, or more, Post Pipelines on this Game Object. - * - * Post Pipelines are invoked after this Game Object has rendered to its target and - * are commonly used for post-fx. - * - * The post pipelines are appended to the `postPipelines` array belonging to this - * Game Object. When the renderer processes this Game Object, it iterates through the post - * pipelines in the order in which they appear in the array. If you are stacking together - * multiple effects, be aware that the order is important. - * - * If you call this method multiple times, the new pipelines will be appended to any existing - * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. - * - * You can optionally also set the `pipelineData` property, if the parameter is given. - * - * Both the pipeline and post pipelines share the pipeline data object together. - * - * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them. - * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. - * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. - * - * @return {this} This Game Object instance. - */ - setPostPipeline: function (pipelines, pipelineData, copyData) - { - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return this; - } - - var pipelineManager = renderer.pipelines; - - if (pipelineManager) - { - if (!Array.isArray(pipelines)) - { - pipelines = [ pipelines ]; - } - - for (var i = 0; i < pipelines.length; i++) - { - var instance = pipelineManager.getPostPipeline(pipelines[i], this); - - if (instance) - { - this.postPipelines.push(instance); - } - } - - if (pipelineData) - { - this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; - } - } - - this.hasPostPipeline = (this.postPipelines.length > 0); - - return this; - }, - - /** - * Adds an entry to the `pipelineData` object belonging to this Game Object. - * - * If the 'key' already exists, its value is updated. If it doesn't exist, it is created. - * - * If `value` is undefined, and `key` exists, `key` is removed from the data object. - * - * Both the pipeline and post pipelines share the pipeline data object together. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipelineData - * @webglOnly - * @since 3.50.0 - * - * @param {string} key - The key of the pipeline data to set, update, or delete. - * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object. - * - * @return {this} This Game Object instance. - */ - setPipelineData: function (key, value) - { - var data = this.pipelineData; - - if (value === undefined) - { - delete data[key]; - } - else - { - data[key] = value; - } - - return this; - }, - - /** - * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it. - * - * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class. - * - * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array. - */ - getPostPipeline: function (pipeline) - { - var pipelines = this.postPipelines; - - var results = []; - - for (var i = 0; i < pipelines.length; i++) - { - var instance = pipelines[i]; - - if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline) - { - results.push(instance); - } - } - - return (results.length === 1) ? results[0] : results; - }, - - /** - * 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 - * - * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines? - * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? - * - * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`. - */ - resetPipeline: function (resetPostPipelines, resetData) - { - if (resetPostPipelines === undefined) { resetPostPipelines = false; } - if (resetData === undefined) { resetData = false; } - - this.pipeline = this.defaultPipeline; - - if (resetPostPipelines) - { - this.postPipelines = []; - this.hasPostPipeline = false; - } - - if (resetData) - { - this.pipelineData = {}; - } - - return (this.pipeline !== null); - }, - - /** - * Resets the WebGL Post Pipelines of this Game Object. It does this by calling - * the `destroy` method on each post pipeline and then clearing the local array. - * - * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? - */ - resetPostPipeline: function (resetData) - { - if (resetData === undefined) { resetData = false; } - - var pipelines = this.postPipelines; - - for (var i = 0; i < pipelines.length; i++) - { - pipelines[i].destroy(); - } - - this.postPipelines = []; - this.hasPostPipeline = false; - - if (resetData) - { - this.pipelineData = {}; - } - }, - - /** - * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them. - * - * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead. - * - * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class. - * - * @return {this} This Game Object. - */ - removePostPipeline: function (pipeline) - { - var pipelines = this.postPipelines; - - for (var i = pipelines.length - 1; i >= 0; i--) - { - var instance = pipelines[i]; - - if ( - (typeof pipeline === 'string' && instance.name === pipeline) || - (typeof pipeline !== 'string' && instance instanceof pipeline)) - { - instance.destroy(); - - SpliceOne(pipelines, i); - } - } - - this.hasPostPipeline = (this.postPipelines.length > 0); - - return this; - }, - - /** - * 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; - - -/***/ }), - -/***/ 4627: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. + * The Video Game Object Seeked Event. * - * @namespace Phaser.GameObjects.Components.ScrollFactor - * @since 3.0.0 + * 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking. */ - -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; +module.exports = 'seeked'; /***/ }), - -/***/ 4759: -/***/ ((module) => { +/* 243 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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; - - -/***/ }), - -/***/ 4976: -/***/ ((module) => { - -/** - * @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. + * The Video Game Object Seeking Event. * - * @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|number)} [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|number)} 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; - - -/***/ }), - -/***/ 9243: -/***/ ((module) => { - -/** - * @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. + * 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. * - * @namespace Phaser.GameObjects.Components.TextureCrop - * @since 3.0.0 + * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_SEEKING + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking. */ - -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|number)} [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|number)} 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; +module.exports = 'seeking'; /***/ }), - -/***/ 5693: -/***/ ((module) => { +/* 244 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Provides methods used for setting the tint of a Game Object. - * Should be applied as a mixin and not used directly. + * The Video Game Object Stopped Event. * - * @namespace Phaser.GameObjects.Components.Tint - * @webglOnly - * @since 3.0.0 + * 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback. */ - -var Tint = { - - /** - * The tint value being applied to the top-left vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintTopLeft - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintTopLeft: 0xffffff, - - /** - * The tint value being applied to the top-right vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintTopRight - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintTopRight: 0xffffff, - - /** - * The tint value being applied to the bottom-left vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomLeft - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintBottomLeft: 0xffffff, - - /** - * The tint value being applied to the bottom-right vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomRight - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintBottomRight: 0xffffff, - - /** - * The tint fill mode. - * - * `false` = An additive tint (the default), where vertices colors are blended with the texture. - * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. - * - * @name Phaser.GameObjects.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); - - 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {number} [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.tintTopLeft = topLeft; - this.tintTopRight = topRight; - this.tintBottomLeft = bottomLeft; - this.tintBottomRight = bottomRight; - - 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {number} [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 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 {number} - * @webglOnly - * @since 3.0.0 - */ - tint: { - - set: function (value) - { - this.setTint(value, value, value, value); - } - }, - - /** - * Does this Game Object have a tint applied? - * - * It checks to see if the 4 tint properties are set to the value 0xffffff - * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. - * - * @name Phaser.GameObjects.Components.Tint#isTinted - * @type {boolean} - * @webglOnly - * @readonly - * @since 3.11.0 - */ - isTinted: { - - get: function () - { - var white = 0xffffff; - - return ( - this.tintFill || - this.tintTopLeft !== white || - this.tintTopRight !== white || - this.tintBottomLeft !== white || - this.tintBottomRight !== white - ); - } - - } - -}; - -module.exports = Tint; +module.exports = 'stop'; /***/ }), - -/***/ 6125: -/***/ ((module) => { +/* 245 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Build a JSON representation of the given Game Object. + * The Video Game Object Timeout Event. * - * This is typically extended further by Game Object specific implementations. + * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video + * source to start playback. * - * @method Phaser.GameObjects.Components.ToJSON - * @since 3.0.0 + * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`. * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. + * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT + * @type {string} + * @since 3.20.0 * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out. */ -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; +module.exports = 'timeout'; /***/ }), - -/***/ 3212: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 246 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = __webpack_require__(7425); -var TransformMatrix = __webpack_require__(4227); -var TransformXY = __webpack_require__(7556); -var WrapAngle = __webpack_require__(3692); -var WrapAngleDegrees = __webpack_require__(2820); -var Vector2 = __webpack_require__(2529); - -// 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 {number} - * @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; - }, - - /** - * Copies an object's coordinates to this Game Object's position. - * - * @method Phaser.GameObjects.Components.Transform#copyPosition - * @since 3.50.0 - * - * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. - * - * @return {this} This Game Object instance. - */ - copyPosition: function (source) - { - if (source.x !== undefined) { this.x = source.x; } - if (source.y !== undefined) { this.y = source.y; } - if (source.z !== undefined) { this.z = source.z; } - if (source.w !== undefined) { this.w = source.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; - - -/***/ }), - -/***/ 4227: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var MATH_CONST = __webpack_require__(7425); -var Vector2 = __webpack_require__(2529); - -/** - * @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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. - * - * @return {Phaser.Types.Math.Vector2Like} 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; - - -/***/ }), - -/***/ 8414: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4286: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.GameObjects.Components + * 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + */ +module.exports = 'unlocked'; + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace SpinePluginEvents */ module.exports = { - Alpha: __webpack_require__(4344), - AlphaSingle: __webpack_require__(4518), - BlendMode: __webpack_require__(5173), - ComputedSize: __webpack_require__(1991), - Crop: __webpack_require__(8305), - Depth: __webpack_require__(3131), - Flip: __webpack_require__(9660), - FX: __webpack_require__(1626), - GetBounds: __webpack_require__(3671), - Mask: __webpack_require__(2246), - Origin: __webpack_require__(5085), - PathFollower: __webpack_require__(77), - Pipeline: __webpack_require__(986), - ScrollFactor: __webpack_require__(4627), - Size: __webpack_require__(4759), - Texture: __webpack_require__(4976), - TextureCrop: __webpack_require__(9243), - Tint: __webpack_require__(5693), - ToJSON: __webpack_require__(6125), - Transform: __webpack_require__(3212), - TransformMatrix: __webpack_require__(4227), - Visible: __webpack_require__(8414) + COMPLETE: __webpack_require__(248), + DISPOSE: __webpack_require__(249), + END: __webpack_require__(250), + EVENT: __webpack_require__(251), + INTERRUPTED: __webpack_require__(252), + START: __webpack_require__(253) }; /***/ }), +/* 248 */ +/***/ (function(module, exports) { -/***/ 7361: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Complete Event. + * + * @event SpinePluginEvents#COMPLETE + * @since 3.19.0 + */ +module.exports = 'complete'; + + +/***/ }), +/* 249 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Dispose Event. + * + * @event SpinePluginEvents#DISPOSE + * @since 3.19.0 + */ +module.exports = 'dispose'; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The End Event. + * + * @event SpinePluginEvents#END + * @since 3.19.0 + */ +module.exports = 'end'; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Custom Event Event. + * + * @event SpinePluginEvents#EVENT + * @since 3.19.0 + */ +module.exports = 'event'; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Interrupted Event. + * + * @event SpinePluginEvents#INTERRUPTED + * @since 3.19.0 + */ +module.exports = 'interrupted'; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Start Event. + * + * @event SpinePluginEvents#START + * @since 3.19.0 + */ +module.exports = 'start'; + + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); +var renderDirect = __webpack_require__(1); + +if (false) +{} + +if (true) +{ + renderCanvas = __webpack_require__(255); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas, + renderDirect: renderDirect + +}; + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var CounterClockwise = __webpack_require__(18); +var RadToDeg = __webpack_require__(22); +var Wrap = __webpack_require__(13); + +/** + * 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 SpineGameObject#renderCanvas + * @since 3.19.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix) +{ + var context = renderer.currentContext; + + var plugin = src.plugin; + var skeleton = src.skeleton; + var skeletonRenderer = plugin.skeletonRenderer; + + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; + + camera.addToRenderList(src); + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); + + camMatrix.copyFrom(camera.matrix); + + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.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); + } + else + { + spriteMatrix.e -= camera.scrollX * src.scrollFactorX; + spriteMatrix.f -= camera.scrollY * src.scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + + skeleton.x = calcMatrix.tx; + skeleton.y = calcMatrix.ty; + + skeleton.scaleX = calcMatrix.scaleX; + + // Inverse or we get upside-down skeletons + skeleton.scaleY = calcMatrix.scaleY * -1; + + 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) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + + skeleton.updateWorldTransform(); + + skeletonRenderer.ctx = context; + skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug); + + context.save(); + + skeletonRenderer.draw(skeleton); + + context.restore(); +}; + +module.exports = SpineGameObjectCanvasRenderer; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 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__(257); +var SpineContainerRender = __webpack_require__(342); + +/** + * @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 must only add ever Spine Game Objects, or other Spine Containers, 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: + * + * ```javascript + * this.add.spineContainer(); + * ``` + * + * or + * + * ```javascript + * this.make.spineContainer(); + * ``` + * + * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the + * container children. You can, however, mask children of Spine Containers if they are embedded within other + * Spine Containers. In short, if you need masking, don't mix and match the types. + * + * See the Container documentation for further details about what Containers can do. + * + * @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 SpineContainer#plugin + * @type {SpinePlugin} + * @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; + } + +}); + +module.exports = SpineContainer; + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(1953); -var BlendModes = __webpack_require__(8351); -var Class = __webpack_require__(7473); -var Components = __webpack_require__(4286); -var Events = __webpack_require__(3389); -var GameObject = __webpack_require__(2273); -var Rectangle = __webpack_require__(2150); -var Render = __webpack_require__(3232); -var Union = __webpack_require__(9422); -var Vector2 = __webpack_require__(2529); +var ArrayUtils = __webpack_require__(258); +var BlendModes = __webpack_require__(12); +var Class = __webpack_require__(0); +var Components = __webpack_require__(309); +var Events = __webpack_require__(59); +var GameObject = __webpack_require__(57); +var Rectangle = __webpack_require__(28); +var Render = __webpack_require__(339); +var Union = __webpack_require__(341); +var Vector2 = __webpack_require__(2); /** * @classdesc @@ -21369,9 +36069,11 @@ var Container = new Class({ gameObject.parentContainer.remove(gameObject); } + gameObject.parentContainer = this; + gameObject.removeFromDisplayList(); - gameObject.parentContainer = this; + gameObject.addedToScene(); } }, @@ -21386,12 +36088,14 @@ var Container = new Class({ */ removeHandler: function (gameObject) { - gameObject.off(Events.DESTROY, this.remove); + gameObject.off(Events.DESTROY, this.remove, this); if (this.exclusive) { gameObject.parentContainer = null; + gameObject.removedFromScene(); + gameObject.addToDisplayList(); } }, @@ -21403,10 +36107,10 @@ var Container = new Class({ * @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. + * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed. + * @param {Phaser.Types.Math.Vector2Like} [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. + * @return {Phaser.Types.Math.Vector2Like} The transformed point. */ pointToContainer: function (source, output) { @@ -21418,7 +36122,8 @@ var Container = new Class({ } else { - output = new Vector2(source.x, source.y); + output.x = source.x; + output.y = source.y; } var tempMatrix = this.tempTransformMatrix; @@ -21456,6 +36161,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#add * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. @@ -21477,6 +36185,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#addAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * @param {number} [index=0] - The position to insert the Game Object/s at. * @@ -21495,6 +36206,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} 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. @@ -21510,6 +36224,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getIndex * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. * * @return {number} The index of the Game Object in this Container, or -1 if not found. @@ -21558,6 +36275,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getByName * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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. @@ -21573,6 +36293,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getRandom * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} [startIndex=0] - An optional start index. * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from. * @@ -21596,6 +36319,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getFirst * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -21626,6 +36352,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAll * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T[]} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -21668,6 +36397,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#swap * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. * @@ -21691,6 +36423,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveTo * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. * @param {number} index - The new position of the Game Object in this Container. * @@ -21711,6 +36446,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveAbove * @since 3.55.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object. * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. * @@ -21731,6 +36469,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveBelow * @since 3.55.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object. * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. * @@ -21753,6 +36494,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#remove * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. * @@ -21846,14 +36590,25 @@ var Container = new Class({ */ removeAll: function (destroyChild) { - var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + var list = this.list; if (destroyChild) { - for (var i = 0; i < removed.length; i++) + for (var i = 0; i < list.length; i++) { - removed[i].destroy(); + if (list[i] && list[i].scene) + { + list[i].off(Events.DESTROY, this.remove, this); + + list[i].destroy(); + } } + + this.list = []; + } + else + { + ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this); } return this; @@ -21866,6 +36621,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#bringToTop * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. * * @return {this} This Container instance. @@ -21884,6 +36642,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#sendToBack * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. * * @return {this} This Container instance. @@ -21901,6 +36662,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveUp * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -21918,6 +36682,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveDown * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -21966,6 +36733,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#replace * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [oldChild,newChild] + * * @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. @@ -21998,6 +36768,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#exists * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @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. @@ -22309,725 +37082,5178 @@ module.exports = Container; /***/ }), - -/***/ 2840: -/***/ ((module) => { +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 {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 + * @namespace Phaser.Utils.Array */ -var ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix) + +module.exports = { + + Matrix: __webpack_require__(259), + + Add: __webpack_require__(268), + AddAt: __webpack_require__(269), + BringToTop: __webpack_require__(270), + CountAllMatching: __webpack_require__(271), + Each: __webpack_require__(272), + EachInRange: __webpack_require__(273), + FindClosestInSorted: __webpack_require__(274), + Flatten: __webpack_require__(275), + GetAll: __webpack_require__(276), + GetFirst: __webpack_require__(277), + GetRandom: __webpack_require__(278), + MoveDown: __webpack_require__(279), + MoveTo: __webpack_require__(280), + MoveUp: __webpack_require__(281), + MoveAbove: __webpack_require__(282), + MoveBelow: __webpack_require__(283), + NumberArray: __webpack_require__(284), + NumberArrayStep: __webpack_require__(285), + QuickSelect: __webpack_require__(286), + Range: __webpack_require__(287), + Remove: __webpack_require__(288), + RemoveAt: __webpack_require__(289), + RemoveBetween: __webpack_require__(290), + RemoveRandomElement: __webpack_require__(291), + Replace: __webpack_require__(292), + RotateLeft: __webpack_require__(61), + RotateRight: __webpack_require__(62), + SafeRange: __webpack_require__(5), + SendToBack: __webpack_require__(293), + SetAll: __webpack_require__(294), + Shuffle: __webpack_require__(63), + SortByDigits: __webpack_require__(295), + SpliceOne: __webpack_require__(10), + StableSort: __webpack_require__(296), + Swap: __webpack_require__(308) + +}; + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array.Matrix + */ + +module.exports = { + + CheckMatrix: __webpack_require__(26), + MatrixToString: __webpack_require__(260), + ReverseColumns: __webpack_require__(262), + ReverseRows: __webpack_require__(263), + Rotate180: __webpack_require__(264), + RotateLeft: __webpack_require__(265), + RotateMatrix: __webpack_require__(15), + RotateRight: __webpack_require__(266), + Translate: __webpack_require__(267), + TransposeMatrix: __webpack_require__(60) + +}; + + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Pad = __webpack_require__(261); +var CheckMatrix = __webpack_require__(26); + +/** + * Generates a string (which you can pass to console.log) from the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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) { - camera.addToRenderList(container); + var str = ''; - var children = container.list; - - if (children.length === 0) + if (!CheckMatrix(matrix)) { - return; + return str; } - var transformMatrix = container.localTransform; - - if (parentMatrix) + for (var r = 0; r < matrix.length; r++) { - transformMatrix.loadIdentity(); - transformMatrix.multiply(parentMatrix); - transformMatrix.translate(container.x, container.y); - transformMatrix.rotate(container.rotation); - transformMatrix.scale(container.scaleX, container.scaleY); + 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; + + +/***/ }), +/* 261 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {number} [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; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the columns in the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 263 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the rows in the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(15); + +/** + * Rotates the array matrix 180 degrees. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(15); + +/** + * Rotates the array matrix to the left (or 90 degrees) + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(15); + +/** + * Rotates the array matrix to the left (or -90 degrees) + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateLeft = __webpack_require__(61); +var RotateRight = __webpack_require__(62); + +/** + * Translates the given Array Matrix by shifting each column and row the + * amount specified. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.Translate + * @since 3.50.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to translate. + * @param {number} [x=0] - The amount to horizontally translate the matrix by. + * @param {number} [y=0] - The amount to vertically translate the matrix by. + * + * @return {T[][]} The translated matrix. + */ +var TranslateMatrix = function (matrix, x, y) +{ + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + // Vertical translation + + if (y !== 0) + { + if (y < 0) + { + // Shift Up + RotateLeft(matrix, Math.abs(y)); + } + else + { + // Shift Down + RotateRight(matrix, y); + } + } + + // Horizontal translation + + if (x !== 0) + { + for (var i = 0; i < matrix.length; i++) + { + var row = matrix[i]; + + if (x < 0) + { + RotateLeft(row, Math.abs(x)); + } + else + { + RotateRight(row, x); + } + } + } + + return matrix; +}; + +module.exports = TranslateMatrix; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 269 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted. + * @param {number} [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; + + +/***/ }), +/* 270 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [endIndex] - An optional end index to search to. + * + * @return {number} 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; + + +/***/ }), +/* 272 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index to search from. + * @param {number} 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; + + +/***/ }), +/* 274 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 { - 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)) + while (array[i] < value) { - continue; + i++; } - - 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, camera, transformMatrix); - - // Restore original values - child.setAlpha(childAlpha); - child.setScrollFactor(childScrollFactorX, childScrollFactorY); } - if (container.mask) + if (i > array.length) { - container.mask.postRenderCanvas(renderer); + 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 = ContainerCanvasRenderer; +module.exports = FindClosestInSorted; /***/ }), - -/***/ 3232: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 275 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(1984); -var renderCanvas = __webpack_require__(1984); - -if (false) -{} - -if (true) +/** + * Takes an array and flattens it, returning a shallow-copy flattened array. + * + * @function Phaser.Utils.Array.Flatten + * @since 3.60.0 + * + * @param {array} array - The array to flatten. + * @param {array} [output] - An array to hold the results in. + * + * @return {array} The flattened output array. + */ +var Flatten = function (array, output) { - renderCanvas = __webpack_require__(2840); + if (output === undefined) { output = []; } + + for (var i = 0; i < array.length; i++) + { + if (Array.isArray(array[i])) + { + Flatten(array[i], output); + } + else + { + output.push(array[i]); + } + } + + return output; +}; + +module.exports = Flatten; + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 278 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex=0] - An optional start index. + * @param {number} [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; + + +/***/ }), +/* 279 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 280 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 281 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 282 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element above another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveAbove + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move above base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveAbove = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex > baseIndex) + { + // item1 is already above item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === array.length - 1) + { + array.push(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveAbove; + + +/***/ }), +/* 283 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element below another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveBelow + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move below base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveBelow = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex < baseIndex) + { + // item1 is already below item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === 0) + { + array.unshift(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveBelow; + + +/***/ }), +/* 284 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RoundAwayFromZero = __webpack_require__(42); + +/** + * 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; + + +/***/ }), +/* 286 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; } -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas - -}; - - -/***/ }), - -/***/ 6608: -/***/ ((module) => { - /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} + * @ignore */ - -/** - * 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'; - - -/***/ }), - -/***/ 4265: -/***/ ((module) => { - -/** - * @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. - * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. - */ -module.exports = 'destroy'; - - -/***/ }), - -/***/ 8671: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3420: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 601: -/***/ ((module) => { - -/** - * @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 {number} width - The width of the video. - * @param {number} height - The height of the video. - */ -module.exports = 'created'; - - -/***/ }), - -/***/ 7919: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5241: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3356: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 7513: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5788: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8118: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5529: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4287: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3389: -/***/ ((module, __unused_webpack_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__(6608), - DESTROY: __webpack_require__(4265), - REMOVED_FROM_SCENE: __webpack_require__(8671), - VIDEO_COMPLETE: __webpack_require__(3420), - VIDEO_CREATED: __webpack_require__(601), - VIDEO_ERROR: __webpack_require__(7919), - VIDEO_LOOP: __webpack_require__(5241), - VIDEO_PLAY: __webpack_require__(3356), - VIDEO_SEEKED: __webpack_require__(7513), - VIDEO_SEEKING: __webpack_require__(5788), - VIDEO_STOP: __webpack_require__(8118), - VIDEO_TIMEOUT: __webpack_require__(5529), - VIDEO_UNLOCKED: __webpack_require__(4287) - -}; - - -/***/ }), - -/***/ 1643: -/***/ ((module) => { - -/** - * @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 {number} - * @since 3.19.0 - */ - CIRCLE: 0, - - /** - * An Ellipse Geometry object type. - * - * @name Phaser.Geom.ELLIPSE - * @type {number} - * @since 3.19.0 - */ - ELLIPSE: 1, - - /** - * A Line Geometry object type. - * - * @name Phaser.Geom.LINE - * @type {number} - * @since 3.19.0 - */ - LINE: 2, - - /** - * A Point Geometry object type. - * - * @name Phaser.Geom.POINT - * @type {number} - * @since 3.19.0 - */ - POINT: 3, - - /** - * A Polygon Geometry object type. - * - * @name Phaser.Geom.POLYGON - * @type {number} - * @since 3.19.0 - */ - POLYGON: 4, - - /** - * A Rectangle Geometry object type. - * - * @name Phaser.Geom.RECTANGLE - * @type {number} - * @since 3.19.0 - */ - RECTANGLE: 5, - - /** - * A Triangle Geometry object type. - * - * @name Phaser.Geom.TRIANGLE - * @type {number} - * @since 3.19.0 - */ - TRIANGLE: 6 - -}; - -module.exports = GEOM_CONST; - - -/***/ }), - -/***/ 8881: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(7655); - -/** - * 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) +function defaultCompare (a, b) { - if (out === undefined) { out = new Point(); } + return a < b ? -1 : a > b ? 1 : 0; +} - out.x = line.x1 + (line.x2 - line.x1) * position; - out.y = line.y1 + (line.y2 - line.y1) * position; +/** + * 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 {number} k - The k-th element index. + * @param {number} [left=0] - The index of the left part of the range. + * @param {number} [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; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetValue = __webpack_require__(7); +var Shuffle = __webpack_require__(63); + +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; }; -module.exports = GetPoint; +/** + * 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; /***/ }), - -/***/ 4479: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(4771); -var Point = __webpack_require__(7655); +var SpliceOne = __webpack_require__(10); /** - * Get a number of points along a line's length. + * Removes the given item, or array of items, from the array. * - * Provide a `quantity` to get an exact number of points along the line. + * The array is modified in-place. * - * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when - * providing a `stepRate`. + * You can optionally specify a callback to be invoked for each item successfully removed from the array. * - * @function Phaser.Geom.Line.GetPoints + * @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; + var removed = []; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + removed.push(entry); + + if (callback) + { + callback.call(context, entry); + } + } + + itemLength--; + } + + return removed; +}; + +module.exports = Remove; + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(10); + +/** + * 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 {number} 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; + + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index to remove from. + * @param {number} 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; + + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(10); + +/** + * 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 {number} [start=0] - The array index to start the search from. + * @param {number} [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; + + +/***/ }), +/* 292 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 293 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 295 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Device = __webpack_require__(297); + +/** + * 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); +} + +/** + * 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 = 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) + { + RunPass(array, compare, chk, buffer); + + var tmp = array; + + array = buffer; + + buffer = tmp; + } + + return array; +} + +/** + * 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) + { + 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++]; + } + } + else if (li < r) + { + // Nothing to compare, just flush what's left. + result[i++] = arr[li++]; + } + else if (ri < e) + { + result[i++] = arr[ri++]; + } + 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; } + + // Short-circuit when there's nothing to sort. + if (!array || array.length < 2) + { + return array; + } + + if (Device.features.stableSort) + { + return array.sort(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; +}; + +module.exports = StableSort; + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// This singleton is instantiated as soon as Phaser loads, +// before a Phaser.Game instance has even been created. +// Which means all instances of Phaser Games can share it, +// without having to re-poll the device all over again + +/** + * @namespace Phaser.Device + * @since 3.0.0 + */ + +/** + * @typedef {object} Phaser.DeviceConf + * + * @property {Phaser.Device.OS} os - The OS Device functions. + * @property {Phaser.Device.Browser} browser - The Browser Device functions. + * @property {Phaser.Device.Features} features - The Features Device functions. + * @property {Phaser.Device.Input} input - The Input Device functions. + * @property {Phaser.Device.Audio} audio - The Audio Device functions. + * @property {Phaser.Device.Video} video - The Video Device functions. + * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions. + * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions. + */ + +module.exports = { + + os: __webpack_require__(27), + browser: __webpack_require__(16), + features: __webpack_require__(299), + input: __webpack_require__(303), + audio: __webpack_require__(304), + video: __webpack_require__(305), + fullscreen: __webpack_require__(306), + canvasFeatures: __webpack_require__(307) + +}; + + +/***/ }), +/* 298 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(27); +var Browser = __webpack_require__(16); +var CanvasPool = __webpack_require__(64); + +/** + * Determines the features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.features` from within any Scene. + * + * @typedef {object} Phaser.Device.Features + * @since 3.0.0 + * + * @property {boolean} canvas - Is canvas available? + * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap. + * @property {boolean} file - Is file available? + * @property {boolean} fileSystem - Is fileSystem available? + * @property {boolean} getUserMedia - Does the device support the getUserMedia API? + * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays) + * @property {boolean} localStorage - Is localStorage available? + * @property {boolean} pointerLock - Is Pointer Lock available? + * @property {boolean} stableSort - Is Array.sort stable? + * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views? + * @property {boolean} vibration - Does the device support the Vibration API? + * @property {boolean} webGL - Is webGL available? + * @property {boolean} worker - Is worker available? + */ +var Features = { + + canvas: false, + canvasBitBltShift: null, + file: false, + fileSystem: false, + getUserMedia: true, + littleEndian: false, + localStorage: false, + pointerLock: false, + stableSort: false, + support32bit: false, + vibration: false, + webGL: false, + worker: false + +}; + +// Check Little or Big Endian system. +// @author Matt DesLauriers (@mattdesl) +function checkIsLittleEndian () +{ + var a = new ArrayBuffer(4); + var b = new Uint8Array(a); + var c = new Uint32Array(a); + + b[0] = 0xa1; + b[1] = 0xb2; + b[2] = 0xc3; + b[3] = 0xd4; + + if (c[0] === 0xd4c3b2a1) + { + return true; + } + + if (c[0] === 0xa1b2c3d4) + { + return false; + } + else + { + // Could not determine endianness + return null; + } +} + +function init () +{ + if (typeof importScripts === 'function') + { + return Features; + } + + Features.canvas = !!window['CanvasRenderingContext2D']; + + try + { + Features.localStorage = !!localStorage.getItem; + } + catch (error) + { + Features.localStorage = false; + } + + Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; + Features.fileSystem = !!window['requestFileSystem']; + + var isUint8 = false; + + var testWebGL = function () + { + if (window['WebGLRenderingContext']) + { + try + { + var canvas = CanvasPool.createWebGL(this); + + var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); + + var canvas2D = CanvasPool.create2D(this); + + var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true }); + + // Can't be done on a webgl context + var image = ctx2D.createImageData(1, 1); + + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) + isUint8 = image.data instanceof Uint8ClampedArray; + + CanvasPool.remove(canvas); + CanvasPool.remove(canvas2D); + + return !!ctx; + } + catch (e) + { + return false; + } + } + + return false; + }; + + Features.webGL = testWebGL(); + + Features.worker = !!window['Worker']; + + Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document; + + navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia; + + window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL; + + Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL; + + // Older versions of firefox (< 21) apparently claim support but user media does not actually work + if (Browser.firefox && Browser.firefoxVersion < 21) + { + Features.getUserMedia = false; + } + + // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it + // is safer to not try and use the fast copy-over method. + if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome)) + { + Features.canvasBitBltShift = true; + } + + // Known not to work + if (Browser.safari || Browser.mobileSafari) + { + Features.canvasBitBltShift = false; + } + + navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; + + if (navigator.vibrate) + { + Features.vibration = true; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined') + { + Features.littleEndian = checkIsLittleEndian(); + } + + Features.support32bit = ( + typeof ArrayBuffer !== 'undefined' && + typeof Uint8ClampedArray !== 'undefined' && + typeof Int32Array !== 'undefined' && + Features.littleEndian !== null && + isUint8 + ); + + return Features; +} + +module.exports = init(); + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Global constants. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.60.0-beta.18', + + BlendModes: __webpack_require__(12), + + ScaleModes: __webpack_require__(301), + + /** + * This setting will auto-detect if the browser is capable of suppporting WebGL. + * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer. + * + * @name Phaser.AUTO + * @const + * @type {number} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports + * WebGL or not. + * + * @name Phaser.CANVAS + * @const + * @type {number} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is + * no fallback to Canvas with this setting, so you should trap it and display a suitable + * message to the user. + * + * @name Phaser.WEBGL + * @const + * @type {number} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still + * absolutely relies on the DOM being present and available. This mode is meant for unit testing, + * not for running Phaser on the server, which is something you really shouldn't do. + * + * @name Phaser.HEADLESS + * @const + * @type {number} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {number} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {number} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {number} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {number} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {number} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {number} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + +/***/ }), +/* 301 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Scale Modes. + * + * @namespace Phaser.ScaleModes + * @since 3.0.0 + */ + +var ScaleModes = { + + /** + * Default Scale Mode (Linear). + * + * @name Phaser.ScaleModes.DEFAULT + * @type {number} + * @readonly + * @since 3.0.0 + */ + DEFAULT: 0, + + /** + * Linear Scale Mode. + * + * @name Phaser.ScaleModes.LINEAR + * @type {number} + * @readonly + * @since 3.0.0 + */ + LINEAR: 0, + + /** + * Nearest Scale Mode. + * + * @name Phaser.ScaleModes.NEAREST + * @type {number} + * @readonly + * @since 3.0.0 + */ + NEAREST: 1 + +}; + +module.exports = ScaleModes; + + +/***/ }), +/* 302 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Browser specific prefix, so not going to change between contexts, only between browsers +var prefix = ''; + +/** + * @namespace Phaser.Display.Canvas.Smoothing + * @since 3.0.0 + */ +var Smoothing = function () +{ + /** + * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set. + * + * @function Phaser.Display.Canvas.Smoothing.getPrefix + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check. + * + * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported. + */ + var getPrefix = function (context) + { + var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ]; + + for (var i = 0; i < vendors.length; i++) + { + var s = vendors[i] + 'mageSmoothingEnabled'; + + if (s in context) + { + return s; + } + } + + return null; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.enable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var enable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = true; + } + + return context; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.disable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var disable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = false; + } + + return context; + }; + + /** + * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`. + * Returns null if no smoothing prefix is available. + * + * @function Phaser.Display.Canvas.Smoothing.isEnabled + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check. + * + * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported. + */ + var isEnabled = function (context) + { + return (prefix !== null) ? context[prefix] : null; + }; + + return { + disable: disable, + enable: enable, + getPrefix: getPrefix, + isEnabled: isEnabled + }; + +}; + +module.exports = Smoothing(); + + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(16); + +/** + * Determines the input support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.input` from within any Scene. + * + * @typedef {object} Phaser.Device.Input + * @since 3.0.0 + * + * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll' + * @property {boolean} gamepads - Is navigator.getGamepads available? + * @property {boolean} mspointer - Is mspointer available? + * @property {boolean} touch - Is touch available? + */ +var Input = { + + gamepads: false, + mspointer: false, + touch: false, + wheelEvent: null + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Input; + } + + if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1)) + { + Input.touch = true; + } + + if (navigator.msPointerEnabled || navigator.pointerEnabled) + { + Input.mspointer = true; + } + + if (navigator.getGamepads) + { + Input.gamepads = true; + } + + // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel + if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window)) + { + // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+ + Input.wheelEvent = 'wheel'; + } + else if ('onmousewheel' in window) + { + // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7. + Input.wheelEvent = 'mousewheel'; + } + else if (Browser.firefox && 'MouseScrollEvent' in window) + { + // FF prior to 17. This should probably be scrubbed. + Input.wheelEvent = 'DOMMouseScroll'; + } + + return Input; +} + +module.exports = init(); + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(16); + +/** + * Determines the audio playback capabilities of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.audio` from within any Scene. + * + * @typedef {object} Phaser.Device.Audio + * @since 3.0.0 + * + * @property {boolean} audioData - Can this device play HTML Audio tags? + * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files? + * @property {boolean} m4a - Can this device can play m4a files. + * @property {boolean} aac - Can this device can play aac files. + * @property {boolean} flac - Can this device can play flac files. + * @property {boolean} mp3 - Can this device play mp3 files? + * @property {boolean} ogg - Can this device play ogg files? + * @property {boolean} opus - Can this device play opus files? + * @property {boolean} wav - Can this device play wav files? + * @property {boolean} webAudio - Does this device have the Web Audio API? + * @property {boolean} webm - Can this device play webm files? + */ +var Audio = { + + flac: false, + aac: false, + audioData: false, + dolby: false, + m4a: false, + mp3: false, + ogg: false, + opus: false, + wav: false, + webAudio: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Audio; + } + + Audio.audioData = !!(window['Audio']); + + Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']); + + var audioElement = document.createElement('audio'); + var result = !!audioElement.canPlayType; + + try + { + if (result) + { + var CanPlay = function (type1, type2) + { + var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, ''); + + if (type2) + { + return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, '')); + } + else + { + return Boolean(canPlayType1); + } + }; + + // wav Mimetypes accepted: + // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + + Audio.ogg = CanPlay('ogg; codecs="vorbis"'); + Audio.opus = CanPlay('ogg; codecs="opus"', 'opus'); + Audio.mp3 = CanPlay('mpeg'); + Audio.wav = CanPlay('wav'); + Audio.m4a = CanPlay('x-m4a'); + Audio.aac = CanPlay('aac'); + Audio.flac = CanPlay('flac', 'x-flac'); + Audio.webm = CanPlay('webm; codecs="vorbis"'); + + if (audioElement.canPlayType('audio/mp4; codecs="ec-3"') !== '') + { + if (Browser.edge) + { + Audio.dolby = true; + } + else if (Browser.safari && Browser.safariVersion >= 9) + { + if ((/Mac OS X (\d+)_(\d+)/).test(navigator.userAgent)) + { + var major = parseInt(RegExp.$1, 10); + var minor = parseInt(RegExp.$2, 10); + + if ((major === 10 && minor >= 11) || major > 10) + { + Audio.dolby = true; + } + } + } + } + } + } + catch (e) + { + // Nothing to do here + } + + return Audio; +} + +module.exports = init(); + + +/***/ }), +/* 305 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the video support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.video` from within any Scene. + * + * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix. + * + * @typedef {object} Phaser.Device.Video + * @since 3.0.0 + * + * @property {boolean} h264 - Can this device play h264 mp4 video files? + * @property {boolean} hls - Can this device play hls video files? + * @property {boolean} mp4 - Can this device play h264 mp4 video files? + * @property {boolean} m4v - Can this device play m4v (typically mp4) video files? + * @property {boolean} ogg - Can this device play ogg video files? + * @property {boolean} vp9 - Can this device play vp9 video files? + * @property {boolean} webm - Can this device play webm video files? + */ +var Video = { + + h264: false, + hls: false, + mp4: false, + m4v: false, + ogg: false, + vp9: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Video; + } + + var videoElement = document.createElement('video'); + var result = !!videoElement.canPlayType; + var no = /^no$/; + + try + { + if (result) + { + if (videoElement.canPlayType('video/ogg; codecs="theora"').replace(no, '')) + { + Video.ogg = true; + } + + if (videoElement.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(no, '')) + { + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + Video.h264 = true; + Video.mp4 = true; + } + + if (videoElement.canPlayType('video/x-m4v').replace(no, '')) + { + Video.m4v = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp8, vorbis"').replace(no, '')) + { + Video.webm = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp9"').replace(no, '')) + { + Video.vp9 = true; + } + + if (videoElement.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(no, '')) + { + Video.hls = true; + } + } + } + catch (e) + { + // Nothing to do + } + + return Video; +} + +module.exports = init(); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the full screen support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.fullscreen` from within any Scene. + * + * @typedef {object} Phaser.Device.Fullscreen + * @since 3.0.0 + * + * @property {boolean} available - Does the browser support the Full Screen API? + * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode? + * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it. + * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it. + */ +var Fullscreen = { + + available: false, + cancel: '', + keyboard: false, + request: '' + +}; + +/** +* Checks for support of the Full Screen API. +* +* @ignore +*/ +function init () +{ + if (typeof importScripts === 'function') + { + return Fullscreen; + } + + var i; + + var suffix1 = 'Fullscreen'; + var suffix2 = 'FullScreen'; + + var fs = [ + 'request' + suffix1, + 'request' + suffix2, + 'webkitRequest' + suffix1, + 'webkitRequest' + suffix2, + 'msRequest' + suffix1, + 'msRequest' + suffix2, + 'mozRequest' + suffix2, + 'mozRequest' + suffix1 + ]; + + for (i = 0; i < fs.length; i++) + { + if (document.documentElement[fs[i]]) + { + Fullscreen.available = true; + Fullscreen.request = fs[i]; + break; + } + } + + var cfs = [ + 'cancel' + suffix2, + 'exit' + suffix1, + 'webkitCancel' + suffix2, + 'webkitExit' + suffix1, + 'msCancel' + suffix2, + 'msExit' + suffix1, + 'mozCancel' + suffix2, + 'mozExit' + suffix1 + ]; + + if (Fullscreen.available) + { + for (i = 0; i < cfs.length; i++) + { + if (document[cfs[i]]) + { + Fullscreen.cancel = cfs[i]; + break; + } + } + } + + // Keyboard Input? + // Safari 5.1 says it supports fullscreen keyboard, but is lying. + if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\/5\.1(?:\.\d+)? Safari\//).test(navigator.userAgent)) + { + Fullscreen.keyboard = true; + } + + Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } }); + + return Fullscreen; +} + +module.exports = init(); + + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(64); + +/** + * Determines the canvas features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.canvasFeatures` from within any Scene. + * + * @typedef {object} Phaser.Device.CanvasFeatures + * @since 3.0.0 + * + * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha. + * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes. + */ +var CanvasFeatures = { + + supportInverseAlpha: false, + supportNewBlendModes: false + +}; + +function checkBlendMode () +{ + var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/'; + var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=='; + + var magenta = new Image(); + + magenta.onload = function () + { + var yellow = new Image(); + + yellow.onload = function () + { + var canvas = CanvasPool.create2D(yellow, 6); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.globalCompositeOperation = 'multiply'; + + context.drawImage(magenta, 0, 0); + context.drawImage(yellow, 2, 0); + + if (!context.getImageData(2, 0, 1, 1)) + { + return false; + } + + var data = context.getImageData(2, 0, 1, 1).data; + + CanvasPool.remove(yellow); + + CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0); + }; + + yellow.src = pngHead + '/wCKxvRF' + pngEnd; + }; + + magenta.src = pngHead + 'AP804Oa6' + pngEnd; + + return false; +} + +function checkInverseAlpha () +{ + var canvas = CanvasPool.create2D(this, 2); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.fillStyle = 'rgba(10, 20, 30, 0.5)'; + + // Draw a single pixel + context.fillRect(0, 0, 1, 1); + + // Get the color values + var s1 = context.getImageData(0, 0, 1, 1); + + if (s1 === null) + { + return false; + } + + // Plot them to x2 + context.putImageData(s1, 1, 0); + + // Get those values + var s2 = context.getImageData(1, 0, 1, 1); + + var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]); + + CanvasPool.remove(this); + + // Compare and return + return result; +} + +function init () +{ + if (typeof importScripts !== 'function' && document !== undefined) + { + CanvasFeatures.supportNewBlendModes = checkBlendMode(); + CanvasFeatures.supportInverseAlpha = checkInverseAlpha(); + } + + return CanvasFeatures; +} + +module.exports = init(); + + +/***/ }), +/* 308 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 array; + } + + 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; + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(310), + AlphaSingle: __webpack_require__(311), + BlendMode: __webpack_require__(312), + ComputedSize: __webpack_require__(50), + Crop: __webpack_require__(313), + Depth: __webpack_require__(51), + Flip: __webpack_require__(52), + FX: __webpack_require__(314), + GetBounds: __webpack_require__(315), + Mask: __webpack_require__(324), + Origin: __webpack_require__(329), + PathFollower: __webpack_require__(330), + Pipeline: __webpack_require__(333), + ScrollFactor: __webpack_require__(53), + Size: __webpack_require__(335), + Texture: __webpack_require__(336), + TextureCrop: __webpack_require__(337), + Tint: __webpack_require__(338), + ToJSON: __webpack_require__(58), + Transform: __webpack_require__(54), + TransformMatrix: __webpack_require__(55), + Visible: __webpack_require__(56) + +}; + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(12); + +/** + * 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 {number} + * @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: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string|number)} + * @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: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + +/***/ }), +/* 313 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the FX values of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.FX + * @webglOnly + * @since 3.60.0 + */ + +var FX = { + + /** + * The amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @name Phaser.GameObjects.Components.FX#fxPadding + * @type {number} + * @default 0 + * @since 3.60.0 + */ + fxPadding: 0, + + /** + * Sets the amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @method Phaser.GameObjects.Components.FX#setFXPadding + * @webglOnly + * @since 3.60.0 + * + * @param {number} [padding=0] - The amount of padding to add to the texture. + * + * @return {this} This Game Object instance. + */ + setFXPadding: function (padding) + { + if (padding === undefined) { padding = 0; } + + this.fxPadding = padding; + + return this; + }, + + /** + * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `copySprite` method. + * + * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFXCopy + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFXCopy: function () + { + }, + + /** + * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `drawSprite` method. + * + * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFX + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFX: function () + { + } + +}; + +module.exports = FX; + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(28); +var RotateAround = __webpack_require__(41); +var Vector2 = __webpack_require__(2); + +/** + * 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; + + +/***/ }), +/* 316 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetPoint = __webpack_require__(65); +var Perimeter = __webpack_require__(66); + +/** + * 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.Line} line - The line. - * @param {number} 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. + * @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 {number} 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, or point-like objects, containing the coordinates of the points on the line. + * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle. */ -var GetPoints = function (line, quantity, stepRate, out) +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 = Length(line) / stepRate; + quantity = Perimeter(rectangle) / 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)); + out.push(GetPoint(rectangle, position)); } return out; @@ -23037,51 +42263,21 @@ module.exports = GetPoints; /***/ }), - -/***/ 4771: -/***/ ((module) => { +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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; - - -/***/ }), - -/***/ 284: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var GetPoint = __webpack_require__(8881); -var GetPoints = __webpack_require__(4479); -var GEOM_CONST = __webpack_require__(1643); -var Random = __webpack_require__(3915); -var Vector2 = __webpack_require__(2529); +var Class = __webpack_require__(0); +var GetPoint = __webpack_require__(319); +var GetPoints = __webpack_require__(320); +var GEOM_CONST = __webpack_require__(29); +var Random = __webpack_require__(322); +var Vector2 = __webpack_require__(2); /** * @classdesc @@ -23404,17 +42600,148 @@ module.exports = Line; /***/ }), - -/***/ 3915: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Point = __webpack_require__(7655); +var Point = __webpack_require__(11); + +/** + * 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; + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(321); +var Point = __webpack_require__(11); + +/** + * 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 {number} 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; + + +/***/ }), +/* 321 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(11); /** * Returns a random point on a given Line. @@ -23445,313 +42772,16 @@ module.exports = Random; /***/ }), - -/***/ 7655: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var GEOM_CONST = __webpack_require__(1643); - -/** - * @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 {number} - * @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; - - -/***/ }), - -/***/ 5956: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 716: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Perimeter = __webpack_require__(8073); -var Point = __webpack_require__(7655); - -/** - * 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; - - -/***/ }), - -/***/ 8151: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetPoint = __webpack_require__(716); -var Perimeter = __webpack_require__(8073); - -// 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 {number} 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; - - -/***/ }), - -/***/ 8073: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2161: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(7655); +var Point = __webpack_require__(11); /** * Returns a random point within a Rectangle. @@ -23780,16075 +42810,1809 @@ module.exports = Random; /***/ }), - -/***/ 2150: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var Contains = __webpack_require__(5956); -var GetPoint = __webpack_require__(716); -var GetPoints = __webpack_require__(8151); -var GEOM_CONST = __webpack_require__(1643); -var Line = __webpack_require__(284); -var Random = __webpack_require__(2161); +var BitmapMask = __webpack_require__(325); +var GeometryMask = __webpack_require__(328); /** - * @classdesc - * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + * Provides methods used for getting and setting the mask of a Game Object. * - * @class Rectangle - * @memberof Phaser.Geom - * @constructor + * @namespace Phaser.GameObjects.Components.Mask * @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 {number} - * @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; - }, +var Mask = { /** - * Checks if the given point is inside the Rectangle's bounds. + * The Mask this Game Object is using during render. * - * @method Phaser.Geom.Rectangle#contains + * @name Phaser.GameObjects.Components.Mask#mask + * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} * @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); - }, + mask: null, /** - * 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. + * Sets the mask that this Game Object will use to render with. * - * @method Phaser.Geom.Rectangle#getPoint - * @since 3.0.0 + * 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. * - * @generic {Phaser.Geom.Point} O - [output,$return] + * If a mask is already set on this Game Object it will be immediately replaced. * - * @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. + * 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. * - * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given. + * 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. */ - getPoint: function (position, output) + setMask: function (mask) { - 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 {number} 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; + this.mask = mask; return this; }, /** - * Resets the position, width, and height of the Rectangle to 0. + * Clears the mask that this Game Object was using. * - * @method Phaser.Geom.Rectangle#setEmpty - * @since 3.0.0 + * @method Phaser.GameObjects.Components.Mask#clearMask + * @since 3.6.2 * - * @return {this} This Rectangle object. + * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? + * + * @return {this} This Game Object instance. */ - setEmpty: function () + clearMask: function (destroyMask) { - return this.setTo(0, 0, 0, 0); - }, + if (destroyMask === undefined) { destroyMask = false; } - /** - * 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; } + if (destroyMask && this.mask) + { + this.mask.destroy(); + } - this.x = x; - this.y = y; + this.mask = null; return this; }, /** - * Sets the width and height of the Rectangle. + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one, or a Dynamic Texture. * - * @method Phaser.Geom.Rectangle#setSize - * @since 3.0.0 + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. * - * @param {number} width - The width to set the Rectangle to. - * @param {number} [height=width] - The height to set the Rectangle to. + * 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. * - * @return {this} This Rectangle object. + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable texture-based Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @generic {Phaser.GameObjects.GameObject} G + * @generic {Phaser.Textures.DynamicTexture} T + * @genericUse {(G|T|null)} [maskObject] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. */ - setSize: function (width, height) + createBitmapMask: function (maskObject, x, y, texture, frame) { - 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 () + if (maskObject === undefined && (this.texture || this.shader || this.geom)) { - return this.x; - }, - - set: function (value) - { - if (value >= this.right) - { - this.width = 0; - } - else - { - this.width = this.right - value; - } - - this.x = value; + // eslint-disable-next-line consistent-this + maskObject = this; } + return new BitmapMask(this.scene, maskObject, x, y, texture, frame); }, /** - * 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. + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. * - * @name Phaser.Geom.Rectangle#right - * @type {number} - * @since 3.0.0 + * 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 + * + * @generic {Phaser.GameObjects.Graphics} G + * @generic {Phaser.GameObjects.Shape} S + * @genericUse {(G|S)} [graphics] + * + * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask. + * + * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. */ - right: { - - get: function () + createGeometryMask: function (graphics) + { + if (graphics === undefined && (this.type === 'Graphics' || this.geom)) { - 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); + // eslint-disable-next-line consistent-this + graphics = this; } + return new GeometryMask(this.scene, graphics); } -}); - -module.exports = Rectangle; - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Rectangle = __webpack_require__(2150); - -/** - * 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; +module.exports = Mask; /***/ }), - -/***/ 1593: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var Events = __webpack_require__(1179); -var GetFastValue = __webpack_require__(4597); -var GetURL = __webpack_require__(5593); -var MergeXHRSettings = __webpack_require__(7410); -var XHRLoader = __webpack_require__(5874); -var XHRSettings = __webpack_require__(707); +var Class = __webpack_require__(0); +var GameObjectFactory = __webpack_require__(326); /** * @classdesc - * The base File class used by all File Types that the Loader can support. - * 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. + * 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. * - * @class File - * @memberof Phaser.Loader + * A Bitmap Mask can use any Game Object or Dynamic Texture 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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.Loader.LoaderPlugin} loader - The Loader that is going to load this File. - * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type. + * @param {Phaser.Scene} scene - The Scene to which this mask is being added. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. */ -var File = new Class({ +var BitmapMask = new Class({ initialize: - function File (loader, fileConfig) + function BitmapMask (scene, maskObject, x, y, texture, frame) { + if (!maskObject) + { + maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false }); + } + /** - * A reference to the Loader that is going to load this file. + * The Game Object that is used as the mask. Must use a texture, such as a Sprite. * - * @name Phaser.Loader.File#loader - * @type {Phaser.Loader.LoaderPlugin} + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} * @since 3.0.0 */ - this.loader = loader; + this.bitmapMask = maskObject; /** - * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. + * Whether to invert the masks alpha. * - * @name Phaser.Loader.File#cache - * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)} - * @since 3.7.0 - */ - this.cache = GetFastValue(fileConfig, 'cache', false); - - /** - * The file type string (image, json, etc) for sorting within the Loader. + * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. * - * @name Phaser.Loader.File#type - * @type {string} - * @since 3.0.0 - */ - this.type = GetFastValue(fileConfig, 'type', false); - - /** - * Unique cache key (unique within its file type) + * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible. * - * @name Phaser.Loader.File#key - * @type {string} - * @since 3.0.0 - */ - this.key = GetFastValue(fileConfig, 'key', false); - - var loadKey = this.key; - - if (loader.prefix && loader.prefix !== '') - { - this.key = loader.prefix + loadKey; - } - - if (!this.type || !this.key) - { - throw new Error('Invalid Loader.' + this.type + ' key'); - } - - var url = GetFastValue(fileConfig, 'url'); - - if (url === undefined) - { - url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); - } - else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) - { - url = loader.path + url; - } - - /** - * The URL of the file, not including baseURL. - * - * 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 {object|string} - * @since 3.0.0 - */ - this.url = url; - - /** - * The final URL this file will load from, including baseURL and path. - * Set automatically when the Loader calls 'load' on this file. - * - * @name Phaser.Loader.File#src - * @type {string} - * @since 3.0.0 - */ - this.src = ''; - - /** - * The merged XHRSettings for this file. - * - * @name Phaser.Loader.File#xhrSettings - * @type {Phaser.Types.Loader.XHRSettingsObject} - * @since 3.0.0 - */ - this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined)); - - if (GetFastValue(fileConfig, 'xhrSettings', false)) - { - this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {})); - } - - /** - * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. - * - * @name Phaser.Loader.File#xhrLoader - * @type {?XMLHttpRequest} - * @since 3.0.0 - */ - this.xhrLoader = null; - - /** - * The current state of the file. One of the FILE_CONST values. - * - * @name Phaser.Loader.File#state - * @type {number} - * @since 3.0.0 - */ - this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING; - - /** - * The total size of this file. - * Set by onProgress and only if loading via XHR. - * - * @name Phaser.Loader.File#bytesTotal - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.bytesTotal = 0; - - /** - * Updated as the file loads. - * Only set if loading via XHR. - * - * @name Phaser.Loader.File#bytesLoaded - * @type {number} - * @default -1 - * @since 3.0.0 - */ - this.bytesLoaded = -1; - - /** - * A percentage value between 0 and 1 indicating how much of this file has loaded. - * Only set if loading via XHR. - * - * @name Phaser.Loader.File#percentComplete - * @type {number} - * @default -1 - * @since 3.0.0 - */ - this.percentComplete = -1; - - /** - * For CORs based loading. - * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) - * - * @name Phaser.Loader.File#crossOrigin - * @type {(string|undefined)} - * @since 3.0.0 - */ - this.crossOrigin = undefined; - - /** - * The processed file data, stored here after the file has loaded. - * - * @name Phaser.Loader.File#data - * @type {*} - * @since 3.0.0 - */ - this.data = undefined; - - /** - * A config object that can be used by file types to store transitional data. - * - * @name Phaser.Loader.File#config - * @type {*} - * @since 3.0.0 - */ - this.config = GetFastValue(fileConfig, 'config', {}); - - /** - * If this is a multipart file, i.e. an atlas and its json together, then this is a reference - * to the parent MultiFile. Set and used internally by the Loader or specific file types. - * - * @name Phaser.Loader.File#multiFile - * @type {?Phaser.Loader.MultiFile} - * @since 3.7.0 - */ - this.multiFile; - - /** - * Does this file have an associated linked file? Such as an image and a normal map. - * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't - * actually bound by data, where-as a linkFile is. - * - * @name Phaser.Loader.File#linkFile - * @type {?Phaser.Loader.File} - * @since 3.7.0 - */ - this.linkFile; - }, - - /** - * Links this File with another, so they depend upon each other for loading and processing. - * - * @method Phaser.Loader.File#setLink - * @since 3.7.0 - * - * @param {Phaser.Loader.File} fileB - The file to link to this one. - */ - setLink: function (fileB) - { - this.linkFile = fileB; - - fileB.linkFile = this; - }, - - /** - * Resets the XHRLoader instance this file is using. - * - * @method Phaser.Loader.File#resetXHR - * @since 3.0.0 - */ - resetXHR: function () - { - if (this.xhrLoader) - { - this.xhrLoader.onload = undefined; - this.xhrLoader.onerror = undefined; - this.xhrLoader.onprogress = undefined; - } - }, - - /** - * Called by the Loader, starts the actual file downloading. - * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. - * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. - * - * @method Phaser.Loader.File#load - * @since 3.0.0 - */ - load: function () - { - if (this.state === CONST.FILE_POPULATED) - { - // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL - this.loader.nextFile(this, true); - } - else - { - this.state = CONST.FILE_LOADING; - - this.src = GetURL(this, this.loader.baseURL); - - if (this.src.indexOf('data:') === 0) - { - console.warn('Local data URIs are not supported: ' + this.key); - } - else - { - // 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 - - this.xhrLoader = XHRLoader(this, this.loader.xhr); - } - } - }, - - /** - * Called when the file finishes loading, is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onLoad - * @since 3.0.0 - * - * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. - * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load. - */ - onLoad: function (xhr, event) - { - // On iOS, Capacitor often runs on a capacitor:// protocol, meaning local files are served from capacitor:// rather than file:// - // See: https://github.com/photonstorm/phaser/issues/5685 - - var isLocalFile = xhr.responseURL && (xhr.responseURL.indexOf('file://') === 0 || xhr.responseURL.indexOf('capacitor://') === 0); - - var localFileOk = (isLocalFile && event.target.status === 0); - - var success = !(event.target && event.target.status !== 200) || localFileOk; - - // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called. - if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) - { - success = false; - } - - this.state = CONST.FILE_LOADED; - - this.resetXHR(); - - this.loader.nextFile(this, success); - }, - - /** - * Called if the file errors while loading, is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onError - * @since 3.0.0 - * - * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. - * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. - */ - onError: function () - { - this.resetXHR(); - - this.loader.nextFile(this, false); - }, - - /** - * Called during the file load progress. Is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onProgress - * @fires Phaser.Loader.Events#FILE_PROGRESS - * @since 3.0.0 - * - * @param {ProgressEvent} event - The DOM ProgressEvent. - */ - onProgress: function (event) - { - if (event.lengthComputable) - { - this.bytesLoaded = event.loaded; - this.bytesTotal = event.total; - - this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1); - - this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete); - } - }, - - /** - * Usually overridden by the FileTypes and is called by Loader.nextFile. - * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. - * - * @method Phaser.Loader.File#onProcess - * @since 3.0.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.onProcessComplete(); - }, - - /** - * Called when the File has completed processing. - * Checks on the state of its multifile, if set. - * - * @method Phaser.Loader.File#onProcessComplete - * @since 3.7.0 - */ - onProcessComplete: function () - { - this.state = CONST.FILE_COMPLETE; - - if (this.multiFile) - { - this.multiFile.onFileComplete(this); - } - - this.loader.fileProcessComplete(this); - }, - - /** - * Called when the File has completed processing but it generated an error. - * Checks on the state of its multifile, if set. - * - * @method Phaser.Loader.File#onProcessError - * @since 3.7.0 - */ - onProcessError: function () - { - // eslint-disable-next-line no-console - console.error('Failed to process file: %s "%s"', this.type, this.key); - - this.state = CONST.FILE_ERRORED; - - if (this.multiFile) - { - this.multiFile.onFileFailed(this); - } - - this.loader.fileProcessComplete(this); - }, - - /** - * Checks if a key matching the one used by this file exists in the target Cache or not. - * This is called automatically by the LoaderPlugin to decide if the file can be safely - * loaded or will conflict. - * - * @method Phaser.Loader.File#hasCacheConflict - * @since 3.7.0 - * - * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`. - */ - hasCacheConflict: function () - { - return (this.cache && this.cache.exists(this.key)); - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * This method is often overridden by specific file types. - * - * @method Phaser.Loader.File#addToCache - * @since 3.7.0 - */ - addToCache: function () - { - if (this.cache && this.data) - { - this.cache.add(this.key, this.data); - } - }, - - /** - * Called once the file has been added to its cache and is now ready for deletion from the Loader. - * It will emit a `filecomplete` event from the LoaderPlugin. - * - * @method Phaser.Loader.File#pendingDestroy - * @fires Phaser.Loader.Events#FILE_COMPLETE - * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.7.0 - */ - pendingDestroy: function (data) - { - if (this.state === CONST.FILE_PENDING_DESTROY) - { - return; - } - - if (data === undefined) { data = this.data; } - - var key = this.key; - var type = this.type; - - this.loader.emit(Events.FILE_COMPLETE, key, type, data); - this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); - - this.loader.flagForRemoval(this); - - this.state = CONST.FILE_PENDING_DESTROY; - }, - - /** - * Destroy this File and any references it holds. - * - * @method Phaser.Loader.File#destroy - * @since 3.7.0 - */ - destroy: function () - { - this.loader = null; - this.cache = null; - this.xhrSettings = null; - this.multiFile = null; - this.linkFile = null; - this.data = null; - } - -}); - -/** - * Static method for creating object URL using URL API and setting it as image 'src' attribute. - * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. - * - * @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. - */ -File.createObjectURL = function (image, blob, defaultType) -{ - if (typeof URL === 'function') - { - image.src = URL.createObjectURL(blob); - } - else - { - var reader = new FileReader(); - - reader.onload = function () - { - image.removeAttribute('crossOrigin'); - image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1]; - }; - - reader.onerror = image.onerror; - - reader.readAsDataURL(blob); - } -}; - -/** - * Static method for releasing an existing object URL which was previously created - * by calling {@link File#createObjectURL} method. - * - * @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) -{ - if (typeof URL === 'function') - { - URL.revokeObjectURL(image.src); - } -}; - -module.exports = File; - - -/***/ }), - -/***/ 9845: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var types = {}; - -/** - * @namespace Phaser.Loader.FileTypesManager - */ - -var FileTypesManager = { - - /** - * Static method called when a LoaderPlugin is created. - * - * Loops through the local types object and injects all of them as - * properties into the LoaderPlugin instance. - * - * @method Phaser.Loader.FileTypesManager.install - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. - */ - install: function (loader) - { - for (var key in types) - { - loader[key] = types[key]; - } - }, - - /** - * Static method called directly by the File Types. - * - * The key is a reference to the function used to load the files via the Loader, i.e. `image`. - * - * @method Phaser.Loader.FileTypesManager.register - * @since 3.0.0 - * - * @param {string} key - The key that will be used as the method name in the LoaderPlugin. - * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. - */ - register: function (key, factoryFunction) - { - types[key] = factoryFunction; - }, - - /** - * Removed all associated file types. - * - * @method Phaser.Loader.FileTypesManager.destroy - * @since 3.0.0 - */ - destroy: function () - { - types = {}; - } - -}; - -module.exports = FileTypesManager; - - -/***/ }), - -/***/ 5593: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Given a File and a baseURL value this returns the URL the File will use to download from. - * - * @function Phaser.Loader.GetURL - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - The File object. - * @param {string} baseURL - A default base URL. - * - * @return {string} The URL the File will use. - */ -var GetURL = function (file, baseURL) -{ - if (!file.url) - { - return false; - } - - if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) - { - return file.url; - } - else - { - return baseURL + file.url; - } -}; - -module.exports = GetURL; - - -/***/ }), - -/***/ 7410: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Extend = __webpack_require__(1030); -var XHRSettings = __webpack_require__(707); - -/** - * Takes two XHRSettings Objects and creates a new XHRSettings object from them. - * - * The new object is seeded by the values given in the global settings, but any setting in - * the local object overrides the global ones. - * - * @function Phaser.Loader.MergeXHRSettings - * @since 3.0.0 - * - * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object. - * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object. - * - * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object. - */ -var MergeXHRSettings = function (global, local) -{ - var output = (global === undefined) ? XHRSettings() : Extend({}, global); - - if (local) - { - for (var setting in local) - { - if (local[setting] !== undefined) - { - output[setting] = local[setting]; - } - } - } - - return output; -}; - -module.exports = MergeXHRSettings; - - -/***/ }), - -/***/ 3137: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var Events = __webpack_require__(1179); - -/** - * @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) - { - var finalFiles = []; - - // Clean out any potential 'null' or 'undefined' file entries - files.forEach(function (file) - { - if (file) - { - finalFiles.push(file); - } - }); - - /** - * 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 {number} - * @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 = finalFiles; - - /** - * The current state of the file. One of the FILE_CONST values. - * - * @name Phaser.Loader.MultiFile#state - * @type {number} - * @since 3.60.0 - */ - this.state = CONST.FILE_PENDING; - - /** - * The completion status of this MultiFile. - * - * @name Phaser.Loader.MultiFile#complete + * @name Phaser.Display.Masks.BitmapMask#invertAlpha * @type {boolean} - * @default false - * @since 3.7.0 + * @since 3.1.2 */ - this.complete = false; + this.invertAlpha = false; /** - * The number of files to load. + * Is this mask a stencil mask? This is false by default and should not be changed. * - * @name Phaser.Loader.MultiFile#pending - * @type {number} - * @since 3.7.0 + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 */ - - this.pending = finalFiles.length; - - /** - * The number of files that failed to load. - * - * @name Phaser.Loader.MultiFile#failed - * @type {number} - * @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 < finalFiles.length; i++) - { - finalFiles[i].multiFile = this; - } + this.isStencil = false; }, /** - * Checks if this MultiFile is ready to process its children or not. + * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use. * - * @method Phaser.Loader.MultiFile#isReadyToProcess + * If a Game Object it must have a texture, such as a Sprite. + * + * You can update the source of the mask as often as you like. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite. + */ + setBitmap: function (maskObject) + { + this.bitmapMask = maskObject; + }, + + /** + * 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.BITMAPMASK_PIPELINE.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. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget. + */ + postRenderWebGL: function (renderer, camera, renderTarget) + { + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget); + }, + + /** + * 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 - * - * @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++; - - // eslint-disable-next-line no-console - console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); - } - }, - - /** - * Called once all children of this multi file have been added to their caches and is now - * ready for deletion from the Loader. - * - * It will emit a `filecomplete` event from the LoaderPlugin. - * - * @method Phaser.Loader.MultiFile#pendingDestroy - * @fires Phaser.Loader.Events#FILE_COMPLETE - * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.60.0 - */ - pendingDestroy: function () - { - if (this.state === CONST.FILE_PENDING_DESTROY) - { - return; - } - - var key = this.key; - var type = this.type; - - this.loader.emit(Events.FILE_COMPLETE, key, type); - this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); - - this.loader.flagForRemoval(this); - - for (var i = 0; i < this.files.length; i++) - { - this.files[i].pendingDestroy(); - } - - this.state = CONST.FILE_PENDING_DESTROY; - }, - - /** - * Destroy this Multi File and any references it holds. - * - * @method Phaser.Loader.MultiFile#destroy - * @since 3.60.0 */ destroy: function () { - this.loader = null; - this.files = null; - this.config = null; - } - -}); - -module.exports = MultiFile; - - -/***/ }), - -/***/ 5874: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MergeXHRSettings = __webpack_require__(7410); - -/** - * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings - * and starts the download of it. It uses the Files own XHRSettings and merges them - * with the global XHRSettings object to set the xhr values before download. - * - * @function Phaser.Loader.XHRLoader - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - The File to download. - * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object. - * - * @return {XMLHttpRequest} The XHR object. - */ -var XHRLoader = function (file, globalXHRSettings) -{ - var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings); - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', file.src, config.async, config.user, config.password); - - 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); - } - - if (config.requestedWith) - { - xhr.setRequestHeader('X-Requested-With', config.requestedWith); - } - - if (config.overrideMimeType) - { - 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); - xhr.onerror = file.onError.bind(file, xhr); - xhr.onprogress = file.onProgress.bind(file); - - // This is the only standard method, the ones above are browser additions (maybe not universal?) - // xhr.onreadystatechange - - xhr.send(); - - return xhr; -}; - -module.exports = XHRLoader; - - -/***/ }), - -/***/ 707: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Creates an XHRSettings Object with default values. - * - * @function Phaser.Loader.XHRSettings - * @since 3.0.0 - * - * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'. - * @param {boolean} [async=true] - Should the XHR request use async or not? - * @param {string} [user=''] - Optional username for the XHR request. - * @param {string} [password=''] - Optional password for the XHR request. - * @param {number} [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, 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. - // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". - - return { - - // Ignored by the Loader, only used by File. - responseType: responseType, - - async: async, - - // credentials - user: user, - password: password, - - // timeout in ms (0 = no timeout) - timeout: timeout, - - // setRequestHeader - headers: undefined, - header: undefined, - headerValue: undefined, - requestedWith: false, - - // overrideMimeType - overrideMimeType: undefined, - - // withCredentials - withCredentials: withCredentials - - }; -}; - -module.exports = XHRSettings; - - -/***/ }), - -/***/ 4359: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var FILE_CONST = { - - /** - * The Loader is idle. - * - * @name Phaser.Loader.LOADER_IDLE - * @type {number} - * @since 3.0.0 - */ - LOADER_IDLE: 0, - - /** - * The Loader is actively loading. - * - * @name Phaser.Loader.LOADER_LOADING - * @type {number} - * @since 3.0.0 - */ - LOADER_LOADING: 1, - - /** - * The Loader is processing files is has loaded. - * - * @name Phaser.Loader.LOADER_PROCESSING - * @type {number} - * @since 3.0.0 - */ - LOADER_PROCESSING: 2, - - /** - * The Loader has completed loading and processing. - * - * @name Phaser.Loader.LOADER_COMPLETE - * @type {number} - * @since 3.0.0 - */ - LOADER_COMPLETE: 3, - - /** - * The Loader is shutting down. - * - * @name Phaser.Loader.LOADER_SHUTDOWN - * @type {number} - * @since 3.0.0 - */ - LOADER_SHUTDOWN: 4, - - /** - * The Loader has been destroyed. - * - * @name Phaser.Loader.LOADER_DESTROYED - * @type {number} - * @since 3.0.0 - */ - LOADER_DESTROYED: 5, - - /** - * File is in the load queue but not yet started. - * - * @name Phaser.Loader.FILE_PENDING - * @type {number} - * @since 3.0.0 - */ - FILE_PENDING: 10, - - /** - * File has been started to load by the loader (onLoad called) - * - * @name Phaser.Loader.FILE_LOADING - * @type {number} - * @since 3.0.0 - */ - FILE_LOADING: 11, - - /** - * File has loaded successfully, awaiting processing. - * - * @name Phaser.Loader.FILE_LOADED - * @type {number} - * @since 3.0.0 - */ - FILE_LOADED: 12, - - /** - * File failed to load. - * - * @name Phaser.Loader.FILE_FAILED - * @type {number} - * @since 3.0.0 - */ - FILE_FAILED: 13, - - /** - * File is being processed (onProcess callback) - * - * @name Phaser.Loader.FILE_PROCESSING - * @type {number} - * @since 3.0.0 - */ - FILE_PROCESSING: 14, - - /** - * The File has errored somehow during processing. - * - * @name Phaser.Loader.FILE_ERRORED - * @type {number} - * @since 3.0.0 - */ - FILE_ERRORED: 16, - - /** - * File has finished processing. - * - * @name Phaser.Loader.FILE_COMPLETE - * @type {number} - * @since 3.0.0 - */ - FILE_COMPLETE: 17, - - /** - * File has been destroyed. - * - * @name Phaser.Loader.FILE_DESTROYED - * @type {number} - * @since 3.0.0 - */ - FILE_DESTROYED: 18, - - /** - * File was populated from local data and doesn't need an HTTP request. - * - * @name Phaser.Loader.FILE_POPULATED - * @type {number} - * @since 3.0.0 - */ - FILE_POPULATED: 19, - - /** - * File is pending being destroyed. - * - * @name Phaser.Loader.FILE_PENDING_DESTROY - * @type {number} - * @since 3.60.0 - */ - FILE_PENDING_DESTROY: 20 - -}; - -module.exports = FILE_CONST; - - -/***/ }), - -/***/ 462: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Add File Event. - * - * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. - * - * Listen to it from a Scene using: `this.load.on('addfile', listener)`. - * - * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. - * - * @event Phaser.Loader.Events#ADD - * @since 3.0.0 - * - * @param {string} key - The unique key of the file that was added to the Loader. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader. - */ -module.exports = 'addfile'; - - -/***/ }), - -/***/ 7297: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Complete Event. - * - * This event is dispatched when the Loader has fully processed everything in the load queue. - * By this point every loaded file will now be in its associated cache and ready for use. - * - * Listen to it from a Scene using: `this.load.on('complete', listener)`. - * - * @event Phaser.Loader.Events#COMPLETE - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - * @param {number} totalComplete - The total number of files that successfully loaded. - * @param {number} totalFailed - The total number of files that failed to load. - */ -module.exports = 'complete'; - - -/***/ }), - -/***/ 8660: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. - * - * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. - * - * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. - * - * 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. - * - * @event Phaser.Loader.Events#FILE_COMPLETE - * @since 3.0.0 - * - * @param {string} key - The key of the file that just loaded and finished processing. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. - */ -module.exports = 'filecomplete'; - - -/***/ }), - -/***/ 6484: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * - * It uses a special dynamic event name constructed from the key and type of the file. - * - * For example, if you have loaded an `image` with a key of `monster`, you can listen for it - * using the following: - * - * ```javascript - * this.load.on('filecomplete-image-monster', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a texture `atlas` with a key of `Level1`: - * - * ```javascript - * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: - * - * ```javascript - * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. - * - * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. - * - * @event Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.0.0 - * - * @param {string} key - The key of the file that just loaded and finished processing. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. - */ -module.exports = 'filecomplete-'; - - -/***/ }), - -/***/ 7972: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Error Event. - * - * This event is dispatched by the Loader Plugin when a file fails to load. - * - * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. - * - * @event Phaser.Loader.Events#FILE_LOAD_ERROR - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which errored during load. - */ -module.exports = 'loaderror'; - - -/***/ }), - -/***/ 1906: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Event. - * - * This event is dispatched by the Loader Plugin when a file finishes loading, - * but _before_ it is processed and added to the internal Phaser caches. - * - * Listen to it from a Scene using: `this.load.on('load', listener)`. - * - * @event Phaser.Loader.Events#FILE_LOAD - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. - */ -module.exports = 'load'; - - -/***/ }), - -/***/ 1441: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Progress Event. - * - * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and - * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. - * - * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. - * - * @event Phaser.Loader.Events#FILE_PROGRESS - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which errored during load. - * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. - */ -module.exports = 'fileprogress'; - - -/***/ }), - -/***/ 1072: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Post Process Event. - * - * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. - * It is dispatched before the internal lists are cleared and each File is destroyed. - * - * Use this hook to perform any last minute processing of files that can only happen once the - * Loader has completed, but prior to it emitting the `complete` event. - * - * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. - * - * @event Phaser.Loader.Events#POST_PROCESS - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - */ -module.exports = 'postprocess'; - - -/***/ }), - -/***/ 1927: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Progress Event. - * - * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. - * - * Listen to it from a Scene using: `this.load.on('progress', listener)`. - * - * @event Phaser.Loader.Events#PROGRESS - * @since 3.0.0 - * - * @param {number} progress - The current progress of the load. A value between 0 and 1. - */ -module.exports = 'progress'; - - -/***/ }), - -/***/ 6597: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Start Event. - * - * This event is dispatched when the Loader starts running. At this point load progress is zero. - * - * This event is dispatched even if there aren't any files in the load queue. - * - * Listen to it from a Scene using: `this.load.on('start', listener)`. - * - * @event Phaser.Loader.Events#START - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - */ -module.exports = 'start'; - - -/***/ }), - -/***/ 1179: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Loader.Events - */ - -module.exports = { - - ADD: __webpack_require__(462), - COMPLETE: __webpack_require__(7297), - FILE_COMPLETE: __webpack_require__(8660), - FILE_KEY_COMPLETE: __webpack_require__(6484), - FILE_LOAD_ERROR: __webpack_require__(7972), - FILE_LOAD: __webpack_require__(1906), - FILE_PROGRESS: __webpack_require__(1441), - POST_PROCESS: __webpack_require__(1072), - PROGRESS: __webpack_require__(1927), - START: __webpack_require__(6597) - -}; - - -/***/ }), - -/***/ 6732: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var IsPlainObject = __webpack_require__(2482); -var GetURL = __webpack_require__(5593); - -/** - * @classdesc - * 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 - * @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.ImageFileConfig)} key - The key to use for this file, or a file configuration object. - * @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] - Extra XHR Settings specifically for this file. - * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets. - */ -var ImageFile = new Class({ - - Extends: File, - - initialize: - - function ImageFile (loader, key, url, xhrSettings, frameConfig) - { - var extension = 'png'; - var normalMapURL; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - normalMapURL = GetFastValue(config, 'normalMap'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - frameConfig = GetFastValue(config, 'frameConfig'); - } - - if (Array.isArray(url)) - { - normalMapURL = url[1]; - url = url[0]; - } - - var fileConfig = { - type: 'image', - cache: loader.textureManager, - extension: extension, - responseType: 'blob', - key: key, - url: url, - xhrSettings: xhrSettings, - config: frameConfig - }; - - File.call(this, loader, fileConfig); - - // Do we have a normal map to load as well? - if (normalMapURL) - { - var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig); - - normalMap.type = 'normalMap'; - - this.setLink(normalMap); - - loader.addFile(normalMap); - } - - this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; - - if (this.useImageElementLoad) - { - this.load = this.loadImage; - this.onProcess = this.onProcessImage; - } - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.ImageFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.data = new Image(); - - this.data.crossOrigin = this.crossOrigin; - - var _this = this; - - this.data.onload = function () - { - File.revokeObjectURL(_this.data); - - _this.onProcessComplete(); - }; - - this.data.onerror = function () - { - File.revokeObjectURL(_this.data); - - _this.onProcessError(); - }; - - File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); - }, - - /** - * Handles image load processing. - * - * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage - * @private - * @since 3.60.0 - */ - onProcessImage: function () - { - var result = this.state; - - this.state = CONST.FILE_PROCESSING; - - if (result === CONST.FILE_LOADED) - { - this.onProcessComplete(); - } - else - { - this.onProcessError(); - } - }, - - /** - * Loads the image using either XHR or an Image tag. - * - * @method Phaser.Loader.FileTypes.ImageFile#loadImage - * @private - * @since 3.60.0 - */ - loadImage: function () - { - this.state = CONST.FILE_LOADING; - - this.src = GetURL(this, this.loader.baseURL); - - if (this.src.indexOf('data:') === 0) - { - console.warn('Local data URIs are not supported: ' + this.key); - } - else - { - this.data = new Image(); - - this.data.crossOrigin = this.crossOrigin; - - var _this = this; - - this.data.onload = function () - { - _this.state = CONST.FILE_LOADED; - - _this.loader.nextFile(_this, true); - }; - - this.data.onerror = function () - { - _this.loader.nextFile(_this, false); - }; - - this.data.src = this.src; - } - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * - * @method Phaser.Loader.FileTypes.ImageFile#addToCache - * @since 3.7.0 - */ - addToCache: function () - { - var linkFile = this.linkFile; - - if (linkFile && linkFile.state === CONST.FILE_COMPLETE) - { - if (this.type === 'image') - { - this.cache.addImage(this.key, this.data, linkFile.data); - } - else - { - this.cache.addImage(linkFile.key, linkFile.data, this.data); - } - } - else if (!linkFile) - { - this.cache.addImage(this.key, this.data); - } + this.bitmapMask = null; } }); /** - * 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 () - * { - * this.load.image('logo', 'images/phaserLogo.png'); - * } - * ``` - * - * 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. - * - * 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. - * - * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. - * 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 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', - * url: 'images/AtariLogo.png' - * }); - * ``` - * - * 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 ... - * this.add.image(x, y, 'logo'); - * ``` - * - * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the image from the Texture Manager. - * - * 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 "alien" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * 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', - * url: 'images/AtariLogo.png', - * normalMap: 'images/AtariLogo-n.png' - * }); - * ``` - * - * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. - * Normal maps are a WebGL only feature. - * - * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. - * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images - * via the Image tag instead. - * - * Note: The ability to load this type of file will only be available if the Image 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#image - * @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 {this} The Loader instance. - */ -FileTypesManager.register('image', function (key, url, 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 ImageFile(this, key[i])); - } - } - else - { - this.addFile(new ImageFile(this, key, url, xhrSettings)); - } - - return this; -}); - -module.exports = ImageFile; - - -/***/ }), - -/***/ 704: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var GetValue = __webpack_require__(5851); -var IsPlainObject = __webpack_require__(2482); - -/** - * @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; - - try - { - var json = JSON.parse(this.xhrLoader.responseText); - } - catch (e) - { - this.onProcessError(); - - throw e; - } - - 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; - - -/***/ }), - -/***/ 1192: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var IsPlainObject = __webpack_require__(2482); - -/** - * @classdesc - * A single Text File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. - * - * @class TextFile - * @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.TextFileConfig)} 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 `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - */ -var TextFile = new Class({ - - Extends: File, - - initialize: - - function TextFile (loader, key, url, xhrSettings) - { - var type = 'text'; - var extension = 'txt'; - var cache = loader.cacheManager.text; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - type = GetFastValue(config, 'type', type); - cache = GetFastValue(config, 'cache', cache); - } - - var fileConfig = { - type: type, - cache: cache, - extension: extension, - responseType: 'text', - key: key, - url: url, - xhrSettings: xhrSettings - }; - - File.call(this, loader, fileConfig); - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.TextFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.data = this.xhrLoader.responseText; - - this.onProcessComplete(); - } - -}); - -/** - * Adds a Text file, or array of Text 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.text('story', 'files/IntroStory.txt'); - * } - * ``` - * - * 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 Text Cache upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Text 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 Text Cache first, before loading a new one. - * - * Instead of passing arguments you can pass a configuration object, such as: - * - * ```javascript - * this.load.text({ - * key: 'story', - * url: 'files/IntroStory.txt' - * }); - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details. - * - * Once the file has finished loading you can access it from its Cache using its key: - * - * ```javascript - * this.load.text('story', 'files/IntroStory.txt'); - * // and later in your game ... - * var data = this.cache.text.get('story'); - * ``` - * - * 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 `Story` the final key will be `LEVEL1.Story` and - * this is what you would use to retrieve the text from the Text 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 "story" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * Note: The ability to load this type of file will only be available if the Text 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#text - * @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 {this} The Loader instance. - */ -FileTypesManager.register('text', function (key, url, 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 TextFile(this, key[i])); - } - } - else - { - this.addFile(new TextFile(this, key, url, xhrSettings)); - } - - return this; -}); - -module.exports = TextFile; - - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 785: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Factorial = __webpack_require__(3916); - -/** - * 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; - - -/***/ }), - -/***/ 7025: -/***/ ((module) => { - -/** - * @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 {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The random integer. - */ -var Between = function (min, max) -{ - return Math.floor(Math.random() * (max - min + 1) + min); -}; - -module.exports = Between; - - -/***/ }), - -/***/ 48: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5035: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2915: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7149: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * Convert the given angle from degrees, to the equivalent angle in radians. - * - * @function Phaser.Math.DegToRad - * @since 3.0.0 - * - * @param {number} 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; - - -/***/ }), - -/***/ 2975: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2107: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); -var Class = __webpack_require__(7473); -var Matrix4 = __webpack_require__(9652); -var NOOP = __webpack_require__(1984); - -var tempMatrix = new Matrix4(); - -/** - * @classdesc - * - * @class Euler - * @memberof Phaser.Math - * @constructor - * @since 3.50.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - */ -var Euler = new Class({ - - initialize: - - function Euler (x, y, z, order) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (z === undefined) { z = 0; } - if (order === undefined) { order = Euler.DefaultOrder; } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this.onChangeCallback = NOOP; - }, - - x: { - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - - this.onChangeCallback(this); - } - }, - - y: { - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - - this.onChangeCallback(this); - } - }, - - z: { - get: function () - { - return this._z; - }, - - set: function (value) - { - this._z = value; - - this.onChangeCallback(this); - } - }, - - order: { - get: function () - { - return this._order; - }, - - set: function (value) - { - this._order = value; - - this.onChangeCallback(this); - } - }, - - set: function (x, y, z, order) - { - if (order === undefined) { order = this._order; } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this.onChangeCallback(this); - - return this; - }, - - copy: function (euler) - { - return this.set(euler.x, euler.y, euler.z, euler.order); - }, - - setFromQuaternion: function (quaternion, order, update) - { - if (order === undefined) { order = this._order; } - if (update === undefined) { update = false; } - - tempMatrix.fromQuat(quaternion); - - return this.setFromRotationMatrix(tempMatrix, order, update); - }, - - setFromRotationMatrix: function (matrix, order, update) - { - if (order === undefined) { order = this._order; } - if (update === undefined) { update = false; } - - var elements = matrix.val; - - // Upper 3x3 of matrix is un-scaled rotation matrix - var m11 = elements[0]; - var m12 = elements[4]; - var m13 = elements[8]; - var m21 = elements[1]; - var m22 = elements[5]; - var m23 = elements[9]; - var m31 = elements[2]; - var m32 = elements[6]; - var m33 = elements[10]; - - var x = 0; - var y = 0; - var z = 0; - var epsilon = 0.99999; - - switch (order) - { - case 'XYZ': - { - y = Math.asin(Clamp(m13, -1, 1)); - - if (Math.abs(m13) < epsilon) - { - x = Math.atan2(-m23, m33); - z = Math.atan2(-m12, m11); - } - else - { - x = Math.atan2(m32, m22); - } - - break; - } - - case 'YXZ': - { - x = Math.asin(-Clamp(m23, -1, 1)); - - if (Math.abs(m23) < epsilon) - { - y = Math.atan2(m13, m33); - z = Math.atan2(m21, m22); - } - else - { - y = Math.atan2(-m31, m11); - } - - break; - } - - case 'ZXY': - { - x = Math.asin(Clamp(m32, -1, 1)); - - if (Math.abs(m32) < epsilon) - { - y = Math.atan2(-m31, m33); - z = Math.atan2(-m12, m22); - } - else - { - z = Math.atan2(m21, m11); - } - - break; - } - - case 'ZYX': - { - y = Math.asin(-Clamp(m31, -1, 1)); - - if (Math.abs(m31) < epsilon) - { - x = Math.atan2(m32, m33); - z = Math.atan2(m21, m11); - } - else - { - z = Math.atan2(-m12, m22); - } - - break; - } - - case 'YZX': - { - z = Math.asin(Clamp(m21, -1, 1)); - - if (Math.abs(m21) < epsilon) - { - x = Math.atan2(-m23, m22); - y = Math.atan2(-m31, m11); - } - else - { - y = Math.atan2(m13, m33); - } - - break; - } - - case 'XZY': - { - z = Math.asin(-Clamp(m12, -1, 1)); - - if (Math.abs(m12) < epsilon) - { - x = Math.atan2(m32, m22); - y = Math.atan2(m13, m11); - } - else - { - x = Math.atan2(-m23, m33); - } - - break; - } - } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - if (update) - { - this.onChangeCallback(this); - } - - return this; - } - -}); - -Euler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ]; - -Euler.DefaultOrder = 'XYZ'; - -module.exports = Euler; - - -/***/ }), - -/***/ 3916: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 104: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4941: -/***/ ((module) => { - -/** - * @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 {number} [place=0] - The place to round to. - * @param {number} [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; - - -/***/ }), - -/***/ 1555: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -/** - * 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 + min; -}; - -module.exports = FromPercent; - - -/***/ }), - -/***/ 5005: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 3702: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8820: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1743: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3416: -/***/ ((module) => { - -/** - * @author Greg McLean - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Interpolates two given Vectors and returns a new Vector between them. - * - * Does not modify either of the passed Vectors. - * - * @function Phaser.Math.LinearXY + * 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, or Dynamic Texture, 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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. + * + * @method Phaser.GameObjects.GameObjectFactory#bitmapMask * @since 3.60.0 * - * @param {Phaser.Math.Vector2} vector1 - Starting vector - * @param {Phaser.Math.Vector2} vector2 - Ending vector - * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. * - * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created. */ -var LinearXY = function (vector1, vector2, t) +GameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame) { - if (t === undefined) { t = 0; } - - return vector1.clone().lerp(vector2, t); -}; - -module.exports = LinearXY; - - -/***/ }), - -/***/ 2149: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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; - } - + return new BitmapMask(this.scene, maskObject, x, y, key, frame); }); -module.exports = Matrix3; +module.exports = BitmapMask; /***/ }), - -/***/ 9652: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var Vector3 = __webpack_require__(5689); - -/** - * @ignore - */ -var EPSILON = 0.000001; +var Class = __webpack_require__(0); +var PluginCache = __webpack_require__(327); +var SceneEvents = __webpack_require__(23); /** * @classdesc - * A four-dimensional matrix. + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. * - * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji - * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. * - * @class Matrix4 - * @memberof Phaser.Math + * @class GameObjectFactory + * @memberof Phaser.GameObjects * @constructor * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from. + * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. */ -var Matrix4 = new Class({ +var GameObjectFactory = new Class({ initialize: - function Matrix4 (m) + function GameObjectFactory (scene) { /** - * The matrix values. + * The Scene to which this Game Object Factory belongs. * - * @name Phaser.Math.Matrix4#val - * @type {Float32Array} - * @since 3.0.0 - */ - this.val = new Float32Array(16); - - if (m) - { - // Assume Matrix4 with val: - this.copy(m); - } - else - { - // Default to identity - this.identity(); - } - }, - - /** - * Make a clone of this Matrix4. - * - * @method Phaser.Math.Matrix4#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix4} A clone of this Matrix4. - */ - clone: function () - { - return new Matrix4(this); - }, - - /** - * This method is an alias for `Matrix4.copy`. - * - * @method Phaser.Math.Matrix4#set - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from. - * - * @return {this} This Matrix4. - */ - set: function (src) - { - return this.copy(src); - }, - - /** - * Sets all values of this Matrix4. - * - * @method Phaser.Math.Matrix4#setValues - * @since 3.50.0 - * - * @param {number} m00 - The m00 value. - * @param {number} m01 - The m01 value. - * @param {number} m02 - The m02 value. - * @param {number} m03 - The m03 value. - * @param {number} m10 - The m10 value. - * @param {number} m11 - The m11 value. - * @param {number} m12 - The m12 value. - * @param {number} m13 - The m13 value. - * @param {number} m20 - The m20 value. - * @param {number} m21 - The m21 value. - * @param {number} m22 - The m22 value. - * @param {number} m23 - The m23 value. - * @param {number} m30 - The m30 value. - * @param {number} m31 - The m31 value. - * @param {number} m32 - The m32 value. - * @param {number} m33 - The m33 value. - * - * @return {this} This Matrix4 instance. - */ - setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) - { - var out = this.val; - - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - - return this; - }, - - /** - * Copy the values of a given Matrix into this Matrix. - * - * @method Phaser.Math.Matrix4#copy - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from. - * - * @return {this} This Matrix4. - */ - copy: function (src) - { - var a = src.val; - - return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - }, - - /** - * Set the values of this Matrix from the given array. - * - * @method Phaser.Math.Matrix4#fromArray - * @since 3.0.0 - * - * @param {number[]} a - The array to copy the values from. Must have at least 16 elements. - * - * @return {this} This Matrix4. - */ - fromArray: function (a) - { - return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - }, - - /** - * Reset this Matrix. - * - * Sets all values to `0`. - * - * @method Phaser.Math.Matrix4#zero - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix4} This Matrix4. - */ - zero: function () - { - return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - }, - - /** - * Generates a transform matrix based on the given position, scale and rotation. - * - * @method Phaser.Math.Matrix4#transform - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} position - The position vector. - * @param {Phaser.Math.Vector3} scale - The scale vector. - * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion. - * - * @return {this} This Matrix4. - */ - transform: function (position, scale, rotation) - { - var rotMatrix = _tempMat1.fromQuat(rotation); - - var rm = rotMatrix.val; - - var sx = scale.x; - var sy = scale.y; - var sz = scale.z; - - return this.setValues( - rm[0] * sx, - rm[1] * sx, - rm[2] * sx, - 0, - - rm[4] * sy, - rm[5] * sy, - rm[6] * sy, - 0, - - rm[8] * sz, - rm[9] * sz, - rm[10] * sz, - 0, - - position.x, - position.y, - position.z, - 1 - ); - }, - - /** - * Set the `x`, `y` and `z` values of this Matrix. - * - * @method Phaser.Math.Matrix4#xyz - * @since 3.0.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {number} z - The z value. - * - * @return {this} This Matrix4. - */ - xyz: function (x, y, z) - { - this.identity(); - - var out = this.val; - - out[12] = x; - out[13] = y; - out[14] = z; - - return this; - }, - - /** - * Set the scaling values of this Matrix. - * - * @method Phaser.Math.Matrix4#scaling - * @since 3.0.0 - * - * @param {number} x - The x scaling value. - * @param {number} y - The y scaling value. - * @param {number} z - The z scaling value. - * - * @return {this} This Matrix4. - */ - scaling: function (x, y, z) - { - this.zero(); - - var out = this.val; - - out[0] = x; - out[5] = y; - out[10] = z; - out[15] = 1; - - return this; - }, - - /** - * Reset this Matrix to an identity (default) matrix. - * - * @method Phaser.Math.Matrix4#identity - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - identity: function () - { - return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - }, - - /** - * Transpose this Matrix. - * - * @method Phaser.Math.Matrix4#transpose - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - transpose: function () - { - var a = this.val; - - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a12 = a[6]; - var a13 = a[7]; - var a23 = a[11]; - - a[1] = a[4]; - a[2] = a[8]; - a[3] = a[12]; - a[4] = a01; - a[6] = a[9]; - a[7] = a[13]; - a[8] = a02; - a[9] = a12; - a[11] = a[14]; - a[12] = a03; - a[13] = a13; - a[14] = a23; - - return this; - }, - - /** - * Copies the given Matrix4 into this Matrix and then inverses it. - * - * @method Phaser.Math.Matrix4#getInverse - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4. - * - * @return {this} This Matrix4. - */ - getInverse: function (m) - { - this.copy(m); - - return this.invert(); - }, - - /** - * Invert this Matrix. - * - * @method Phaser.Math.Matrix4#invert - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - invert: function () - { - var a = 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 this; - } - - det = 1 / det; - - return this.setValues( - (a11 * b11 - a12 * b10 + a13 * b09) * det, - (a02 * b10 - a01 * b11 - a03 * b09) * det, - (a31 * b05 - a32 * b04 + a33 * b03) * det, - (a22 * b04 - a21 * b05 - a23 * b03) * det, - (a12 * b08 - a10 * b11 - a13 * b07) * det, - (a00 * b11 - a02 * b08 + a03 * b07) * det, - (a32 * b02 - a30 * b05 - a33 * b01) * det, - (a20 * b05 - a22 * b02 + a23 * b01) * det, - (a10 * b10 - a11 * b08 + a13 * b06) * det, - (a01 * b08 - a00 * b10 - a03 * b06) * det, - (a30 * b04 - a31 * b02 + a33 * b00) * det, - (a21 * b02 - a20 * b04 - a23 * b00) * det, - (a11 * b07 - a10 * b09 - a12 * b06) * det, - (a00 * b09 - a01 * b07 + a02 * b06) * det, - (a31 * b01 - a30 * b03 - a32 * b00) * det, - (a20 * b03 - a21 * b01 + a22 * b00) * det - ); - }, - - /** - * Calculate the adjoint, or adjugate, of this Matrix. - * - * @method Phaser.Math.Matrix4#adjoint - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - adjoint: function () - { - var a = 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]; - - return this.setValues( - (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)), - -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)), - (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)), - -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)), - -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)), - (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)), - -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)), - (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)), - (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)), - -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)), - (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)), - -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)), - -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)), - (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)), - -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)), - (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)) - ); - }, - - /** - * Calculate the determinant of this Matrix. - * - * @method Phaser.Math.Matrix4#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 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 - return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * @method Phaser.Math.Matrix4#multiply - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by. - * - * @return {this} This Matrix4. - */ - multiply: function (src) - { - var a = 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 b = src.val; - - // Cache only the current line of the second matrix - var b0 = b[0]; - var b1 = b[1]; - var b2 = b[2]; - var b3 = b[3]; - - a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[4]; - b1 = b[5]; - b2 = b[6]; - b3 = b[7]; - - a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[8]; - b1 = b[9]; - b2 = b[10]; - b3 = b[11]; - - a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[12]; - b1 = b[13]; - b2 = b[14]; - b3 = b[15]; - - a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - return this; - }, - - /** - * 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 - The source Matrix4 that this Matrix4 is multiplied by. - * - * @return {this} This Matrix4. - */ - multiplyLocal: function (src) - { - var a = this.val; - var b = src.val; - - return this.setValues( - a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12], - a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13], - a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14], - a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15], - - a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12], - a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13], - a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14], - a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15], - - a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12], - a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13], - a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14], - a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15], - - a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12], - a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13], - a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14], - a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15] - ); - }, - - /** - * Multiplies the given Matrix4 object with this Matrix. - * - * This is the same as calling `multiplyMatrices(m, this)`. - * - * @method Phaser.Math.Matrix4#premultiply - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one. - * - * @return {this} This Matrix4. - */ - premultiply: function (m) - { - return this.multiplyMatrices(m, this); - }, - - /** - * Multiplies the two given Matrix4 objects and stores the results in this Matrix. - * - * @method Phaser.Math.Matrix4#multiplyMatrices - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply. - * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply. - * - * @return {this} This Matrix4. - */ - multiplyMatrices: function (a, b) - { - var am = a.val; - var bm = b.val; - - var a11 = am[0]; - var a12 = am[4]; - var a13 = am[8]; - var a14 = am[12]; - var a21 = am[1]; - var a22 = am[5]; - var a23 = am[9]; - var a24 = am[13]; - var a31 = am[2]; - var a32 = am[6]; - var a33 = am[10]; - var a34 = am[14]; - var a41 = am[3]; - var a42 = am[7]; - var a43 = am[11]; - var a44 = am[15]; - - var b11 = bm[0]; - var b12 = bm[4]; - var b13 = bm[8]; - var b14 = bm[12]; - var b21 = bm[1]; - var b22 = bm[5]; - var b23 = bm[9]; - var b24 = bm[13]; - var b31 = bm[2]; - var b32 = bm[6]; - var b33 = bm[10]; - var b34 = bm[14]; - var b41 = bm[3]; - var b42 = bm[7]; - var b43 = bm[11]; - var b44 = bm[15]; - - return this.setValues( - a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41, - a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41, - a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41, - a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41, - a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42, - a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42, - a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42, - a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42, - a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43, - a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43, - a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43, - a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43, - a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44, - a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44, - a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44, - a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44 - ); - }, - - /** - * Translate this Matrix using the given Vector. - * - * @method Phaser.Math.Matrix4#translate - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. - * - * @return {this} This Matrix4. - */ - translate: function (v) - { - return this.translateXYZ(v.x, v.y, v.z); - }, - - /** - * 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 {this} 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. - * - * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. - * - * @method Phaser.Math.Matrix4#scale - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. - * - * @return {this} This Matrix4. - */ - scale: function (v) - { - return this.scaleXYZ(v.x, v.y, v.z); - }, - - /** - * 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 {this} 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. - * - * @method Phaser.Math.Matrix4#makeRotationAxis - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis. - * @param {number} angle - The rotation angle in radians. - * - * @return {this} This Matrix4. - */ - makeRotationAxis: function (axis, angle) - { - // Based on http://www.gamedev.net/reference/articles/article1199.asp - - var c = Math.cos(angle); - var s = Math.sin(angle); - var t = 1 - c; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var tx = t * x; - var ty = t * y; - - return this.setValues( - tx * x + c, tx * y - s * z, tx * z + s * y, 0, - tx * y + s * z, ty * y + c, ty * z - s * x, 0, - tx * z - s * y, ty * z + s * x, t * z * z + c, 0, - 0, 0, 0, 1 - ); - }, - - /** - * Apply a rotation transformation to this Matrix. - * - * @method Phaser.Math.Matrix4#rotate - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * @param {Phaser.Math.Vector3} axis - The axis to rotate upon. - * - * @return {this} This Matrix4. - */ - rotate: function (rad, axis) - { - var a = this.val; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var len = Math.sqrt(x * x + y * y + z * z); - - if (Math.abs(len) < EPSILON) - { - return this; - } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - - var s = Math.sin(rad); - var c = Math.cos(rad); - var t = 1 - c; - - 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]; - - // Construct the elements of the rotation matrix - var b00 = x * x * t + c; - var b01 = y * x * t + z * s; - var b02 = z * x * t - y * s; - - var b10 = x * y * t - z * s; - var b11 = y * y * t + c; - var b12 = z * y * t + x * s; - - var b20 = x * z * t + y * s; - var b21 = y * z * t - x * s; - var b22 = z * z * t + c; - - // Perform rotation-specific matrix multiplication - return this.setValues( - a00 * b00 + a10 * b01 + a20 * b02, - a01 * b00 + a11 * b01 + a21 * b02, - a02 * b00 + a12 * b01 + a22 * b02, - a03 * b00 + a13 * b01 + a23 * b02, - a00 * b10 + a10 * b11 + a20 * b12, - a01 * b10 + a11 * b11 + a21 * b12, - a02 * b10 + a12 * b11 + a22 * b12, - a03 * b10 + a13 * b11 + a23 * b12, - a00 * b20 + a10 * b21 + a20 * b22, - a01 * b20 + a11 * b21 + a21 * b22, - a02 * b20 + a12 * b21 + a22 * b22, - a03 * b20 + a13 * b21 + a23 * b22, - a30, a31, a32, a33 - ); - }, - - /** - * Rotate this matrix on its X axis. - * - * @method Phaser.Math.Matrix4#rotateX - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * - * @return {this} This Matrix4. - */ - rotateX: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - 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]; - - // Perform axis-specific matrix multiplication - a[4] = a10 * c + a20 * s; - a[5] = a11 * c + a21 * s; - a[6] = a12 * c + a22 * s; - a[7] = a13 * c + a23 * s; - a[8] = a20 * c - a10 * s; - a[9] = a21 * c - a11 * s; - a[10] = a22 * c - a12 * s; - a[11] = a23 * c - a13 * s; - - return this; - }, - - /** - * Rotate this matrix on its Y axis. - * - * @method Phaser.Math.Matrix4#rotateY - * @since 3.0.0 - * - * @param {number} rad - The angle to rotate by, in radians. - * - * @return {this} This Matrix4. - */ - rotateY: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - // Perform axis-specific matrix multiplication - a[0] = a00 * c - a20 * s; - a[1] = a01 * c - a21 * s; - a[2] = a02 * c - a22 * s; - a[3] = a03 * c - a23 * s; - a[8] = a00 * s + a20 * c; - a[9] = a01 * s + a21 * c; - a[10] = a02 * s + a22 * c; - a[11] = a03 * s + a23 * c; - - return this; - }, - - /** - * Rotate this matrix on its Z axis. - * - * @method Phaser.Math.Matrix4#rotateZ - * @since 3.0.0 - * - * @param {number} rad - The angle to rotate by, in radians. - * - * @return {this} This Matrix4. - */ - rotateZ: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - 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]; - - // Perform axis-specific matrix multiplication - a[0] = a00 * c + a10 * s; - a[1] = a01 * c + a11 * s; - a[2] = a02 * c + a12 * s; - a[3] = a03 * c + a13 * s; - a[4] = a10 * c - a00 * s; - a[5] = a11 * c - a01 * s; - a[6] = a12 * c - a02 * s; - a[7] = a13 * c - a03 * s; - - return this; - }, - - /** - * Set the values of this Matrix from the given rotation Quaternion and translation Vector. - * - * @method Phaser.Math.Matrix4#fromRotationTranslation - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from. - * @param {Phaser.Math.Vector3} v - The Vector to set translation from. - * - * @return {this} This Matrix4. - */ - fromRotationTranslation: function (q, v) - { - // Quaternion math - 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; - - return this.setValues( - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - v.x, - v.y, - v.z, - 1 - ); - }, - - /** - * Set the values of this Matrix from the given Quaternion. - * - * @method Phaser.Math.Matrix4#fromQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. - * - * @return {this} This Matrix4. - */ - 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; - - return this.setValues( - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - 0, - 0, - 0, - 1 - ); - }, - - /** - * Generate a frustum matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#frustum - * @since 3.0.0 - * - * @param {number} left - The left bound of the frustum. - * @param {number} right - The right bound of the frustum. - * @param {number} bottom - The bottom bound of the frustum. - * @param {number} top - The top bound of the frustum. - * @param {number} near - The near bound of the frustum. - * @param {number} far - The far bound of the frustum. - * - * @return {this} This Matrix4. - */ - frustum: function (left, right, bottom, top, near, far) - { - var rl = 1 / (right - left); - var tb = 1 / (top - bottom); - var nf = 1 / (near - far); - - return this.setValues( - (near * 2) * rl, - 0, - 0, - 0, - - 0, - (near * 2) * tb, - 0, - 0, - - (right + left) * rl, - (top + bottom) * tb, - (far + near) * nf, - -1, - - 0, - 0, - (far * near * 2) * nf, - 0 - ); - }, - - /** - * Generate a perspective projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#perspective - * @since 3.0.0 - * - * @param {number} fovy - Vertical field of view in radians - * @param {number} aspect - Aspect ratio. Typically viewport width /height. - * @param {number} near - Near bound of the frustum. - * @param {number} far - Far bound of the frustum. - * - * @return {this} This Matrix4. - */ - perspective: function (fovy, aspect, near, far) - { - var f = 1.0 / Math.tan(fovy / 2); - var nf = 1 / (near - far); - - return this.setValues( - f / aspect, - 0, - 0, - 0, - - 0, - f, - 0, - 0, - - 0, - 0, - (far + near) * nf, - -1, - - 0, - 0, - (2 * far * near) * nf, - 0 - ); - }, - - /** - * Generate a perspective projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#perspectiveLH - * @since 3.0.0 - * - * @param {number} width - The width of the frustum. - * @param {number} height - The height of the frustum. - * @param {number} near - Near bound of the frustum. - * @param {number} far - Far bound of the frustum. - * - * @return {this} This Matrix4. - */ - perspectiveLH: function (width, height, near, far) - { - return this.setValues( - (2 * near) / width, - 0, - 0, - 0, - - 0, - (2 * near) / height, - 0, - 0, - - 0, - 0, - -far / (near - far), - 1, - - 0, - 0, - (near * far) / (near - far), - 0 - ); - }, - - /** - * Generate an orthogonal projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#ortho - * @since 3.0.0 - * - * @param {number} left - The left bound of the frustum. - * @param {number} right - The right bound of the frustum. - * @param {number} bottom - The bottom bound of the frustum. - * @param {number} top - The top bound of the frustum. - * @param {number} near - The near bound of the frustum. - * @param {number} far - The far bound of the frustum. - * - * @return {this} This Matrix4. - */ - ortho: function (left, right, bottom, top, near, far) - { - var lr = left - right; - var bt = bottom - top; - var nf = near - far; - - // Avoid division by zero - lr = (lr === 0) ? lr : 1 / lr; - bt = (bt === 0) ? bt : 1 / bt; - nf = (nf === 0) ? nf : 1 / nf; - - return this.setValues( - -2 * lr, - 0, - 0, - 0, - - 0, - -2 * bt, - 0, - 0, - - 0, - 0, - 2 * nf, - 0, - - (left + right) * lr, - (top + bottom) * bt, - (far + near) * nf, - 1 - ); - }, - - /** - * Generate a right-handed look-at matrix with the given eye position, target and up axis. - * - * @method Phaser.Math.Matrix4#lookAtRH - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} eye - Position of the viewer. - * @param {Phaser.Math.Vector3} target - Point the viewer is looking at. - * @param {Phaser.Math.Vector3} up - vec3 pointing up. - * - * @return {this} This Matrix4. - */ - lookAtRH: function (eye, target, up) - { - var m = this.val; - - _z.subVectors(eye, target); - - if (_z.getLengthSquared() === 0) - { - // eye and target are in the same position - _z.z = 1; - } - - _z.normalize(); - _x.crossVectors(up, _z); - - if (_x.getLengthSquared() === 0) - { - // up and z are parallel - - if (Math.abs(up.z) === 1) - { - _z.x += 0.0001; - } - else - { - _z.z += 0.0001; - } - - _z.normalize(); - _x.crossVectors(up, _z); - } - - _x.normalize(); - _y.crossVectors(_z, _x); - - m[0] = _x.x; - m[1] = _x.y; - m[2] = _x.z; - m[4] = _y.x; - m[5] = _y.y; - m[6] = _y.z; - m[8] = _z.x; - m[9] = _z.y; - m[10] = _z.z; - - return this; - }, - - /** - * Generate a look-at matrix with the given eye position, focal point, and up axis. - * - * @method Phaser.Math.Matrix4#lookAt - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} eye - Position of the viewer - * @param {Phaser.Math.Vector3} center - Point the viewer is looking at - * @param {Phaser.Math.Vector3} up - vec3 pointing up. - * - * @return {this} This Matrix4. - */ - lookAt: function (eye, center, up) - { - var eyex = eye.x; - var eyey = eye.y; - var eyez = eye.z; - - var upx = up.x; - var upy = up.y; - var upz = up.z; - - var centerx = center.x; - var centery = center.y; - var centerz = center.z; - - if (Math.abs(eyex - centerx) < EPSILON && - Math.abs(eyey - centery) < EPSILON && - Math.abs(eyez - centerz) < EPSILON) - { - return this.identity(); - } - - var z0 = eyex - centerx; - var z1 = eyey - centery; - var z2 = eyez - centerz; - - var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); - - z0 *= len; - z1 *= len; - z2 *= len; - - var x0 = upy * z2 - upz * z1; - var x1 = upz * z0 - upx * z2; - var x2 = upx * z1 - upy * z0; - - len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); - - if (!len) - { - x0 = 0; - x1 = 0; - x2 = 0; - } - else - { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; - } - - var y0 = z1 * x2 - z2 * x1; - var y1 = z2 * x0 - z0 * x2; - var y2 = z0 * x1 - z1 * x0; - - len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); - - if (!len) - { - y0 = 0; - y1 = 0; - y2 = 0; - } - else - { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; - } - - return this.setValues( - x0, - y0, - z0, - 0, - - x1, - y1, - z1, - 0, - - x2, - y2, - z2, - 0, - - -(x0 * eyex + x1 * eyey + x2 * eyez), - -(y0 * eyex + y1 * eyey + y2 * eyez), - -(z0 * eyex + z1 * eyey + z2 * eyez), - 1 - ); - }, - - /** - * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. - * - * @method Phaser.Math.Matrix4#yawPitchRoll - * @since 3.0.0 - * - * @param {number} yaw - The yaw value. - * @param {number} pitch - The pitch value. - * @param {number} roll - The roll value. - * - * @return {this} This Matrix4. - */ - yawPitchRoll: function (yaw, pitch, roll) - { - this.zero(); - _tempMat1.zero(); - _tempMat2.zero(); - - var m0 = this.val; - var m1 = _tempMat1.val; - var m2 = _tempMat2.val; - - // Rotate Z - var s = Math.sin(roll); - var c = Math.cos(roll); - - m0[10] = 1; - m0[15] = 1; - m0[0] = c; - m0[1] = s; - m0[4] = -s; - m0[5] = c; - - // Rotate X - s = Math.sin(pitch); - c = Math.cos(pitch); - - m1[0] = 1; - m1[15] = 1; - m1[5] = c; - m1[10] = c; - m1[9] = -s; - m1[6] = s; - - // Rotate Y - s = Math.sin(yaw); - c = Math.cos(yaw); - - m2[5] = 1; - m2[15] = 1; - m2[0] = c; - m2[2] = -s; - m2[8] = s; - m2[10] = c; - - this.multiplyLocal(_tempMat1); - this.multiplyLocal(_tempMat2); - - return this; - }, - - /** - * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. - * - * @method Phaser.Math.Matrix4#setWorldMatrix - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix. - * @param {Phaser.Math.Vector3} position - The position of the world matrix. - * @param {Phaser.Math.Vector3} scale - The scale of the world matrix. - * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix. - * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix. - * - * @return {this} This Matrix4. - */ - setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix) - { - this.yawPitchRoll(rotation.y, rotation.x, rotation.z); - - _tempMat1.scaling(scale.x, scale.y, scale.z); - _tempMat2.xyz(position.x, position.y, position.z); - - this.multiplyLocal(_tempMat1); - this.multiplyLocal(_tempMat2); - - if (viewMatrix) - { - this.multiplyLocal(viewMatrix); - } - - if (projectionMatrix) - { - this.multiplyLocal(projectionMatrix); - } - - return this; - }, - - /** - * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4. - * - * @method Phaser.Math.Matrix4#multiplyToMat4 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one. - * @param {Phaser.Math.Matrix4} out - The receiving Matrix. - * - * @return {Phaser.Math.Matrix4} This `out` Matrix4. - */ - multiplyToMat4: function (src, out) - { - var a = this.val; - var b = src.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 = b[0]; - var b01 = b[1]; - var b02 = b[2]; - var b03 = b[3]; - var b10 = b[4]; - var b11 = b[5]; - var b12 = b[6]; - var b13 = b[7]; - var b20 = b[8]; - var b21 = b[9]; - var b22 = b[10]; - var b23 = b[11]; - var b30 = b[12]; - var b31 = b[13]; - var b32 = b[14]; - var b33 = b[15]; - - return out.setValues( - b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, - b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31, - b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32, - b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33, - - b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, - b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, - b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, - b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, - - b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, - b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, - b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, - b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, - - b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, - b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, - b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, - b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 - ); - }, - - /** - * Takes the rotation and position vectors and builds this Matrix4 from them. - * - * @method Phaser.Math.Matrix4#fromRotationXYTranslation - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} rotation - The rotation vector. - * @param {Phaser.Math.Vector3} position - The position vector. - * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`) - * - * @return {this} This Matrix4. - */ - fromRotationXYTranslation: function (rotation, position, translateFirst) - { - var x = position.x; - var y = position.y; - var z = position.z; - - var sx = Math.sin(rotation.x); - var cx = Math.cos(rotation.x); - - var sy = Math.sin(rotation.y); - var cy = Math.cos(rotation.y); - - var a30 = x; - var a31 = y; - var a32 = z; - - // Rotate X - - var b21 = -sx; - - // Rotate Y - - var c01 = 0 - b21 * sy; - - var c02 = 0 - cx * sy; - - var c21 = b21 * cy; - - var c22 = cx * cy; - - // Translate - if (!translateFirst) - { - // a30 = cy * x + 0 * y + sy * z; - a30 = cy * x + sy * z; - a31 = c01 * x + cx * y + c21 * z; - a32 = c02 * x + sx * y + c22 * z; - } - - return this.setValues( - cy, - c01, - c02, - 0, - 0, - cx, - sx, - 0, - sy, - c21, - c22, - 0, - a30, - a31, - a32, - 1 - ); - }, - - /** - * Returns the maximum axis scale from this Matrix4. - * - * @method Phaser.Math.Matrix4#getMaxScaleOnAxis - * @since 3.50.0 - * - * @return {number} The maximum axis scale. - */ - getMaxScaleOnAxis: function () - { - var m = this.val; - - var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2]; - var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6]; - var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10]; - - return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); - } - -}); - -/** - * @ignore - */ -var _tempMat1 = new Matrix4(); - -/** - * @ignore - */ -var _tempMat2 = new Matrix4(); - -/** - * @ignore - */ -var _x = new Vector3(); - -/** - * @ignore - */ -var _y = new Vector3(); - -/** - * @ignore - */ -var _z = new Vector3(); - -module.exports = Matrix4; - - -/***/ }), - -/***/ 3733: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 44: -/***/ ((module) => { - -/** - * @author Vladislav Forsh - * @copyright 2021 RoboWhale - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate the median of the given values. The values are sorted and the middle value is returned. - * In case of an even number of values, the average of the two middle values is returned. - * - * @function Phaser.Math.Median - * @since 3.54.0 - * - * @param {number[]} values - The values to average. - * - * @return {number} The median value. - */ -var Median = function (values) -{ - var valuesNum = values.length; - if (valuesNum === 0) - { - return 0; - } - - values.sort(function (a, b) { return a - b; }); - - var halfIndex = Math.floor(valuesNum / 2); - - return valuesNum % 2 === 0 - ? (values[halfIndex] + values[halfIndex - 1]) / 2 - : values[halfIndex]; -}; - -module.exports = Median; - - -/***/ }), - -/***/ 5385: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8585: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 372: -/***/ ((module, __unused_webpack_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__(7473); -var Matrix3 = __webpack_require__(2149); -var NOOP = __webpack_require__(1984); -var Vector3 = __webpack_require__(5689); - -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=0] - The x component. - * @param {number} [y=0] - The y component. - * @param {number} [z=0] - The z component. - * @param {number} [w=1] - 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 - * @private - * @since 3.50.0 - */ - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_y - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_z - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_w - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * This callback is invoked, if set, each time a value in this quaternion is changed. - * The callback is passed one argument, a reference to this quaternion. - * - * @name Phaser.Math.Quaternion#onChangeCallback - * @type {function} - * @since 3.50.0 - */ - this.onChangeCallback = NOOP; - - this.set(x, y, z, w); - }, - - /** - * The x component of this Quaternion. - * - * @name Phaser.Math.Quaternion#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - x: { - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - - this.onChangeCallback(this); - } - }, - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - y: { - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - - this.onChangeCallback(this); - } - }, - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - z: { - get: function () - { - return this._z; - }, - - set: function (value) - { - this._z = value; - - this.onChangeCallback(this); - } - }, - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - w: { - get: function () - { - return this._w; - }, - - set: function (value) - { - this._w = value; - - this.onChangeCallback(this); - } - }, - - /** - * 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) - { - return this.set(src); - }, - - /** - * Set the components of this Quaternion and optionally call the `onChangeCallback`. - * - * @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. - * @param {boolean} [update=true] - Call the `onChangeCallback`? - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - set: function (x, y, z, w, update) - { - if (update === undefined) { update = true; } - - 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; - } - - if (update) - { - this.onChangeCallback(this); - } - - 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; - - this.onChangeCallback(this); - - 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; - - this.onChangeCallback(this); - - 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; - - this.onChangeCallback(this); - - 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; - } - - this.onChangeCallback(this); - - 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; - - return this.set( - ax + t * (v.x - ax), - ay + t * (v.y - ay), - az + t * (v.z - az), - aw + t * (v.w - aw) - ); - }, - - /** - * 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) - { - return this.set(0, 0, 0, 1); - } - 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 () - { - return this.set(0, 0, 0, 1); - }, - - /** - * 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); - - return this.set( - s * axis.x, - s * axis.y, - s * axis.z, - Math.cos(rad) - ); - }, - - /** - * 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; - - return this.set( - ax * bw + aw * bx + ay * bz - az * by, - ay * bw + aw * by + az * bx - ax * bz, - az * bw + aw * bz + ax * by - ay * bx, - aw * bw - ax * bx - ay * by - az * bz - ); - }, - - /** - * 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 - return this.set( - scale0 * ax + scale1 * bx, - scale0 * ay + scale1 * by, - scale0 * az + scale1 * bz, - scale0 * aw + scale1 * bw - ); - }, - - /** - * 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; - - return this.set( - -a0 * invDot, - -a1 * invDot, - -a2 * invDot, - a3 * invDot - ); - }, - - /** - * 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; - - this.onChangeCallback(this); - - 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); - - return this.set( - ax * bw + aw * bx, - ay * bw + az * bx, - az * bw - ay * bx, - aw * bw - ax * bx - ); - }, - - /** - * 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); - - return this.set( - ax * bw - az * by, - ay * bw + aw * by, - az * bw + ax * by, - aw * bw - ay * by - ); - }, - - /** - * 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); - - return this.set( - ax * bw + ay * bz, - ay * bw - ax * bz, - az * bw + aw * bz, - aw * bw - az * bz - ); - }, - - /** - * 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; - }, - - /** - * Set this Quaternion from the given Euler, based on Euler order. - * - * @method Phaser.Math.Quaternion#setFromEuler - * @since 3.50.0 - * - * @param {Phaser.Math.Euler} euler - The Euler to convert from. - * @param {boolean} [update=true] - Run the `onChangeCallback`? - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setFromEuler: function (euler, update) - { - var x = euler.x / 2; - var y = euler.y / 2; - var z = euler.z / 2; - - var c1 = Math.cos(x); - var c2 = Math.cos(y); - var c3 = Math.cos(z); - - var s1 = Math.sin(x); - var s2 = Math.sin(y); - var s3 = Math.sin(z); - - switch (euler.order) - { - case 'XYZ': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'YXZ': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - - case 'ZXY': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'ZYX': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - - case 'YZX': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'XZY': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - } - - return this; - }, - - /** - * Sets the rotation of this Quaternion from the given Matrix4. - * - * @method Phaser.Math.Quaternion#setFromRotationMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setFromRotationMatrix: function (mat4) - { - var m = mat4.val; - - var m11 = m[0]; - var m12 = m[4]; - var m13 = m[8]; - var m21 = m[1]; - var m22 = m[5]; - var m23 = m[9]; - var m31 = m[2]; - var m32 = m[6]; - var m33 = m[10]; - - var trace = m11 + m22 + m33; - var s; - - if (trace > 0) - { - s = 0.5 / Math.sqrt(trace + 1.0); - - this.set( - (m32 - m23) * s, - (m13 - m31) * s, - (m21 - m12) * s, - 0.25 / s - ); - } - else if (m11 > m22 && m11 > m33) - { - s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); - - this.set( - 0.25 * s, - (m12 + m21) / s, - (m13 + m31) / s, - (m32 - m23) / s - ); - } - else if (m22 > m33) - { - s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); - - this.set( - (m12 + m21) / s, - 0.25 * s, - (m23 + m32) / s, - (m13 - m31) / s - ); - } - else - { - s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); - - this.set( - (m13 + m31) / s, - (m23 + m32) / s, - 0.25 * s, - (m21 - m12) / s - ); - } - - 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; - } - - this.onChangeCallback(this); - - return this; - } - -}); - -module.exports = Quaternion; - - -/***/ }), - -/***/ 4208: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * 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 {number} The given angle converted to degrees. - */ -var RadToDeg = function (radians) -{ - return radians * CONST.RAD_TO_DEG; -}; - -module.exports = RadToDeg; - - -/***/ }), - -/***/ 1705: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6650: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2037: -/***/ ((module) => { - -/** - * @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; } - - 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; - - -/***/ }), - -/***/ 6283: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9876: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8348: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4497: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9640: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector3 = __webpack_require__(5689); -var Matrix4 = __webpack_require__(9652); -var Quaternion = __webpack_require__(372); - -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; - - -/***/ }), - -/***/ 4078: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 855: -/***/ ((module) => { - -/** - * @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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. - * @param {number} [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; - - -/***/ }), - -/***/ 4936: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2733: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 278: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 163: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(2529); - -/** - * 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 {number} index - The position within the grid to get the x/y value for. - * @param {number} width - The width of the grid. - * @param {number} 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; - } - } - - return out.set(x, y); -}; - -module.exports = ToXY; - - -/***/ }), - -/***/ 7556: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(2529); - -/** - * 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; - - -/***/ }), - -/***/ 2529: -/***/ ((module, __unused_webpack_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__(7473); -var FuzzyEqual = __webpack_require__(12); - -/** - * @classdesc - * A representation of a vector in 2D space. - * - * A two-component vector. - * - * @class Vector2 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. - * @param {number} [y=x] - The y component. - */ -var Vector2 = new Class({ - - initialize: - - function Vector2 (x, y) - { - /** - * The x component of this Vector. - * - * @name Phaser.Math.Vector2#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = 0; - - /** - * The y component of this Vector. - * - * @name Phaser.Math.Vector2#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; - } - }, - - /** - * Make a clone of this Vector2. - * - * @method Phaser.Math.Vector2#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Vector2} A clone of this Vector2. - */ - 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.Types.Math.Vector2Like} 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 (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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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); - } - -}); - -/** - * 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; - - -/***/ }), - -/***/ 5689: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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; - }, - - /** - * Sets the components of this Vector to be the `Math.min` result from the given vector. - * - * @method Phaser.Math.Vector3#min - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - min: function (v) - { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - - return this; - }, - - /** - * Sets the components of this Vector to be the `Math.max` result from the given vector. - * - * @method Phaser.Math.Vector3#max - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - max: function (v) - { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - - 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); - }, - - /** - * Adds the two given Vector3s and sets the results into this Vector3. - * - * @method Phaser.Math.Vector3#addVectors - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} a - The first Vector to add. - * @param {Phaser.Math.Vector3} b - The second Vector to add. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addVectors: function (a, b) - { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - - return this; - }, - - /** - * 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; - }, - - /** - * Sets the components of this Vector3 from the position of the given Matrix4. - * - * @method Phaser.Math.Vector3#setFromMatrixPosition - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - setFromMatrixPosition: function (m) - { - return this.fromArray(m.val, 12); - }, - - /** - * Sets the components of this Vector3 from the Matrix4 column specified. - * - * @method Phaser.Math.Vector3#setFromMatrixColumn - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from. - * @param {number} index - The column index. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - setFromMatrixColumn: function (mat4, index) - { - return this.fromArray(mat4.val, index * 4); - }, - - /** - * Sets the components of this Vector3 from the given array, based on the offset. - * - * Vector3.x = array[offset] - * Vector3.y = array[offset + 1] - * Vector3.z = array[offset + 2] - * - * @method Phaser.Math.Vector3#fromArray - * @since 3.50.0 - * - * @param {number[]} array - The array of values to get this Vector from. - * @param {number} [offset=0] - The offset index into the array. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - fromArray: function (array, offset) - { - if (offset === undefined) { offset = 0; } - - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - - 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; - }, - - /** - * Add the given value to each component of this Vector. - * - * @method Phaser.Math.Vector3#addScalar - * @since 3.50.0 - * - * @param {number} s - The amount to add to this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addScalar: function (s) - { - this.x += s; - this.y += s; - this.z += s; - - return this; - }, - - /** - * Add and scale a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector3#addScale - * @since 3.50.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. - * @param {number} scale - The amount to scale `v` by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addScale: function (v, scale) - { - this.x += v.x * scale; - this.y += v.y * scale; - this.z += v.z * scale || 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; - }, - - /** - * Takes a Matrix3 and applies it to this Vector3. - * - * @method Phaser.Math.Vector3#applyMatrix3 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - applyMatrix3: function (mat3) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat3.val; - - this.x = m[0] * x + m[3] * y + m[6] * z; - this.y = m[1] * x + m[4] * y + m[7] * z; - this.z = m[2] * x + m[5] * y + m[8] * z; - - return this; - }, - - /** - * Takes a Matrix4 and applies it to this Vector3. - * - * @method Phaser.Math.Vector3#applyMatrix4 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - applyMatrix4: function (mat4) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat4.val; - - var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]); - - 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; - - 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 Matrix4. - * - * @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; - }, - - /** - * Multiplies this Vector3 by the given view and projection matrices. - * - * @method Phaser.Math.Vector3#projectViewMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix. - * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - projectViewMatrix: function (viewMatrix, projectionMatrix) - { - return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix); - }, - - /** - * Multiplies this Vector3 by the given inversed projection matrix and world matrix. - * - * @method Phaser.Math.Vector3#unprojectViewMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix. - * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - unprojectViewMatrix: function (projectionMatrix, worldMatrix) - { - return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix); - }, - - /** - * 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; - - -/***/ }), - -/***/ 9279: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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) - { - 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; - } - -}); - -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; - - -/***/ }), - -/***/ 4119: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8445: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6412: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 760: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6909: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6947: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3426: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * 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; - - -/***/ }), - -/***/ 6906: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3270: -/***/ ((module, __unused_webpack_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__(104); - -/** - * 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; - - -/***/ }), - -/***/ 2748: -/***/ ((module, __unused_webpack_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__(104); - -/** - * 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; - - -/***/ }), - -/***/ 936: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Normalize = __webpack_require__(6906); - -/** - * 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; - - -/***/ }), - -/***/ 1935: -/***/ ((module, __unused_webpack_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__(7425); - -/** - * 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; - - -/***/ }), - -/***/ 5393: -/***/ ((module) => { - -/** - * @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. - * - * @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; - - -/***/ }), - -/***/ 3692: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MathWrap = __webpack_require__(8445); - -/** - * 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; - - -/***/ }), - -/***/ 2820: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Wrap = __webpack_require__(8445); - -/** - * 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; - - -/***/ }), - -/***/ 1833: -/***/ ((module, __unused_webpack_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__(6412), - BetweenPoints: __webpack_require__(760), - BetweenPointsY: __webpack_require__(6909), - BetweenY: __webpack_require__(6947), - CounterClockwise: __webpack_require__(3426), - Normalize: __webpack_require__(6906), - Random: __webpack_require__(3270), - RandomDegrees: __webpack_require__(2748), - Reverse: __webpack_require__(936), - RotateTo: __webpack_require__(1935), - ShortestBetween: __webpack_require__(5393), - Wrap: __webpack_require__(3692), - WrapDegrees: __webpack_require__(2820) - -}; - - -/***/ }), - -/***/ 7425: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1518: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5372: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4430: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4361: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7798: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8290: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3788: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6338: -/***/ ((module, __unused_webpack_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__(1518), - BetweenPoints: __webpack_require__(5372), - BetweenPointsSquared: __webpack_require__(4430), - Chebyshev: __webpack_require__(4361), - Power: __webpack_require__(7798), - Snake: __webpack_require__(8290), - Squared: __webpack_require__(3788) - -}; - - -/***/ }), - -/***/ 5751: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6203: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9103: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4938: -/***/ ((module, __unused_webpack_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__(5751), - Out: __webpack_require__(9103), - InOut: __webpack_require__(6203) - -}; - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4649: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 504: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8872: -/***/ ((module, __unused_webpack_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__(8677), - Out: __webpack_require__(504), - InOut: __webpack_require__(4649) - -}; - - -/***/ }), - -/***/ 3170: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2627: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1349: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5006: -/***/ ((module, __unused_webpack_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__(3170), - Out: __webpack_require__(1349), - InOut: __webpack_require__(2627) - -}; - - -/***/ }), - -/***/ 6046: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9531: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4836: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 875: -/***/ ((module, __unused_webpack_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__(6046), - Out: __webpack_require__(4836), - InOut: __webpack_require__(9531) - -}; - - -/***/ }), - -/***/ 7619: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7437: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8119: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2884: -/***/ ((module, __unused_webpack_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__(7619), - Out: __webpack_require__(8119), - InOut: __webpack_require__(7437) - -}; - - -/***/ }), - -/***/ 5456: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3461: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2711: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6287: -/***/ ((module, __unused_webpack_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__(5456), - Out: __webpack_require__(2711), - InOut: __webpack_require__(3461) - -}; - - -/***/ }), - -/***/ 8613: -/***/ ((module, __unused_webpack_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__(4938), - Bounce: __webpack_require__(8872), - Circular: __webpack_require__(5006), - Cubic: __webpack_require__(875), - Elastic: __webpack_require__(2884), - Expo: __webpack_require__(6287), - Linear: __webpack_require__(4233), - Quadratic: __webpack_require__(6341), - Quartic: __webpack_require__(762), - Quintic: __webpack_require__(345), - Sine: __webpack_require__(8698), - Stepped: __webpack_require__(7051) - -}; - - -/***/ }), - -/***/ 744: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4233: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -module.exports = __webpack_require__(744); - - -/***/ }), - -/***/ 9810: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8163: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6123: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6341: -/***/ ((module, __unused_webpack_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__(9810), - Out: __webpack_require__(6123), - InOut: __webpack_require__(8163) - -}; - - -/***/ }), - -/***/ 7337: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4878: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9012: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 762: -/***/ ((module, __unused_webpack_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__(7337), - Out: __webpack_require__(9012), - InOut: __webpack_require__(4878) - -}; - - -/***/ }), - -/***/ 303: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 553: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1632: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 345: -/***/ ((module, __unused_webpack_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__(303), - Out: __webpack_require__(1632), - InOut: __webpack_require__(553) - -}; - - -/***/ }), - -/***/ 8455: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1844: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 990: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8698: -/***/ ((module, __unused_webpack_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__(8455), - Out: __webpack_require__(990), - InOut: __webpack_require__(1844) - -}; - - -/***/ }), - -/***/ 6745: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7051: -/***/ ((module, __unused_webpack_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__(6745); - - -/***/ }), - -/***/ 3158: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 12: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1326: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7373: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2622: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7927: -/***/ ((module, __unused_webpack_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__(3158), - Equal: __webpack_require__(12), - Floor: __webpack_require__(1326), - GreaterThan: __webpack_require__(7373), - LessThan: __webpack_require__(2622) - -}; - - -/***/ }), - -/***/ 4675: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); -var Extend = __webpack_require__(1030); - -/** - * @namespace Phaser.Math - */ - -var PhaserMath = { - - // Collections of functions - Angle: __webpack_require__(1833), - Distance: __webpack_require__(6338), - Easing: __webpack_require__(8613), - Fuzzy: __webpack_require__(7927), - Interpolation: __webpack_require__(2140), - Pow2: __webpack_require__(7897), - Snap: __webpack_require__(3943), - - // Expose the RNG Class - RandomDataGenerator: __webpack_require__(6957), - - // Single functions - Average: __webpack_require__(3136), - Bernstein: __webpack_require__(785), - Between: __webpack_require__(7025), - CatmullRom: __webpack_require__(48), - CeilTo: __webpack_require__(5035), - Clamp: __webpack_require__(2915), - DegToRad: __webpack_require__(7149), - Difference: __webpack_require__(2975), - Euler: __webpack_require__(2107), - Factorial: __webpack_require__(3916), - FloatBetween: __webpack_require__(104), - FloorTo: __webpack_require__(4941), - FromPercent: __webpack_require__(1555), - GetSpeed: __webpack_require__(5005), - IsEven: __webpack_require__(3702), - IsEvenStrict: __webpack_require__(8820), - Linear: __webpack_require__(1743), - LinearXY: __webpack_require__(3416), - MaxAdd: __webpack_require__(3733), - Median: __webpack_require__(44), - MinSub: __webpack_require__(5385), - Percent: __webpack_require__(8585), - RadToDeg: __webpack_require__(4208), - RandomXY: __webpack_require__(1705), - RandomXYZ: __webpack_require__(6650), - RandomXYZW: __webpack_require__(2037), - Rotate: __webpack_require__(6283), - RotateAround: __webpack_require__(9876), - RotateAroundDistance: __webpack_require__(8348), - RotateTo: __webpack_require__(4497), - RoundAwayFromZero: __webpack_require__(4078), - RoundTo: __webpack_require__(855), - SinCosTableGenerator: __webpack_require__(4936), - SmootherStep: __webpack_require__(278), - SmoothStep: __webpack_require__(2733), - ToXY: __webpack_require__(163), - TransformXY: __webpack_require__(7556), - Within: __webpack_require__(4119), - Wrap: __webpack_require__(8445), - - // Vector classes - Vector2: __webpack_require__(2529), - Vector3: __webpack_require__(5689), - Vector4: __webpack_require__(9279), - Matrix3: __webpack_require__(2149), - Matrix4: __webpack_require__(9652), - Quaternion: __webpack_require__(372), - RotateVec3: __webpack_require__(9640) - -}; - -// Merge in the consts - -PhaserMath = Extend(false, PhaserMath, CONST); - -// Export it - -module.exports = PhaserMath; - - -/***/ }), - -/***/ 1640: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bernstein = __webpack_require__(785); - -/** - * 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; - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CatmullRom = __webpack_require__(48); - -/** - * 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; - - -/***/ }), - -/***/ 4002: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6765: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Linear = __webpack_require__(1743); - -/** - * 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; - - -/***/ }), - -/***/ 6388: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SmoothStep = __webpack_require__(2733); - -/** - * 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; - - -/***/ }), - -/***/ 8705: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SmootherStep = __webpack_require__(278); - -/** - * 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; - - -/***/ }), - -/***/ 2140: -/***/ ((module, __unused_webpack_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__(1640), - CatmullRom: __webpack_require__(6105), - CubicBezier: __webpack_require__(4002), - Linear: __webpack_require__(6765), - QuadraticBezier: __webpack_require__(6388), - SmoothStep: __webpack_require__(5735), - SmootherStep: __webpack_require__(8705) - -}; - - -/***/ }), - -/***/ 5443: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 725: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 167: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7897: -/***/ ((module, __unused_webpack_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__(5443), - IsSize: __webpack_require__(725), - IsValue: __webpack_require__(167) - -}; - - -/***/ }), - -/***/ 6957: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); - -/** - * @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; - - -/***/ }), - -/***/ 5659: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5461: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5131: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3943: -/***/ ((module, __unused_webpack_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__(5659), - Floor: __webpack_require__(5461), - To: __webpack_require__(5131) - -}; - - -/***/ }), - -/***/ 8666: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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} + * @name Phaser.GameObjects.GameObjectFactory#scene + * @type {Phaser.Scene} * @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; - - -/***/ }), - -/***/ 5722: -/***/ ((module, __unused_webpack_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__(8666); -var Class = __webpack_require__(7473); -var SceneEvents = __webpack_require__(204); - -/** - * @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. - * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. - */ -var ScenePlugin = new Class({ - - Extends: BasePlugin, - - initialize: - - function ScenePlugin (scene, pluginManager, pluginKey) - { - 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 + * @since 3.0.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. + * A reference to the Scene.Systems. * - * @name Phaser.Plugins.ScenePlugin#systems - * @type {?Phaser.Scenes.Systems} + * @name Phaser.GameObjects.GameObjectFactory#systems + * @type {Phaser.Scenes.Systems} * @protected - * @since 3.8.0 + * @since 3.0.0 */ this.systems = scene.sys; /** - * The key under which this plugin was installed into the Scene Systems. + * A reference to the Scene Event Emitter. * - * 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#pluginKey - * @type {string} - * @readonly - * @since 3.54.0 + * @name Phaser.GameObjects.GameObjectFactory#events + * @type {Phaser.Events.EventEmitter} + * @protected + * @since 3.50.0 */ - this.pluginKey = pluginKey; + this.events = scene.sys.events; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.GameObjectFactory#displayList + * @type {Phaser.GameObjects.DisplayList} + * @protected + * @since 3.0.0 + */ + this.displayList; + + /** + * A reference to the Scene Update List. + * + * @name Phaser.GameObjects.GameObjectFactory#updateList + * @type {Phaser.GameObjects.UpdateList} + * @protected + * @since 3.0.0 + */ + this.updateList; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** - * This method is called when the Scene boots. It is only ever called once. + * This method is called automatically, only once, when the Scene is first created. + * Do not invoke it directly. * - * 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 + * @method Phaser.GameObjects.GameObjectFactory#boot + * @private + * @since 3.5.1 */ boot: function () { + this.displayList = this.systems.displayList; + this.updateList = this.systems.updateList; + + this.events.once(SceneEvents.DESTROY, this.destroy, this); }, /** - * Game instance has been destroyed. + * This method is called automatically by the Scene when it is starting up. + * It is responsible for creating local systems, properties and listening for Scene events. + * Do not invoke it directly. * - * You must release everything in here, all references, all objects, free it all up. + * @method Phaser.GameObjects.GameObjectFactory#start + * @private + * @since 3.5.0 + */ + start: function () + { + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * Adds an existing Game Object to this Scene. * - * @method Phaser.Plugins.ScenePlugin#destroy - * @since 3.8.0 + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * + * @method Phaser.GameObjects.GameObjectFactory#existing + * @since 3.0.0 + * + * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was added. + */ + existing: function (child) + { + if (child.renderCanvas || child.renderWebGL) + { + this.displayList.add(child); + } + + // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event: + // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway. + if (child.preUpdate) + { + this.updateList.add(child); + } + + return child; + }, + + /** + * 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.GameObjectFactory#shutdown + * @private + * @since 3.0.0 + */ + shutdown: function () + { + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + * + * @method Phaser.GameObjects.GameObjectFactory#destroy + * @private + * @since 3.0.0 */ destroy: function () { - this.pluginManager = null; - this.game = null; + this.shutdown(); + + this.events.off(SceneEvents.START, this.start, this); + this.scene = null; this.systems = null; + this.events = null; + + this.displayList = null; + this.updateList = null; } }); -module.exports = ScenePlugin; +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ +GameObjectFactory.register = function (factoryType, factoryFunction) +{ + if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + GameObjectFactory.prototype[factoryType] = factoryFunction; + } +}; + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ +GameObjectFactory.remove = function (factoryType) +{ + if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + delete GameObjectFactory.prototype[factoryType]; + } +}; + +PluginCache.register('GameObjectFactory', GameObjectFactory, 'add'); + +module.exports = GameObjectFactory; /***/ }), - -/***/ 8351: -/***/ ((module) => { +/* 327 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Contains the plugins that Phaser uses globally and locally. +// These are the source objects, not instantiated. +var corePlugins = {}; + +// Contains the plugins that the dev has loaded into their game +// These are the source objects, not instantiated. +var customPlugins = {}; + +var PluginCache = {}; + +/** + * @namespace Phaser.Plugins.PluginCache + */ + +/** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * + * @method Phaser.Plugins.PluginCache.register + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin? + */ +PluginCache.register = function (key, plugin, mapping, custom) +{ + if (custom === undefined) { custom = false; } + + corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom }; +}; + +/** + * Stores a custom plugin in the global plugin cache. + * The key must be unique, within the scope of the cache. + * + * @method Phaser.Plugins.PluginCache.registerCustom + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {?any} data - A value to be passed to the plugin's `init` method. + */ +PluginCache.registerCustom = function (key, plugin, mapping, data) +{ + customPlugins[key] = { plugin: plugin, mapping: mapping, data: data }; +}; + +/** + * Checks if the given key is already being used in the core plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCore + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`. + */ +PluginCache.hasCore = function (key) +{ + return corePlugins.hasOwnProperty(key); +}; + +/** + * Checks if the given key is already being used in the custom plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCustom + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`. + */ +PluginCache.hasCustom = function (key) +{ + return customPlugins.hasOwnProperty(key); +}; + +/** + * Returns the core plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCore + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to get. + * + * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object. + */ +PluginCache.getCore = function (key) +{ + return corePlugins[key]; +}; + +/** + * Returns the custom plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object. + */ +PluginCache.getCustom = function (key) +{ + return customPlugins[key]; +}; + +/** + * Returns an object from the custom cache based on the given key that can be instantiated. + * + * @method Phaser.Plugins.PluginCache.getCustomClass + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {function} The custom plugin object. + */ +PluginCache.getCustomClass = function (key) +{ + return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null; +}; + +/** + * Removes a core plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.remove + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to remove. + */ +PluginCache.remove = function (key) +{ + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } +}; + +/** + * Removes a custom plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.removeCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to remove. + */ +PluginCache.removeCustom = function (key) +{ + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } +}; + +/** + * Removes all Core Plugins. + * + * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. + * So be sure you only call this if you do not wish to run Phaser again. + * + * @method Phaser.Plugins.PluginCache.destroyCorePlugins + * @since 3.12.0 + */ +PluginCache.destroyCorePlugins = function () +{ + for (var key in corePlugins) + { + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } + } +}; + +/** + * Removes all Custom Plugins. + * + * @method Phaser.Plugins.PluginCache.destroyCustomPlugins + * @since 3.12.0 + */ +PluginCache.destroyCustomPlugins = function () +{ + for (var key in customPlugins) + { + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } + } +}; + +module.exports = PluginCache; + + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(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. + * + * This is a WebGL only feature. + * + * @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. + * + * This is a WebGL only feature. + * + * @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, 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--; + + // Force flush before disabling stencil test + renderer.flush(); + + var current = renderer.currentMask; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + current.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + current.mask = prev.mask; + current.camera = prev.camera; + } + else + { + current.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, 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; + + +/***/ }), +/* 329 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Phaser Blend Modes. - * - * @namespace Phaser.BlendModes + * 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 */ -module.exports = { +var Origin = { /** - * Skips the Blend Mode check in the renderer. - * - * @name Phaser.BlendModes.SKIP_CHECK - * @type {number} - * @const - * @since 3.0.0 + * 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 */ - SKIP_CHECK: -1, + _originComponent: true, /** - * 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 + * 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} - * @const + * @default 0.5 * @since 3.0.0 */ - NORMAL: 0, + originX: 0.5, /** - * Add blend mode. For Canvas and WebGL. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.ADD + * 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} - * @const + * @default 0.5 * @since 3.0.0 */ - ADD: 1, + originY: 0.5, + + // private + read only + _displayOriginX: 0, + _displayOriginY: 0, /** - * 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 + * 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} - * @const * @since 3.0.0 */ - MULTIPLY: 2, + displayOriginX: { + + get: function () + { + return this._displayOriginX; + }, + + set: function (value) + { + this._displayOriginX = value; + this.originX = value / this.width; + } + + }, /** - * 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 + * 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} - * @const * @since 3.0.0 */ - SCREEN: 3, + displayOriginY: { + + get: function () + { + return this._displayOriginY; + }, + + set: function (value) + { + this._displayOriginY = value; + this.originY = value / this.height; + } + + }, /** - * 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 {number} - * @const + * 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. */ - OVERLAY: 4, + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this.updateDisplayOrigin(); + }, /** - * Darken blend mode. For Canvas only. - * Retains the darkest pixels of both layers. - * - * @name Phaser.BlendModes.DARKEN - * @type {number} - * @const + * 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. */ - DARKEN: 5, + 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(); + }, /** - * Lighten blend mode. For Canvas only. - * Retains the lightest pixels of both layers. - * - * @name Phaser.BlendModes.LIGHTEN - * @type {number} - * @const + * 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. */ - LIGHTEN: 6, + setDisplayOrigin: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.displayOriginX = x; + this.displayOriginY = y; + + return this; + }, /** - * Color Dodge blend mode. For Canvas only. - * Divides the bottom layer by the inverted top layer. - * - * @name Phaser.BlendModes.COLOR_DODGE - * @type {number} - * @const + * 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. */ - COLOR_DODGE: 7, + updateDisplayOrigin: function () + { + this._displayOriginX = this.originX * this.width; + this._displayOriginY = this.originY * this.height; - /** - * 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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - DIFFERENCE: 11, - - /** - * Exclusion blend mode. For Canvas only. - * Like difference, but with lower contrast. - * - * @name Phaser.BlendModes.EXCLUSION - * @type {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - LUMINOSITY: 16, - - /** - * Alpha erase blend mode. For Canvas and WebGL. - * - * @name Phaser.BlendModes.ERASE - * @type {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - LIGHTER: 25, - - /** - * Copy blend mode. For Canvas only. - * Only the new shape is shown. - * - * @name Phaser.BlendModes.COPY - * @type {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - XOR: 27 + return this; + } }; - -/***/ }), - -/***/ 387: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Post-Render Event. - * - * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes, - * has completed, but before any pending snap shots have been taken. - * - * @event Phaser.Renderer.Events#POST_RENDER - * @since 3.50.0 - */ -module.exports = 'postrender'; +module.exports = Origin; /***/ }), - -/***/ 7970: -/***/ ((module) => { +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -/** - * The Pre-Render Event. - * - * This event is dispatched by the Phaser Renderer. This happens right at the start of the render - * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been - * reset ready for the render. - * - * @event Phaser.Renderer.Events#PRE_RENDER - * @since 3.50.0 - */ -module.exports = 'prerender'; - - -/***/ }), - -/***/ 674: -/***/ ((module) => { +var DegToRad = __webpack_require__(20); +var GetBoolean = __webpack_require__(331); +var GetValue = __webpack_require__(7); +var TWEEN_CONST = __webpack_require__(332); +var Vector2 = __webpack_require__(2); /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Render Event. + * Provides methods used for managing a Game Object following a Path. + * Should be applied as a mixin and not used directly. * - * This event is dispatched by the Phaser Renderer for every camera in every Scene. - * - * It is dispatched before any of the children in the Scene have been rendered. - * - * @event Phaser.Renderer.Events#RENDER - * @since 3.50.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered. - */ -module.exports = 'render'; - - -/***/ }), - -/***/ 9418: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Renderer Resize Event. - * - * This event is dispatched by the Phaser Renderer when it is resized, usually as a result - * of the Scale Manager resizing. - * - * @event Phaser.Renderer.Events#RESIZE - * @since 3.50.0 - * - * @param {number} width - The new width of the renderer. - * @param {number} height - The new height of the renderer. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ 8604: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Renderer.Events - */ - -module.exports = { - - POST_RENDER: __webpack_require__(387), - PRE_RENDER: __webpack_require__(7970), - RENDER: __webpack_require__(674), - RESIZE: __webpack_require__(9418) - -}; - - -/***/ }), - -/***/ 5412: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var PIPELINE_CONST = { - - /** - * The Bitmap Mask Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', - - /** - * The Light 2D Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - LIGHT_PIPELINE: 'Light2D', - - /** - * The Point Light Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POINTLIGHT_PIPELINE: 'PointLightPipeline', - - /** - * The Single Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - SINGLE_PIPELINE: 'SinglePipeline', - - /** - * The Multi Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - MULTI_PIPELINE: 'MultiPipeline', - - /** - * The Rope Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - ROPE_PIPELINE: 'RopePipeline', - - /** - * The Graphics and Shapes Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - GRAPHICS_PIPELINE: 'GraphicsPipeline', - - /** - * The Post FX Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POSTFX_PIPELINE: 'PostFXPipeline', - - /** - * The Utility Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - UTILITY_PIPELINE: 'UtilityPipeline' - -}; - -module.exports = PIPELINE_CONST; - - -/***/ }), - -/***/ 3527: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Scale Manager Resize Event. - * - * This event is dispatched whenever the Scale Manager detects a resize event from the browser. - * It sends three parameters to the callback, each of them being Size components. You can read - * the `width`, `height`, `aspectRatio` and other properties of these components to help with - * scaling your own game content. - * - * @event Phaser.Scale.Events#RESIZE - * @since 3.16.1 - * - * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. - * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. - * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. - * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. - * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ 8618: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 4328: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6099: -/***/ ((module) => { - -/** - * @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.events.on('create', listener)`. - * - * @event Phaser.Scenes.Events#CREATE + * @namespace Phaser.GameObjects.Components.PathFollower * @since 3.17.0 - * - * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. - */ -module.exports = 'create'; - - -/***/ }), - -/***/ 7645: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 2710: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 2547: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 8577: -/***/ ((module) => { - -/** - * @author samme - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to this event from a Scene using `this.events.on('prerender', listener)`. - * - * A Scene will only render if it is visible. - * - * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. - * - * @event Phaser.Scenes.Events#PRE_RENDER - * @since 3.53.0 - * - * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. - */ -module.exports = 'prerender'; - - -/***/ }), - -/***/ 8197: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 8997: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7604: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 8999: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.events.on('render', listener)`. - * - * A Scene will only render if it is visible. - * - * 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'; - - -/***/ }), - -/***/ 9742: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3667: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3468: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7840: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 9896: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 5103: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3162: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7841: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6454: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6536: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 3875: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 204: -/***/ ((module, __unused_webpack_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__(8618), - BOOT: __webpack_require__(4328), - CREATE: __webpack_require__(6099), - DESTROY: __webpack_require__(7645), - PAUSE: __webpack_require__(2710), - POST_UPDATE: __webpack_require__(2547), - PRE_RENDER: __webpack_require__(8577), - PRE_UPDATE: __webpack_require__(8197), - READY: __webpack_require__(8997), - REMOVED_FROM_SCENE: __webpack_require__(7604), - RENDER: __webpack_require__(8999), - RESUME: __webpack_require__(9742), - SHUTDOWN: __webpack_require__(3667), - SLEEP: __webpack_require__(3468), - START: __webpack_require__(7840), - TRANSITION_COMPLETE: __webpack_require__(9896), - TRANSITION_INIT: __webpack_require__(5103), - TRANSITION_OUT: __webpack_require__(3162), - TRANSITION_START: __webpack_require__(7841), - TRANSITION_WAKE: __webpack_require__(6454), - UPDATE: __webpack_require__(6536), - WAKE: __webpack_require__(3875) +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 {number} + * @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.setTargetValue(); + }; + } + + 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(); + + config.persist = true; + + 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(tweenData.end, 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; + /***/ }), - -/***/ 1864: -/***/ ((module) => { +/* 331 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39860,9 +44624,9 @@ module.exports = { * * @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. + * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. * - * @return {*} The retrieved value. + * @return {boolean} The retrieved value. */ var GetBoolean = function (source, key, defaultValue) { @@ -39884,104 +44648,113 @@ module.exports = GetBoolean; /***/ }), - -/***/ 3747: -/***/ ((module) => { +/* 332 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +/** + * Phaser Tween States. + * + * @namespace Phaser.Tweens.States + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + +/** + * Phaser Tween state constants. + * + * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + var TWEEN_CONST = { /** * TweenData state. - * - * @name Phaser.Tweens.CREATED + * + * @name Phaser.Tweens.States.CREATED * @type {number} + * @const * @since 3.0.0 */ CREATED: 0, - /** - * TweenData state. - * - * @name Phaser.Tweens.INIT - * @type {number} - * @since 3.0.0 - */ - INIT: 1, + // 1 used to be INIT prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.DELAY + * + * @name Phaser.Tweens.States.DELAY * @type {number} + * @const * @since 3.0.0 */ DELAY: 2, - /** - * TweenData state. - * - * @name Phaser.Tweens.OFFSET_DELAY - * @type {number} - * @since 3.0.0 - */ - OFFSET_DELAY: 3, + // 3 used to be OFFSET_DELAY prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.PENDING_RENDER + * + * @name Phaser.Tweens.States.PENDING_RENDER * @type {number} + * @const * @since 3.0.0 */ PENDING_RENDER: 4, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_FORWARD + * + * @name Phaser.Tweens.States.PLAYING_FORWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_FORWARD: 5, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_BACKWARD + * + * @name Phaser.Tweens.States.PLAYING_BACKWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_BACKWARD: 6, /** * TweenData state. - * - * @name Phaser.Tweens.HOLD_DELAY + * + * @name Phaser.Tweens.States.HOLD_DELAY * @type {number} + * @const * @since 3.0.0 */ HOLD_DELAY: 7, /** * TweenData state. - * - * @name Phaser.Tweens.REPEAT_DELAY + * + * @name Phaser.Tweens.States.REPEAT_DELAY * @type {number} + * @const * @since 3.0.0 */ REPEAT_DELAY: 8, /** * TweenData state. - * - * @name Phaser.Tweens.COMPLETE + * + * @name Phaser.Tweens.States.COMPLETE * @type {number} + * @const * @since 3.0.0 */ COMPLETE: 9, @@ -39989,67 +44762,110 @@ var TWEEN_CONST = { // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_ADD + * Tween state. The Tween has been created but has not yet been added to the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING * @type {number} + * @const * @since 3.0.0 */ - PENDING_ADD: 20, + PENDING: 20, /** - * Tween state. - * - * @name Phaser.Tweens.PAUSED + * Tween state. The Tween is active within the Tween Manager. This means it is either playing, + * or was playing and is currently paused, but in both cases it's still being processed by + * the Tween Manager, so is considered 'active'. + * + * @name Phaser.Tweens.States.ACTIVE * @type {number} + * @const * @since 3.0.0 */ - PAUSED: 21, + ACTIVE: 21, /** - * Tween state. - * - * @name Phaser.Tweens.LOOP_DELAY + * Tween state. The Tween is waiting for a loop countdown to elapse. + * + * @name Phaser.Tweens.States.LOOP_DELAY * @type {number} + * @const * @since 3.0.0 */ LOOP_DELAY: 22, /** - * Tween state. - * - * @name Phaser.Tweens.ACTIVE + * Tween state. The Tween is waiting for a complete delay to elapse. + * + * @name Phaser.Tweens.States.COMPLETE_DELAY * @type {number} + * @const * @since 3.0.0 */ - ACTIVE: 23, + COMPLETE_DELAY: 23, /** - * Tween state. - * - * @name Phaser.Tweens.COMPLETE_DELAY + * Tween state. The Tween is waiting for a starting delay to elapse. + * + * @name Phaser.Tweens.States.START_DELAY * @type {number} + * @const * @since 3.0.0 */ - COMPLETE_DELAY: 24, + START_DELAY: 24, /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_REMOVE + * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING_REMOVE * @type {number} + * @const * @since 3.0.0 */ PENDING_REMOVE: 25, /** - * Tween state. - * - * @name Phaser.Tweens.REMOVED + * Tween state. The Tween has been removed from the Tween Manager. + * + * @name Phaser.Tweens.States.REMOVED * @type {number} + * @const * @since 3.0.0 */ - REMOVED: 26 + REMOVED: 26, + + /** + * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation, + * so will not be automatically removed by the Tween Manager. + * + * @name Phaser.Tweens.States.FINISHED + * @type {number} + * @const + * @since 3.60.0 + */ + FINISHED: 27, + + /** + * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager. + * + * @name Phaser.Tweens.States.DESTROYED + * @type {number} + * @const + * @since 3.60.0 + */ + DESTROYED: 28, + + /** + * A large integer value used for 'infinite' style countdowns. + * + * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not + * supported on IE. + * + * @name Phaser.Tweens.States.MAX + * @type {number} + * @const + * @since 3.60.0 + */ + MAX: 999999999999 }; @@ -40057,3276 +44873,439 @@ module.exports = TWEEN_CONST; /***/ }), - -/***/ 7473: -/***/ ((module) => { +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Taken from klasse by mattdesl https://github.com/mattdesl/klasse - -function hasGetterOrSetter (def) -{ - return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); -} - -function getProperty (definition, k, isClassDescriptor) -{ - // This may be a lightweight object, OR it might be a property that was defined previously. - - // For simple class descriptors we can just assume its NOT previously defined. - var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); - - if (!isClassDescriptor && def.value && typeof def.value === 'object') - { - def = def.value; - } - - // This might be a regular property, or it may be a getter/setter the user defined in a class. - if (def && hasGetterOrSetter(def)) - { - if (typeof def.enumerable === 'undefined') - { - def.enumerable = true; - } - - if (typeof def.configurable === 'undefined') - { - def.configurable = true; - } - - return def; - } - else - { - return false; - } -} - -function hasNonConfigurable (obj, k) -{ - var prop = Object.getOwnPropertyDescriptor(obj, k); - - if (!prop) - { - return false; - } - - if (prop.value && typeof prop.value === 'object') - { - prop = prop.value; - } - - if (prop.configurable === false) - { - return true; - } - - return false; -} +var DeepCopy = __webpack_require__(334); +var SpliceOne = __webpack_require__(10); /** - * Extends the given `myClass` object's prototype with the properties of `definition`. + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. * - * @function extend - * @ignore - * @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) - { - if (!definition.hasOwnProperty(k)) - { - continue; - } - - var def = getProperty(definition, k, isClassDescriptor); - - if (def !== false) - { - // If Extends is used, we will check its prototype to see if the final variable exists. - - var parent = extend || ctor; - - if (hasNonConfigurable(parent.prototype, k)) - { - // Just skip the final property - if (Class.ignoreFinals) - { - continue; - } - - // We cannot re-define a property that is configurable=false. - // So we will consider them final and throw an error. This is by - // default so it is clear to the developer what is happening. - // You can set ignoreFinals to true if you need to extend a class - // which has configurable=false; it will simply not re-define final properties. - throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); - } - - Object.defineProperty(ctor.prototype, k, def); - } - else - { - ctor.prototype[k] = definition[k]; - } - } -} - -/** - * Applies the given `mixins` to the prototype of `myClass`. - * - * @function mixin - * @ignore - * @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) - { - return; - } - - if (!Array.isArray(mixins)) - { - mixins = [ mixins ]; - } - - for (var i = 0; i < mixins.length; i++) - { - extend(myClass, mixins[i].prototype || mixins[i]); - } -} - -/** - * Creates a new class with the given descriptor. - * The constructor, defined by the name `initialize`, - * is an optional function. If unspecified, an anonymous - * function will be used which calls the parent class (if - * one exists). - * - * You can also use `Extends` and `Mixins` to provide subclassing - * and inheritance. - * - * @class Phaser.Class - * @constructor - * @param {Object} definition a dictionary of functions for the class - * @example - * - * var MyClass = new Phaser.Class({ - * - * initialize: function() { - * this.foo = 2.0; - * }, - * - * bar: function() { - * return this.foo + 5; - * } - * }); - */ -function Class (definition) -{ - if (!definition) - { - definition = {}; - } - - // The variable name here dictates what we see in Chrome debugger - var initialize; - var Extends; - - if (definition.initialize) - { - if (typeof definition.initialize !== 'function') - { - throw new Error('initialize must be a function'); - } - - initialize = definition.initialize; - - // Usually we should avoid 'delete' in V8 at all costs. - // However, its unlikely to make any performance difference - // here since we only call this on class creation (i.e. not object creation). - delete definition.initialize; - } - else if (definition.Extends) - { - var base = definition.Extends; - - initialize = function () - { - base.apply(this, arguments); - }; - } - else - { - initialize = function () {}; - } - - if (definition.Extends) - { - initialize.prototype = Object.create(definition.Extends.prototype); - initialize.prototype.constructor = initialize; - - // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) - - Extends = definition.Extends; - - delete definition.Extends; - } - else - { - initialize.prototype.constructor = initialize; - } - - // Grab the mixins, if they are specified... - var mixins = null; - - if (definition.Mixins) - { - mixins = definition.Mixins; - delete definition.Mixins; - } - - // First, mixin if we can. - mixin(initialize, mixins); - - // Now we grab the actual definition which defines the overrides. - extend(initialize, definition, true, Extends); - - return initialize; -} - -Class.extend = extend; -Class.mixin = mixin; -Class.ignoreFinals = false; - -module.exports = Class; - - -/***/ }), - -/***/ 1984: -/***/ ((module) => { - -/** - * @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 + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly * @since 3.0.0 */ -var NOOP = function () -{ - // NOOP -}; -module.exports = NOOP; - - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2280: -/***/ ((module) => { - -/** - * @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 {number} [index=0] - The index in the array where the item will be inserted. - * @param {number} [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; - - -/***/ }), - -/***/ 2513: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1771: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [endIndex] - An optional end index to search to. - * - * @return {number} 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; - - -/***/ }), - -/***/ 7883: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5856: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} startIndex - The start index to search from. - * @param {number} 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; - - -/***/ }), - -/***/ 3957: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6245: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 1647: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 5301: -/***/ ((module) => { - -/** - * @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 {number} [startIndex=0] - An optional start index. - * @param {number} [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; - - -/***/ }), - -/***/ 8683: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Moves the given array element above another one in the array. - * The array is modified in-place. - * - * @function Phaser.Utils.Array.MoveAbove - * @since 3.55.0 - * - * @param {array} array - The input array. - * @param {*} item1 - The element to move above base element. - * @param {*} item2 - The base element. - * - * - * @return {array} The input array. - */ -var MoveAbove = function (array, item1, item2) -{ - if (item1 === item2) - { - return array; - } - - var currentIndex = array.indexOf(item1); - var baseIndex = array.indexOf(item2); - - if (currentIndex < 0 || baseIndex < 0) - { - throw new Error('Supplied items must be elements of the same array'); - } - - if (currentIndex > baseIndex) - { - // item1 is already above item2 - return array; - } - - // Remove - array.splice(currentIndex, 1); - - // Add in new location - if (baseIndex === array.length - 1) - { - array.push(item1); - } - else - { - array.splice(baseIndex, 0, item1); - } - - return array; -}; - -module.exports = MoveAbove; - - -/***/ }), - -/***/ 546: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Moves the given array element below another one in the array. - * The array is modified in-place. - * - * @function Phaser.Utils.Array.MoveBelow - * @since 3.55.0 - * - * @param {array} array - The input array. - * @param {*} item1 - The element to move below base element. - * @param {*} item2 - The base element. - * - * - * @return {array} The input array. - */ -var MoveBelow = function (array, item1, item2) -{ - if (item1 === item2) - { - return array; - } - - var currentIndex = array.indexOf(item1); - var baseIndex = array.indexOf(item2); - - if (currentIndex < 0 || baseIndex < 0) - { - throw new Error('Supplied items must be elements of the same array'); - } - - if (currentIndex < baseIndex) - { - // item1 is already below item2 - return array; - } - - // Remove - array.splice(currentIndex, 1); - - // Add in new location - if (baseIndex === 0) - { - array.unshift(item1); - } - else - { - array.splice(baseIndex, 0, item1); - } - - return array; -}; - -module.exports = MoveBelow; - - -/***/ }), - -/***/ 1842: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1419: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 6512: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4130: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1316: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RoundAwayFromZero = __webpack_require__(4078); - -/** - * 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; - - -/***/ }), - -/***/ 9465: -/***/ ((module) => { - -/** - * @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 {number} k - The k-th element index. - * @param {number} [left=0] - The index of the left part of the range. - * @param {number} [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; - - -/***/ }), - -/***/ 9703: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetValue = __webpack_require__(5851); -var Shuffle = __webpack_require__(4912); - -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; - - -/***/ }), - -/***/ 7161: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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; - var removed = []; - - while (itemLength >= 0) - { - var entry = item[itemLength]; - - index = array.indexOf(entry); - - if (index !== -1) - { - SpliceOne(array, index); - - removed.push(entry); - - if (callback) - { - callback.call(context, entry); - } - } - - itemLength--; - } - - return removed; -}; - -module.exports = Remove; - - -/***/ }), - -/***/ 4725: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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 {number} 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; - - -/***/ }), - -/***/ 8780: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} startIndex - The start index to remove from. - * @param {number} 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; - - -/***/ }), - -/***/ 5744: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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 {number} [start=0] - The array index to start the search from. - * @param {number} [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; - - -/***/ }), - -/***/ 6960: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1021: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 4027: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2497: -/***/ ((module) => { - -/** - * @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 {number} startIndex - The start index. - * @param {number} 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; - - -/***/ }), - -/***/ 5361: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3718: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 4912: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2071: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8935: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 9992: -/***/ ((module) => { - -/** - * @author Richard Davey - * @author Angry Bytes (and contributors) - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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); -} - -/** - * 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 = 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) - { - RunPass(array, compare, chk, buffer); - - var tmp = array; - - array = buffer; - - buffer = tmp; - } - - return array; -} - -/** - * 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) - { - 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++]; - } - } - else if (li < r) - { - // Nothing to compare, just flush what's left. - result[i++] = arr[li++]; - } - else if (ri < e) - { - result[i++] = arr[ri++]; - } - 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; -}; - -module.exports = StableSort; - - -/***/ }), - -/***/ 2372: -/***/ ((module) => { - -/** - * @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 array; - } - - 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; - - -/***/ }), - -/***/ 1953: -/***/ ((module, __unused_webpack_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__(1237), - - Add: __webpack_require__(1792), - AddAt: __webpack_require__(2280), - BringToTop: __webpack_require__(2513), - CountAllMatching: __webpack_require__(1771), - Each: __webpack_require__(7883), - EachInRange: __webpack_require__(5856), - FindClosestInSorted: __webpack_require__(3957), - GetAll: __webpack_require__(6245), - GetFirst: __webpack_require__(1647), - GetRandom: __webpack_require__(5301), - MoveDown: __webpack_require__(1842), - MoveTo: __webpack_require__(1419), - MoveUp: __webpack_require__(6512), - MoveAbove: __webpack_require__(8683), - MoveBelow: __webpack_require__(546), - NumberArray: __webpack_require__(4130), - NumberArrayStep: __webpack_require__(1316), - QuickSelect: __webpack_require__(9465), - Range: __webpack_require__(9703), - Remove: __webpack_require__(7161), - RemoveAt: __webpack_require__(4725), - RemoveBetween: __webpack_require__(8780), - RemoveRandomElement: __webpack_require__(5744), - Replace: __webpack_require__(6960), - RotateLeft: __webpack_require__(1021), - RotateRight: __webpack_require__(4027), - SafeRange: __webpack_require__(2497), - SendToBack: __webpack_require__(5361), - SetAll: __webpack_require__(3718), - Shuffle: __webpack_require__(4912), - SortByDigits: __webpack_require__(2071), - SpliceOne: __webpack_require__(8935), - StableSort: __webpack_require__(9992), - Swap: __webpack_require__(2372) - -}; - - -/***/ }), - -/***/ 1816: -/***/ ((module) => { - -/** - * @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. This is an example matrix: - * - * ``` - * [ - * [ 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) || !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) +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default. + * + * @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, + + /** + * Does this Game Object have any Post Pipelines set? + * + * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline + * @type {boolean} + * @webglOnly + * @since 3.50.0 + */ + hasPostPipeline: false, + + /** + * The WebGL Post FX Pipelines this Game Object uses for post-render effects. + * + * The pipelines are processed in the order in which they appear in this array. + * + * If you modify this array directly, be sure to set the + * `hasPostPipeline` property accordingly. + * + * @name Phaser.GameObjects.Components.Pipeline#postPipelines + * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} + * @webglOnly + * @since 3.50.0 + */ + postPipelines: null, + + /** + * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses. + * + * @name Phaser.GameObjects.Components.Pipeline#pipelineData + * @type {object} + * @webglOnly + * @since 3.50.0 + */ + pipelineData: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipeline) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) { return false; } - } - return true; -}; + var pipelines = renderer.pipelines; -module.exports = CheckMatrix; + this.postPipelines = []; + this.pipelineData = {}; - -/***/ }), - -/***/ 6655: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Pad = __webpack_require__(7222); -var CheckMatrix = __webpack_require__(1816); - -/** - * Generates a string (which you can pass to console.log) from the given Array 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + if (pipelines) { - var cell = matrix[r][c].toString(); - - if (cell !== 'undefined') + if (pipeline === undefined) { - str += Pad(cell, 2); - } - else - { - str += '?'; + pipeline = pipelines.default; } - if (c < matrix[r].length - 1) + var instance = pipelines.get(pipeline); + + if (instance) { - str += ' |'; + this.defaultPipeline = instance; + this.pipeline = instance; + + return true; } } - if (r < matrix.length - 1) + return false; + }, + + /** + * Sets the main WebGL Pipeline of this Game Object. + * + * Also sets the `pipelineData` property, if the parameter is given. + * + * Both the pipeline and post pipelines share the same pipeline data object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. + * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. + * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipeline, pipelineData, copyData) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) { - str += '\n'; + return this; + } - for (var i = 0; i < matrix[r].length; i++) + var pipelines = renderer.pipelines; + + if (pipelines) + { + var instance = pipelines.get(pipeline); + + if (instance) { - str += '---'; + this.pipeline = instance; + } - if (i < matrix[r].length - 1) + if (pipelineData) + { + this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; + } + } + + return this; + }, + + /** + * Sets one, or more, Post Pipelines on this Game Object. + * + * Post Pipelines are invoked after this Game Object has rendered to its target and + * are commonly used for post-fx. + * + * The post pipelines are appended to the `postPipelines` array belonging to this + * Game Object. When the renderer processes this Game Object, it iterates through the post + * pipelines in the order in which they appear in the array. If you are stacking together + * multiple effects, be aware that the order is important. + * + * If you call this method multiple times, the new pipelines will be appended to any existing + * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. + * + * You can optionally also set the `pipelineData` property, if the parameter is given. + * + * Both the pipeline and post pipelines share the pipeline data object together. + * + * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them. + * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. + * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. + * + * @return {this} This Game Object instance. + */ + setPostPipeline: function (pipelines, pipelineData, copyData) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) + { + return this; + } + + var pipelineManager = renderer.pipelines; + + if (pipelineManager) + { + if (!Array.isArray(pipelines)) + { + pipelines = [ pipelines ]; + } + + for (var i = 0; i < pipelines.length; i++) + { + var instance = pipelineManager.getPostPipeline(pipelines[i], this); + + if (instance) { - str += '+'; + this.postPipelines.push(instance); } } - str += '\n'; + if (pipelineData) + { + this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; + } } - } + this.hasPostPipeline = (this.postPipelines.length > 0); - return str; -}; + return this; + }, -module.exports = MatrixToString; - - -/***/ }), - -/***/ 582: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 6063: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + /** + * Adds an entry to the `pipelineData` object belonging to this Game Object. + * + * If the 'key' already exists, its value is updated. If it doesn't exist, it is created. + * + * If `value` is undefined, and `key` exists, `key` is removed from the data object. + * + * Both the pipeline and post pipelines share the pipeline data object together. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipelineData + * @webglOnly + * @since 3.50.0 + * + * @param {string} key - The key of the pipeline data to set, update, or delete. + * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object. + * + * @return {this} This Game Object instance. + */ + setPipelineData: function (key, value) { - matrix[i].reverse(); - } + var data = this.pipelineData; - return matrix; -}; - -module.exports = ReverseRows; - - -/***/ }), - -/***/ 8321: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix 180 degrees. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 2597: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix to the left (or 90 degrees) - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 7116: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CheckMatrix = __webpack_require__(1816); -var TransposeMatrix = __webpack_require__(4780); - -/** - * 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/}. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + if (value === undefined) { - matrix[i].reverse(); - } - - matrix.reverse(); - } - - return matrix; -}; - -module.exports = RotateMatrix; - - -/***/ }), - -/***/ 6285: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix to the left (or -90 degrees) - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 7711: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateLeft = __webpack_require__(1021); -var RotateRight = __webpack_require__(4027); - -/** - * Translates the given Array Matrix by shifting each column and row the - * amount specified. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.Translate - * @since 3.50.0 - * - * @generic T - * @genericUse {T[][]} - [matrix,$return] - * - * @param {T[][]} [matrix] - The array matrix to translate. - * @param {number} [x=0] - The amount to horizontally translate the matrix by. - * @param {number} [y=0] - The amount to vertically translate the matrix by. - * - * @return {T[][]} The translated matrix. - */ -var TranslateMatrix = function (matrix, x, y) -{ - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - - // Vertical translation - - if (y !== 0) - { - if (y < 0) - { - // Shift Up - RotateLeft(matrix, Math.abs(y)); + delete data[key]; } else { - // Shift Down - RotateRight(matrix, y); + data[key] = value; } - } - // Horizontal translation + return this; + }, - if (x !== 0) + /** + * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it. + * + * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class. + * + * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array. + */ + getPostPipeline: function (pipeline) { - for (var i = 0; i < matrix.length; i++) - { - var row = matrix[i]; + var isString = (typeof pipeline === 'string'); - if (x < 0) + var pipelines = this.postPipelines; + + var results = []; + + for (var i = 0; i < pipelines.length; i++) + { + var instance = pipelines[i]; + + if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline)) { - RotateLeft(row, Math.abs(x)); - } - else - { - RotateRight(row, x); + results.push(instance); } } - } - return matrix; -}; + return (results.length === 1) ? results[0] : results; + }, -module.exports = TranslateMatrix; - - -/***/ }), - -/***/ 4780: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + /** + * 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 + * + * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines? + * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? + * + * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`. + */ + resetPipeline: function (resetPostPipelines, resetData) { - result[i] = new Array(sourceRowCount); + if (resetPostPipelines === undefined) { resetPostPipelines = false; } + if (resetData === undefined) { resetData = false; } - for (var j = sourceRowCount - 1; j > -1; j--) + this.pipeline = this.defaultPipeline; + + if (resetPostPipelines) { - result[i][j] = array[j][i]; + this.postPipelines = []; + this.hasPostPipeline = false; } + + if (resetData) + { + this.pipelineData = {}; + } + + return (this.pipeline !== null); + }, + + /** + * Resets the WebGL Post Pipelines of this Game Object. It does this by calling + * the `destroy` method on each post pipeline and then clearing the local array. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? + */ + resetPostPipeline: function (resetData) + { + if (resetData === undefined) { resetData = false; } + + var pipelines = this.postPipelines; + + for (var i = 0; i < pipelines.length; i++) + { + pipelines[i].destroy(); + } + + this.postPipelines = []; + this.hasPostPipeline = false; + + if (resetData) + { + this.pipelineData = {}; + } + }, + + /** + * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them. + * + * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead. + * + * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class. + * + * @return {this} This Game Object. + */ + removePostPipeline: function (pipeline) + { + var pipelines = this.postPipelines; + + for (var i = pipelines.length - 1; i >= 0; i--) + { + var instance = pipelines[i]; + + if ( + (typeof pipeline === 'string' && instance.name === pipeline) || + (typeof pipeline !== 'string' && instance instanceof pipeline)) + { + instance.destroy(); + + SpliceOne(pipelines, i); + } + } + + this.hasPostPipeline = (this.postPipelines.length > 0); + + return this; + }, + + /** + * 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 result; }; -module.exports = TransposeMatrix; +module.exports = Pipeline; /***/ }), - -/***/ 1237: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 334 */ +/***/ (function(module, exports) { /** * @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__(1816), - MatrixToString: __webpack_require__(6655), - ReverseColumns: __webpack_require__(582), - ReverseRows: __webpack_require__(6063), - Rotate180: __webpack_require__(8321), - RotateLeft: __webpack_require__(2597), - RotateMatrix: __webpack_require__(7116), - RotateRight: __webpack_require__(6285), - Translate: __webpack_require__(7711), - TransposeMatrix: __webpack_require__(4780) - -}; - - -/***/ }), - -/***/ 3911: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43370,512 +45349,1117 @@ module.exports = DeepCopy; /***/ }), - -/***/ 1030: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 335 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsPlainObject = __webpack_require__(2482); - -// @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/ + * Provides methods used for getting and setting the size of a Game Object. * - * @function Phaser.Utils.Objects.Extend + * @namespace Phaser.GameObjects.Components.Size * @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] || {}; +var Size = { - // skip the boolean and the target - i = 2; - } + /** + * 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, - // extend Phaser if only one argument is passed - if (length === i) - { - target = this; - --i; - } + /** + * 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, - for (; i < length; i++) - { - // Only deal with non-null/undefined values - if ((options = arguments[i]) != null) + /** + * 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 () { - // Extend the base object - for (name in options) - { - src = target[name]; - copy = options[name]; + return Math.abs(this.scaleX * this.frame.realWidth); + }, - // 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; - } - } + 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; + + var input = this.input; + + if (input && !input.customHitArea) + { + input.hitArea.width = this.width; + input.hitArea.height = this.height; + } + + 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; } - // Return the modified object - return target; }; -module.exports = Extend; +module.exports = Size; /***/ }), - -/***/ 8361: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(4675); -var GetValue = __webpack_require__(5851); +var Frame = __webpack_require__(67); + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 /** - * Retrieves a value from an object. Allows for more advanced selection options, including: + * Provides methods used for getting and setting the texture of a Game Object. * - * 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 + * @namespace Phaser.GameObjects.Components.Texture * @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 GetAdvancedValue = function (source, key, defaultValue) -{ - var value = GetValue(source, key, null); - if (value === null) +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|number)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) { - return defaultValue; - } - else if (Array.isArray(value)) + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. + * @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) { - return MATH.RND.pick(value); - } - else if (typeof value === 'object') - { - if (value.hasOwnProperty('randInt')) + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + if (frame instanceof Frame) { - return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]); + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; } - else if (value.hasOwnProperty('randFloat')) + else { - return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]); + this.frame = this.texture.get(frame); } - } - else if (typeof value === 'function') - { - return value(key); - } - return value; -}; - -module.exports = GetAdvancedValue; - - -/***/ }), - -/***/ 4597: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5851: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. - * - * The key is a string, which can be split based on the use of the period character. - * - * For example: - * - * ```javascript - * const source = { - * lives: 3, - * render: { - * screen: { - * width: 1024 - * } - * } - * } - * - * const lives = GetValue(source, 'lives', 1); - * const width = GetValue(source, 'render.screen.width', 800); - * const height = GetValue(source, 'render.screen.height', 600); - * ``` - * - * In the code above, `lives` will be 3 because it's defined at the top level of `source`. - * The `width` value will be 1024 because it can be found inside the `render.screen` object. - * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. - * - * @function Phaser.Utils.Objects.GetValue - * @since 3.0.0 - * - * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. - * @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. - * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. - * - * @return {*} The value of the requested key. - */ -var GetValue = function (source, key, defaultValue, altSource) -{ - if ((!source && !altSource) || typeof source === 'number') - { - return defaultValue; - } - else if (source && source.hasOwnProperty(key)) - { - return source[key]; - } - else if (altSource && altSource.hasOwnProperty(key)) - { - return altSource[key]; - } - else if (key.indexOf('.') !== -1) - { - var keys = key.split('.'); - var parentA = source; - var parentB = altSource; - var value = defaultValue; - - // Use for loop here so we can break early - for (var i = 0; i < keys.length; i++) + if (!this.frame.cutWidth || !this.frame.cutHeight) { - if (parentA && parentA.hasOwnProperty(keys[i])) - { - // Yes parentA has a key property, let's carry on down - value = parentA[keys[i]]; + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } - parentA = parentA[keys[i]]; - } - else if (parentB && parentB.hasOwnProperty(keys[i])) - { - // Yes parentB has a key property, let's carry on down - value = parentB[keys[i]]; + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } - parentB = parentB[keys[i]]; + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); } else { - // Can't go any further, so reset to default - value = defaultValue; - break; + this.updateDisplayOrigin(); } } - return value; + return this; + } + +}; + +module.exports = Texture; + + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Frame = __webpack_require__(67); + +// 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|number)} [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. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. + * @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; } + + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + 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; + + +/***/ }), +/* 338 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * 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 = { + + /** + * The tint value being applied to the top-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintTopLeft: 0xffffff, + + /** + * The tint value being applied to the top-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintTopRight: 0xffffff, + + /** + * The tint value being applied to the bottom-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintBottomLeft: 0xffffff, + + /** + * The tint value being applied to the bottom-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintBottomRight: 0xffffff, + + /** + * The tint fill mode. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * + * @name Phaser.GameObjects.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); + + 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {number} [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.tintTopLeft = topLeft; + this.tintTopRight = topRight; + this.tintBottomLeft = bottomLeft; + this.tintBottomRight = bottomRight; + + 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {number} [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 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 {number} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied? + * + * It checks to see if the 4 tint properties are set to the value 0xffffff + * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + var white = 0xffffff; + + return ( + this.tintFill || + this.tintTopLeft !== white || + this.tintTopRight !== white || + this.tintBottomLeft !== white || + this.tintBottomRight !== white + ); + } + + } + +}; + +module.exports = Tint; + + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var NOOP = __webpack_require__(1); +var renderWebGL = NOOP; +var renderCanvas = NOOP; + +if (false) +{} + +if (true) +{ + renderCanvas = __webpack_require__(340); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 340 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 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 {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, camera, parentMatrix) +{ + camera.addToRenderList(container); + + 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 { - return defaultValue; + 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, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); } }; -module.exports = GetValue; +module.exports = ContainerCanvasRenderer; /***/ }), - -/***/ 2482: -/***/ ((module) => { +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(28); + +/** + * 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; + + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); + +if (false) +{} + +if (true) +{ + renderCanvas = __webpack_require__(343); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 343 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 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]. + * 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. * - * @function Phaser.Utils.Objects.IsPlainObject - * @since 3.0.0 + * @method Phaser.GameObjects.Container#renderCanvas + * @since 3.4.0 + * @private * - * @param {object} obj - The object to inspect. - * - * @return {boolean} `true` if the object is plain, otherwise `false`. + * @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 {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 IsPlainObject = function (obj) +var SpineContainerCanvasRenderer = function (renderer, container, camera, parentMatrix) { - // 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) + var children = container.list; + + if (children.length === 0) { - return false; + return; } - // 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 + camera.addToRenderList(container); + + var transformMatrix = container.localTransform; + + if (parentMatrix) { - if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) + 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)) { - return false; + continue; } - } - catch (e) - { - return false; + + 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, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); } - // 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; + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } }; -module.exports = IsPlainObject; - - -/***/ }), - -/***/ 7222: -/***/ ((module) => { - -/** - * @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 {number} [len=0] - The number of characters to be added. - * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). - * @param {number} [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; +module.exports = SpineContainerCanvasRenderer; /***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __webpack_require__(4513); -/******/ window.SpinePlugin = __webpack_exports__; -/******/ -/******/ })() -; \ No newline at end of file +/******/ ]); \ No newline at end of file diff --git a/plugins/spine/dist/SpineCanvasPlugin.min.js b/plugins/spine/dist/SpineCanvasPlugin.min.js index 9a87740a5..3753c26ce 100644 --- a/plugins/spine/dist/SpineCanvasPlugin.min.js +++ b/plugins/spine/dist/SpineCanvasPlugin.min.js @@ -1 +1,1254 @@ -(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(t,e,n,s,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var o=new r(n,s||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,a=new Array(s);r{(function(){var e,i,n,r=this&&this.__extends||(e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},e(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});!function(t){var e,i,n,s=function(){function t(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;n0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},t.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},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"}(i=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"}(n=t.TimelineType||(t.TimelineType={}));var a=function(){function e(i){if(i<=0)throw new Error("frameCount must be > 0: "+i);this.curves=t.Utils.newFloatArray((i-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 i=t*e.BEZIER_SIZE;if(i==this.curves.length)return e.LINEAR;var n=this.curves[i];return n==e.LINEAR?e.LINEAR:n==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,i,n,r,s){var a=.03*(2*-i+r),o=.03*(2*-n+s),h=.006*(3*(i-r)+1),l=.006*(3*(n-s)+1),u=2*a+h,c=2*o+l,f=.3*i+a+.16666667*h,d=.3*n+o+.16666667*l,p=t*e.BEZIER_SIZE,v=this.curves;v[p++]=e.BEZIER;for(var g=f,m=d,y=p+e.BEZIER_SIZE-1;p=n){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)*(n-u)/(o-u)}var f=r[s-1];return f+(1-f)*(n-o)/(1-o)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=a;var o=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e<<1),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=i},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,a.ENTRIES),v=u[p+a.PREV_ROTATION],g=u[p],m=this.getCurvePercent((p>>1)-1,1-(n-g)/(u[p+a.PREV_TIME]-g)),y=u[p+a.ROTATION]-v;switch(y=v+(y-360*(16384-(16384.499999999996-y/360|0)))*m,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(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=i,this.frames[t+a.Y]=n},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,a.ENTRIES);f=u[p+a.PREV_X],d=u[p+a.PREV_Y];var v=u[p],g=this.getCurvePercent(p/a.ENTRIES-1,1-(n-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.X]-f)*g,d+=(u[p+a.Y]-d)*g}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(n.scale<<24)+this.boneIndex},o.prototype.apply=function(n,r,a,h,l,u,c){var f=this.frames,d=n.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 g=s.binarySearch(f,a,o.ENTRIES);p=f[g+o.PREV_X],v=f[g+o.PREV_Y];var m=f[g],y=this.getCurvePercent(g/o.ENTRIES-1,1-(a-m)/(f[g+o.PREV_TIME]-m));p=(p+(f[g+o.X]-p)*y)*d.data.scaleX,v=(v+(f[g+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,M=0;if(c==i.mixOut)switch(u){case e.setup:x=d.data.scaleX,M=d.data.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=M+(Math.abs(v)*t.MathUtils.signum(M)-M)*l;break;case e.first:case e.replace:x=d.scaleX,M=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=M+(Math.abs(v)*t.MathUtils.signum(M)-M)*l;break;case e.add:x=d.scaleX,M=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-d.data.scaleX)*l,d.scaleY=M+(Math.abs(v)*t.MathUtils.signum(M)-d.data.scaleY)*l}else switch(u){case e.setup:x=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),M=Math.abs(d.data.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=M+(v-M)*l;break;case e.first:case e.replace:x=Math.abs(d.scaleX)*t.MathUtils.signum(p),M=Math.abs(d.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=M+(v-M)*l;break;case e.add:x=t.MathUtils.signum(p),M=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)*M+(v-Math.abs(d.data.scaleY)*M)*l}}}},o}(h);t.ScaleTimeline=l;var u=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,r,a,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_X],d=u[u.length+i.PREV_Y];else{var p=s.binarySearch(u,r,i.ENTRIES);f=u[p+i.PREV_X],d=u[p+i.PREV_Y];var v=u[p],g=this.getCurvePercent(p/i.ENTRIES-1,1-(r-v)/(u[p+i.PREV_TIME]-v));f+=(u[p+i.X]-f)*g,d+=(u[p+i.Y]-d)*g}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}}},i}(h);t.ShearTimeline=u;var c=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,this.frames[t+a.B]=r,this.frames[t+a.A]=s},a.prototype.apply=function(t,i,n,r,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=c[c.length-a.ENTRIES]){var y=c.length;p=c[y+a.PREV_R],v=c[y+a.PREV_G],g=c[y+a.PREV_B],m=c[y+a.PREV_A]}else{var x=s.binarySearch(c,n,a.ENTRIES);p=c[x+a.PREV_R],v=c[x+a.PREV_G],g=c[x+a.PREV_B],m=c[x+a.PREV_A];var M=c[x],w=this.getCurvePercent(x/a.ENTRIES-1,1-(n-M)/(c[x+a.PREV_TIME]-M));p+=(c[x+a.R]-p)*w,v+=(c[x+a.G]-v)*w,g+=(c[x+a.B]-g)*w,m+=(c[x+a.A]-m)*w}if(1==o)u.color.set(p,v,g,m);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*o,(v-f.g)*o,(g-f.b)*o,(m-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(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s,o,h,l){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,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,i,n,r,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=c[c.length-a.ENTRIES]){var T=c.length;g=c[T+a.PREV_R],m=c[T+a.PREV_G],y=c[T+a.PREV_B],x=c[T+a.PREV_A],M=c[T+a.PREV_R2],w=c[T+a.PREV_G2],E=c[T+a.PREV_B2]}else{var A=s.binarySearch(c,n,a.ENTRIES);g=c[A+a.PREV_R],m=c[A+a.PREV_G],y=c[A+a.PREV_B],x=c[A+a.PREV_A],M=c[A+a.PREV_R2],w=c[A+a.PREV_G2],E=c[A+a.PREV_B2];var R=c[A],b=this.getCurvePercent(A/a.ENTRIES-1,1-(n-R)/(c[A+a.PREV_TIME]-R));g+=(c[A+a.R]-g)*b,m+=(c[A+a.G]-m)*b,y+=(c[A+a.B]-y)*b,x+=(c[A+a.A]-x)*b,M+=(c[A+a.R2]-M)*b,w+=(c[A+a.G2]-w)*b,E+=(c[A+a.B2]-E)*b}if(1==o)u.color.set(g,m,y,x),u.darkColor.set(M,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)*o,(m-f.g)*o,(y-f.b)*o,(x-f.a)*o),d.add((M-d.r)*o,(w-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(n.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},r.prototype.apply=function(t,n,r,a,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=i.mixOut){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else h==e.setup&&this.setAttachment(t,u,u.data.attachmentName)},r.prototype.setAttachment=function(t,e,i){e.attachment=null==i?null:t.getAttachment(this.slotIndex,i)},r}();t.AttachmentTimeline=d;var p=null,v=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e),n.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},a.prototype.apply=function(i,n,r,a,o,h,l){var u=i.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==o)if(h==e.add)if(null==(g=c).bones){y=g.vertices;for(var E=0;Ei)this.apply(t,e,Number.MAX_VALUE,n,r,a,o),e=-1;else if(e>=h[l-1])return;if(!(i0&&h[u-1]==c;)u--;for(;u=h[u];u++)n.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 n.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},r.prototype.apply=function(n,r,a,o,h,l,u){var c=n.drawOrder,f=n.slots;if(u!=i.mixOut){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 g=0,m=v.length;g=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==i.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==i.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],g=c[d],m=this.getCurvePercent(d/o.ENTRIES-1,1-(r-g)/(c[d+o.PREV_TIME]-g));l==e.setup?(f.mix=f.data.mix+(p+(c[d+o.MIX]-p)*m-f.data.mix)*h,f.softness=f.data.softness+(v+(c[d+o.SOFTNESS]-v)*m-f.data.softness)*h,u==i.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)*m-f.mix)*h,f.softness+=(v+(c[d+o.SOFTNESS]-v)*m-f.softness)*h,u==i.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(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n,this.frames[t+a.SCALE]=r,this.frames[t+a.SHEAR]=s},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(n=u[u.length-a.ENTRIES]){var m=u.length;d=u[m+a.PREV_ROTATE],p=u[m+a.PREV_TRANSLATE],v=u[m+a.PREV_SCALE],g=u[m+a.PREV_SHEAR]}else{var y=s.binarySearch(u,n,a.ENTRIES);d=u[y+a.PREV_ROTATE],p=u[y+a.PREV_TRANSLATE],v=u[y+a.PREV_SCALE],g=u[y+a.PREV_SHEAR];var x=u[y],M=this.getCurvePercent(y/a.ENTRIES-1,1-(n-x)/(u[y+a.PREV_TIME]-x));d+=(u[y+a.ROTATE]-d)*M,p+=(u[y+a.TRANSLATE]-p)*M,v+=(u[y+a.SCALE]-v)*M,g+=(u[y+a.SHEAR]-g)*M}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+(g-f.shearMix)*o}else c.rotateMix+=(d-c.rotateMix)*o,c.translateMix+=(p-c.translateMix)*o,c.scaleMix+=(v-c.scaleMix)*o,c.shearMix+=(g-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 M=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=i},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_VALUE];else{var d=s.binarySearch(u,n,a.ENTRIES);f=u[d+a.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/a.ENTRIES-1,1-(n-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=M;var w=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,r,a,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_VALUE];else{var d=s.binarySearch(u,r,i.ENTRIES);f=u[d+i.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(u[d+i.PREV_TIME]-p));f+=(u[d+i.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o}},i}(M);t.PathConstraintSpacingTimeline=w;var E=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=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,n,a.ENTRIES);f=u[p+a.PREV_ROTATE],d=u[p+a.PREV_TRANSLATE];var v=u[p],g=this.getCurvePercent(p/a.ENTRIES-1,1-(n-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.ROTATE]-f)*g,d+=(u[p+a.TRANSLATE]-d)*g}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}(n||(n={})),function(t){var e=function(){function e(e){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 t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool((function(){return new i})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i0){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(i,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=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,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 i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=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)},e.prototype.apply=function(i){if(null==i)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=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,i,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.applyAttachmentTimeline=function(i,n,r,s,a){var o=n.slots[i.slotIndex];if(o.bone.active){var h,l=i.frames;if(r=l[l.length-1]?l.length-1:t.Animation.binarySearch(l,r)-1,this.setAttachment(n,o,i.attachmentNames[h],a);o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+e.SETUP)}},e.prototype.setAttachment=function(t,i,n,r){i.attachment=null==n?null:t.getAttachment(i.data.index,n),r&&(i.attachmentState=this.unkeyedState+e.CURRENT)},e.prototype.applyRotateTimeline=function(e,i,n,r,s,a,o,h){if(h&&(a[o]=0),1!=r){var l=e,u=l.frames,c=i.bones[l.boneIndex];if(c.active){var f=0,d=0;if(n=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,n,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],g=u[p],m=l.getCurvePercent((p>>1)-1,1-(n-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 y=0,x=d-f;if(0==(x-=360*(16384-(16384.499999999996-x/360|0))))y=a[o];else{var M=0,w=0;h?(M=0,w=x):(M=a[o],w=a[o+1]);var E=x>0,T=M>=0;t.MathUtils.signum(w)!=t.MathUtils.signum(x)&&Math.abs(w)<=90&&(Math.abs(M)>180&&(M+=360*t.MathUtils.signum(M)),T=E),y=x+M-M%360,T!=E&&(y+=360*t.MathUtils.signum(M)),a[o]=y}a[o+1]=x,f+=y*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(i,0,n,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,a=this.events,o=0,h=a.length;on||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=n&&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()}}},e.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,n.mixingTo=e,e.mixTime=0,null!=n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},e.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!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,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},e.prototype.addAnimationWith=function(t,e,i,n){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,i,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,n<=0){var a=r.animationEnd-r.animationStart;0!=a?(r.loop?n+=a*(1+(r.trackTime/a|0)):n+=Math.max(a,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime}return s.delay=n,s},e.prototype.setEmptyAnimation=function(t,i){var n=this.setAnimationWith(t,e.emptyAnimation,!1);return n.mixDuration=i,n.trackEnd=i,n},e.prototype.addEmptyAnimation=function(t,i,n){n<=0&&(n-=i);var r=this.addAnimationWith(t,e.emptyAnimation,!1,n);return r.mixDuration=i,r.trackEnd=i,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i0){a[l]=e.HOLD_MIX,o[l]=f;continue t}break}a[l]=e.HOLD_FIRST}else a[l]=e.SUBSEQUENT}},e.prototype.getCurrent=function(t){return t>=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_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,e}();t.AnimationState=e;var i=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=i;var n,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(n.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(n.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(n.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(n.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,i=0;i=0?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,(function(a){var o={count:0},h=new Array;try{new t.TextureAtlas(a,(function(e){h.push(""==s?e:s+"/"+e);var i=document.createElement("img");return i.width=16,i.height=16,new t.FakeTexture(i)}))}catch(t){var l=t;return r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(l.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(l.message)),r.toLoad--,void r.loaded++}for(var u=function(l){var u=!1;r.loadTexture(l,(function(l,c){if(o.count++,o.count==h.length)if(u)r.errors[e]="Couldn't load texture atlas page ".concat(l,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(l," of atlas ").concat(e)),r.toLoad--,r.loaded++;else try{var f=new t.TextureAtlas(a,(function(t){return r.get(""==s?t:s+"/"+t)}));r.assets[e]=f,i&&i(e,f),r.toLoad--,r.loaded++}catch(t){var d=t;r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(d.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(d.message)),r.toLoad--,r.loaded++}}),(function(t,i){u=!0,o.count++,o.count==h.length&&(r.errors[e]="Couldn't load texture atlas page ".concat(t,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(t," of atlas ").concat(e)),r.toLoad--,r.loaded++)}))},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(n||(n={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (region attachment: "+i+")");r.renderObject=r;var s=new t.RegionAttachment(i);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+i+")");r.renderObject=r;var s=new t.MeshAttachment(i);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,i){return new t.BoundingBoxAttachment(i)},e.prototype.newPathAttachment=function(e,i){return new t.PathAttachment(i)},e.prototype.newPointAttachment=function(e,i){return new t.PointAttachment(i)},e.prototype.newClippingAttachment=function(e,i){return new t.ClippingAttachment(i)},e}();t.AtlasAttachmentLoader=e}(n||(n={})),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={}))}(n||(n={})),function(t){var e=function(){function e(t,e,i){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=i,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,i,n,r,s,a,o){this.ax=e,this.ay=i,this.arotation=n,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=n+90+o,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(n+a)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(n+a)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=i*f+l.y)}var d=h.a,p=h.b,v=h.c,g=h.d;switch(this.worldX=d*e+p*i+h.worldX,this.worldY=v*e+g*i+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=n+90+o;var m=t.MathUtils.cosDeg(n+a)*r,y=t.MathUtils.cosDeg(u)*s,x=t.MathUtils.sinDeg(n+a)*r,M=t.MathUtils.sinDeg(u)*s;return this.a=d*m+p*x,this.b=d*y+p*M,this.c=v*m+g*x,void(this.d=v*y+g*M);case t.TransformMode.OnlyTranslation:u=n+90+o;this.a=t.MathUtils.cosDeg(n+a)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(n+a)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var w=0;(A=d*d+v*v)>1e-4?(A=Math.abs(d*g-p*v)/A,d/=this.skeleton.scaleX,p=(v/=this.skeleton.scaleY)*A,g=d*A,w=Math.atan2(v,d)*t.MathUtils.radDeg):(d=0,v=0,w=90-Math.atan2(g,p)*t.MathUtils.radDeg);var E=n+a-w,T=n+o-w+90;m=t.MathUtils.cosDeg(E)*r,y=t.MathUtils.cosDeg(T)*s,x=t.MathUtils.sinDeg(E)*r,M=t.MathUtils.sinDeg(T)*s;this.a=d*m-p*x,this.b=d*y-p*M,this.c=v*m+g*x,this.d=v*y+g*M;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var A,R=t.MathUtils.cosDeg(n),b=t.MathUtils.sinDeg(n),S=(d*R+p*b)/this.skeleton.scaleX,I=(v*R+g*b)/this.skeleton.scaleY;(A=Math.sqrt(S*S+I*I))>1e-5&&(A=1/A),S*=A,I*=A,A=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)&&(A=-A);var C=Math.PI/2+Math.atan2(I,S),P=Math.cos(C)*A,k=Math.sin(C)*A;m=t.MathUtils.cosDeg(a)*r,y=t.MathUtils.cosDeg(90+o)*s,x=t.MathUtils.sinDeg(a)*r,M=t.MathUtils.sinDeg(90+o)*s;this.a=S*m+P*x,this.b=S*y+P*M,this.c=I*m+k*x,this.d=I*y+k*M}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 i=e.a,n=e.b,r=e.c,s=e.d,a=1/(i*s-n*r),o=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=o*s*a-h*n*a,this.ay=h*i*a-o*r*a;var l=a*s,u=a*i,c=a*n,f=a*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,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*i*s,t.y=o*e*s-a*n*s,t},e.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(this.a*i-this.c*n,this.d*n-this.b*i)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(n*this.c+i*this.d,n*this.a+i*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var i=this.a,n=this.b,r=this.c,s=this.d,a=t.MathUtils.cosDeg(e),o=t.MathUtils.sinDeg(e);this.a=a*i-o*r,this.b=a*n-o*s,this.c=o*i+a*r,this.d=o*n+a*s,this.appliedValid=!1},e}();t.Bone=e}(n||(n={})),function(t){var e,i=function(i,n,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,i<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=i,this.name=n,this.parent=r};t.BoneData=i,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={}))}(n||(n={})),function(t){var e=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i};t.ConstraintData=e}(n||(n={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(n||(n={})),function(t){var e=function(t){this.name=t};t.EventData=e}(n||(n={})),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 i=0;i180?d-=360:d<-180&&(d+=360);var E=e.ascaleX,T=e.ascaleY;if(r||s){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=i-e.worldX,v=n-e.worldY}var A=e.data.length*E,R=Math.sqrt(p*p+v*v);if(r&&RA&&A>1e-4)E*=g=(R/A-1)*o+1,a&&(T*=g)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*o,E,T,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,i,n,r,s,a,o,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),i.appliedValid||i.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=i.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 y=i.ax,x=0,M=0,w=0,E=e.a,T=e.b,A=e.c,R=e.d,b=Math.abs(c-d)<=1e-4;b?(M=E*y+T*(x=i.ay)+e.worldX,w=A*y+R*x+e.worldY):(x=0,M=E*y+e.worldX,w=A*y+e.worldY);var S=e.parent;E=S.a,T=S.b,A=S.c;var I,C,P=1/(E*(R=S.d)-T*A),k=M-S.worldX,_=w-S.worldY,O=(k*R-_*T)*P-l,F=(_*E-k*A)*P-u,L=Math.sqrt(O*O+F*F),D=i.data.length*p;if(L<1e-4)return this.apply1(e,n,r,!1,a,!1,h),void i.updateWorldTransformWith(y,x,0,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY);var V=((k=n-S.worldX)*R-(_=r-S.worldY)*T)*P-l,N=(_*E-k*A)*P-u,Y=V*V+N*N;if(0!=o){o*=c*(p+1)/2;var X=Math.sqrt(Y),B=X-L-D*c+o;if(B>0){var U=Math.min(1,B/(2*o))-1;Y=(V-=(U=(B-o*(1-U*U))/X)*V)*V+(N-=U*N)*N}}t:if(b){var z=(Y-L*L-(D*=c)*D)/(2*L*D);z<-1?z=-1:z>1&&(z=1,a&&(f*=(Math.sqrt(Y)/(L+D)-1)*h+1)),C=Math.acos(z)*s,E=L+D*z,T=D*Math.sin(C),I=Math.atan2(N*E-V*T,V*E+N*T)}else{var W=(E=c*D)*E,q=(T=d*D)*T,G=Math.atan2(N,V),H=-2*q*L,j=q-W;if((R=H*H-4*j*(A=q*L*L+W*Y-W*q))>=0){var Z=Math.sqrt(R);H<0&&(Z=-Z);var K=(Z=-(H+Z)/2)/j,Q=A/Z,J=Math.abs(K)=-1&&A<=1&&(A=Math.acos(A),(R=(k=E*Math.cos(A)+L)*k+(_=T*Math.sin(A))*_)st&&(nt=A,st=R,rt=k,at=_)),Y<=(et+st)/2?(I=G-Math.atan2(it*s,tt),C=$*s):(I=G-Math.atan2(at*s,rt),C=nt*s)}var ot=Math.atan2(x,y)*m,ht=e.arotation;(I=(I-ot)*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=i.arotation,(C=((C+ot)*t.MathUtils.radDeg-i.ashearX)*m+g-ht)>180?C-=360:C<-180&&(C+=360),i.updateWorldTransformWith(y,x,ht+C*h,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY)}else i.updateWorldTransform()},e}();t.IkConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.bendDirection=1,i.compress=!1,i.stretch=!1,i.uniform=!1,i.mix=1,i.softness=0,i}return r(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(n||(n={})),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 i=0,n=t.bones.length;i0;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,g=this.spacing;if(u||!o){u&&(v=t.Utils.setArraySize(this.lengths,c));for(var m=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*=n,B=Math.cos(X),U=Math.sin(X),k.a=B*D-U*N,k.b=B*V-U*Y,k.c=U*D+B*N,k.d=U*V+B*Y}k.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(i,n,r,s,a){var o=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*n+2),c=null,f=i.closed,d=i.worldVerticesLength,p=d/6,v=e.NONE;if(!i.constantSpeed){var g=i.lengths,m=g[p-=f?1:2];if(s&&(h*=m),a)for(var y=1;ym){v!=e.AFTER&&(v=e.AFTER,i.computeWorldVertices(o,d-6,4,c,0,2)),this.addAfterPosition(w-m,c,0,u,x);continue}}for(;;M++){var E=g[M];if(!(w>E)){if(0==M)w/=E;else w=(w-(Z=g[M-1]))/(E-Z);break}}M!=v&&(v=M,f&&M==p?(i.computeWorldVertices(o,d-4,4,c,0,2),i.computeWorldVertices(o,0,4,c,4,2)):i.computeWorldVertices(o,6*M+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||y>0&&0==q)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(o,2,d-4,c,0,2),i.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),i.computeWorldVertices(o,2,d,c,0,2));for(var T=t.Utils.setArraySize(this.curves,p),A=0,R=c[0],b=c[1],S=0,I=0,C=0,P=0,k=0,_=0,O=0,F=0,L=0,D=0,V=0,N=0,Y=0,X=0,B=(y=0,2);yA){this.addAfterPosition(w-A,c,d-4,u,x);continue}}for(;;M++){var G=T[M];if(!(w>G)){if(0==M)w/=G;else w=(w-(Z=T[M-1]))/(G-Z);break}}if(M!=v){v=M;var H=6*M;for(R=c[H],b=c[H+1],S=c[H+2],I=c[H+3],C=c[H+4],P=c[H+5],V=2*(O=.03*(R-2*S+C))+(L=.006*(3*(S-C)-R+(k=c[H+6]))),N=2*(F=.03*(b-2*I+P))+(D=.006*(3*(I-P)-b+(_=c[H+7]))),Y=.3*(S-R)+O+.16666667*L,X=.3*(I-b)+F+.16666667*D,z=Math.sqrt(Y*Y+X*X),U[0]=z,H=1;H<8;H++)Y+=V,X+=N,V+=L,N+=D,z+=Math.sqrt(Y*Y+X*X),U[H]=z;Y+=V,X+=N,z+=Math.sqrt(Y*Y+X*X),U[8]=z,Y+=V+L,X+=N+D,z+=Math.sqrt(Y*Y+X*X),U[9]=z,W=0}for(w*=z;;W++){var j=U[W];if(!(w>j)){var Z;if(0==W)w/=j;else w=W+(w-(Z=U[W-1]))/(j-Z);break}}this.addCurvePosition(.1*w,R,b,S,I,C,P,k,_,u,x,r||y>0&&0==q)}return u},e.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],a=e[i+1],o=e[i+2]-s,h=e[i+3]-a,l=Math.atan2(h,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},e.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],a=e[i+3],o=s-e[i],h=a-e[i+1],l=Math.atan2(h,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},e.prototype.addCurvePosition=function(t,e,i,n,r,s,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,n-e));var f=t*t,d=f*t,p=1-t,v=p*p,g=v*p,m=p*t,y=3*m,x=p*y,M=y*t,w=e*g+n*x+s*M+o*d,E=i*g+r*x+a*M+h*d;l[u]=w,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(E-(i*v+r*m*2+a*f),w-(e*v+n*m*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i}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={}))}(n||(n={})),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}(),i=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,i,n){var r=this.clientAssets[t];return null==r&&(r=new e(t),this.clientAssets[t]=r),null!==i&&(r.textureLoader=i),r.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},t.prototype.loadText=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadJson=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadTexture=function(t,e,i){var n=this;if(i=this.pathPrefix+i,this.queueAsset(t,e,i))if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(i,{mode:"cors"}).then((function(t){return t.ok||(n.errors[i]="Couldn't load image "+i),t.blob()})).then((function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(t){n.rawAssets[i]=t}))}else{var r=new Image;r.crossOrigin="anonymous",r.onload=function(t){n.rawAssets[i]=r},r.onerror=function(t){n.errors[i]="Couldn't load image ".concat(i)},r.src=i}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts,i=0;i0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=i}(n||(n={})),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 i=0;i1){var s=n[n.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),n[n.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 i=e.target,n=i.data.index,r=i.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var s=0,a=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){M=new t.DrawOrderTimeline(D);var V=r.slots.length;for(u=0;u=0;d--)Y[d]=-1;var X=t.Utils.newArray(V-N,0),B=0,U=0;for(d=0;d=0;d--)-1==Y[d]&&(Y[d]=X[--U]);M.setFrame(u,y,Y)}s.push(M),o=Math.max(o,M.frames[D-1])}var z=i.readInt(!0);if(z>0){for(M=new t.EventTimeline(z),u=0;u>>1^-(1&i)},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="",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},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}(),n=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},r=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(n||(n={})),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,i){if(null==e)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,s=this.polygonPool,a=e.slots,o=a.length;n.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,i,n){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||t>=a&&i>=a||e>=o&&n>=o)return!1;var h=(n-e)/(i-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 i=this.polygons,n=0,r=i.length;n=i||l=i){var u=n[o];u+(i-h)/(l-h)*(n[s]-u)=u&&x<=d||x>=d&&x<=u)&&(x>=e&&x<=n||x>=n&&x<=e)){var M=(l*m-h*v)/y;if((M>=c&&M<=p||M>=p&&M<=c)&&(M>=i&&M<=r||M>=r&&M<=i))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}(n||(n={})),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(i,n){if(null!=this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(i,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+N*p),B=0;B<_;B+=2){var U=Y[B],z=Y[B+1];X[k]=U,X[k+1]=z,X[k+2]=a.r,X[k+3]=a.g,X[k+4]=a.b,X[k+5]=a.a;var W=U-b,q=z-S,G=(O*W+F*q)*V,H=(D*W+L*q)*V,j=1-G-H;X[k+6]=M*G+A*H+I*j,X[k+7]=w*G+R*H+C*j,h&&(X[k+8]=o.r,X[k+9]=o.g,X[k+10]=o.b,X[k+11]=o.a),k+=p}k=c.length;var Z=t.Utils.setArraySize(c,k+3*(N-2));N--;for(B=1;B=2?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(i),u.push(n),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],g=c[d+2],m=c[d+3],y=p-g,x=v-m,M=u,w=u.length-2,E=o.length,T=0;T0;if(y*(R-m)-x*(A-g)>0){if(I){o.push(b),o.push(S);continue}var C=(k=S-R)*(g-p)-(_=b-A)*(m-v);if(Math.abs(C)>1e-6){var P=(_*(v-R)-k*(p-A))/C;o.push(p+(g-p)*P),o.push(v+(m-v)*P)}else o.push(p),o.push(v)}else if(I){var k,_;C=(k=S-R)*(g-p)-(_=b-A)*(m-v);if(Math.abs(C)>1e-6){P=(_*(v-R)-k*(p-A))/C;o.push(p+(g-p)*P),o.push(v+(m-v)*P)}else o.push(p),o.push(v);o.push(b),o.push(S)}l=!0}if(E==o.length)return h.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var O=o;(o=u).length=0,u=O}if(h!=o){h.length=0;d=0;for(var F=o.length-2;d>1;o=0;f--)-1==q[f]&&(q[f]=H[--Z])}M.setFrame(c++,this.getValue(W,"time",0),q)}s.push(M),a=Math.max(a,M.frames[M.getFrameCount()-1])}if(e.events){for(M=new t.EventTimeline(e.events.length),c=0,f=0;f=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},i.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==i)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=e,this.name=i,this.boneData=n};t.SlotData=e}(n||(n={})),function(t){var e,i,n=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 ".concat(t))}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap ".concat(t))}},t}();t.Texture=n,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"}(i=t.TextureWrap||(t.TextureWrap={}));var s=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}(n);t.FakeTexture=a}(n||(n={})),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 i(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 n).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 g=a.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(),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},t}(),n=function(){};t.TextureAtlasPage=n;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(n||(n={})),function(t){var e=function(){function e(e,i){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==i)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 n=0;n0?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*y-T*M,g.b=E*x-T*w,g.c=T*y+E*M,g.d=T*x+E*w,m=!0}if(0!=i){var A=this.temp;s.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),g.worldX+=(A.x-g.worldX)*i,g.worldY+=(A.y-g.worldY)*i,m=!0}if(n>0){var R=Math.sqrt(g.a*g.a+g.c*g.c),b=Math.sqrt(a*a+h*h);R>1e-5&&(R=(R+(b-R+this.data.offsetScaleX)*n)/R),g.a*=R,g.c*=R,R=Math.sqrt(g.b*g.b+g.d*g.d),b=Math.sqrt(o*o+l*l),R>1e-5&&(R=(R+(b-R+this.data.offsetScaleY)*n)/R),g.b*=R,g.d*=R,m=!0}if(r>0){x=g.b,w=g.d;var S,I=Math.atan2(w,x);(S=Math.atan2(l,o)-Math.atan2(h,a)-(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;R=Math.sqrt(x*x+w*w);g.b=Math.cos(S)*R,g.d=Math.sin(S)*R,m=!0}m&&(g.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,i=this.translateMix,n=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?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b*=e;var E=Math.cos(b),T=Math.sin(b);g.a=E*y-T*M,g.b=E*x-T*w,g.c=T*y+E*M,g.d=T*x+E*w,m=!0}if(0!=i){var A=this.temp;s.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),g.worldX+=A.x*i,g.worldY+=A.y*i,m=!0}if(n>0){var R=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleX)*n+1;g.a*=R,g.c*=R,R=(Math.sqrt(o*o+l*l)-1+this.data.offsetScaleY)*n+1,g.b*=R,g.d*=R,m=!0}if(r>0){var b;(b=Math.atan2(l,o)-Math.atan2(h,a))>t.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2);x=g.b,w=g.d;b=Math.atan2(w,x)+(b-t.MathUtils.PI/2+f)*r;R=Math.sqrt(x*x+w*w);g.b=Math.cos(b)*R,g.d=Math.sin(b)*R,m=!0}m&&(g.appliedValid=!1)}},e.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;a1e-5&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*i)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*i)/p));var v=h.ashearY;if(0!=n){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*n}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=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;a1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var p=h.ashearY;0!=n&&(p+=(r.ashearY+this.data.offsetShearY)*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.rotateMix=0,i.translateMix=0,i.scaleMix=0,i.shearMix=0,i.offsetRotation=0,i.offsetX=0,i.offsetY=0,i.offsetScaleX=0,i.offsetScaleY=0,i.offsetShearY=0,i.relative=!1,i.local=!1,i}return r(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(n||(n={})),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 i=t,n=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=n-1,u=(s=0,1);;){t:if(!a[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=i[c],v=i[c+1],g=i[f],m=i[f+1],y=i[d],x=i[d+1],M=(u+1)%n;M!=l;M=(M+1)%n)if(a[M]){var w=r[M]<<1,E=i[w],T=i[w+1];if(e.positiveArea(y,x,p,v,E,T)&&e.positiveArea(p,v,g,m,E,T)&&e.positiveArea(g,m,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)%n}h.push(r[(n+s-1)%n]),h.push(r[s]),h.push(r[(s+1)%n]),r.splice(s,1),a.splice(s,1);var A=(--n+s-1)%n,R=s==n?0:s;a[A]=e.isConcave(A,n,i,r),a[R]=e.isConcave(R,n,i,r)}return 3==n&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,i){var n=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=i.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(g),o.push(m),o.push(y),o.push(x),o.push(M),(a=this.polygonIndicesPool.obtain()).length=0,a.push(f),a.push(d),a.push(p),l=e.winding(v,g,m,y,x,M),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,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,a=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[s],i[s+1],i[a],i[a+1])},e.positiveArea=function(t,e,i,n,r,s){return t*(s-n)+i*(e-s)+r*(n-e)>=0},e.winding=function(t,e,i,n,r,s){var a=i-t,o=n-e;return r*o-s*a+a*e-t*o>=0?1:-1},e}();t.Triangulator=e}(n||(n={})),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 null!=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 i=function(){function t(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}return t.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,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,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,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=i;var n=function(){function t(){}return t.clamp=function(t,e,i){return ti?i: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,i){return t.randomTriangularWith(e,i,.5*(e+i))},t.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},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=n;var s=function(){function t(){}return t.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},t}();t.Interpolation=s;var a=function(t){function e(e){var i=t.call(this)||this;return i.power=2,i.power=e,i}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,i,n,r){for(var s=e,a=n;s=i?e:t.setArraySize(e,i,n)},t.newArray=function(t,e){for(var i=new Array(t),n=0;n0?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 M,w=(M=t.bone).worldX,E=M.worldY,T=M.a,A=M.b,R=M.c,b=M.d,S=e,I=r;I{var n=i(7473),r=i(4597),s=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),u=new n({Extends:h,initialize:function(t,e,i,n,s,u,c){var f,d,p,v=[],g=t.cacheManager.custom.spine;if(a(e)){var m=e;for(e=r(m,"key"),d=new o(t,{key:e,url:r(m,"jsonURL"),extension:r(m,"jsonExtension","json"),xhrSettings:r(m,"jsonXhrSettings")}),n=r(m,"atlasURL"),s=r(m,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),f=0;f{var n=i(2494),r=i(7473),s=i(5851),a=i(3527),o=i(5722),h=i(5159),l=i(3524),u=i(8332),c=i(5782),f=i(1984),d=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.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=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:f,postRender:f,render:f,destroy:f});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,n,r,s){var a=this.scene.sys[i],o=new u(this.scene,a,t,e,n,r,s);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=s(t,"key",null),a=s(t,"animationName",null),o=s(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),n(this.scene,l,t);var c=s(t,"skinName",!1);c&&l.setSkinByName(c);var f=s(t,"slotName",!1),d=s(t,"attachmentName",null);return f&&l.setAttachment(f,d),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,n){var r=this.scene.sys[i],s=new c(this.scene,r,t,e,n);return this.displayList.add(s),s}),(function(t,e){void 0===t&&(t={});var r=s(t,"x",0),a=s(t,"y",0),o=s(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))}},e=this.renderer.spineSceneRenderer;e||((e=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,e.shapes.setBlendMode=t,this.renderer.spineSceneRenderer=e),this.sceneRenderer=e,this.skeletonRenderer=e.skeletonRenderer,this.skeletonDebugRenderer=e.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 i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures;i=new h.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new h.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(s,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,r,s){var a;if(Array.isArray(t))for(var o=0;o{var n=i(7473),r=i(7361),s=i(2437),a=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s){r.call(this,t,i,n,s),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},8064:t=>{t.exports=function(t,e,i,n){var r=e.list;if(0!==r.length){i.addToRenderList(e);var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var n=i(1984),r=i(1984);r=i(8064),t.exports={renderWebGL:n,renderCanvas:r}},6576:t=>{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var n=i(6412),r=i(2915),s=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),u=i(3212),c=i(8414),f=i(3426),d=i(7149),p=i(2273),v=i(4208),g=i(5146),m=i(2762),y=new s({Extends:p,Mixins:[a,o,h,l,u,c,m],initialize:function(t,e,i,n,r,s,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),r&&this.setSkeleton(r,s,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var n=this.plugin,r=n.sceneRenderer;n.gl&&r.batcher.isDrawing&&(r.end(),n.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,n=(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=i,a.color.g=n,a.color.b=r,null!==s&&(a.color.a=s),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=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,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{var n=i(3426),r=i(4208),s=i(8445);t.exports=function(t,e,i,a){var o=t.currentContext,h=e.plugin,l=e.skeleton,u=h.skeletonRenderer,c=t._tempMatrix1,f=t._tempMatrix2,d=t._tempMatrix3;i.addToRenderList(e),f.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),c.copyFrom(i.matrix),a?(c.multiplyWithOffset(a,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),f.e=e.x,f.f=e.y,c.multiply(f,d)):(f.e-=i.scrollX*e.scrollFactorX,f.f-=i.scrollY*e.scrollFactorY,c.multiply(f,d)),l.x=d.tx,l.y=d.ty,l.scaleX=d.scaleX,l.scaleY=-1*d.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=r(d.rotationNormalized)):e.root.rotation=s(r(n(d.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*r(d.rotationNormalized):e.root.rotation+=2*r(d.rotationNormalized)),i.renderToTexture&&(l.y=d.ty,l.scaleY*=-1),l.updateWorldTransform(),u.ctx=o,u.debugRendering=h.drawDebug||e.drawDebug,o.save(),u.draw(l),o.restore()}},2762:(t,e,i)=>{var n=i(1984),r=i(1984),s=i(1984);r=i(2753),t.exports={renderWebGL:n,renderCanvas:r,renderDirect:s}},8599:t=>{t.exports="blur"},3570:t=>{t.exports="boot"},7950:t=>{t.exports="contextlost"},5389:t=>{t.exports="contextrestored"},4679:t=>{t.exports="destroy"},6903:t=>{t.exports="focus"},9638:t=>{t.exports="hidden"},2505:t=>{t.exports="pause"},8616:t=>{t.exports="postrender"},1868:t=>{t.exports="poststep"},2075:t=>{t.exports="prerender"},918:t=>{t.exports="prestep"},8136:t=>{t.exports="ready"},5113:t=>{t.exports="resume"},2029:t=>{t.exports="step"},527:t=>{t.exports="visible"},5215:(t,e,i)=>{t.exports={BLUR:i(8599),BOOT:i(3570),CONTEXT_LOST:i(7950),CONTEXT_RESTORED:i(5389),DESTROY:i(4679),FOCUS:i(6903),HIDDEN:i(9638),PAUSE:i(2505),POST_RENDER:i(8616),POST_STEP:i(1868),PRE_RENDER:i(2075),PRE_STEP:i(918),READY:i(8136),RESUME:i(5113),STEP:i(2029),VISIBLE:i(527)}},1081:(t,e,i)=>{var n=i(7473),r=i(6748),s=new n({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(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},7499:(t,e,i)=>{var n=i(7473),r=i(5215),s=i(8604),a=new n({initialize:function(t,e){var i=t.sys.renderer;this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.scene=t,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this),i&&i.on(s.RESIZE,this.createMask,this)},createMask:function(){var t=this.renderer;if(t&&t.gl){this.mainTexture&&this.clearMask();var e=t.width,i=t.height,n=0==(e&e-1)&&0==(i&i-1),r=t.gl,s=n?r.REPEAT:r.CLAMP_TO_EDGE,a=r.LINEAR;this.mainTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,i),this.mainFramebuffer=t.createFramebuffer(e,i,this.mainTexture,!0),this.maskFramebuffer=t.createFramebuffer(e,i,this.maskTexture,!0)}},clearMask:function(){var t=this.renderer;t&&t.gl&&this.mainTexture&&(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)},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.scene.sys.game.events.off(r.CONTEXT_RESTORED,this.createMask,this),this.renderer&&this.renderer.off(s.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=a},6726:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var n=t.maskStack[t.maskStack.length-1];n.mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},2494:(t,e,i)=>{var n=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var s=r(i,"scale",null);"number"==typeof s?e.setScale(s):null!==s&&(e.scaleX=r(s,"x",1),e.scaleY=r(s,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",n.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var n=i(7473),r=i(6125),s=i(1081),a=i(4399),o=i(3389),h=i(204),l=new n({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},4344:(t,e,i)=>{var n=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var n=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var n=i(8351),r={_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=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.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},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},9660:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var n=i(2150),r=i(9876),s=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new 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,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,s,a,o,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,s=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,s=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,s,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,s,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var n=i(7499),r=i(6726),s={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||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&(this instanceof Phaser.GameObjects.Graphics||this instanceof Phaser.GameObjects.Shape)&&(t=this),new r(this.scene,t)}};t.exports=s},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var n=i(7149),r=i(1864),s=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=s(t,"from",0),t.to=s(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=s(t,"rotationOffset",0);var l=s(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var s=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-s,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var n=i(3911),r=i(5412),s=i(8935),a={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){void 0===t&&(t=r.MULTI_PIPELINE);var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){var n=i.get(t);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){var a=s.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?n(e):e)}return this},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),s(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},4759:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:t=>{var e={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=e},9243:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var n=i(7425),r=i(4227),s=i(7556),a=i(3692),o=i(2820),h=i(2529),l={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(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},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,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 h),n||(n=this.scene.sys.cameras.main);var r=n.scrollX,a=n.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):s(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var n=i(7473),r=i(7425),s=i(2529),a=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],s=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||s?r.TAU-(s>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3];return n[0]=r*i+a*e,n[1]=s*i+o*e,n[2]=r*-e+a*i,n[3]=s*-e+o*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],g=void 0===e?this:e;return g.a=u*r+c*a,g.b=u*s+c*o,g.c=f*r+d*a,g.d=f*s+d*o,g.e=p*r+v*a+h,g.f=p*s+v*o+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],a=n[1],o=n[2],h=n[3],l=e*s+i*o+n[4],u=e*a+i*h+n[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],g=r[5];return n[0]=c*s+f*o,n[1]=c*a+f*h,n[2]=d*s+p*o,n[3]=d*a+p*h,n[4]=v*s+g*o+l,n[5]=v*a+g*h+u,this},transform:function(t,e,i,n,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]=i*o+n*l,a[3]=i*h+n*u,a[4]=r*o+s*l+c,a[5]=r*h+s*u+f,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5];return i.x=t*r+e*a+h,i.y=t*s+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=e*r-i*n;return t[0]=r/o,t[1]=-i/o,t[2]=-n/o,t[3]=e/o,t[4]=(n*a-r*s)/o,t[5]=-(e*a-i*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,i,n,r,s){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=r,a[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],a=i*s-n*r;if(t.translateX=e[4],t.translateY=e[5],i||n){var o=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/o):-Math.acos(i/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,i,n,r){var s=this.matrix,a=Math.sin(i),o=Math.cos(i);return s[4]=t,s[5]=e,s[0]=o*n,s[1]=a*n,s[2]=-a*r,s[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],a=n[1],o=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=r*c*e+-a*c*t+(-u*r+l*a)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},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},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),ScrollFactor:i(4627),Size:i(4759),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var n=i(1953),r=i(8351),s=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(2150),u=i(3232),c=i(9422),f=i(2529),d=new s({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Pipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,n=[null],r=this.list.slice(),s=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=d},2840:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list;if(0!==r.length){var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var n=i(1984),r=i(1984);r=i(2840),t.exports={renderWebGL:n,renderCanvas:r}},6608:t=>{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},5241:t=>{t.exports="loop"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},8118:t=>{t.exports="stop"},5529:t=>{t.exports="timeout"},4287:t=>{t.exports="unlocked"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STOP:i(8118),VIDEO_TIMEOUT:i(5529),VIDEO_UNLOCKED:i(4287)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var n=i(7655);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}},4479:(t,e,i)=>{var n=i(4771),r=i(7655);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=n(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var n=i(7473),r=i(8881),s=i(4479),a=i(1643),o=i(3915),h=i(2529),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.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return o(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},3915:(t,e,i)=>{var n=i(7655);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var n=i(7473),r=i(1643),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},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var n=i(8073),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var s=n(t)*e;return e>.5?(s-=t.width+t.height)<=t.width?(i.x=t.right-s,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(s-t.width)):s<=t.width?(i.x=t.x+s,i.y=t.y):(i.x=t.right,i.y=t.y+(s-t.width)),i}},8151:(t,e,i)=>{var n=i(716),r=i(8073);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var n=i(7655);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},2150:(t,e,i)=>{var n=i(7473),r=i(5956),s=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),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.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},9422:(t,e,i)=>{var n=i(2150);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=Math.min(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-s;return i.setTo(r,s,a,o)}},1593:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),u=i(707),c=new n({initialize:function(t,e){this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var n=a(e,"url");void 0===n?n=t.path+i+"."+a(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&(0===t.responseURL.indexOf("file://")||0===t.responseURL.indexOf("capacitor://"))&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},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(){console.error('Failed to process file: %s "%s"',this.type,this.key),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.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var n=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);return i}},3137:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1179),a=new n({initialize:function(t,e,i,n){var s=[];n.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.state=r.FILE_PENDING,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a{var n=i(7410);t.exports=function(t,e){var i=n(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var s in i.headers)r.setRequestHeader(s,i.headers[s]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{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}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),u=new n({Extends:s,initialize:function t(e,i,n,r,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),n=o(c,"url"),l=o(c,"normalMap"),r=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var f={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:r,config:a};if(s.call(this,e,f),l){var d=new t(e,this.key,l,r,a);d.type="normalMap",this.setLink(d),e.addFile(d)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){s.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(t.data),t.onProcessError()},s.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t&&t.state===r.FILE_COMPLETE?"image"===this.type?this.cache.addImage(this.key,this.data,t.data):this.cache.addImage(t.key,t.data,this.data):t||this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),u=new n({Extends:s,initialize:function(t,e,i,n,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),n=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var f={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:a};s.call(this,t,f),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new n({Extends:s,initialize:function(t,e,i,n){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),n=o(u,"xhrSettings"),a=o(u,"extension",a),r=o(u,"type",r),l=o(u,"cache",l)}var c={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n{t.exports=function(t){for(var e=0,i=0;i{var n=i(3916);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,n,r){var s=.5*(n-e),a=.5*(r-i),o=t*t;return(2*i-2*n+s+a)*(t*o)+(-3*i+3*n-2*s-a)*o+s*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t*n.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var n=i(2915),r=i(7473),s=i(9652),a=i(1984),o=new s,h=new r({initialize:function t(e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,s=r[0],a=r[4],o=r[8],h=r[1],l=r[5],u=r[9],c=r[2],f=r[6],d=r[10],p=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(n(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},1555:(t,e,i)=>{var n=i(2915);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var n=new(i(7473))({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 e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=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+i*c+n*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*i+n*h)*d,t[2]=(a*i-n*s)*d,t[3]=c*d,t[4]=(l*e-n*o)*d,t[5]=(-a*e+n*r)*d,t[6]=f*d,t[7]=(-h*e+i*o)*d,t[8]=(s*e-i*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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]=n*h-i*l,t[2]=i*a-n*s,t[3]=a*o-r*l,t[4]=e*l-n*o,t[5]=n*r-e*a,t[6]=r*h-s*o,t[7]=i*o-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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)+i*(-l*r+a*o)+n*(h*r-s*o)},multiply:function(t){var e=this.val,i=e[0],n=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],g=c[4],m=c[5],y=c[6],x=c[7],M=c[8];return e[0]=f*i+d*s+p*h,e[1]=f*n+d*a+p*l,e[2]=f*r+d*o+p*u,e[3]=v*i+g*s+m*h,e[4]=v*n+g*a+m*l,e[5]=v*r+g*o+m*u,e[6]=y*i+x*s+M*h,e[7]=y*n+x*a+M*l,e[8]=y*r+x*o+M*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=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*i+h*s,e[1]=l*n+h*a,e[2]=l*r+h*o,e[3]=l*s-h*i,e[4]=l*a-h*n,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,a=i+i,o=n+n,h=e*s,l=e*a,u=e*o,c=i*a,f=i*o,d=n*o,p=r*s,v=r*a,g=r*o,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,i=this.val,n=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],g=e[13],m=e[14],y=e[15],x=n*h-r*o,M=n*l-s*o,w=n*u-a*o,E=r*l-s*h,T=r*u-a*h,A=s*u-a*l,R=c*g-f*v,b=c*m-d*v,S=c*y-p*v,I=f*m-d*g,C=f*y-p*g,P=d*y-p*m,k=x*P-M*C+w*I+E*S-T*b+A*R;return k?(k=1/k,i[0]=(h*P-l*C+u*I)*k,i[1]=(l*S-o*P-u*b)*k,i[2]=(o*C-h*S+u*R)*k,i[3]=(s*C-r*P-a*I)*k,i[4]=(n*P-s*S+a*b)*k,i[5]=(r*S-n*C-a*R)*k,i[6]=(g*A-m*T+y*E)*k,i[7]=(m*w-v*A-y*M)*k,i[8]=(v*T-g*w+y*x)*k,this):null}});t.exports=n},9652:(t,e,i)=>{var n=i(7473),r=i(5689),s=1e-6,a=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,r,s,a,o,h,l,u,c,f,d,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=r,g[5]=s,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=f,g[13]=d,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=o.fromQuat(i).val,r=e.x,s=e.y,a=e.z;return this.setValues(n[0]*r,n[1]*r,n[2]*r,0,n[4]*s,n[5]*s,n[6]*s,0,n[8]*a,n[9]*a,n[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=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]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15],m=e*a-i*s,y=e*o-n*s,x=e*h-r*s,M=i*o-n*a,w=i*h-r*a,E=n*h-r*o,T=l*p-u*d,A=l*v-c*d,R=l*g-f*d,b=u*v-c*p,S=u*g-f*p,I=c*g-f*v,C=m*I-y*S+x*b+M*R-w*A+E*T;return C?(C=1/C,this.setValues((a*I-o*S+h*b)*C,(n*S-i*I-r*b)*C,(p*E-v*w+g*M)*C,(c*w-u*E-f*M)*C,(o*R-s*I-h*A)*C,(e*I-n*R+r*A)*C,(v*x-d*E-g*y)*C,(l*E-c*x+f*y)*C,(s*S-a*R+h*T)*C,(i*R-e*S-r*T)*C,(d*w-p*x+g*m)*C,(u*x-l*w-f*m)*C,(a*A-s*b-o*T)*C,(e*b-i*A+n*T)*C,(p*y-d*M-v*m)*C,(l*M-u*y+c*m)*C)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15];return this.setValues(a*(c*g-f*v)-u*(o*g-h*v)+p*(o*f-h*c),-(i*(c*g-f*v)-u*(n*g-r*v)+p*(n*f-r*c)),i*(o*g-h*v)-a*(n*g-r*v)+p*(n*h-r*o),-(i*(o*f-h*c)-a*(n*f-r*c)+u*(n*h-r*o)),-(s*(c*g-f*v)-l*(o*g-h*v)+d*(o*f-h*c)),e*(c*g-f*v)-l*(n*g-r*v)+d*(n*f-r*c),-(e*(o*g-h*v)-s*(n*g-r*v)+d*(n*h-r*o)),e*(o*f-h*c)-s*(n*f-r*c)+l*(n*h-r*o),s*(u*g-f*p)-l*(a*g-h*p)+d*(a*f-h*u),-(e*(u*g-f*p)-l*(i*g-r*p)+d*(i*f-r*u)),e*(a*g-h*p)-s*(i*g-r*p)+d*(i*h-r*a),-(e*(a*f-h*u)-s*(i*f-r*u)+l*(i*h-r*a)),-(s*(u*v-c*p)-l*(a*v-o*p)+d*(a*c-o*u)),e*(u*v-c*p)-l*(i*v-n*p)+d*(i*c-n*u),-(e*(a*v-o*p)-s*(i*v-n*p)+d*(i*o-n*a)),e*(a*c-o*u)-s*(i*c-n*u)+l*(i*o-n*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15];return(e*a-i*s)*(c*g-f*v)-(e*o-n*s)*(u*g-f*p)+(e*h-r*s)*(u*v-c*p)+(i*o-n*a)*(l*g-f*d)-(i*h-r*a)*(l*v-c*d)+(n*h-r*o)*(l*p-u*d)},multiply:function(t){var e=this.val,i=e[0],n=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],g=e[14],m=e[15],y=t.val,x=y[0],M=y[1],w=y[2],E=y[3];return e[0]=x*i+M*a+w*u+E*p,e[1]=x*n+M*o+w*c+E*v,e[2]=x*r+M*h+w*f+E*g,e[3]=x*s+M*l+w*d+E*m,x=y[4],M=y[5],w=y[6],E=y[7],e[4]=x*i+M*a+w*u+E*p,e[5]=x*n+M*o+w*c+E*v,e[6]=x*r+M*h+w*f+E*g,e[7]=x*s+M*l+w*d+E*m,x=y[8],M=y[9],w=y[10],E=y[11],e[8]=x*i+M*a+w*u+E*p,e[9]=x*n+M*o+w*c+E*v,e[10]=x*r+M*h+w*f+E*g,e[11]=x*s+M*l+w*d+E*m,x=y[12],M=y[13],w=y[14],E=y[15],e[12]=x*i+M*a+w*u+E*p,e[13]=x*n+M*o+w*c+E*v,e[14]=x*r+M*h+w*f+E*g,e[15]=x*s+M*l+w*d+E*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,r=i[0],s=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],f=i[2],d=i[6],p=i[10],v=i[14],g=i[3],m=i[7],y=i[11],x=i[15],M=n[0],w=n[4],E=n[8],T=n[12],A=n[1],R=n[5],b=n[9],S=n[13],I=n[2],C=n[6],P=n[10],k=n[14],_=n[3],O=n[7],F=n[11],L=n[15];return this.setValues(r*M+s*A+a*I+o*_,h*M+l*A+u*I+c*_,f*M+d*A+p*I+v*_,g*M+m*A+y*I+x*_,r*w+s*R+a*C+o*O,h*w+l*R+u*C+c*O,f*w+d*R+p*C+v*O,g*w+m*R+y*C+x*O,r*E+s*b+a*P+o*F,h*E+l*b+u*P+c*F,f*E+d*b+p*P+v*F,g*E+m*b+y*P+x*F,r*T+s*S+a*k+o*L,h*T+l*S+u*k+c*L,f*T+d*S+p*k+v*L,g*T+m*S+y*k+x*L)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,a=t.y,o=t.z,h=r*s,l=r*a;return this.setValues(h*s+i,h*a-n*o,h*o+n*a,0,h*a+n*o,l*a+i,l*o-n*s,0,h*o-n*a,l*o+n*s,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,a=e.z,o=Math.sqrt(n*n+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var n=i(7473),r=i(2149),s=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new a(1,0,0),c=new a(0,1,0),f=new a,d=new r,p=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(f.copy(u).cross(t).length().999999?this.set(0,0,0,1):(f.copy(t).cross(e),this._x=f.x,this._y=f.y,this._z=f.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=d.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(d).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*s+i*o-n*a,i*h+r*a+n*s-e*o,n*h+r*o+e*a-i*s,r*h-e*s-i*a-n*o)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,a=t.x,h=t.y,l=t.z,u=t.w,c=i*a+n*h+r*l+s*u;c<0&&(c=-c,a=-a,h=-h,l=-l,u=-u);var f=1-e,d=e;if(1-c>o){var p=Math.acos(c),v=Math.sin(p);f=Math.sin((1-e)*p)/v,d=Math.sin(e*p)/v}return this.set(f*i+d*a,f*n+d*h,f*r+d*l,f*s+d*u)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.set(-t*s,-e*s,-i*s,n*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*s,i*a+n*s,n*a-i*s,r*a-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a-n*s,i*a+r*s,n*a+e*s,r*a-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*s,i*a-e*s,n*a+r*s,r*a-n*s)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,r=t.z/2,s=Math.cos(i),a=Math.cos(n),o=Math.cos(r),h=Math.sin(i),l=Math.sin(n),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],r=i[4],s=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],f=n+o+c;return f>0?(e=.5/Math.sqrt(f+1),this.set((u-h)*e,(s-l)*e,(a-r)*e,.25/e)):n>o&&n>c?(e=2*Math.sqrt(1+n-o-c),this.set(.25*e,(r+a)/e,(s+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-n-c),this.set((r+a)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-n-o),this.set((s+l)/e,(h+u)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var s=h[r],a=h[s];e=Math.sqrt(i[3*r+r]-i[3*s+s]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[s]=(i[3*s+r]+i[3*r+s])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+s]-i[3*s+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t*n.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),a=t.x-e,o=t.y-i;return t.x=a*r-o*s+e,t.y=a*s+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},4497:t=>{t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},9640:(t,e,i)=>{var n=i(5689),r=i(9652),s=i(372),a=new r,o=new s,h=new n;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},4936:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var n=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new n);var s=0,a=0;return t>0&&t<=e*i&&(s=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(s,a)}},7556:(t,e,i)=>{var n=i(2529);t.exports=function(t,e,i,r,s,a,o,h){void 0===h&&(h=new n);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-i*p)*v,h.y=c*v*e+-f*v*t+(-r*c+i*f)*v,h}},2529:(t,e,i)=>{var n=i(7473),r=i(12),s=new n({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 s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},5689:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=n*o-r*a,this.y=r*s-i*o,this.z=i*a-n*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,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,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 n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z;return this.x=i*a-n*s,this.y=n*r-e*a,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],a=e*r[1]+i*r[5]+n*r[9]+r[13],o=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*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,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*n-a*i,l=o*i+a*e-r*n,u=o*n+r*i-s*e,c=-r*e-s*i-a*n;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,i=this.y,n=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],g=r[11],m=r[12],y=r[13],x=r[14],M=1/(e*h+i*f+n*g+r[15]);return this.x=(e*s+i*l+n*d+m)*M,this.y=(e*a+i*u+n*p+y)*M,this.z=(e*o+i*c+n*v+x)*M,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,a=this.x-i,o=s-this.y-1-n,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}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},9279:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e,i,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=e||0,this.z=i||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,e,i,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=e||0,this.z=i||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,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*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 i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),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,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+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,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*n-a*i,l=o*i+a*e-r*n,u=o*n+r*i-s*e,c=-r*e-s*i-a*n;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}});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},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},6412:t=>{t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},3426:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var n=i(104);t.exports=function(){return n(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var n=i(104);t.exports=function(){return n(-180,180)}},936:(t,e,i)=>{var n=i(6906);t.exports=function(t){return n(t+Math.PI)}},1935:(t,e,i)=>{var n=i(7425);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&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var n=i(8445);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var n=i(8445);t.exports=function(t){return n(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},4361:t=>{t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},7798:t=>{t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},8290:t=>{t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},3788:t=>{t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var n=i(7425),r=i(1030),s={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};s=r(!1,s,n),t.exports=s},1640:(t,e,i)=>{var n=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,s=0;s<=r;s++)i+=Math.pow(1-e,r-s)*Math.pow(e,s)*t[s]*n(r,s);return i}},6105:(t,e,i)=>{var n=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return t[0]===t[i]?(e<0&&(s=Math.floor(r=i*(1+e))),n(r-s,t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i])):e<0?t[0]-(n(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(r-s,t[s?s-1:0],t[s],t[i{t.exports=function(t,e,i,n,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var n=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return e<0?n(t[0],t[1],r):e>1?n(t[i],t[i-1],i-r):n(t[s],t[s+1>i?i:s+1],r-s)}},6388:t=>{t.exports=function(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},5735:(t,e,i)=>{var n=i(2733);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},8705:(t,e,i)=>{var n=i(278);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var n=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},5659:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var n=new(i(7473))({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=n},5722:(t,e,i)=>{var n=i(8666),r=i(7473),s=i(204),a=new r({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,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},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},387:t=>{t.exports="postrender"},7970:t=>{t.exports="prerender"},674:t=>{t.exports="render"},9418:t=>{t.exports="resize"},8604:(t,e,i)=>{t.exports={POST_RENDER:i(387),PRE_RENDER:i(7970),RENDER:i(674),RESIZE:i(9418)}},5412:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline"}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},7473:t=>{function e(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&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 i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function n(t,n,r,a){for(var o in n)if(n.hasOwnProperty(o)){var h=e(n,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(s.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]=n[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),i>0){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>s&&(e.splice(s),a=s);for(var o=0;o{t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),n>0){var a=n-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;n>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var n=i(2497);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var a=0;if(n(t,r,s))for(var o=r;o{t.exports=function(t,e,i){var n,r=[null];for(n=3;n{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(te.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)}},6245:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var a=[];if(n(t,r,s))for(var o=r;o{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n>r||(t.splice(n,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var n=t[i-1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,n){var r,s=[],a=!1;if((i||n)&&(a=!0,i||(i=""),n||(n="")),e=e;r--)a?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)a?s.push(i+r.toString()+n):s.push(r);return s}},1316:(t,e,i)=>{var n=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],s=Math.max(n((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t,r,s,a,o){for(void 0===s&&(s=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>s;){if(a-s>600){var h=a-s+1,l=r-s+1,u=Math.log(h),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),d=Math.max(s,Math.floor(r-l*c/h+f)),p=Math.min(a,Math.floor(r+(h-l)*c/h+f));n(t,r,d,p,o)}var v=t[r],g=s,m=a;for(e(t,s,r),o(t[a],v)>0&&e(t,s,a);g0;)m--}0===o(t[s],v)?e(t,s,m):e(t,++m,a),m<=r&&(s=m+1),r<=m&&(a=m-1)}};t.exports=n},9703:(t,e,i)=>{var n=i(5851),r=i(4912),s=function(t,e,i){for(var n=[],r=0;r{var n=i(8935);t.exports=function(t,e,i,r){var s;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(n(t,s),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(s=t.indexOf(h))&&(n(t,s),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var n=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var s=n(t,e);return i&&i.call(r,s),s}},8780:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),n(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var n=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return n(t,r)}},6960:t=>{t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n{t.exports=function(t,e,i,n){var r=t.length;if(e<0||e>r||e>=i||i>r||e+i>r){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r{function e(t,e){return String(t).localeCompare(e)}function i(t,e,i,n){var r,s,a,o,h,l=t.length,u=0,c=2*i;for(r=0;rl&&(s=l),a>l&&(a=l),o=r,h=s;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var n=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var n=i(7116);t.exports=function(t){return n(t,180)}},2597:(t,e,i)=>{var n=i(7116);t.exports=function(t){return n(t,90)}},7116:(t,e,i)=>{var n=i(1816),r=i(4780);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{var n=i(7116);t.exports=function(t){return n(t,-90)}},7711:(t,e,i)=>{var n=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):r(t,i)),0!==e)for(var s=0;s{t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r-1;s--)n[r][s]=t[s][r]}return n}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,n,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)n=t[r],i[r]=e(n);return i};t.exports=e},1030:(t,e,i)=>{var n=i(2482),r=function(){var t,e,i,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{var n=i(4675),r=i(5851);t.exports=function(t,e,i){var s=r(t,e,null);if(null===s)return i;if(Array.isArray(s))return n.RND.pick(s);if("object"==typeof s){if(s.hasOwnProperty("randInt"))return n.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return n.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if("function"==typeof s)return s(e);return s}},4597:t=>{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}},5851:t=>{t.exports=function(t,e,i,n){if(!t&&!n||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(n&&n.hasOwnProperty(e))return n[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),s=t,a=n,o=i,h=0;h{t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var r=0;if(e+1>=(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(r-s+1).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file +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=68)}([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||! +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(34),s=new i({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 s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,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)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,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},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var 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},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e*this.x-n*this.y,n*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=n},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e){t.exports=function(t,e,n,i){var r=t.length;if(e<0||e>r||e>=n||n>r){if(i)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e){t.exports=function(t,e,n,i){if(!t&&!i||"number"==typeof t)return n;if(t&&t.hasOwnProperty(e))return t[e];if(i&&i.hasOwnProperty(e))return i[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),s=t,a=i,o=n,h=n,l=!0,u=!0,c=0;c=t.length)){for(var n=t.length-1,i=t[e],r=e;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(29),s=new i({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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e){t.exports=function(t,e,n){var i=n-e;return e+((t-e)%i+i)%i}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new i(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var 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},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,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},applyMatrix3:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this},applyMatrix4:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,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],g=r[11],m=r[12],y=r[13],x=r[14],w=1/(e*h+n*f+i*g+r[15]);return this.x=(e*s+n*l+i*d+m)*w,this.y=(e*a+n*u+i*p+y)*w,this.z=(e*o+n*c+i*v+x)*w,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var 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,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(26),r=n(60);t.exports=function(t,e){if(void 0===e&&(e=90),!i(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 n=0;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i,r=n(27),s={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(i=navigator.userAgent,/Edg\/\d+/.test(i)?(s.edge=!0,s.es2019=!0):/OPR/.test(i)?(s.opera=!0,s.es2019=!0):/Chrome\/(\d+)/.test(i)&&!r.windowsPhone?(s.chrome=!0,s.chromeVersion=parseInt(RegExp.$1,10),s.es2019=s.chromeVersion>69):/Firefox\D+(\d+)/.test(i)?(s.firefox=!0,s.firefoxVersion=parseInt(RegExp.$1,10),s.es2019=s.firefoxVersion>10):/AppleWebKit/.test(i)&&r.iOS?s.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(i)?(s.ie=!0,s.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(i)&&!r.windowsPhone?(s.safari=!0,s.safariVersion=parseInt(RegExp.$1,10),s.es2019=s.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(i)&&(s.ie=!0,s.trident=!0,s.tridentVersion=parseInt(RegExp.$1,10),s.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(i)&&(s.silk=!0),s)},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(6),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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(3);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){return Math.random()*(e-t)+t}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(3);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(14),s=new i({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},setValues:function(t,e,n,i,r,s,a,o,h,l,u,c,f,d,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=n,g[3]=i,g[4]=r,g[5]=s,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=f,g[13]=d,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,n){var i=a.fromQuat(n).val,r=e.x,s=e.y,o=e.z;return this.setValues(i[0]*r,i[1]*r,i[2]*r,0,i[4]*s,i[5]*s,i[6]*s,0,i[8]*o,i[9]*o,i[10]*o,0,t.x,t.y,t.z,1)},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(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],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},getInverse:function(t){return this.copy(t),this.invert()},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],g=t[15],m=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*g-f*d,S=u*v-c*p,R=u*g-f*p,I=c*g-f*v,C=m*I-y*R+x*S+w*b-M*A+E*T;return C?(C=1/C,this.setValues((a*I-o*R+h*S)*C,(i*R-n*I-r*S)*C,(p*E-v*M+g*w)*C,(c*M-u*E-f*w)*C,(o*b-s*I-h*A)*C,(e*I-i*b+r*A)*C,(v*x-d*E-g*y)*C,(l*E-c*x+f*y)*C,(s*R-a*b+h*T)*C,(n*b-e*R-r*T)*C,(d*M-p*x+g*m)*C,(u*x-l*M-f*m)*C,(a*A-s*S-o*T)*C,(e*S-n*A+i*T)*C,(p*y-d*w-v*m)*C,(l*w-u*y+c*m)*C)):this},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],g=t[15];return this.setValues(a*(c*g-f*v)-u*(o*g-h*v)+p*(o*f-h*c),-(n*(c*g-f*v)-u*(i*g-r*v)+p*(i*f-r*c)),n*(o*g-h*v)-a*(i*g-r*v)+p*(i*h-r*o),-(n*(o*f-h*c)-a*(i*f-r*c)+u*(i*h-r*o)),-(s*(c*g-f*v)-l*(o*g-h*v)+d*(o*f-h*c)),e*(c*g-f*v)-l*(i*g-r*v)+d*(i*f-r*c),-(e*(o*g-h*v)-s*(i*g-r*v)+d*(i*h-r*o)),e*(o*f-h*c)-s*(i*f-r*c)+l*(i*h-r*o),s*(u*g-f*p)-l*(a*g-h*p)+d*(a*f-h*u),-(e*(u*g-f*p)-l*(n*g-r*p)+d*(n*f-r*u)),e*(a*g-h*p)-s*(n*g-r*p)+d*(n*h-r*a),-(e*(a*f-h*u)-s*(n*f-r*u)+l*(n*h-r*a)),-(s*(u*v-c*p)-l*(a*v-o*p)+d*(a*c-o*u)),e*(u*v-c*p)-l*(n*v-i*p)+d*(n*c-i*u),-(e*(a*v-o*p)-s*(n*v-i*p)+d*(n*o-i*a)),e*(a*c-o*u)-s*(n*c-i*u)+l*(n*o-i*a))},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],g=t[15];return(e*a-n*s)*(c*g-f*v)-(e*o-i*s)*(u*g-f*p)+(e*h-r*s)*(u*v-c*p)+(n*o-i*a)*(l*g-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],g=e[14],m=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*g,e[3]=x*s+w*l+M*d+E*m,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*g,e[7]=x*s+w*l+M*d+E*m,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*g,e[11]=x*s+w*l+M*d+E*m,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*g,e[15]=x*s+w*l+M*d+E*m,this},multiplyLocal:function(t){var e=this.val,n=t.val;return this.setValues(e[0]*n[0]+e[1]*n[4]+e[2]*n[8]+e[3]*n[12],e[0]*n[1]+e[1]*n[5]+e[2]*n[9]+e[3]*n[13],e[0]*n[2]+e[1]*n[6]+e[2]*n[10]+e[3]*n[14],e[0]*n[3]+e[1]*n[7]+e[2]*n[11]+e[3]*n[15],e[4]*n[0]+e[5]*n[4]+e[6]*n[8]+e[7]*n[12],e[4]*n[1]+e[5]*n[5]+e[6]*n[9]+e[7]*n[13],e[4]*n[2]+e[5]*n[6]+e[6]*n[10]+e[7]*n[14],e[4]*n[3]+e[5]*n[7]+e[6]*n[11]+e[7]*n[15],e[8]*n[0]+e[9]*n[4]+e[10]*n[8]+e[11]*n[12],e[8]*n[1]+e[9]*n[5]+e[10]*n[9]+e[11]*n[13],e[8]*n[2]+e[9]*n[6]+e[10]*n[10]+e[11]*n[14],e[8]*n[3]+e[9]*n[7]+e[10]*n[11]+e[11]*n[15],e[12]*n[0]+e[13]*n[4]+e[14]*n[8]+e[15]*n[12],e[12]*n[1]+e[13]*n[5]+e[14]*n[9]+e[15]*n[13],e[12]*n[2]+e[13]*n[6]+e[14]*n[10]+e[15]*n[14],e[12]*n[3]+e[13]*n[7]+e[14]*n[11]+e[15]*n[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.val,i=e.val,r=n[0],s=n[4],a=n[8],o=n[12],h=n[1],l=n[5],u=n[9],c=n[13],f=n[2],d=n[6],p=n[10],v=n[14],g=n[3],m=n[7],y=n[11],x=n[15],w=i[0],M=i[4],E=i[8],T=i[12],A=i[1],b=i[5],S=i[9],R=i[13],I=i[2],C=i[6],P=i[10],k=i[14],O=i[3],_=i[7],F=i[11],L=i[15];return this.setValues(r*w+s*A+a*I+o*O,h*w+l*A+u*I+c*O,f*w+d*A+p*I+v*O,g*w+m*A+y*I+x*O,r*M+s*b+a*C+o*_,h*M+l*b+u*C+c*_,f*M+d*b+p*C+v*_,g*M+m*b+y*C+x*_,r*E+s*S+a*P+o*F,h*E+l*S+u*P+c*F,f*E+d*S+p*P+v*F,g*E+m*S+y*P+x*F,r*T+s*R+a*k+o*L,h*T+l*R+u*k+c*L,f*T+d*R+p*k+v*L,g*T+m*R+y*k+x*L)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},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){return this.scaleXYZ(t.x,t.y,t.z)},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.setValues(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)},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 this;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],g=n[6],m=n[7],y=n[8],x=n[9],w=n[10],M=n[11],E=n[12],T=n[13],A=n[14],b=n[15],S=i*i*l+h,R=r*i*l+s*o,I=s*i*l-r*o,C=i*r*l-s*o,P=r*r*l+h,k=s*r*l+i*o,O=i*s*l+r*o,_=r*s*l-i*o,F=s*s*l+h;return this.setValues(u*S+p*R+y*I,c*S+v*R+x*I,f*S+g*R+w*I,d*S+m*R+M*I,u*C+p*P+y*k,c*C+v*P+x*k,f*C+g*P+w*k,d*C+m*P+M*k,u*O+p*_+y*F,c*O+v*_+x*F,f*O+g*_+w*F,d*O+m*_+M*F,E,T,A,b)},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=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,g=s*o,m=s*h;return this.setValues(1-(f+p),u+m,c-g,0,u-m,1-(l+p),d+v,0,c+g,d-v,1-(l+f),0,e.x,e.y,e.z,1)},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,g=r*o;return this.setValues(1-(c+d),l+g,u-v,0,l-g,1-(h+d),f+p,0,u+v,f-p,1-(h+c),0,0,0,0,1)},frustum:function(t,e,n,i,r,s){var a=1/(e-t),o=1/(i-n),h=1/(r-s);return this.setValues(2*r*a,0,0,0,0,2*r*o,0,0,(e+t)*a,(i+n)*o,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,n,i){var r=1/Math.tan(t/2),s=1/(n-i);return this.setValues(r/e,0,0,0,0,r,0,0,0,0,(i+n)*s,-1,0,0,2*i*n*s,0)},perspectiveLH:function(t,e,n,i){return this.setValues(2*n/t,0,0,0,0,2*n/e,0,0,0,0,-i/(n-i),1,0,0,n*i/(n-i),0)},ortho:function(t,e,n,i,r,s){var a=t-e,o=n-i,h=r-s;return a=0===a?a:1/a,o=0===o?o:1/o,h=0===h?h:1/h,this.setValues(-2*a,0,0,0,0,-2*o,0,0,0,0,2*h,0,(t+e)*a,(i+n)*o,(s+r)*h,1)},lookAtRH:function(t,e,n){var i=this.val;return u.subVectors(t,e),0===u.getLengthSquared()&&(u.z=1),u.normalize(),h.crossVectors(n,u),0===h.getLengthSquared()&&(1===Math.abs(n.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),h.crossVectors(n,u)),h.normalize(),l.crossVectors(u,h),i[0]=h.x,i[1]=h.y,i[2]=h.z,i[4]=l.x,i[5]=l.y,i[6]=l.z,i[8]=u.x,i[9]=u.y,i[10]=u.z,this},lookAt:function(t,e,n){var i=t.x,r=t.y,s=t.z,a=n.x,o=n.y,h=n.z,l=e.x,u=e.y,c=e.z;if(Math.abs(i-l)<1e-6&&Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6)return this.identity();var f=i-l,d=r-u,p=s-c,v=1/Math.sqrt(f*f+d*d+p*p),g=o*(p*=v)-h*(d*=v),m=h*(f*=v)-a*p,y=a*d-o*f;(v=Math.sqrt(g*g+m*m+y*y))?(g*=v=1/v,m*=v,y*=v):(g=0,m=0,y=0);var x=d*y-p*m,w=p*g-f*y,M=f*m-d*g;return(v=Math.sqrt(x*x+w*w+M*M))?(x*=v=1/v,w*=v,M*=v):(x=0,w=0,M=0),this.setValues(g,x,f,0,m,w,d,0,y,M,p,0,-(g*i+m*r+y*s),-(x*i+w*r+M*s),-(f*i+d*r+p*s),1)},yawPitchRoll:function(t,e,n){this.zero(),a.zero(),o.zero();var i=this.val,r=a.val,s=o.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),r[0]=1,r[15]=1,r[5]=l,r[10]=l,r[9]=-h,r[6]=h,h=Math.sin(t),l=Math.cos(t),s[5]=1,s[15]=1,s[0]=l,s[2]=-h,s[8]=h,s[10]=l,this.multiplyLocal(a),this.multiplyLocal(o),this},setWorldMatrix:function(t,e,n,i,r){return this.yawPitchRoll(t.y,t.x,t.z),a.scaling(n.x,n.y,n.z),o.xyz(e.x,e.y,e.z),this.multiplyLocal(a),this.multiplyLocal(o),i&&this.multiplyLocal(i),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var n=this.val,i=t.val,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5],u=n[6],c=n[7],f=n[8],d=n[9],p=n[10],v=n[11],g=n[12],m=n[13],y=n[14],x=n[15],w=i[0],M=i[1],E=i[2],T=i[3],A=i[4],b=i[5],S=i[6],R=i[7],I=i[8],C=i[9],P=i[10],k=i[11],O=i[12],_=i[13],F=i[14],L=i[15];return e.setValues(w*r+M*h+E*f+T*g,M*s+M*l+E*d+T*m,E*a+M*u+E*p+T*y,T*o+M*c+E*v+T*x,A*r+b*h+S*f+R*g,A*s+b*l+S*d+R*m,A*a+b*u+S*p+R*y,A*o+b*c+S*v+R*x,I*r+C*h+P*f+k*g,I*s+C*l+P*d+k*m,I*a+C*u+P*p+k*y,I*o+C*c+P*v+k*x,O*r+_*h+F*f+L*g,O*s+_*l+F*d+L*m,O*a+_*u+F*p+L*y,O*o+_*c+F*v+L*x)},fromRotationXYTranslation:function(t,e,n){var i=e.x,r=e.y,s=e.z,a=Math.sin(t.x),o=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=i,c=r,f=s,d=-a,p=0-d*h,v=0-o*h,g=d*l,m=o*l;return n||(u=l*i+h*s,c=p*i+o*r+g*s,f=v*i+a*r+m*s),this.setValues(l,p,v,0,0,o,a,0,h,g,m,0,u,c,f,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}}),a=new s,o=new s,h=new r,l=new r,u=new r;t.exports=s},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(3);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADDED_TO_SCENE:n(186),BOOT:n(187),CREATE:n(188),DESTROY:n(189),PAUSE:n(190),POST_UPDATE:n(191),PRE_RENDER:n(192),PRE_UPDATE:n(193),READY:n(194),REMOVED_FROM_SCENE:n(195),RENDER:n(196),RESUME:n(197),SHUTDOWN:n(198),SLEEP:n(199),START:n(200),TRANSITION_COMPLETE:n(201),TRANSITION_INIT:n(202),TRANSITION_OUT:n(203),TRANSITION_START:n(204),TRANSITION_WAKE:n(205),UPDATE:n(206),WAKE:n(207)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(9),s=n(46),a=n(8),o=n(47),h=n(48),l=n(221),u=n(49),c=new i({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var n=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+n),!this.key)throw new Error("Invalid File key: "+this.key);var i=a(e,"url");void 0===i?i=t.path+n+"."+a(e,"extension",""):"string"!=typeof i||i.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(i=t.path+i),this.url=i,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var n=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,i=!(e.target&&200!==e.target.status)||n;4===t.readyState&&t.status>=400&&t.status<=599&&(i=!1),this.state=r.FILE_LOADED,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(){console.error('Failed to process file: %s "%s"',this.type,this.key),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.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){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),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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){t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,n=1;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return n;var t=navigator.userAgent;/Windows/.test(t)?n.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(n.iOS=!0,n.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),n.iOSVersion=parseInt(RegExp.$1,10)):n.macOS=!0:/Android/.test(t)?n.android=!0:/Linux/.test(t)?n.linux=!0:/iP[ao]d|iPhone/i.test(t)?(n.iOS=!0,navigator.appVersion.match(/OS (\d+)/),n.iOSVersion=parseInt(RegExp.$1,10),n.iPhone=-1!==t.toLowerCase().indexOf("iphone"),n.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?n.kindle=!0:/CrOS/.test(t)&&(n.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(n.android=!1,n.iOS=!1,n.macOS=!1,n.windows=!0,n.windowsPhone=!0);var i=/Silk/.test(t);return(n.windows||n.macOS||n.linux&&!i||n.chromeOS)&&(n.desktop=!0),(n.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(n.desktop=!1),navigator.standalone&&(n.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(n.cordova=!0),void 0!==window.ejecta&&(n.ejecta=!0)),void 0!==e&&e.versions&&e.versions.node&&(n.node=!0),n.node&&"object"==typeof e.versions&&(n.nodeWebkit=!!e.versions["node-webkit"],n.electron=!!e.versions.electron),/Crosswalk/.test(t)&&(n.crosswalk=!0),n.pixelRatio=window.devicePixelRatio||1,n}()}).call(this,n(298))},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(316),s=n(65),a=n(317),o=n(29),h=n(318),l=n(323),u=new i({initialize:function(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.type=o.RECTANGLE,this.x=t,this.y=e,this.width=n,this.height=i},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,n){return a(this,t,e,n)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,n,i){return this.x=t,this.y=e,this.width=n,this.height=i,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},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,n,i){return Math.atan2(i-e,n-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(13);t.exports=function(t){return i(t,-Math.PI,Math.PI)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(13);t.exports=function(t){return i(t,-180,180)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),Math.abs(t-e) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(36);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){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){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(2);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,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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],g=c[4],m=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+g*s+m*h,e[4]=v*i+g*a+m*l,e[5]=v*r+g*o+m*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,g=r*o,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],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],g=e[13],m=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*g-f*v,S=c*m-d*v,R=c*y-p*v,I=f*m-d*g,C=f*y-p*g,P=d*y-p*m,k=x*P-w*C+M*I+E*R-T*S+A*b;return k?(k=1/k,n[0]=(h*P-l*C+u*I)*k,n[1]=(l*R-o*P-u*S)*k,n[2]=(o*C-h*R+u*b)*k,n[3]=(s*C-r*P-a*I)*k,n[4]=(i*P-s*R+a*S)*k,n[5]=(r*R-i*C-a*b)*k,n[6]=(g*A-m*T+y*E)*k,n[7]=(m*M-v*A-y*w)*k,n[8]=(v*T-g*M+y*x)*k,this):null}});t.exports=i},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(44),s=n(1),a=n(14),o=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),l=new a(1,0,0),u=new a(0,1,0),c=new a,f=new r,d=new i({initialize:function(t,e,n,i){this.onChangeCallback=s,this.set(t,e,n,i)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,n,i,r){return void 0===r&&(r=!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),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,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.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z,s=this.w;return this.set(n+e*(t.x-n),i+e*(t.y-i),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var n=t.x*e.x+t.y*e.y+t.z*e.z;return n<-.999999?(c.copy(l).cross(t).length()<1e-6&&c.copy(u).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):n>.999999?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+n,this.normalize())},setAxes:function(t,e,n){var i=f.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(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var n=Math.sin(e);return this.set(n*t.x,n*t.y,n*t.z,Math.cos(e))},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.set(e*h+r*s+n*o-i*a,n*h+r*a+i*s-e*o,i*h+r*o+e*a-n*s,r*h-e*s-n*a-i*o)},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.set(c*n+f*a,c*i+f*o,c*r+f*h,c*s+f*l)},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.set(-t*s,-e*s,-n*s,i*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*s,n*a+i*s,i*a-n*s,r*a-e*s)},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.set(e*a-i*s,n*a+r*s,i*a+e*s,r*a-n*s)},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.set(e*a+n*s,n*a-e*s,i*a+r*s,r*a-i*s)},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},setFromEuler:function(t,e){var n=t.x/2,i=t.y/2,r=t.z/2,s=Math.cos(n),a=Math.cos(i),o=Math.cos(r),h=Math.sin(n),l=Math.sin(i),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,n=t.val,i=n[0],r=n[4],s=n[8],a=n[1],o=n[5],h=n[9],l=n[2],u=n[6],c=n[10],f=i+o+c;return f>0?(e=.5/Math.sqrt(f+1),this.set((u-h)*e,(s-l)*e,(a-r)*e,.25/e)):i>o&&i>c?(e=2*Math.sqrt(1+i-o-c),this.set(.25*e,(r+a)/e,(s+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-i-c),this.set((r+a)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-i-o),this.set((s+l)/e,(h+u)/e,.25*e,(a-r)/e)),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],a=o[s];e=Math.sqrt(n[3*r+r]-n[3*s+s]-n[3*a+a]+1),h[r]=.5*e,e=.5/e,h[s]=(n[3*s+r]+n[3*r+s])*e,h[a]=(n[3*a+r]+n[3*r+a])*e,this._x=h[0],this._y=h[1],this._z=h[2],this._w=(n[3*a+s]-n[3*s+a])*e}return this.onChangeCallback(this),this}});t.exports=d},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADD:n(211),COMPLETE:n(212),FILE_COMPLETE:n(213),FILE_KEY_COMPLETE:n(214),FILE_LOAD_ERROR:n(215),FILE_LOAD:n(216),FILE_PROGRESS:n(217),POST_PROCESS:n(218),PROGRESS:n(219),START:n(220)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(17),r=n(49);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,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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(3),r=n(55),s=n(43),a=n(32),o=n(33),h=n(2),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*i.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*i.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(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},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,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 h),i||(i=this.scene.sys.cameras.main);var r=i.scrollX,a=i.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,n):s(o,l,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=l},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(3),s=n(2),a=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},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],s=t[3];return e||n?n>0?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],g=void 0===e?n:e.matrix;return g[0]=u*r+c*a,g[1]=u*s+c*o,g[2]=f*r+d*a,g[3]=f*s+d*o,g[4]=p*r+v*a+h,g[5]=p*s+v*o+l,g},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],g=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+g*o+l,i[5]=v*a+g*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},setQuad:function(t,e,n,i,r,s){void 0===s&&(s=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],f=a[5];return s[0]=t*o+e*l+c,s[1]=t*h+e*u+f,s[2]=t*o+i*l+c,s[3]=t*h+i*u+f,s[4]=n*o+i*l+c,s[5]=n*h+i*u+f,s[6]=n*o+e*l+c,s[7]=n*h+e*u+f,r&&s.forEach((function(t,e){s[e]=Math.round(t)})),s},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,n){var i=this.getX(t,e);return n&&(i=Math.round(i)),i},getYRound:function(t,e,n){var i=this.getY(t,e);return n&&(i=Math.round(i)),i},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(58),s=n(226),a=n(233),o=n(59),h=n(23),l=new i({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),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.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,n=[];e&&(n.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?n.unshift(this.displayList.getIndex(t)):n.unshift(this.scene.sys.displayList.getIndex(t)),n},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADDED_TO_SCENE:n(234),DESTROY:n(235),REMOVED_FROM_SCENE:n(236),VIDEO_COMPLETE:n(237),VIDEO_CREATED:n(238),VIDEO_ERROR:n(239),VIDEO_LOOP:n(240),VIDEO_PLAY:n(241),VIDEO_SEEKED:n(242),VIDEO_SEEKING:n(243),VIDEO_STOP:n(244),VIDEO_TIMEOUT:n(245),VIDEO_UNLOCKED:n(246)}},function(t,e){t.exports=function(t){for(var e=t.length,n=t[0].length,i=new Array(n),r=0;r-1;s--)i[r][s]=t[s][r]}return i}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var n=null,i=0;i0;e--){var n=Math.floor(Math.random()*(e+1)),i=t[e];t[e]=t[n],t[n]=i}return t}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i,r,s,a=n(300),o=n(302),h=[],l=!1;t.exports=(s=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,n){return i(t,e,n,a.CANVAS)},create:i=function(t,e,n,i,s){var u;void 0===e&&(e=1),void 0===n&&(n=1),void 0===i&&(i=a.CANVAS),void 0===s&&(s=!1);var c=r(i);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:i},i===a.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),s&&(c.parent=u),u.width=e,u.height=n,l&&i===a.CANVAS&&o.disable(u.getContext("2d")),u},createWebGL:function(t,e,n){return i(t,e,n,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(66),r=n(11);t.exports=function(t,e,n){if(void 0===n&&(n=new r),e<=0||e>=1)return n.x=t.x,n.y=t.y,n;var s=i(t)*e;return e>.5?(s-=t.width+t.height)<=t.width?(n.x=t.right-s,n.y=t.bottom):(n.x=t.x,n.y=t.bottom-(s-t.width)):s<=t.width?(n.x=t.x+s,n.y=t.y):(n.x=t.right,n.y=t.y+(s-t.width)),n}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(4),s=n(17),a=new i({initialize:function(t,e,n,i,r,s,a){this.texture=t,this.name=e,this.source=t.source[n],this.sourceIndex=n,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(s,a,i,r)},setSize:function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),this.cutX=n,this.cutY=i,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,s=r.cut;s.x=n,s.y=i,s.w=t,s.h=e,s.r=n+t,s.b=i+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var a=r.drawImage;return a.x=n,a.y=i,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,n,i,r,s){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=n,o.y=i,o.w=r,o.h=s,o.r=n+r,o.b=i+s,this.x=n,this.y=i,this.width=r,this.height=s,this.halfWidth=.5*r,this.halfHeight=.5*s,this.centerX=Math.floor(r/2),this.centerY=Math.floor(s/2),this.updateUVs()},setCropUVs:function(t,e,n,i,s,a,o){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,f=this.realWidth,d=this.realHeight,p=h+(e=r(e,0,f)),v=l+(n=r(n,0,d)),g=i=r(i,0,f-e),m=s=r(s,0,d-n),y=this.data;if(y.trim){var x=y.spriteSourceSize,w=e+(i=r(i,0,u-e)),M=n+(s=r(s,0,c-n));if(!(x.rw||x.y>M)){var E=Math.max(x.x,e),T=Math.max(x.y,n),A=Math.min(x.r,w)-E,b=Math.min(x.b,M)-T;g=A,m=b,p=a?h+(u-(E-x.x)-A):h+(E-x.x),v=o?l+(c-(T-x.y)-b):l+(T-x.y),e=E,n=T,i=A,s=b}else p=0,v=0,g=0,m=0}else a&&(p=h+(u-e-i)),o&&(v=l+(c-n-s));var S=this.source.width,R=this.source.height;return t.u0=Math.max(0,p/S),t.v0=Math.max(0,v/R),t.u1=Math.min(1,(p+g)/S),t.v1=Math.min(1,(v+m)/R),t.x=e,t.y=n,t.cx=p,t.cy=v,t.cw=g,t.ch=m,t.width=i,t.height=s,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,n){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,n)},setUVs:function(t,e,n,i,r,s){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=n,this.v0=i,this.u1=r,this.v1=s,this},updateUVs:function(){var t=this.cutX,e=this.cutY,n=this.cutWidth,i=this.cutHeight,r=this.data.drawImage;r.width=n,r.height=i;var s=this.source.width,a=this.source.height;return this.u0=t/s,this.v0=e/a,this.u1=(t+n)/s,this.v1=(e+i)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=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=a},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var i=n(69),r=n(0),s=n(7),a=n(183),o=n(184),h=n(208),l=n(209),u=n(225),c=n(256),f=n(1),d=new r({Extends:o,initialize:function(t,e,n){o.call(this,t,e,n);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.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=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:f,postRender:f,render:f,destroy:f});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,i,r,s){var a=this.scene.sys[n],o=new u(this.scene,a,t,e,i,r,s);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=s(t,"key",null),a=s(t,"animationName",null),o=s(t,"loop",!1),h=this.scene.sys[n],l=new u(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),i(this.scene,l,t);var c=s(t,"skinName",!1);c&&l.setSkinByName(c);var f=s(t,"slotName",!1),d=s(t,"attachmentName",null);return f&&l.setAttachment(f,d),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,i){var r=this.scene.sys[n],s=new c(this.scene,r,t,e,i);return this.displayList.add(s),s}),(function(t,e){void 0===t&&(t={});var r=s(t,"x",0),a=s(t,"y",0),o=s(t,"children",null),h=this.scene.sys[n],l=new c(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),i(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){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))}},e=this.renderer.spineSceneRenderer;e||((e=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,e.shapes.setBlendMode=t,this.renderer.spineSceneRenderer=e),this.sceneRenderer=e,this.skeletonRenderer=e.skeletonRenderer,this.skeletonDebugRenderer=e.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(e.prefix+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(e.prefix+t).getSourceImage(),!1)}))}return n}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(12),r=n(70);t.exports=function(t,e,n){e.x=r(n,"x",0),e.y=r(n,"y",0),e.depth=r(n,"depth",0),e.flipX=r(n,"flipX",!1),e.flipY=r(n,"flipY",!1);var s=r(n,"scale",null);"number"==typeof s?e.setScale(s):null!==s&&(e.scaleX=r(s,"x",1),e.scaleY=r(s,"y",1));var a=r(n,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(n,"rotation",0);var o=r(n,"angle",null);null!==o&&(e.angle=o),e.alpha=r(n,"alpha",1);var h=r(n,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(n,"blendMode",i.NORMAL),e.visible=r(n,"visible",!0),r(n,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(71),r=n(7);t.exports=function(t,e,n){var s=r(t,e,null);if(null===s)return n;if(Array.isArray(s))return i.RND.pick(s);if("object"==typeof s){if(s.hasOwnProperty("randInt"))return i.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return i.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if("function"==typeof s)return s(e);return s}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(3),r=n(17),s={Angle:n(72),Distance:n(81),Easing:n(89),Fuzzy:n(134),Interpolation:n(139),Pow2:n(147),Snap:n(151),RandomDataGenerator:n(155),Average:n(156),Bernstein:n(35),Between:n(157),CatmullRom:n(37),CeilTo:n(158),Clamp:n(4),DegToRad:n(20),Difference:n(159),Euler:n(160),Factorial:n(36),FloatBetween:n(19),FloorTo:n(161),FromPercent:n(162),GetSpeed:n(163),IsEven:n(164),IsEvenStrict:n(165),Linear:n(38),LinearXY:n(166),MaxAdd:n(167),Median:n(168),MinSub:n(169),Percent:n(170),RadToDeg:n(22),RandomXY:n(171),RandomXYZ:n(172),RandomXYZW:n(173),Rotate:n(174),RotateAround:n(41),RotateAroundDistance:n(175),RotateTo:n(176),RoundAwayFromZero:n(42),RoundTo:n(177),SinCosTableGenerator:n(178),SmootherStep:n(40),SmoothStep:n(39),ToXY:n(179),TransformXY:n(43),Within:n(180),Wrap:n(13),Vector2:n(2),Vector3:n(14),Vector4:n(181),Matrix3:n(44),Matrix4:n(21),Quaternion:n(45),RotateVec3:n(182)};s=r(!1,s,i),t.exports=s},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Between:n(30),BetweenPoints:n(73),BetweenPointsY:n(74),BetweenY:n(75),CounterClockwise:n(18),Normalize:n(31),Random:n(76),RandomDegrees:n(77),Reverse:n(78),RotateTo:n(79),ShortestBetween:n(80),Wrap:n(32),WrapDegrees:n(33)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,n,i){return Math.atan2(n-t,i-e)}},function(t,e,n){ +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(19);t.exports=function(){return i(-Math.PI,Math.PI)}},function(t,e,n){ +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(19);t.exports=function(){return i(-180,180)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(31);t.exports=function(t){return i(t+Math.PI)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(3);t.exports=function(t,e,n){return void 0===n&&(n=.05),t===e||(Math.abs(e-t)<=n||Math.abs(e-t)>=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=n:e + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Between:n(82),BetweenPoints:n(83),BetweenPointsSquared:n(84),Chebyshev:n(85),Power:n(86),Snake:n(87),Squared:n(88)}},function(t,e){t.exports=function(t,e,n,i){var r=t-n,s=e-i;return Math.sqrt(r*r+s*s)}},function(t,e){t.exports=function(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)}},function(t,e){t.exports=function(t,e){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i}},function(t,e){t.exports=function(t,e,n,i){return Math.max(Math.abs(t-n),Math.abs(e-i))}},function(t,e){t.exports=function(t,e,n,i,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(n-t,r)+Math.pow(i-e,r))}},function(t,e){t.exports=function(t,e,n,i){return Math.abs(t-n)+Math.abs(e-i)}},function(t,e){t.exports=function(t,e,n,i){var r=t-n,s=e-i;return r*r+s*s}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Back:n(90),Bounce:n(94),Circular:n(98),Cubic:n(102),Elastic:n(106),Expo:n(110),Linear:n(114),Quadratic:n(116),Quartic:n(120),Quintic:n(124),Sine:n(128),Stepped:n(132)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(91),Out:n(92),InOut:n(93)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var n=1.525*e;return(t*=2)<1?t*t*((n+1)*t-n)*.5:.5*((t-=2)*t*((n+1)*t+n)+2)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(95),Out:n(96),InOut:n(97)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(99),Out:n(100),InOut:n(101)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(103),Out:n(104),InOut:n(105)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(107),Out:n(108),InOut:n(109)}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/n)}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-i)*(2*Math.PI)/n)+1}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/n)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/n)*.5+1}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(111),Out:n(112),InOut:n(113)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports=n(115)},function(t,e){t.exports=function(t){return t}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(117),Out:n(118),InOut:n(119)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(121),Out:n(122),InOut:n(123)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(125),Out:n(126),InOut:n(127)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:n(129),Out:n(130),InOut:n(131)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports=n(133)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Ceil:n(135),Equal:n(34),Floor:n(136),GreaterThan:n(137),LessThan:n(138)}},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){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),t>e-n}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),t + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Bezier:n(140),CatmullRom:n(141),CubicBezier:n(142),Linear:n(143),QuadraticBezier:n(144),SmoothStep:n(145),SmootherStep:n(146)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(35);t.exports=function(t,e){for(var n=0,r=t.length-1,s=0;s<=r;s++)n+=Math.pow(1-e,r-s)*Math.pow(e,s)*t[s]*i(r,s);return n}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(37);t.exports=function(t,e){var n=t.length-1,r=n*e,s=Math.floor(r);return t[0]===t[n]?(e<0&&(s=Math.floor(r=n*(1+e))),i(r-s,t[(s-1+n)%n],t[s],t[(s+1)%n],t[(s+2)%n])):e<0?t[0]-(i(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?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[n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,i)+function(t,e){return t*t*t*e}(t,r)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(38);t.exports=function(t,e){var n=t.length-1,r=n*e,s=Math.floor(r);return e<0?i(t[0],t[1],r):e>1?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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(39);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(40);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={GetNext:n(148),IsSize:n(149),IsValue:n(150)}},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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Ceil:n(152),Floor:n(153),To:n(154)}},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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(4),r=n(0),s=n(21),a=n(1),o=new s,h=new r({initialize:function t(e,n,i,r){void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=n,this._z=i,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,n,i){return void 0===i&&(i=this._order),this._x=t,this._y=e,this._z=n,this._order=i,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,n){return void 0===e&&(e=this._order),void 0===n&&(n=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,n)},setFromRotationMatrix:function(t,e,n){void 0===e&&(e=this._order),void 0===n&&(n=!1);var r=t.val,s=r[0],a=r[4],o=r[8],h=r[1],l=r[5],u=r[9],c=r[2],f=r[6],d=r[10],p=0,v=0,g=0;switch(e){case"XYZ":v=Math.asin(i(o,-1,1)),Math.abs(o)<.99999?(p=Math.atan2(-u,d),g=Math.atan2(-a,s)):p=Math.atan2(f,l);break;case"YXZ":p=Math.asin(-i(u,-1,1)),Math.abs(u)<.99999?(v=Math.atan2(o,d),g=Math.atan2(h,l)):v=Math.atan2(-c,s);break;case"ZXY":p=Math.asin(i(f,-1,1)),Math.abs(f)<.99999?(v=Math.atan2(-c,d),g=Math.atan2(-a,l)):g=Math.atan2(h,s);break;case"ZYX":v=Math.asin(-i(c,-1,1)),Math.abs(c)<.99999?(p=Math.atan2(f,d),g=Math.atan2(h,s)):g=Math.atan2(-a,l);break;case"YZX":g=Math.asin(i(h,-1,1)),Math.abs(h)<.99999?(p=Math.atan2(-u,l),v=Math.atan2(-c,s)):v=Math.atan2(o,d);break;case"XZY":g=Math.asin(-i(a,-1,1)),Math.abs(a)<.99999?(p=Math.atan2(f,l),v=Math.atan2(o,s)):p=Math.atan2(-u,d)}return this._x=p,this._y=v,this._z=g,this._order=e,n&&this.onChangeCallback(this),this}});h.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],h.DefaultOrder="XYZ",t.exports=h},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.floor(t*i)/i}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(4);t.exports=function(t,e,n){return(n-e)*(t=i(t,0,1))+e}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=0),t.clone().lerp(e,n)}},function(t,e){t.exports=function(t,e,n){return Math.min(t+e,n)}},function(t,e){t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var n=Math.floor(e/2);return e%2==0?(t[n]+t[n-1])/2:t[n]}},function(t,e){t.exports=function(t,e,n){return Math.max(t-e,n)}},function(t,e){t.exports=function(t,e,n,i){void 0===n&&(n=e+1);var r=(t-e)/(n-e);return r>1?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,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,e,n,i,r){return t.x=e+r*Math.cos(i),t.y=n+r*Math.sin(i),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;a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(2);t.exports=function(t,e,n,r){void 0===r&&(r=new i);var s=0,a=0;return t>0&&t<=e*n&&(s=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(s,a)}},function(t,e){t.exports=function(t,e,n){return Math.abs(t-e)<=n}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(14),r=n(21),s=n(45),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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="resize"},function(t,e,n){ +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ +var i=n(185),r=n(0),s=n(23),a=new r({Extends:i,initialize:function(t,e,n){i.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=n,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){ +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ +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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addedtoscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="boot"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="create"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="pause"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="postupdate"},function(t,e){ +/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="prerender"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="preupdate"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="ready"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedfromscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="render"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="resume"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="shutdown"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="sleep"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitioncomplete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitioninit"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionout"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionstart"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionwake"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="update"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");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 g=f,m=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],g=u[p],m=this.getCurvePercent((p>>1)-1,1-(i-g)/(u[p+a.PREV_TIME]-g)),y=u[p+a.ROTATION]-v;switch(y=v+(y-360*(16384-(16384.499999999996-y/360|0)))*m,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],g=this.getCurvePercent(p/a.ENTRIES-1,1-(i-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.X]-f)*g,d+=(u[p+a.Y]-d)*g}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 g=s.binarySearch(f,a,o.ENTRIES);p=f[g+o.PREV_X],v=f[g+o.PREV_Y];var m=f[g],y=this.getCurvePercent(g/o.ENTRIES-1,1-(a-m)/(f[g+o.PREV_TIME]-m));p=(p+(f[g+o.X]-p)*y)*d.data.scaleX,v=(v+(f[g+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],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*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],g=c[y+a.PREV_B],m=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],g=c[x+a.PREV_B],m=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,g+=(c[x+a.B]-g)*M,m+=(c[x+a.A]-m)*M}if(1==o)u.color.set(p,v,g,m);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*o,(v-f.g)*o,(g-f.b)*o,(m-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;g=c[T+a.PREV_R],m=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);g=c[A+a.PREV_R],m=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],S=this.getCurvePercent(A/a.ENTRIES-1,1-(i-b)/(c[A+a.PREV_TIME]-b));g+=(c[A+a.R]-g)*S,m+=(c[A+a.G]-m)*S,y+=(c[A+a.B]-y)*S,x+=(c[A+a.A]-x)*S,w+=(c[A+a.R2]-w)*S,M+=(c[A+a.G2]-M)*S,E+=(c[A+a.B2]-E)*S}if(1==o)u.color.set(g,m,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((g-f.r)*o,(m-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){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else h==e.setup&&this.setAttachment(t,u,u.data.attachmentName)},r.prototype.setAttachment=function(t,e,n){e.setAttachment(null==n?null:t.getAttachment(this.slotIndex,n))},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==(g=c).bones){y=g.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=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,a,o,h,l,u){var c=i.drawOrder,f=i.slots;if(u!=n.mixOut){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 g=0,m=v.length;g=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],g=c[d],m=this.getCurvePercent(d/o.ENTRIES-1,1-(r-g)/(c[d+o.PREV_TIME]-g));l==e.setup?(f.mix=f.data.mix+(p+(c[d+o.MIX]-p)*m-f.data.mix)*h,f.softness=f.data.softness+(v+(c[d+o.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+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)*m-f.mix)*h,f.softness+=(v+(c[d+o.SOFTNESS]-v)*m-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 m=u.length;d=u[m+a.PREV_ROTATE],p=u[m+a.PREV_TRANSLATE],v=u[m+a.PREV_SCALE],g=u[m+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],g=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,g+=(u[y+a.SHEAR]-g)*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+(g-f.shearMix)*o}else c.rotateMix+=(d-c.rotateMix)*o,c.translateMix+=(p-c.translateMix)*o,c.scaleMix+=(v-c.scaleMix)*o,c.shearMix+=(g-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],g=this.getCurvePercent(p/a.ENTRIES-1,1-(i-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.ROTATE]-f)*g,d+=(u[p+a.TRANSLATE]-d)*g}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.unkeyedState=0,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.applyAttachmentTimeline=function(n,i,r,s,a){var o=i.slots[n.slotIndex];if(o.bone.active){var h,l=n.frames;if(r=l[l.length-1]?l.length-1:t.Animation.binarySearch(l,r)-1,this.setAttachment(i,o,n.attachmentNames[h],a);o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+e.SETUP)}},e.prototype.setAttachment=function(t,n,i,r){n.setAttachment(null==i?null:t.getAttachment(n.data.index,i)),r&&(n.attachmentState=this.unkeyedState+e.CURRENT)},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],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 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;n0){a[l]=e.HOLD_MIX,o[l]=f;continue t}break}a[l]=e.HOLD_FIRST}else a[l]=e.SUBSEQUENT}},e.prototype.getCurrent=function(t){return t>=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_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,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?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,(function(a){var o={count:0},h=new Array;try{new t.TextureAtlas(a,(function(e){h.push(""==s?e:s+"/"+e);var n=document.createElement("img");return n.width=16,n.height=16,new t.FakeTexture(n)}))}catch(t){var l=t;return r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(l.message),i&&i(e,"Couldn't load texture atlas ".concat(e,": ").concat(l.message)),r.toLoad--,void r.loaded++}for(var u=function(l){var u=!1;r.loadTexture(l,(function(l,c){if(o.count++,o.count==h.length)if(u)r.errors[e]="Couldn't load texture atlas page ".concat(l,"} of atlas ").concat(e),i&&i(e,"Couldn't load texture atlas page ".concat(l," of atlas ").concat(e)),r.toLoad--,r.loaded++;else try{var f=new t.TextureAtlas(a,(function(t){return r.get(""==s?t:s+"/"+t)}));r.assets[e]=f,n&&n(e,f),r.toLoad--,r.loaded++}catch(t){var d=t;r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(d.message),i&&i(e,"Couldn't load texture atlas ".concat(e,": ").concat(d.message)),r.toLoad--,r.loaded++}}),(function(t,n){u=!0,o.count++,o.count==h.length&&(r.errors[e]="Couldn't load texture atlas page ".concat(t,"} of atlas ").concat(e),i&&i(e,"Couldn't load texture atlas page ".concat(t," of atlas ").concat(e)),r.toLoad--,r.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,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+o;var m=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*m+p*x,this.b=d*y+p*w,this.c=v*m+g*x,void(this.d=v*y+g*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?(A=Math.abs(d*g-p*v)/A,d/=this.skeleton.scaleX,p=(v/=this.skeleton.scaleY)*A,g=d*A,M=Math.atan2(v,d)*t.MathUtils.radDeg):(d=0,v=0,M=90-Math.atan2(g,p)*t.MathUtils.radDeg);var E=i+a-M,T=i+o-M+90;m=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*m-p*x,this.b=d*y-p*w,this.c=v*m+g*x,this.d=v*y+g*w;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var A,b=t.MathUtils.cosDeg(i),S=t.MathUtils.sinDeg(i),R=(d*b+p*S)/this.skeleton.scaleX,I=(v*b+g*S)/this.skeleton.scaleY;(A=Math.sqrt(R*R+I*I))>1e-5&&(A=1/A),R*=A,I*=A,A=Math.sqrt(R*R+I*I),this.data.transformMode==t.TransformMode.NoScale&&d*g-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(A=-A);var C=Math.PI/2+Math.atan2(I,R),P=Math.cos(C)*A,k=Math.sin(C)*A;m=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=R*m+P*x,this.b=R*y+P*w,this.c=I*m+k*x,this.d=I*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,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),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(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(t,e,n){this.name=t,this.order=e,this.skinRequired=n};t.ConstraintData=e}(i||(i={})),function(t){var e=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(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?d-=360:d<-180&&(d+=360);var E=e.ascaleX,T=e.ascaleY;if(r||s){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=n-e.worldX,v=i-e.worldY}var A=e.data.length*E,b=Math.sqrt(p*p+v*v);if(r&&bA&&A>1e-4)E*=g=(b/A-1)*o+1,a&&(T*=g)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*o,E,T,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,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 y=n.ax,x=0,w=0,M=0,E=e.a,T=e.b,A=e.c,b=e.d,S=Math.abs(c-d)<=1e-4;S?(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 R=e.parent;E=R.a,T=R.b,A=R.c;var I,C,P=1/(E*(b=R.d)-T*A),k=w-R.worldX,O=M-R.worldY,_=(k*b-O*T)*P-l,F=(O*E-k*A)*P-u,L=Math.sqrt(_*_+F*F),V=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 D=((k=i-R.worldX)*b-(O=r-R.worldY)*T)*P-l,N=(O*E-k*A)*P-u,Y=D*D+N*N;if(0!=o){o*=c*(p+1)/2;var X=Math.sqrt(Y),U=X-L-V*c+o;if(U>0){var B=Math.min(1,U/(2*o))-1;Y=(D-=(B=(U-o*(1-B*B))/X)*D)*D+(N-=B*N)*N}}t:if(S){var z=(Y-L*L-(V*=c)*V)/(2*L*V);z<-1?z=-1:z>1&&(z=1,a&&(f*=(Math.sqrt(Y)/(L+V)-1)*h+1)),C=Math.acos(z)*s,E=L+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*L,j=q-W;if((b=H*H-4*j*(A=q*L*L+W*Y-W*q))>=0){var Z=Math.sqrt(b);H<0&&(Z=-Z);var K=(Z=-(H+Z)/2)/j,Q=A/Z,$=Math.abs(K)=-1&&A<=1&&(A=Math.acos(A),(b=(k=E*Math.cos(A)+L)*k+(O=T*Math.sin(A))*O)st&&(it=A,st=b,rt=k,at=O)),Y<=(et+st)/2?(I=G-Math.atan2(nt*s,tt),C=J*s):(I=G-Math.atan2(at*s,rt),C=it*s)}var ot=Math.atan2(x,y)*m,ht=e.arotation;(I=(I-ot)*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+ot)*t.MathUtils.radDeg-n.ashearX)*m+g-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,g=this.spacing;if(u||!o){u&&(v=t.Utils.setArraySize(this.lengths,c));for(var m=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),B=Math.sin(X),k.a=U*V-B*N,k.b=U*D-B*Y,k.c=B*V+U*N,k.d=B*D+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 g=n.lengths,m=g[p-=f?1:2];if(s&&(h*=m),a)for(var y=1;ym){v!=e.AFTER&&(v=e.AFTER,n.computeWorldVertices(o,d-6,4,c,0,2)),this.addAfterPosition(M-m,c,0,u,x);continue}}for(;;w++){var E=g[w];if(!(M>E)){if(0==w)M/=E;else M=(M-(Z=g[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==q)}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],S=c[1],R=0,I=0,C=0,P=0,k=0,O=0,_=0,F=0,L=0,V=0,D=0,N=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 H=6*w;for(b=c[H],S=c[H+1],R=c[H+2],I=c[H+3],C=c[H+4],P=c[H+5],D=2*(_=.03*(b-2*R+C))+(L=.006*(3*(R-C)-b+(k=c[H+6]))),N=2*(F=.03*(S-2*I+P))+(V=.006*(3*(I-P)-S+(O=c[H+7]))),Y=.3*(R-b)+_+.16666667*L,X=.3*(I-S)+F+.16666667*V,z=Math.sqrt(Y*Y+X*X),B[0]=z,H=1;H<8;H++)Y+=D,X+=N,D+=L,N+=V,z+=Math.sqrt(Y*Y+X*X),B[H]=z;Y+=D,X+=N,z+=Math.sqrt(Y*Y+X*X),B[8]=z,Y+=D+L,X+=N+V,z+=Math.sqrt(Y*Y+X*X),B[9]=z,W=0}for(M*=z;;W++){var j=B[W];if(!(M>j)){var Z;if(0==W)M/=j;else M=W+(M-(Z=B[W-1]))/(j-Z);break}}this.addCurvePosition(.1*M,b,S,R,I,C,P,k,O,u,x,r||y>0&&0==q)}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,g=v*p,m=p*t,y=3*m,x=p*y,w=y*t,M=e*g+i*x+s*w+o*d,E=n*g+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*m*2+a*f),M-(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&&(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.overrideMimeType("text/html"),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 ".concat(e,": status ").concat(i.status,", ").concat(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.overrideMimeType("text/html"),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 ".concat(e,": status ").concat(i.status,", ").concat(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))if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(n,{mode:"cors"}).then((function(t){return t.ok||(i.errors[n]="Couldn't load image "+n),t.blob()})).then((function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(t){i.rawAssets[n]=t}))}else{var r=new Image;r.crossOrigin="anonymous",r.onload=function(t){i.rawAssets[n]=r},r.onerror=function(t){i.errors[n]="Couldn't load image ".concat(n)},r.src=n}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts,n=0;n0},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(V);var D=r.slots.length;for(u=0;u=0;d--)Y[d]=-1;var X=t.Utils.newArray(D-N,0),U=0,B=0;for(d=0;d=0;d--)-1==Y[d]&&(Y[d]=X[--B]);w.setFrame(u,y,Y)}s.push(w),o=Math.max(o,w.frames[V-1])}var z=n.readInt(!0);if(z>0){for(w=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(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},r=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*m-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+N*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],g=c[d+2],m=c[d+3],y=p-g,x=v-m,w=u,M=u.length-2,E=o.length,T=0;T0;if(y*(b-m)-x*(A-g)>0){if(I){o.push(S),o.push(R);continue}var C=(k=R-b)*(g-p)-(O=S-A)*(m-v);if(Math.abs(C)>1e-6){var P=(O*(v-b)-k*(p-A))/C;o.push(p+(g-p)*P),o.push(v+(m-v)*P)}else o.push(p),o.push(v)}else if(I){var k,O;C=(k=R-b)*(g-p)-(O=S-A)*(m-v);if(Math.abs(C)>1e-6){P=(O*(v-b)-k*(p-A))/C;o.push(p+(g-p)*P),o.push(v+(m-v)*P)}else o.push(p),o.push(v);o.push(S),o.push(R)}l=!0}if(E==o.length)return h.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var _=o;(o=u).length=0,u=_}if(h!=o){h.length=0;d=0;for(var F=o.length-2;d>1;o=0;f--)-1==q[f]&&(q[f]=H[--Z])}w.setFrame(c++,this.getValue(W,"time",0),q)}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 ".concat(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 ".concat(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(){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 g=a.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(){};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?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*y-T*w,g.b=E*x-T*M,g.c=T*y+E*w,g.d=T*x+E*M,m=!0}if(0!=n){var A=this.temp;s.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),g.worldX+=(A.x-g.worldX)*n,g.worldY+=(A.y-g.worldY)*n,m=!0}if(i>0){var b=Math.sqrt(g.a*g.a+g.c*g.c),S=Math.sqrt(a*a+h*h);b>1e-5&&(b=(b+(S-b+this.data.offsetScaleX)*i)/b),g.a*=b,g.c*=b,b=Math.sqrt(g.b*g.b+g.d*g.d),S=Math.sqrt(o*o+l*l),b>1e-5&&(b=(b+(S-b+this.data.offsetScaleY)*i)/b),g.b*=b,g.d*=b,m=!0}if(r>0){x=g.b,M=g.d;var R,I=Math.atan2(M,x);(R=Math.atan2(l,o)-Math.atan2(h,a)-(I-Math.atan2(g.c,g.a)))>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R=I+(R+f)*r;b=Math.sqrt(x*x+M*M);g.b=Math.cos(R)*b,g.d=Math.sin(R)*b,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,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?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*y-T*w,g.b=E*x-T*M,g.c=T*y+E*w,g.d=T*x+E*M,m=!0}if(0!=n){var A=this.temp;s.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),g.worldX+=A.x*n,g.worldY+=A.y*n,m=!0}if(i>0){var b=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleX)*i+1;g.a*=b,g.c*=b,b=(Math.sqrt(o*o+l*l)-1+this.data.offsetScaleY)*i+1,g.b*=b,g.d*=b,m=!0}if(r>0){var S;(S=Math.atan2(l,o)-Math.atan2(h,a))>t.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2);x=g.b,M=g.d;S=Math.atan2(M,x)+(S-t.MathUtils.PI/2+f)*r;b=Math.sqrt(x*x+M*M);g.b=Math.cos(S)*b,g.d=Math.sin(S)*b,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,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],g=n[f],m=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,g,m,E,T)&&e.positiveArea(g,m,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(g),o.push(m),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,g,m,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 null!=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,S=w.d,R=e,I=r;I + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var i=n(0),r=n(8),s=n(210),a=n(6),o=n(222),h=n(223),l=n(224),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(a(e)){var m=e;for(e=r(m,"key"),d=new o(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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(9),s=n(24),a=n(25),o=n(8),h=n(6),l=n(47),u=new i({Extends:s,initialize:function t(e,n,i,r,a){var l,u="png";if(h(n)){var c=n;n=o(c,"key"),i=o(c,"url"),l=o(c,"normalMap"),r=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(i)&&(l=i[1],i=i[0]);var f={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:n,url:i,xhrSettings:r,config:a};if(s.call(this,e,f),l){var d=new t(e,this.key,l,r,a);d.type="normalMap",this.setLink(d),e.addFile(d)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){s.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(t.data),t.onProcessError()},s.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,n){if(Array.isArray(t))for(var i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addfile"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="filecomplete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="filecomplete-"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="loaderror"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="load"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="fileprogress"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="postprocess"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="progress"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(48);t.exports=function(t,e){var n=i(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,n.async,n.user,n.password),r.responseType=t.xhrSettings.responseType,r.timeout=n.timeout,n.headers)for(var s in n.headers)r.setRequestHeader(s,n.headers[s]);return n.header&&n.headerValue&&r.setRequestHeader(n.header,n.headerValue),n.requestedWith&&r.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&r.overrideMimeType(n.overrideMimeType),n.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(9),s=n(24),a=n(25),o=n(8),h=n(7),l=n(6),u=new i({Extends:s,initialize:function(t,e,n,i,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),n=o(c,"url"),i=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var f={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:n,xhrSettings:i,config:a};s.call(this,t,f),l(n)&&(this.data=a?h(n,a):n,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,n,i){if(Array.isArray(t))for(var r=0;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(9),s=n(46),a=new i({initialize:function(t,e,n,i){var s=[];i.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=n,this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.state=r.FILE_PENDING,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(9),s=n(24),a=n(25),o=n(8),h=n(6),l=new i({Extends:s,initialize:function(t,e,n,i){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),n=o(u,"url"),i=o(u,"xhrSettings"),a=o(u,"extension",a),r=o(u,"type",r),l=o(u,"cache",l)}var c={type:r,cache:l,extension:a,responseType:"text",key:e,url:n,xhrSettings:i};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,n){if(Array.isArray(t))for(var i=0;i + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var i=n(30),r=n(4),s=n(0),a=n(50),o=n(51),h=n(52),l=n(53),u=n(54),c=n(56),f=n(18),d=n(20),p=n(57),v=n(22),g=n(247),m=n(254),y=new s({Extends:p,Mixins:[a,o,h,l,u,c,m],initialize:function(t,e,n,i,r,s,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(n,i),r&&this.setSkeleton(r,s,a)},willRender:function(t,e){var n=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!n&&this.parentContainer){var i=this.plugin,r=i.sceneRenderer;i.gl&&r.batcher.isDrawing&&(r.end(),i.renderer.pipelines.rebind())}return n},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var n=this.findSlot(e);n&&(n.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var n=(t>>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(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;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(227),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(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var n=[],i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={CHANGE_DATA:n(228),CHANGE_DATA_KEY:n(229),DESTROY:n(230),REMOVE_DATA:n(231),SET_DATA:n(232)}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="changedata"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="changedata-"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedata"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="setdata"},function(t,e,n){"use strict";var i=Object.prototype.hasOwnProperty,r="~";function s(){}function a(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,n,i,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var o=new a(n,i||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function l(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(r=!1)),l.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},l.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,a=new Array(s);i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addedtoscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedfromscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="created"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="error"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="loop"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="play"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="seeked"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="seeking"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="stop"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="timeout"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="unlocked"},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={COMPLETE:n(248),DISPOSE:n(249),END:n(250),EVENT:n(251),INTERRUPTED:n(252),START:n(253)}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="dispose"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="end"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="event"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="interrupted"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var i=n(1),r=n(1),s=n(1);r=n(255),t.exports={renderWebGL:i,renderCanvas:r,renderDirect:s}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var i=n(18),r=n(22),s=n(13);t.exports=function(t,e,n,a){var o=t.currentContext,h=e.plugin,l=e.skeleton,u=h.skeletonRenderer,c=t._tempMatrix1,f=t._tempMatrix2,d=t._tempMatrix3;n.addToRenderList(e),f.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),c.copyFrom(n.matrix),a?(c.multiplyWithOffset(a,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),f.e=e.x,f.f=e.y,c.multiply(f,d)):(f.e-=n.scrollX*e.scrollFactorX,f.f-=n.scrollY*e.scrollFactorY,c.multiply(f,d)),l.x=d.tx,l.y=d.ty,l.scaleX=d.scaleX,l.scaleY=-1*d.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=r(d.rotationNormalized)):e.root.rotation=s(r(i(d.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*r(d.rotationNormalized):e.root.rotation+=2*r(d.rotationNormalized)),n.renderToTexture&&(l.y=d.ty,l.scaleY*=-1),l.updateWorldTransform(),u.ctx=o,u.debugRendering=h.drawDebug||e.drawDebug,o.save(),u.draw(l),o.restore()}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var i=n(0),r=n(257),s=n(342),a=new i({Extends:r,Mixins:[s],initialize:function(t,e,n,i,s){r.call(this,t,n,i,s),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},function(t,e,n){ +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(258),r=n(12),s=n(0),a=n(309),o=n(59),h=n(57),l=n(28),u=n(339),c=n(341),f=n(2),d=new s({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Pipeline,a.Transform,a.Visible,u],initialize:function(t,e,n,i){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,n),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),i&&this.add(i)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var n=this.list,i=new l,r=!1;t.setEmpty();for(var s=0;s-1},setAll:function(t,e,n,r){return i.SetAll(this.list,t,e,n,r),this},each:function(t,e){var n,i=[null],r=this.list.slice(),s=r.length;for(n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=d},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Matrix:n(259),Add:n(268),AddAt:n(269),BringToTop:n(270),CountAllMatching:n(271),Each:n(272),EachInRange:n(273),FindClosestInSorted:n(274),Flatten:n(275),GetAll:n(276),GetFirst:n(277),GetRandom:n(278),MoveDown:n(279),MoveTo:n(280),MoveUp:n(281),MoveAbove:n(282),MoveBelow:n(283),NumberArray:n(284),NumberArrayStep:n(285),QuickSelect:n(286),Range:n(287),Remove:n(288),RemoveAt:n(289),RemoveBetween:n(290),RemoveRandomElement:n(291),Replace:n(292),RotateLeft:n(61),RotateRight:n(62),SafeRange:n(5),SendToBack:n(293),SetAll:n(294),Shuffle:n(63),SortByDigits:n(295),SpliceOne:n(10),StableSort:n(296),Swap:n(308)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={CheckMatrix:n(26),MatrixToString:n(260),ReverseColumns:n(262),ReverseRows:n(263),Rotate180:n(264),RotateLeft:n(265),RotateMatrix:n(15),RotateRight:n(266),Translate:n(267),TransposeMatrix:n(60)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(261),r=n(26);t.exports=function(t){var e="";if(!r(t))return 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(r-s+1).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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(15);t.exports=function(t){return i(t,180)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(15);t.exports=function(t){return i(t,90)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(15);t.exports=function(t){return i(t,-90)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(61),r=n(62);t.exports=function(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=0),0!==n&&(n<0?i(t,Math.abs(n)):r(t,n)),0!==e)for(var s=0;s0){var s=n-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),i&&i.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;n>0&&a>s&&(e.splice(s),a=s);for(var o=0;o0){var a=i-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(n,0,e),r&&r.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;i>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(n,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var n=t.indexOf(e);return-1!==n&&n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(5);t.exports=function(t,e,n,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var a=0;if(i(t,r,s))for(var o=r;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(5);t.exports=function(t,e,n,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),i(t,r,s)){var a,o=[null];for(a=5;ae.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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=function(t,e){void 0===e&&(e=[]);for(var i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(5);t.exports=function(t,e,n,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var a=[];if(i(t,r,s))for(var o=r;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(5);t.exports=function(t,e,n,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),i(t,r,s))for(var a=r;a0){var i=t[n-1],r=t.indexOf(i);t[n]=i,t[r]=e}return t}},function(t,e){t.exports=function(t,e,n){var i=t.indexOf(e);if(-1===i||n<0||n>=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=t.indexOf(e);if(-1!==n&&nr||(t.splice(i,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},function(t,e){t.exports=function(t,e,n){if(e===n)return t;var i=t.indexOf(e),r=t.indexOf(n);if(i<0||r<0)throw new Error("Supplied items must be elements of the same array");return i=e;r--)a?s.push(n+r.toString()+i):s.push(r);else for(r=t;r<=e;r++)a?s.push(n+r.toString()+i):s.push(r);return s}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(42);t.exports=function(t,e,n){void 0===t&&(t=0),void 0===e&&(e=null),void 0===n&&(n=1),null===e&&(e=t,t=0);for(var r=[],s=Math.max(i((e-t)/(n||1)),0),a=0;a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +function n(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function i(t,e){return te?1:0}var r=function(t,e,s,a,o){for(void 0===s&&(s=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>s;){if(a-s>600){var h=a-s+1,l=e-s+1,u=Math.log(h),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),d=Math.max(s,Math.floor(e-l*c/h+f)),p=Math.min(a,Math.floor(e+(h-l)*c/h+f));r(t,e,d,p,o)}var v=t[e],g=s,m=a;for(n(t,s,e),o(t[a],v)>0&&n(t,s,a);g0;)m--}0===o(t[s],v)?n(t,s,m):n(t,++m,a),m<=e&&(s=m+1),e<=m&&(a=m-1)}};t.exports=r},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(7),r=n(63),s=function(t,e,n){for(var i=[],r=0;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(10);t.exports=function(t,e,n,r){var s;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(i(t,s),n&&n.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(s=t.indexOf(h))&&(i(t,s),o.push(h),n&&n.call(r,h)),a--}return o}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(10);t.exports=function(t,e,n,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var s=i(t,e);return n&&n.call(r,s),s}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(5);t.exports=function(t,e,n,r,s){if(void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===s&&(s=t),i(t,e,n)){var a=n-e,o=t.splice(e,a);if(r)for(var h=0;h + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(10);t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);var r=e+Math.floor(Math.random()*n);return i(t,r)}},function(t,e){t.exports=function(t,e,n){var i=t.indexOf(e),r=t.indexOf(n);return-1!==i&&-1===r&&(t[i]=n,!0)}},function(t,e){t.exports=function(t,e){var n=t.indexOf(e);return-1!==n&&n>0&&(t.splice(n,1),t.unshift(e)),e}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(5);t.exports=function(t,e,n,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),i(t,r,s))for(var a=r;a + * @author Angry Bytes (and contributors) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(297);function r(t,e){return String(t).localeCompare(e)}function s(t,e,n,i){var r,s,a,o,h,l=t.length,u=0,c=2*n;for(r=0;rl&&(s=l),a>l&&(a=l),o=r,h=s;;)if(o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={os:n(27),browser:n(16),features:n(299),input:n(303),audio:n(304),video:n(305),fullscreen:n(306),canvasFeatures:n(307)}},function(t,e){var n,i,r=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var h,l=[],u=!1,c=-1;function f(){u&&h&&(u=!1,h.length?l=h.concat(l):c=-1,l.length&&d())}function d(){if(!u){var t=o(f);u=!0;for(var e=l.length;e;){for(h=l,l=[];++c1)for(var n=1;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(27),r=n(16),s=n(64),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,n,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=s.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),n=s.create2D(this),i=n.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=i.data instanceof Uint8ClampedArray,s.remove(t),s.remove(n),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!i.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),n=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===n[0]||2712847316!==n[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={VERSION:"3.60.0-beta.18",BlendModes:n(12),ScaleModes:n(301),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=i},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n,i="";t.exports={disable:function(t){return""===i&&(i=n(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=n(t)),i&&(t[i]=!0),t},getPrefix:n=function(t){for(var e=["i","webkitI","msI","mozI","oI"],n=0;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(16),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||i.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":i.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(16),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var n=function(e,n){var i=t.canPlayType("audio/"+e).replace(/^no$/,"");return n?Boolean(i||t.canPlayType("audio/"+n).replace(/^no$/,"")):Boolean(i)};if(r.ogg=n('ogg; codecs="vorbis"'),r.opus=n('ogg; codecs="opus"',"opus"),r.mp3=n("mpeg"),r.wav=n("wav"),r.m4a=n("x-m4a"),r.aac=n("aac"),r.flac=n("flac","x-flac"),r.webm=n('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(i.edge)r.dolby=!0;else if(i.safari&&i.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===s&&a>=11||s>10)&&(r.dolby=!0)}}}catch(t){}return r}()},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return n;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(n.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(n.h264=!0,n.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(n.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(n.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(n.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(n.hls=!0))}catch(t){}return n}()},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return n;var t,e="Fullscreen",i="FullScreen",r=["request"+e,"request"+i,"webkitRequest"+e,"webkitRequest"+i,"msRequest"+e,"msRequest"+i,"mozRequest"+i,"mozRequest"+e];for(t=0;t + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i,r,s,a=n(64),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(s=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(s,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var n=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===n[0]&&0===n[1]&&0===n[2]},t.src=i+"/wCKxvRF"+r},s.src=i+"AP804Oa6"+r,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var n=t.getImageData(1,0,1,1),i=n.data[0]===e.data[0]&&n.data[1]===e.data[1]&&n.data[2]===e.data[2]&&n.data[3]===e.data[3];return a.remove(this),i}()),o)},function(t,e){t.exports=function(t,e,n){if(e===n)return t;var i=t.indexOf(e),r=t.indexOf(n);if(i<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[i]=n,t[r]=e,t}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Alpha:n(310),AlphaSingle:n(311),BlendMode:n(312),ComputedSize:n(50),Crop:n(313),Depth:n(51),Flip:n(52),FX:n(314),GetBounds:n(315),Mask:n(324),Origin:n(329),PathFollower:n(330),Pipeline:n(333),ScrollFactor:n(53),Size:n(335),Texture:n(336),TextureCrop:n(337),Tint:n(338),ToJSON:n(58),Transform:n(54),TransformMatrix:n(55),Visible:n(56)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(4),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,n,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=i(t,0,1),this._alphaTR=i(e,0,1),this._alphaBL=i(n,0,1),this._alphaBR=i(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=i(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=i(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=i(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=i(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=i(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(4),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=i(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(12),r={_blendMode:i.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=i[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,n,i){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,n,i,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.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=n},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=n},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(28),r=n(41),s=n(2),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new 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,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,n,r,s,a,o,h,l;if(void 0===t&&(t=new i),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,n=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,s=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,n=t.y,this.getTopRight(t),r=t.x,s=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(n,s,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(n,s,o,l)-t.y,t}};t.exports=a},function(t,e){t.exports=function(t,e,n){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=n&&t.y+t.height>=n)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(65),r=n(66);t.exports=function(t,e,n,s){void 0===s&&(s=[]),!e&&n>0&&(e=r(t)/n);for(var a=0;a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(319),s=n(320),a=n(29),o=n(322),h=n(2),l=new i({initialize:function(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.type=a.LINE,this.x1=t,this.y1=e,this.x2=n,this.y2=i},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,n){return s(this,t,e,n)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.x1=t,this.y1=e,this.x2=n,this.y2=i,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,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(11);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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(321),r=n(11);t.exports=function(t,e,n,s){void 0===s&&(s=[]),!e&&n>0&&(e=i(t)/n);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(11);t.exports=function(t,e){void 0===e&&(e=new i);var n=Math.random();return e.x=t.x1+n*(t.x2-t.x1),e.y=t.y1+n*(t.y2-t.y1),e}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(11);t.exports=function(t,e){return void 0===e&&(e=new i),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(325),r=n(328),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,n,r,s){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new i(this.scene,t,e,n,r,s)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=s},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(326),s=new i({initialize:function(t,e,n,i,r,s){e||(e=t.sys.make.image({x:n,y:i,key:r,frame:s,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,n){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,n)},postRenderWebGL:function(t,e,n){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,n)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,n,i,r){return new s(this.scene,t,e,n,i,r)})),t.exports=s},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(0),r=n(327),s=n(23),a=new i({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectFactory",a,"add"),t.exports=a},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={},i={},r={register:function(t,e,i,r){void 0===r&&(r=!1),n[t]={plugin:e,mapping:i,custom:r}},registerCustom:function(t,e,n,r){i[t]={plugin:e,mapping:n,data:r}},hasCore:function(t){return n.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return n[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){n.hasOwnProperty(t)&&delete n[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=r},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=new(n(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,n){var i=t.gl;t.flush(),0===t.maskStack.length&&(i.enable(i.STENCIL_TEST),i.clear(i.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:n}),this.applyStencil(t,n,!0),t.maskCount++},applyStencil:function(t,e,n){var i=t.gl,r=this.geometryMask,s=t.maskCount;i.colorMask(!1,!1,!1,!1),n?(i.stencilFunc(i.EQUAL,s,255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)):(i.stencilFunc(i.EQUAL,s+1,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)),r.renderWebGL(t,r,e),t.flush(),i.colorMask(!0,!0,!0,!0),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),n?this.invertAlpha?i.stencilFunc(i.NOTEQUAL,s+1,255):i.stencilFunc(i.EQUAL,s+1,255):this.invertAlpha?i.stencilFunc(i.NOTEQUAL,s,255):i.stencilFunc(i.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var n=t.currentMask;if(0===t.maskStack.length)n.mask=null,e.disable(e.STENCIL_TEST);else{var i=t.maskStack[t.maskStack.length-1];i.mask.applyStencil(t,i.camera,!1),t.currentCameraMask.mask!==i.mask?(n.mask=i.mask,n.camera=i.camera):n.mask=null}},preRenderCanvas:function(t,e,n){var i=this.geometryMask;t.currentContext.save(),i.renderCanvas(t,i,n,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=i},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=n},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(20),r=n(331),s=n(7),a=n(332),o=n(2),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var n=this.pathTween;return n&&n.isPlaying()&&n.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var n=this.pathTween;n&&n.isPlaying()&&n.stop(),"number"==typeof t&&(t={duration:t}),t.from=s(t,"from",0),t.to=s(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=s(t,"rotationOffset",0);var l=s(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var n=e.ease(e.progress);e.current=e.start+(e.end-e.start)*n,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+i(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],n=this.pathDelta,r=this.pathVector;if(n.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),n.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),n.add(r),r.add(this.pathOffset);var s=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-s,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+i(this.pathRotationOffset))}}};t.exports=h},function(t,e){t.exports=function(t,e,n){return t&&t.hasOwnProperty(e)?t[e]:n}},function(t,e){t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(334),r=n(10),s={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var n=e.pipelines;if(this.postPipelines=[],this.pipelineData={},n){void 0===t&&(t=n.default);var i=n.get(t);if(i)return this.defaultPipeline=i,this.pipeline=i,!0}return!1},setPipeline:function(t,e,n){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){var a=s.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=n?i(e):e)}return this},setPostPipeline:function(t,e,n){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPipelineData:function(t,e){var n=this.pipelineData;return void 0===e?delete n[t]:n[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,n=this.postPipelines,i=[],r=0;r=0;n--){var i=e[n];("string"==typeof t&&i.name===t||"string"!=typeof t&&i instanceof t)&&(i.destroy(),r(e,n))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=s},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=function(t){var e,i,r;if("object"!=typeof t||null===t)return t;for(r in e=Array.isArray(t)?[]:{},t)i=t[r],e[r]=n(i);return e};t.exports=n},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=n},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(67),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!0),t instanceof i?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(67),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,n,i){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,n,i,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!0),t instanceof i?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&n&&(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=r},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,i){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,i=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=n,this.tintBottomRight=i,this.tintFill=!1,this},setTintFill:function(t,e,n,i){return this.setTint(t,e,n,i),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this.tintFill||16777215!==this.tintTopLeft||16777215!==this.tintTopRight||16777215!==this.tintBottomLeft||16777215!==this.tintBottomRight}}};t.exports=n},function(t,e,n){ +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(1),r=i,s=i;s=n(340),t.exports={renderWebGL:r,renderCanvas:s}},function(t,e){t.exports=function(t,e,n,i){n.addToRenderList(e);var r=e.list;if(0!==r.length){var s=e.localTransform;i?(s.loadIdentity(),s.multiply(i),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,n);for(var u=0;u + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(28);t.exports=function(t,e,n){void 0===n&&(n=new i);var r=Math.min(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-s;return n.setTo(r,s,a,o)}},function(t,e,n){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=n(1),r=n(1);r=n(343),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e){t.exports=function(t,e,n,i){var r=e.list;if(0!==r.length){n.addToRenderList(e);var s=e.localTransform;i?(s.loadIdentity(),s.multiply(i),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,n);for(var u=0;u - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ +// shim for using process in browser +var process = module.exports = {}; -/** - * 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'; +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; /***/ }), -/***/ "../../../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 ***! - \***************************************************/ +/***/ "../../../src/const.js": +/*!*************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/const.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Core.Events + * Global constants. + * + * @ignore */ -module.exports = { +var CONST = { - 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") + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.60.0-beta.18', + + BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ "../../../src/renderer/BlendModes.js"), + + ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ "../../../src/renderer/ScaleModes.js"), + + /** + * This setting will auto-detect if the browser is capable of suppporting WebGL. + * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer. + * + * @name Phaser.AUTO + * @const + * @type {number} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports + * WebGL or not. + * + * @name Phaser.CANVAS + * @const + * @type {number} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is + * no fallback to Canvas with this setting, so you should trap it and display a suitable + * message to the user. + * + * @name Phaser.WEBGL + * @const + * @type {number} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still + * absolutely relies on the DOM being present and available. This mode is meant for unit testing, + * not for running Phaser on the server, which is something you really shouldn't do. + * + * @name Phaser.HEADLESS + * @const + * @type {number} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {number} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {number} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {number} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {number} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {number} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {number} + * @since 3.0.0 + */ + RIGHT: 8 }; +module.exports = CONST; + /***/ }), /***/ "../../../src/data/DataManager.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/data/DataManager.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1193,6 +1040,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.0.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @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. * @@ -1231,6 +1081,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to increase the value for. * @param {*} [data] - The value to increase for the given key. * @@ -1270,6 +1123,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to toggle the value for. * * @return {Phaser.Data.DataManager} This DataManager object. @@ -1645,32 +1501,33 @@ module.exports = DataManager; /***/ }), /***/ "../../../src/data/events/CHANGE_DATA_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * a change data event from a Game Object you would use: `sprite.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 + * @type {string} * @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. @@ -1682,31 +1539,32 @@ module.exports = 'changedata'; /***/ }), /***/ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`, + * the change of a specific data item from a Game Object you would use: `sprite.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')`. + * then you can listen for `sprite.on('changedata-gold')`. * * @event Phaser.Data.Events#CHANGE_DATA_KEY + * @type {string} * @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. @@ -1717,15 +1575,15 @@ module.exports = 'changedata-'; /***/ }), /***/ "../../../src/data/events/DESTROY_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/DESTROY_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1735,6 +1593,7 @@ module.exports = 'changedata-'; * The Data Manager will listen for the destroy event from its parent, and then close itself down. * * @event Phaser.Data.Events#DESTROY + * @type {string} * @since 3.50.0 */ module.exports = 'destroy'; @@ -1743,29 +1602,30 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/data/events/REMOVE_DATA_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. + * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`. * * @event Phaser.Data.Events#REMOVE_DATA + * @type {string} * @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. @@ -1776,29 +1636,30 @@ module.exports = 'removedata'; /***/ }), /***/ "../../../src/data/events/SET_DATA_EVENT.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. + * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`. * * @event Phaser.Data.Events#SET_DATA + * @type {string} * @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. @@ -1809,15 +1670,15 @@ module.exports = 'setdata'; /***/ }), /***/ "../../../src/data/events/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/index.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1838,22 +1699,1557 @@ module.exports = { /***/ }), -/***/ "../../../src/display/mask/BitmapMask.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/display/mask/BitmapMask.js ***! - \*********************************************************/ +/***/ "../../../src/device/Audio.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); + +/** + * Determines the audio playback capabilities of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.audio` from within any Scene. + * + * @typedef {object} Phaser.Device.Audio + * @since 3.0.0 + * + * @property {boolean} audioData - Can this device play HTML Audio tags? + * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files? + * @property {boolean} m4a - Can this device can play m4a files. + * @property {boolean} aac - Can this device can play aac files. + * @property {boolean} flac - Can this device can play flac files. + * @property {boolean} mp3 - Can this device play mp3 files? + * @property {boolean} ogg - Can this device play ogg files? + * @property {boolean} opus - Can this device play opus files? + * @property {boolean} wav - Can this device play wav files? + * @property {boolean} webAudio - Does this device have the Web Audio API? + * @property {boolean} webm - Can this device play webm files? + */ +var Audio = { + + flac: false, + aac: false, + audioData: false, + dolby: false, + m4a: false, + mp3: false, + ogg: false, + opus: false, + wav: false, + webAudio: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Audio; + } + + Audio.audioData = !!(window['Audio']); + + Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']); + + var audioElement = document.createElement('audio'); + var result = !!audioElement.canPlayType; + + try + { + if (result) + { + var CanPlay = function (type1, type2) + { + var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, ''); + + if (type2) + { + return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, '')); + } + else + { + return Boolean(canPlayType1); + } + }; + + // wav Mimetypes accepted: + // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + + Audio.ogg = CanPlay('ogg; codecs="vorbis"'); + Audio.opus = CanPlay('ogg; codecs="opus"', 'opus'); + Audio.mp3 = CanPlay('mpeg'); + Audio.wav = CanPlay('wav'); + Audio.m4a = CanPlay('x-m4a'); + Audio.aac = CanPlay('aac'); + Audio.flac = CanPlay('flac', 'x-flac'); + Audio.webm = CanPlay('webm; codecs="vorbis"'); + + if (audioElement.canPlayType('audio/mp4; codecs="ec-3"') !== '') + { + if (Browser.edge) + { + Audio.dolby = true; + } + else if (Browser.safari && Browser.safariVersion >= 9) + { + if ((/Mac OS X (\d+)_(\d+)/).test(navigator.userAgent)) + { + var major = parseInt(RegExp.$1, 10); + var minor = parseInt(RegExp.$2, 10); + + if ((major === 10 && minor >= 11) || major > 10) + { + Audio.dolby = true; + } + } + } + } + } + } + catch (e) + { + // Nothing to do here + } + + return Audio; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Browser.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"); + +/** + * Determines the browser type and version running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.browser` from within any Scene. + * + * @typedef {object} Phaser.Device.Browser + * @since 3.0.0 + * + * @property {boolean} chrome - Set to true if running in Chrome. + * @property {boolean} edge - Set to true if running in Microsoft Edge browser. + * @property {boolean} firefox - Set to true if running in Firefox. + * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge). + * @property {boolean} mobileSafari - Set to true if running in Mobile Safari. + * @property {boolean} opera - Set to true if running in Opera. + * @property {boolean} safari - Set to true if running in Safari. + * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle) + * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+) + * @property {number} chromeVersion - If running in Chrome this will contain the major version number. + * @property {number} firefoxVersion - If running in Firefox this will contain the major version number. + * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion. + * @property {number} safariVersion - If running in Safari this will contain the major version number. + * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx} + */ +var Browser = { + + chrome: false, + chromeVersion: 0, + edge: false, + firefox: false, + firefoxVersion: 0, + ie: false, + ieVersion: 0, + mobileSafari: false, + opera: false, + safari: false, + safariVersion: 0, + silk: false, + trident: false, + tridentVersion: 0, + es2019: false + +}; + +function init () +{ + var ua = navigator.userAgent; + + if ((/Edg\/\d+/).test(ua)) + { + Browser.edge = true; + Browser.es2019 = true; + } + else if ((/OPR/).test(ua)) { + Browser.opera = true; + Browser.es2019 = true; + } + else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) + { + Browser.chrome = true; + Browser.chromeVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.chromeVersion > 69); + } + else if ((/Firefox\D+(\d+)/).test(ua)) + { + Browser.firefox = true; + Browser.firefoxVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.firefoxVersion > 10); + } + else if ((/AppleWebKit/).test(ua) && OS.iOS) + { + Browser.mobileSafari = true; + } + else if ((/MSIE (\d+\.\d+);/).test(ua)) + { + Browser.ie = true; + Browser.ieVersion = parseInt(RegExp.$1, 10); + } + else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) + { + Browser.safari = true; + Browser.safariVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.safariVersion > 10); + } + else if ((/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/).test(ua)) + { + Browser.ie = true; + Browser.trident = true; + Browser.tridentVersion = parseInt(RegExp.$1, 10); + Browser.ieVersion = parseInt(RegExp.$3, 10); + } + + // Silk gets its own if clause because its ua also contains 'Safari' + if ((/Silk/).test(ua)) + { + Browser.silk = true; + } + + return Browser; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/CanvasFeatures.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "../../../src/display/canvas/CanvasPool.js"); + +/** + * Determines the canvas features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.canvasFeatures` from within any Scene. + * + * @typedef {object} Phaser.Device.CanvasFeatures + * @since 3.0.0 + * + * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha. + * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes. + */ +var CanvasFeatures = { + + supportInverseAlpha: false, + supportNewBlendModes: false + +}; + +function checkBlendMode () +{ + var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/'; + var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=='; + + var magenta = new Image(); + + magenta.onload = function () + { + var yellow = new Image(); + + yellow.onload = function () + { + var canvas = CanvasPool.create2D(yellow, 6); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.globalCompositeOperation = 'multiply'; + + context.drawImage(magenta, 0, 0); + context.drawImage(yellow, 2, 0); + + if (!context.getImageData(2, 0, 1, 1)) + { + return false; + } + + var data = context.getImageData(2, 0, 1, 1).data; + + CanvasPool.remove(yellow); + + CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0); + }; + + yellow.src = pngHead + '/wCKxvRF' + pngEnd; + }; + + magenta.src = pngHead + 'AP804Oa6' + pngEnd; + + return false; +} + +function checkInverseAlpha () +{ + var canvas = CanvasPool.create2D(this, 2); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.fillStyle = 'rgba(10, 20, 30, 0.5)'; + + // Draw a single pixel + context.fillRect(0, 0, 1, 1); + + // Get the color values + var s1 = context.getImageData(0, 0, 1, 1); + + if (s1 === null) + { + return false; + } + + // Plot them to x2 + context.putImageData(s1, 1, 0); + + // Get those values + var s2 = context.getImageData(1, 0, 1, 1); + + var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]); + + CanvasPool.remove(this); + + // Compare and return + return result; +} + +function init () +{ + if (typeof importScripts !== 'function' && document !== undefined) + { + CanvasFeatures.supportNewBlendModes = checkBlendMode(); + CanvasFeatures.supportInverseAlpha = checkInverseAlpha(); + } + + return CanvasFeatures; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Features.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Features.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"); +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); +var CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "../../../src/display/canvas/CanvasPool.js"); + +/** + * Determines the features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.features` from within any Scene. + * + * @typedef {object} Phaser.Device.Features + * @since 3.0.0 + * + * @property {boolean} canvas - Is canvas available? + * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap. + * @property {boolean} file - Is file available? + * @property {boolean} fileSystem - Is fileSystem available? + * @property {boolean} getUserMedia - Does the device support the getUserMedia API? + * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays) + * @property {boolean} localStorage - Is localStorage available? + * @property {boolean} pointerLock - Is Pointer Lock available? + * @property {boolean} stableSort - Is Array.sort stable? + * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views? + * @property {boolean} vibration - Does the device support the Vibration API? + * @property {boolean} webGL - Is webGL available? + * @property {boolean} worker - Is worker available? + */ +var Features = { + + canvas: false, + canvasBitBltShift: null, + file: false, + fileSystem: false, + getUserMedia: true, + littleEndian: false, + localStorage: false, + pointerLock: false, + stableSort: false, + support32bit: false, + vibration: false, + webGL: false, + worker: false + +}; + +// Check Little or Big Endian system. +// @author Matt DesLauriers (@mattdesl) +function checkIsLittleEndian () +{ + var a = new ArrayBuffer(4); + var b = new Uint8Array(a); + var c = new Uint32Array(a); + + b[0] = 0xa1; + b[1] = 0xb2; + b[2] = 0xc3; + b[3] = 0xd4; + + if (c[0] === 0xd4c3b2a1) + { + return true; + } + + if (c[0] === 0xa1b2c3d4) + { + return false; + } + else + { + // Could not determine endianness + return null; + } +} + +function init () +{ + if (typeof importScripts === 'function') + { + return Features; + } + + Features.canvas = !!window['CanvasRenderingContext2D']; + + try + { + Features.localStorage = !!localStorage.getItem; + } + catch (error) + { + Features.localStorage = false; + } + + Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; + Features.fileSystem = !!window['requestFileSystem']; + + var isUint8 = false; + + var testWebGL = function () + { + if (window['WebGLRenderingContext']) + { + try + { + var canvas = CanvasPool.createWebGL(this); + + var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); + + var canvas2D = CanvasPool.create2D(this); + + var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true }); + + // Can't be done on a webgl context + var image = ctx2D.createImageData(1, 1); + + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) + isUint8 = image.data instanceof Uint8ClampedArray; + + CanvasPool.remove(canvas); + CanvasPool.remove(canvas2D); + + return !!ctx; + } + catch (e) + { + return false; + } + } + + return false; + }; + + Features.webGL = testWebGL(); + + Features.worker = !!window['Worker']; + + Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document; + + navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia; + + window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL; + + Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL; + + // Older versions of firefox (< 21) apparently claim support but user media does not actually work + if (Browser.firefox && Browser.firefoxVersion < 21) + { + Features.getUserMedia = false; + } + + // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it + // is safer to not try and use the fast copy-over method. + if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome)) + { + Features.canvasBitBltShift = true; + } + + // Known not to work + if (Browser.safari || Browser.mobileSafari) + { + Features.canvasBitBltShift = false; + } + + navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; + + if (navigator.vibrate) + { + Features.vibration = true; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined') + { + Features.littleEndian = checkIsLittleEndian(); + } + + Features.support32bit = ( + typeof ArrayBuffer !== 'undefined' && + typeof Uint8ClampedArray !== 'undefined' && + typeof Int32Array !== 'undefined' && + Features.littleEndian !== null && + isUint8 + ); + + return Features; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Fullscreen.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the full screen support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.fullscreen` from within any Scene. + * + * @typedef {object} Phaser.Device.Fullscreen + * @since 3.0.0 + * + * @property {boolean} available - Does the browser support the Full Screen API? + * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode? + * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it. + * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it. + */ +var Fullscreen = { + + available: false, + cancel: '', + keyboard: false, + request: '' + +}; + +/** +* Checks for support of the Full Screen API. +* +* @ignore +*/ +function init () +{ + if (typeof importScripts === 'function') + { + return Fullscreen; + } + + var i; + + var suffix1 = 'Fullscreen'; + var suffix2 = 'FullScreen'; + + var fs = [ + 'request' + suffix1, + 'request' + suffix2, + 'webkitRequest' + suffix1, + 'webkitRequest' + suffix2, + 'msRequest' + suffix1, + 'msRequest' + suffix2, + 'mozRequest' + suffix2, + 'mozRequest' + suffix1 + ]; + + for (i = 0; i < fs.length; i++) + { + if (document.documentElement[fs[i]]) + { + Fullscreen.available = true; + Fullscreen.request = fs[i]; + break; + } + } + + var cfs = [ + 'cancel' + suffix2, + 'exit' + suffix1, + 'webkitCancel' + suffix2, + 'webkitExit' + suffix1, + 'msCancel' + suffix2, + 'msExit' + suffix1, + 'mozCancel' + suffix2, + 'mozExit' + suffix1 + ]; + + if (Fullscreen.available) + { + for (i = 0; i < cfs.length; i++) + { + if (document[cfs[i]]) + { + Fullscreen.cancel = cfs[i]; + break; + } + } + } + + // Keyboard Input? + // Safari 5.1 says it supports fullscreen keyboard, but is lying. + if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\/5\.1(?:\.\d+)? Safari\//).test(navigator.userAgent)) + { + Fullscreen.keyboard = true; + } + + Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } }); + + return Fullscreen; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Input.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Input.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); + +/** + * Determines the input support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.input` from within any Scene. + * + * @typedef {object} Phaser.Device.Input + * @since 3.0.0 + * + * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll' + * @property {boolean} gamepads - Is navigator.getGamepads available? + * @property {boolean} mspointer - Is mspointer available? + * @property {boolean} touch - Is touch available? + */ +var Input = { + + gamepads: false, + mspointer: false, + touch: false, + wheelEvent: null + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Input; + } + + if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1)) + { + Input.touch = true; + } + + if (navigator.msPointerEnabled || navigator.pointerEnabled) + { + Input.mspointer = true; + } + + if (navigator.getGamepads) + { + Input.gamepads = true; + } + + // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel + if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window)) + { + // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+ + Input.wheelEvent = 'wheel'; + } + else if ('onmousewheel' in window) + { + // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7. + Input.wheelEvent = 'mousewheel'; + } + else if (Browser.firefox && 'MouseScrollEvent' in window) + { + // FF prior to 17. This should probably be scrubbed. + Input.wheelEvent = 'DOMMouseScroll'; + } + + return Input; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/OS.js": +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/OS.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the operating system of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.os` from within any Scene. + * + * @typedef {object} Phaser.Device.OS + * @since 3.0.0 + * + * @property {boolean} android - Is running on android? + * @property {boolean} chromeOS - Is running on chromeOS? + * @property {boolean} cordova - Is the game running under Apache Cordova? + * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK? + * @property {boolean} desktop - Is running on a desktop? + * @property {boolean} ejecta - Is the game running under Ejecta? + * @property {boolean} electron - Is the game running under GitHub Electron? + * @property {boolean} iOS - Is running on iOS? + * @property {boolean} iPad - Is running on iPad? + * @property {boolean} iPhone - Is running on iPhone? + * @property {boolean} kindle - Is running on an Amazon Kindle? + * @property {boolean} linux - Is running on linux? + * @property {boolean} macOS - Is running on macOS? + * @property {boolean} node - Is the game running under Node.js? + * @property {boolean} nodeWebkit - Is the game running under Node-Webkit? + * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView + * @property {boolean} windows - Is running on windows? + * @property {boolean} windowsPhone - Is running on a Windows Phone? + * @property {number} iOSVersion - If running in iOS this will contain the major version number. + * @property {number} pixelRatio - PixelRatio of the host device? + */ +var OS = { + + android: false, + chromeOS: false, + cordova: false, + crosswalk: false, + desktop: false, + ejecta: false, + electron: false, + iOS: false, + iOSVersion: 0, + iPad: false, + iPhone: false, + kindle: false, + linux: false, + macOS: false, + node: false, + nodeWebkit: false, + pixelRatio: 1, + webApp: false, + windows: false, + windowsPhone: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return OS; + } + + var ua = navigator.userAgent; + + if ((/Windows/).test(ua)) + { + OS.windows = true; + } + else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua))) + { + // Because iOS 13 identifies as Mac OS: + if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2) + { + OS.iOS = true; + OS.iPad = true; + + (navigator.appVersion).match(/Version\/(\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + } + else + { + OS.macOS = true; + } + } + else if ((/Android/).test(ua)) + { + OS.android = true; + } + else if ((/Linux/).test(ua)) + { + OS.linux = true; + } + else if ((/iP[ao]d|iPhone/i).test(ua)) + { + OS.iOS = true; + + (navigator.appVersion).match(/OS (\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + + OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1; + OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1; + } + else if ((/Kindle/).test(ua) || (/\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua)) + { + OS.kindle = true; + + // This will NOT detect early generations of Kindle Fire, I think there is no reliable way... + // E.g. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true" + } + else if ((/CrOS/).test(ua)) + { + OS.chromeOS = true; + } + + if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua)) + { + OS.android = false; + OS.iOS = false; + OS.macOS = false; + OS.windows = true; + OS.windowsPhone = true; + } + + var silk = (/Silk/).test(ua); + + if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS) + { + OS.desktop = true; + } + + // Windows Phone / Table reset + if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua)))) + { + OS.desktop = false; + } + + // WebApp mode in iOS + if (navigator.standalone) + { + OS.webApp = true; + } + + if (typeof importScripts !== 'function') + { + if (window.cordova !== undefined) + { + OS.cordova = true; + } + + if (window.ejecta !== undefined) + { + OS.ejecta = true; + } + } + + if (typeof process !== 'undefined' && process.versions && process.versions.node) + { + OS.node = true; + } + + if (OS.node && typeof process.versions === 'object') + { + OS.nodeWebkit = !!process.versions['node-webkit']; + + OS.electron = !!process.versions.electron; + } + + if ((/Crosswalk/).test(ua)) + { + OS.crosswalk = true; + } + + OS.pixelRatio = window['devicePixelRatio'] || 1; + + return OS; +} + +module.exports = init(); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/process/browser.js */ "../../../node_modules/process/browser.js"))) + +/***/ }), + +/***/ "../../../src/device/Video.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Video.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the video support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.video` from within any Scene. + * + * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix. + * + * @typedef {object} Phaser.Device.Video + * @since 3.0.0 + * + * @property {boolean} h264 - Can this device play h264 mp4 video files? + * @property {boolean} hls - Can this device play hls video files? + * @property {boolean} mp4 - Can this device play h264 mp4 video files? + * @property {boolean} m4v - Can this device play m4v (typically mp4) video files? + * @property {boolean} ogg - Can this device play ogg video files? + * @property {boolean} vp9 - Can this device play vp9 video files? + * @property {boolean} webm - Can this device play webm video files? + */ +var Video = { + + h264: false, + hls: false, + mp4: false, + m4v: false, + ogg: false, + vp9: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Video; + } + + var videoElement = document.createElement('video'); + var result = !!videoElement.canPlayType; + var no = /^no$/; + + try + { + if (result) + { + if (videoElement.canPlayType('video/ogg; codecs="theora"').replace(no, '')) + { + Video.ogg = true; + } + + if (videoElement.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(no, '')) + { + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + Video.h264 = true; + Video.mp4 = true; + } + + if (videoElement.canPlayType('video/x-m4v').replace(no, '')) + { + Video.m4v = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp8, vorbis"').replace(no, '')) + { + Video.webm = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp9"').replace(no, '')) + { + Video.vp9 = true; + } + + if (videoElement.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(no, '')) + { + Video.hls = true; + } + } + } + catch (e) + { + // Nothing to do + } + + return Video; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/index.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/index.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// This singleton is instantiated as soon as Phaser loads, +// before a Phaser.Game instance has even been created. +// Which means all instances of Phaser Games can share it, +// without having to re-poll the device all over again + +/** + * @namespace Phaser.Device + * @since 3.0.0 + */ + +/** + * @typedef {object} Phaser.DeviceConf + * + * @property {Phaser.Device.OS} os - The OS Device functions. + * @property {Phaser.Device.Browser} browser - The Browser Device functions. + * @property {Phaser.Device.Features} features - The Features Device functions. + * @property {Phaser.Device.Input} input - The Input Device functions. + * @property {Phaser.Device.Audio} audio - The Audio Device functions. + * @property {Phaser.Device.Video} video - The Video Device functions. + * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions. + * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions. + */ + +module.exports = { + + os: __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"), + browser: __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"), + features: __webpack_require__(/*! ./Features */ "../../../src/device/Features.js"), + input: __webpack_require__(/*! ./Input */ "../../../src/device/Input.js"), + audio: __webpack_require__(/*! ./Audio */ "../../../src/device/Audio.js"), + video: __webpack_require__(/*! ./Video */ "../../../src/device/Video.js"), + fullscreen: __webpack_require__(/*! ./Fullscreen */ "../../../src/device/Fullscreen.js"), + canvasFeatures: __webpack_require__(/*! ./CanvasFeatures */ "../../../src/device/CanvasFeatures.js") + +}; + + +/***/ }), + +/***/ "../../../src/display/canvas/CanvasPool.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(/*! ../../const */ "../../../src/const.js"); +var Smoothing = __webpack_require__(/*! ./Smoothing */ "../../../src/display/canvas/Smoothing.js"); + +// The pool into which the canvas elements are placed. +var pool = []; + +// Automatically apply smoothing(false) to created Canvas elements +var _disableContextSmoothing = false; + +/** + * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements. + * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, + * which is useless for some of the Phaser pipelines / renderer. + * + * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created. + * Which means all instances of Phaser Games on the same page can share the one single pool. + * + * @namespace Phaser.Display.Canvas.CanvasPool + * @since 3.0.0 + */ +var CanvasPool = function () +{ + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent? + * + * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool + */ + var create = function (parent, width, height, canvasType, selfParent) + { + if (width === undefined) { width = 1; } + if (height === undefined) { height = 1; } + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + if (selfParent === undefined) { selfParent = false; } + + var canvas; + var container = first(canvasType); + + if (container === null) + { + container = { + parent: parent, + canvas: document.createElement('canvas'), + type: canvasType + }; + + if (canvasType === CONST.CANVAS) + { + pool.push(container); + } + + canvas = container.canvas; + } + else + { + container.parent = parent; + + canvas = container.canvas; + } + + if (selfParent) + { + container.parent = canvas; + } + + canvas.width = width; + canvas.height = height; + + if (_disableContextSmoothing && canvasType === CONST.CANVAS) + { + Smoothing.disable(canvas.getContext('2d')); + } + + return canvas; + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create2D + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created canvas. + */ + var create2D = function (parent, width, height) + { + return create(parent, width, height, CONST.CANVAS); + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.createWebGL + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created WebGL canvas. + */ + var createWebGL = function (parent, width, height) + { + return create(parent, width, height, CONST.WEBGL); + }; + + /** + * Gets the first free canvas index from the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.first + * @since 3.0.0 + * + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * + * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases. + */ + var first = function (canvasType) + { + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + + if (canvasType === CONST.WEBGL) + { + return null; + } + + for (var i = 0; i < pool.length; i++) + { + var container = pool[i]; + + if (!container.parent && container.type === canvasType) + { + return container; + } + } + + return null; + }; + + /** + * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use. + * The canvas has its width and height set to 1, and its parent attribute nulled. + * + * @function Phaser.Display.Canvas.CanvasPool.remove + * @since 3.0.0 + * + * @param {*} parent - The canvas or the parent of the canvas to free. + */ + var remove = function (parent) + { + // Check to see if the parent is a canvas object + var isCanvas = parent instanceof HTMLCanvasElement; + + pool.forEach(function (container) + { + if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent)) + { + container.parent = null; + container.canvas.width = 1; + container.canvas.height = 1; + } + }); + }; + + /** + * Gets the total number of used canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.total + * @since 3.0.0 + * + * @return {number} The number of used canvases. + */ + var total = function () + { + var c = 0; + + pool.forEach(function (container) + { + if (container.parent) + { + c++; + } + }); + + return c; + }; + + /** + * Gets the total number of free canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.free + * @since 3.0.0 + * + * @return {number} The number of free canvases. + */ + var free = function () + { + return pool.length - total(); + }; + + /** + * Disable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing + * @since 3.0.0 + */ + var disableSmoothing = function () + { + _disableContextSmoothing = true; + }; + + /** + * Enable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing + * @since 3.0.0 + */ + var enableSmoothing = function () + { + _disableContextSmoothing = false; + }; + + return { + create2D: create2D, + create: create, + createWebGL: createWebGL, + disableSmoothing: disableSmoothing, + enableSmoothing: enableSmoothing, + first: first, + free: free, + pool: pool, + remove: remove, + total: total + }; +}; + +// If we export the called function here, it'll only be invoked once (not every time it's required). +module.exports = CanvasPool(); + + +/***/ }), + +/***/ "../../../src/display/canvas/Smoothing.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Browser specific prefix, so not going to change between contexts, only between browsers +var prefix = ''; + +/** + * @namespace Phaser.Display.Canvas.Smoothing + * @since 3.0.0 + */ +var Smoothing = function () +{ + /** + * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set. + * + * @function Phaser.Display.Canvas.Smoothing.getPrefix + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check. + * + * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported. + */ + var getPrefix = function (context) + { + var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ]; + + for (var i = 0; i < vendors.length; i++) + { + var s = vendors[i] + 'mageSmoothingEnabled'; + + if (s in context) + { + return s; + } + } + + return null; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.enable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var enable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = true; + } + + return context; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.disable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var disable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = false; + } + + return context; + }; + + /** + * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`. + * Returns null if no smoothing prefix is available. + * + * @function Phaser.Display.Canvas.Smoothing.isEnabled + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check. + * + * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported. + */ + var isEnabled = function (context) + { + return (prefix !== null) ? context[prefix] : null; + }; + + return { + disable: disable, + enable: enable, + getPrefix: getPrefix, + isEnabled: isEnabled + }; + +}; + +module.exports = Smoothing(); + + +/***/ }), + +/***/ "../../../src/display/mask/BitmapMask.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); -var GameEvents = __webpack_require__(/*! ../../core/events */ "../../../src/core/events/index.js"); -var RenderEvents = __webpack_require__(/*! ../../renderer/events */ "../../../src/renderer/events/index.js"); +var GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ "../../../src/gameobjects/GameObjectFactory.js"); /** * @classdesc @@ -1861,7 +3257,7 @@ var RenderEvents = __webpack_require__(/*! ../../renderer/events */ "../../../sr * 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). + * A Bitmap Mask can use any Game Object or Dynamic Texture 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. @@ -1890,87 +3286,38 @@ var RenderEvents = __webpack_require__(/*! ../../renderer/events */ "../../../sr * @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. + * @param {Phaser.Scene} scene - The Scene to which this mask is being added. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. */ var BitmapMask = new Class({ initialize: - function BitmapMask (scene, renderable) + function BitmapMask (scene, maskObject, x, y, texture, frame) { - var renderer = scene.sys.renderer; + if (!maskObject) + { + maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false }); + } /** - * 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. + * The Game Object that is used as the mask. Must use a texture, such as a Sprite. * * @name Phaser.Display.Masks.BitmapMask#bitmapMask - * @type {Phaser.GameObjects.GameObject} + * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} * @since 3.0.0 */ - this.bitmapMask = renderable; - - /** - * The texture used for the masks 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; + this.bitmapMask = maskObject; /** * 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 @@ -1980,7 +3327,7 @@ var BitmapMask = new Class({ this.invertAlpha = false; /** - * Is this mask a stencil mask? + * Is this mask a stencil mask? This is false by default and should not be changed. * * @name Phaser.Display.Masks.BitmapMask#isStencil * @type {boolean} @@ -1988,92 +3335,23 @@ var BitmapMask = new Class({ * @since 3.17.0 */ this.isStencil = false; - - this.createMask(); - - scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (renderer) - { - renderer.on(RenderEvents.RESIZE, this.createMask, this); - } }, /** - * Creates the WebGL Texture2D objects and Framebuffers required for this - * mask. If this mask has already been created, then `clearMask` is called first. + * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use. * - * @method Phaser.Display.Masks.BitmapMask#createMask - * @since 3.50.0 - */ - createMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl) - { - return; - } - - if (this.mainTexture) - { - this.clearMask(); - } - - 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); - }, - - /** - * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes - * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references. + * If a Game Object it must have a texture, such as a Sprite. * - * This is called when this mask is destroyed, or if you try to creat a new - * mask from this object when one is already set. - * - * @method Phaser.Display.Masks.BitmapMask#clearMask - * @since 3.50.0 - */ - clearMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl || !this.mainTexture) - { - return; - } - - 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; - }, - - /** - * Sets a new masking Game Object for the Bitmap Mask. + * You can update the source of the mask as often as you like. * * @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. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite. */ - setBitmap: function (renderable) + setBitmap: function (maskObject) { - this.bitmapMask = renderable; + this.bitmapMask = maskObject; }, /** @@ -2102,10 +3380,12 @@ var BitmapMask = new Class({ * @since 3.0.0 * * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget. */ - postRenderWebGL: function (renderer, camera) + postRenderWebGL: function (renderer, camera, renderTarget) { - renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget); }, /** @@ -2147,35 +3427,71 @@ var BitmapMask = new Class({ */ destroy: function () { - this.clearMask(); - - if (this.renderer) - { - this.renderer.off(RenderEvents.RESIZE, this.createMask, this); - } - this.bitmapMask = null; - this.prevFramebuffer = null; - this.renderer = null; } }); +/** + * 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, or Dynamic Texture, 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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. + * + * @method Phaser.GameObjects.GameObjectFactory#bitmapMask + * @since 3.60.0 + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + * + * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created. + */ +GameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame) +{ + return new BitmapMask(this.scene, maskObject, x, y, key, frame); +}); + module.exports = BitmapMask; /***/ }), /***/ "../../../src/display/mask/GeometryMask.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/display/mask/GeometryMask.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2492,15 +3808,15 @@ module.exports = GeometryMask; /***/ }), /***/ "../../../src/gameobjects/BuildGameObject.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2625,15 +3941,15 @@ module.exports = BuildGameObject; /***/ }), /***/ "../../../src/gameobjects/GameObject.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/GameObject.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2967,6 +4283,9 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#setData * @since 3.0.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @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. * @@ -2997,6 +4316,9 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#incData * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to increase the value for. * @param {*} [data] - The value to increase for the given key. * @@ -3027,6 +4349,9 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#toggleData * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to toggle the value for. * * @return {this} This GameObject. @@ -3137,10 +4462,7 @@ var GameObject = new Class({ */ disableInteractive: function () { - if (this.input) - { - this.input.enabled = false; - } + this.scene.sys.input.disable(this); return this; }, @@ -3247,7 +4569,9 @@ var GameObject = new Class({ */ willRender: function (camera) { - return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); + var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; + + return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); }, /** @@ -3397,7 +4721,7 @@ var GameObject = new Class({ { var displayList = this.displayList || this.scene.sys.displayList; - if (displayList.exists(this)) + if (displayList && displayList.exists(this)) { displayList.remove(this, true); @@ -3454,8 +4778,10 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#destroy * @fires Phaser.GameObjects.Events#DESTROY * @since 3.0.0 + * + * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not. */ - destroy: function () + destroy: function (fromScene) { // This Game Object has already been destroyed if (!this.scene || this.ignoreDestroy) @@ -3463,12 +4789,14 @@ var GameObject = new Class({ return; } + if (fromScene === undefined) { fromScene = false; } + if (this.preDestroy) { this.preDestroy.call(this); } - this.emit(Events.DESTROY, this); + this.emit(Events.DESTROY, this, fromScene); this.removeAllListeners(); @@ -3524,16 +4852,254 @@ module.exports = GameObject; /***/ }), -/***/ "../../../src/gameobjects/components/Alpha.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Alpha.js ***! - \**************************************************************/ +/***/ "../../../src/gameobjects/GameObjectFactory.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "../../../src/plugins/PluginCache.js"); +var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene/events/index.js"); + +/** + * @classdesc + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. + * + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. + * + * @class GameObjectFactory + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. + */ +var GameObjectFactory = new Class({ + + initialize: + + function GameObjectFactory (scene) + { + /** + * The Scene to which this Game Object Factory belongs. + * + * @name Phaser.GameObjects.GameObjectFactory#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + + /** + * A reference to the Scene.Systems. + * + * @name Phaser.GameObjects.GameObjectFactory#systems + * @type {Phaser.Scenes.Systems} + * @protected + * @since 3.0.0 + */ + 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. + * + * @name Phaser.GameObjects.GameObjectFactory#displayList + * @type {Phaser.GameObjects.DisplayList} + * @protected + * @since 3.0.0 + */ + this.displayList; + + /** + * A reference to the Scene Update List. + * + * @name Phaser.GameObjects.GameObjectFactory#updateList + * @type {Phaser.GameObjects.UpdateList} + * @protected + * @since 3.0.0 + */ + this.updateList; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); + }, + + /** + * This method is called automatically, only once, when the Scene is first created. + * Do not invoke it directly. + * + * @method Phaser.GameObjects.GameObjectFactory#boot + * @private + * @since 3.5.1 + */ + boot: function () + { + this.displayList = this.systems.displayList; + this.updateList = this.systems.updateList; + + this.events.once(SceneEvents.DESTROY, this.destroy, this); + }, + + /** + * This method is called automatically by the Scene when it is starting up. + * It is responsible for creating local systems, properties and listening for Scene events. + * Do not invoke it directly. + * + * @method Phaser.GameObjects.GameObjectFactory#start + * @private + * @since 3.5.0 + */ + start: function () + { + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * Adds an existing Game Object to this Scene. + * + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * + * @method Phaser.GameObjects.GameObjectFactory#existing + * @since 3.0.0 + * + * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was added. + */ + existing: function (child) + { + if (child.renderCanvas || child.renderWebGL) + { + this.displayList.add(child); + } + + // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event: + // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway. + if (child.preUpdate) + { + this.updateList.add(child); + } + + return child; + }, + + /** + * 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.GameObjectFactory#shutdown + * @private + * @since 3.0.0 + */ + shutdown: function () + { + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + * + * @method Phaser.GameObjects.GameObjectFactory#destroy + * @private + * @since 3.0.0 + */ + destroy: function () + { + this.shutdown(); + + this.events.off(SceneEvents.START, this.start, this); + + this.scene = null; + this.systems = null; + this.events = null; + + this.displayList = null; + this.updateList = null; + } + +}); + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ +GameObjectFactory.register = function (factoryType, factoryFunction) +{ + if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + GameObjectFactory.prototype[factoryType] = factoryFunction; + } +}; + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ +GameObjectFactory.remove = function (factoryType) +{ + if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + delete GameObjectFactory.prototype[factoryType]; + } +}; + +PluginCache.register('GameObjectFactory', GameObjectFactory, 'add'); + +module.exports = GameObjectFactory; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Alpha.js": +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3825,15 +5391,15 @@ module.exports = Alpha; /***/ }), /***/ "../../../src/gameobjects/components/AlphaSingle.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/AlphaSingle.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3940,15 +5506,15 @@ module.exports = AlphaSingle; /***/ }), /***/ "../../../src/gameobjects/components/BlendMode.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/BlendMode.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3966,7 +5532,7 @@ var BlendMode = { /** * Private internal value. Holds the current blend mode. - * + * * @name Phaser.GameObjects.Components.BlendMode#_blendMode * @type {number} * @private @@ -3982,6 +5548,7 @@ var BlendMode = { * * Under WebGL only the following Blend Modes are available: * + * * NORMAL * * ADD * * MULTIPLY * * SCREEN @@ -3997,7 +5564,7 @@ var BlendMode = { * are used. * * @name Phaser.GameObjects.Components.BlendMode#blendMode - * @type {(Phaser.BlendModes|string)} + * @type {(Phaser.BlendModes|string|number)} * @since 3.0.0 */ blendMode: { @@ -4031,6 +5598,7 @@ var BlendMode = { * * Under WebGL only the following Blend Modes are available: * + * * NORMAL * * ADD * * MULTIPLY * * SCREEN @@ -4048,7 +5616,7 @@ var BlendMode = { * @method Phaser.GameObjects.Components.BlendMode#setBlendMode * @since 3.0.0 * - * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST. + * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number. * * @return {this} This Game Object instance. */ @@ -4067,22 +5635,22 @@ module.exports = BlendMode; /***/ }), /***/ "../../../src/gameobjects/components/ComputedSize.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 */ @@ -4091,11 +5659,11 @@ 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 @@ -4104,11 +5672,11 @@ var ComputedSize = { /** * 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 @@ -4117,11 +5685,11 @@ var ComputedSize = { /** * 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 @@ -4142,11 +5710,11 @@ var ComputedSize = { /** * 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 @@ -4167,21 +5735,21 @@ var ComputedSize = { /** * 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) @@ -4194,15 +5762,15 @@ var ComputedSize = { /** * 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) @@ -4221,15 +5789,15 @@ module.exports = ComputedSize; /***/ }), /***/ "../../../src/gameobjects/components/Crop.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Crop.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4273,24 +5841,24 @@ var Crop = { /** * 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. * @@ -4335,7 +5903,7 @@ var Crop = { * @method Phaser.GameObjects.Components.Crop#resetCropObject * @private * @since 3.12.0 - * + * * @return {object} The crop object. */ resetCropObject: function () @@ -4351,15 +5919,15 @@ module.exports = Crop; /***/ }), /***/ "../../../src/gameobjects/components/Depth.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Depth.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4385,7 +5953,7 @@ var Depth = { _depth: 0, /** - * The depth of this Game Object within the Scene. + * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type. * * 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. @@ -4432,7 +6000,7 @@ var Depth = { * @method Phaser.GameObjects.Components.Depth#setDepth * @since 3.0.0 * - * @param {number} value - The depth of this Game Object. + * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type. * * @return {this} This Game Object instance. */ @@ -4452,23 +6020,130 @@ module.exports = Depth; /***/ }), -/***/ "../../../src/gameobjects/components/Flip.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Flip.js ***! - \*************************************************************/ +/***/ "../../../src/gameobjects/components/FX.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the FX values of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.FX + * @webglOnly + * @since 3.60.0 + */ + +var FX = { + + /** + * The amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @name Phaser.GameObjects.Components.FX#fxPadding + * @type {number} + * @default 0 + * @since 3.60.0 + */ + fxPadding: 0, + + /** + * Sets the amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @method Phaser.GameObjects.Components.FX#setFXPadding + * @webglOnly + * @since 3.60.0 + * + * @param {number} [padding=0] - The amount of padding to add to the texture. + * + * @return {this} This Game Object instance. + */ + setFXPadding: function (padding) + { + if (padding === undefined) { padding = 0; } + + this.fxPadding = padding; + + return this; + }, + + /** + * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `copySprite` method. + * + * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFXCopy + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFXCopy: function () + { + }, + + /** + * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `drawSprite` method. + * + * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFX + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFX: function () + { + } + +}; + +module.exports = FX; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Flip.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 */ @@ -4477,11 +6152,11 @@ 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 @@ -4491,11 +6166,11 @@ var Flip = { /** * 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 @@ -4505,14 +6180,14 @@ var Flip = { /** * 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 () @@ -4524,10 +6199,10 @@ var Flip = { /** * 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 () @@ -4539,16 +6214,16 @@ var Flip = { /** * 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) @@ -4560,12 +6235,12 @@ var Flip = { /** * 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) @@ -4577,17 +6252,17 @@ var Flip = { /** * 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) @@ -4600,7 +6275,7 @@ var Flip = { /** * 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 * @@ -4622,15 +6297,15 @@ module.exports = Flip; /***/ }), /***/ "../../../src/gameobjects/components/GetBounds.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/GetBounds.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4917,7 +6592,7 @@ var GetBounds = { var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy; - // Instead of doing a check if parent container is + // Instead of doing a check if parent container is // defined per corner we only do it once. if (this.parentContainer) { @@ -4986,15 +6661,15 @@ module.exports = GetBounds; /***/ }), /***/ "../../../src/gameobjects/components/Mask.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Mask.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5073,7 +6748,7 @@ var Mask = { /** * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, - * including this one. + * including this one, or a Dynamic Texture. * * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. * @@ -5083,24 +6758,32 @@ var Mask = { * * 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. + * a Bitmap Mask from any renderable texture-based 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. + * @generic {Phaser.GameObjects.GameObject} G + * @generic {Phaser.Textures.DynamicTexture} T + * @genericUse {(G|T|null)} [maskObject] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. * * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. */ - createBitmapMask: function (renderable) + createBitmapMask: function (maskObject, x, y, texture, frame) { - if (renderable === undefined && (this.texture || this.shader)) + if (maskObject === undefined && (this.texture || this.shader || this.geom)) { // eslint-disable-next-line consistent-this - renderable = this; + maskObject = this; } - return new BitmapMask(this.scene, renderable); + return new BitmapMask(this.scene, maskObject, x, y, texture, frame); }, /** @@ -5117,13 +6800,17 @@ var Mask = { * @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. + * @generic {Phaser.GameObjects.Graphics} G + * @generic {Phaser.GameObjects.Shape} S + * @genericUse {(G|S)} [graphics] + * + * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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') + if (graphics === undefined && (this.type === 'Graphics' || this.geom)) { // eslint-disable-next-line consistent-this graphics = this; @@ -5140,15 +6827,15 @@ module.exports = Mask; /***/ }), /***/ "../../../src/gameobjects/components/Origin.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Origin.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5348,15 +7035,15 @@ module.exports = Origin; /***/ }), /***/ "../../../src/gameobjects/components/PathFollower.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/PathFollower.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5586,7 +7273,7 @@ var PathFollower = { 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; + tweenData.setTargetValue(); }; } @@ -5607,6 +7294,8 @@ var PathFollower = { this.pathDelta.reset(); + config.persist = true; + this.pathTween = this.scene.sys.tweens.addCounter(config); // The starting point of the path, relative to this follower @@ -5723,7 +7412,7 @@ var PathFollower = { if (tweenData.state === TWEEN_CONST.COMPLETE) { - this.path.getPoint(1, pathVector); + this.path.getPoint(tweenData.end, pathVector); pathDelta.add(pathVector); pathVector.add(this.pathOffset); @@ -5780,20 +7469,19 @@ module.exports = PathFollower; /***/ }), /***/ "../../../src/gameobjects/components/Pipeline.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Pipeline.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var DeepCopy = __webpack_require__(/*! ../../utils/object/DeepCopy */ "../../../src/utils/object/DeepCopy.js"); -var PIPELINE_CONST = __webpack_require__(/*! ../../renderer/webgl/pipelines/const */ "../../../src/renderer/webgl/pipelines/const.js"); var SpliceOne = __webpack_require__(/*! ../../utils/array/SpliceOne */ "../../../src/utils/array/SpliceOne.js"); /** @@ -5848,7 +7536,7 @@ var Pipeline = { * If you modify this array directly, be sure to set the * `hasPostPipeline` property accordingly. * - * @name Phaser.GameObjects.Components.Pipeline#postPipeline + * @name Phaser.GameObjects.Components.Pipeline#postPipelines * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} * @webglOnly * @since 3.50.0 @@ -5874,14 +7562,12 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ initPipeline: function (pipeline) { - if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; } - var renderer = this.scene.sys.renderer; if (!renderer) @@ -5896,6 +7582,11 @@ var Pipeline = { if (pipelines) { + if (pipeline === undefined) + { + pipeline = pipelines.default; + } + var instance = pipelines.get(pipeline); if (instance) @@ -5970,7 +7661,7 @@ var Pipeline = { * If you call this method multiple times, the new pipelines will be appended to any existing * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. * - * You can optionally also sets the `pipelineData` property, if the parameter is given. + * You can optionally also set the `pipelineData` property, if the parameter is given. * * Both the pipeline and post pipelines share the pipeline data object together. * @@ -6070,6 +7761,8 @@ var Pipeline = { */ getPostPipeline: function (pipeline) { + var isString = (typeof pipeline === 'string'); + var pipelines = this.postPipelines; var results = []; @@ -6078,7 +7771,7 @@ var Pipeline = { { var instance = pipelines[i]; - if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline) + if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline)) { results.push(instance); } @@ -6208,15 +7901,15 @@ module.exports = Pipeline; /***/ }), /***/ "../../../src/gameobjects/components/ScrollFactor.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6240,7 +7933,7 @@ var ScrollFactor = { * 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 @@ -6264,7 +7957,7 @@ var ScrollFactor = { * 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 @@ -6288,7 +7981,7 @@ var ScrollFactor = { * 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 @@ -6320,21 +8013,21 @@ module.exports = ScrollFactor; /***/ }), /***/ "../../../src/gameobjects/components/Size.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Size.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 */ @@ -6343,7 +8036,7 @@ var Size = { /** * A property indicating that a Game Object has this component. - * + * * @name Phaser.GameObjects.Components.Size#_sizeComponent * @type {boolean} * @private @@ -6354,11 +8047,11 @@ var Size = { /** * 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 @@ -6367,11 +8060,11 @@ var Size = { /** * 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 @@ -6380,11 +8073,11 @@ var Size = { /** * 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 @@ -6405,11 +8098,11 @@ var Size = { /** * 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 @@ -6430,20 +8123,20 @@ var Size = { /** * 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) @@ -6453,26 +8146,34 @@ var Size = { this.width = frame.realWidth; this.height = frame.realHeight; + var input = this.input; + + if (input && !input.customHitArea) + { + input.hitArea.width = this.width; + input.hitArea.height = this.height; + } + 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) @@ -6485,15 +8186,15 @@ var Size = { /** * 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) @@ -6512,18 +8213,20 @@ module.exports = Size; /***/ }), /***/ "../../../src/gameobjects/components/Texture.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Texture.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js ***! + \**************************************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Frame = __webpack_require__(/*! ../../textures/Frame */ "../../../src/textures/Frame.js"); + // bitmask flag for GameObject.renderMask var _FLAG = 8; // 1000 @@ -6587,17 +8290,19 @@ var Texture = { /** * Sets the frame this Game Object will use to render with. * - * The Frame has to belong to the current Texture being used. + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. * - * It can be either a string or an index. + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. * * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. * * @method Phaser.GameObjects.Components.Texture#setFrame * @since 3.0.0 * - * @param {(string|number)} frame - The name or index of the frame within the Texture. + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. * @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? * @@ -6608,7 +8313,16 @@ var Texture = { if (updateSize === undefined) { updateSize = true; } if (updateOrigin === undefined) { updateOrigin = true; } - this.frame = this.texture.get(frame); + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + this.frame = this.texture.get(frame); + } if (!this.frame.cutWidth || !this.frame.cutHeight) { @@ -6647,18 +8361,20 @@ module.exports = Texture; /***/ }), /***/ "../../../src/gameobjects/components/TextureCrop.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/TextureCrop.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js ***! + \******************************************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Frame = __webpack_require__(/*! ../../textures/Frame */ "../../../src/textures/Frame.js"); + // bitmask flag for GameObject.renderMask var _FLAG = 8; // 1000 @@ -6781,17 +8497,19 @@ var TextureCrop = { /** * Sets the frame this Game Object will use to render with. * - * The Frame has to belong to the current Texture being used. + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. * - * It can be either a string or an index. + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. * * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. * * @method Phaser.GameObjects.Components.TextureCrop#setFrame * @since 3.0.0 * - * @param {(string|number)} frame - The name or index of the frame within the Texture. + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. * @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? * @@ -6802,7 +8520,16 @@ var TextureCrop = { if (updateSize === undefined) { updateSize = true; } if (updateOrigin === undefined) { updateOrigin = true; } - this.frame = this.texture.get(frame); + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + this.frame = this.texture.get(frame); + } if (!this.frame.cutWidth || !this.frame.cutHeight) { @@ -6860,15 +8587,15 @@ module.exports = TextureCrop; /***/ }), /***/ "../../../src/gameobjects/components/Tint.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Tint.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7102,15 +8829,15 @@ module.exports = Tint; /***/ }), /***/ "../../../src/gameobjects/components/ToJSON.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7168,15 +8895,15 @@ module.exports = ToJSON; /***/ }), /***/ "../../../src/gameobjects/components/Transform.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Transform.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7199,6 +8926,17 @@ var _FLAG = 4; // 0100 var Transform = { + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Transform#hasTransformComponent + * @type {boolean} + * @readonly + * @default true + * @since 3.60.0 + */ + hasTransformComponent: true, + /** * Private internal value. Holds the horizontal scale value. * @@ -7784,15 +9522,15 @@ module.exports = Transform; /***/ }), /***/ "../../../src/gameobjects/components/TransformMatrix.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7860,6 +9598,15 @@ var TransformMatrix = new Class({ scaleY: 1, rotation: 0 }; + + /** + * The temporary quad value cache. + * + * @name Phaser.GameObjects.Components.TransformMatrix#quad + * @type {Float32Array} + * @since 3.60.0 + */ + this.quad = new Float32Array(8); }, /** @@ -8251,14 +9998,14 @@ var TransformMatrix = new Class({ var sourceE = source[4]; var sourceF = source[5]; - var destinationMatrix = (out === undefined) ? this : out; + var destinationMatrix = (out === undefined) ? matrix : out.matrix; - 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; + destinationMatrix[0] = (sourceA * localA) + (sourceB * localC); + destinationMatrix[1] = (sourceA * localB) + (sourceB * localD); + destinationMatrix[2] = (sourceC * localA) + (sourceD * localC); + destinationMatrix[3] = (sourceC * localB) + (sourceD * localD); + destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF; return destinationMatrix; }, @@ -8347,16 +10094,16 @@ var TransformMatrix = new Class({ }, /** - * Transform a point using this Matrix. + * Transform a point in to the local space of 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. + * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. * - * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. + * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates. */ transformPoint: function (x, y, point) { @@ -8688,6 +10435,61 @@ var TransformMatrix = new Class({ return output; }, + /** + * Performs the 8 calculations required to create the vertices of + * a quad based on this matrix and the given x/y/xw/yh values. + * + * The result is stored in `TransformMatrix.quad`, which is returned + * from this method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setQuad + * @since 3.60.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} xw - The xw value. + * @param {number} yh - The yh value. + * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. + * + * @return {Float32Array} The quad Float32Array. + */ + setQuad: function (x, y, xw, yh, roundPixels, quad) + { + if (quad === undefined) { quad = this.quad; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var e = matrix[4]; + var f = matrix[5]; + + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; + + if (roundPixels) + { + quad.forEach(function (value, index) + { + quad[index] = Math.round(value); + }); + } + + return quad; + }, + /** * Returns the X component of this matrix multiplied by the given values. * This is the same as `x * a + y * c + e`. @@ -8798,6 +10600,7 @@ var TransformMatrix = new Class({ destroy: function () { this.matrix = null; + this.quad = null; this.decomposedMatrix = null; } @@ -8809,15 +10612,15 @@ module.exports = TransformMatrix; /***/ }), /***/ "../../../src/gameobjects/components/Visible.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Visible.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8827,7 +10630,7 @@ 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 */ @@ -8836,7 +10639,7 @@ var Visible = { /** * Private internal value. Holds the visible value. - * + * * @name Phaser.GameObjects.Components.Visible#_visible * @type {boolean} * @private @@ -8847,9 +10650,9 @@ var Visible = { /** * 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 @@ -8879,14 +10682,14 @@ var Visible = { /** * 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) @@ -8903,15 +10706,15 @@ module.exports = Visible; /***/ }), /***/ "../../../src/gameobjects/components/index.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/index.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8928,6 +10731,7 @@ module.exports = { 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"), + FX: __webpack_require__(/*! ./FX */ "../../../src/gameobjects/components/FX.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"), @@ -8949,16 +10753,16 @@ module.exports = { /***/ }), /***/ "../../../src/gameobjects/container/Container.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/Container.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8983,7 +10787,7 @@ var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/V * * 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 + * The transform point 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. * @@ -9401,18 +11205,16 @@ var Container = new Class({ if (this.exclusive) { - gameObject.removeFromDisplayList(); - if (gameObject.parentContainer) { gameObject.parentContainer.remove(gameObject); } - var displayList = this.displayList || this.scene.sys.displayList; - - gameObject.addToDisplayList(displayList); - gameObject.parentContainer = this; + + gameObject.removeFromDisplayList(); + + gameObject.addedToScene(); } }, @@ -9427,14 +11229,14 @@ var Container = new Class({ */ removeHandler: function (gameObject) { - gameObject.off(Events.DESTROY, this.remove); + gameObject.off(Events.DESTROY, this.remove, this); if (this.exclusive) { - gameObject.removeFromDisplayList(); - gameObject.parentContainer = null; + gameObject.removedFromScene(); + gameObject.addToDisplayList(); } }, @@ -9446,10 +11248,10 @@ var Container = new Class({ * @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. + * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed. + * @param {Phaser.Types.Math.Vector2Like} [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. + * @return {Phaser.Types.Math.Vector2Like} The transformed point. */ pointToContainer: function (source, output) { @@ -9461,7 +11263,8 @@ var Container = new Class({ } else { - output = new Vector2(source.x, source.y); + output.x = source.x; + output.y = source.y; } var tempMatrix = this.tempTransformMatrix; @@ -9499,6 +11302,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#add * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. @@ -9520,6 +11326,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#addAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * @param {number} [index=0] - The position to insert the Game Object/s at. * @@ -9538,6 +11347,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} 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. @@ -9553,6 +11365,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getIndex * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. * * @return {number} The index of the Game Object in this Container, or -1 if not found. @@ -9601,6 +11416,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getByName * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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. @@ -9616,6 +11434,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getRandom * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} [startIndex=0] - An optional start index. * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from. * @@ -9639,6 +11460,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getFirst * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -9669,6 +11493,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAll * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T[]} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -9711,6 +11538,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#swap * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. * @@ -9734,6 +11564,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveTo * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. * @param {number} index - The new position of the Game Object in this Container. * @@ -9746,6 +11579,52 @@ var Container = new Class({ return this; }, + /** + * Moves a Game Object above another one within this Container. + * + * These 2 Game Objects must already be children of this Container. + * + * @method Phaser.GameObjects.Container#moveAbove + * @since 3.55.0 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * + * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object. + * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. + * + * @return {this} This Container instance. + */ + moveAbove: function (child1, child2) + { + ArrayUtils.MoveAbove(this.list, child1, child2); + + return this; + }, + + /** + * Moves a Game Object below another one within this Container. + * + * These 2 Game Objects must already be children of this Container. + * + * @method Phaser.GameObjects.Container#moveBelow + * @since 3.55.0 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * + * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object. + * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. + * + * @return {this} This Container instance. + */ + moveBelow: function (child1, child2) + { + ArrayUtils.MoveBelow(this.list, child1, child2); + + return this; + }, + /** * Removes the given Game Object, or array of Game Objects, from this Container. * @@ -9756,6 +11635,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#remove * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. * @@ -9849,14 +11731,25 @@ var Container = new Class({ */ removeAll: function (destroyChild) { - var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + var list = this.list; if (destroyChild) { - for (var i = 0; i < removed.length; i++) + for (var i = 0; i < list.length; i++) { - removed[i].destroy(); + if (list[i] && list[i].scene) + { + list[i].off(Events.DESTROY, this.remove, this); + + list[i].destroy(); + } } + + this.list = []; + } + else + { + ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this); } return this; @@ -9869,6 +11762,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#bringToTop * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. * * @return {this} This Container instance. @@ -9887,6 +11783,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#sendToBack * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. * * @return {this} This Container instance. @@ -9904,6 +11803,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveUp * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -9921,6 +11823,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveDown * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -9969,6 +11874,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#replace * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [oldChild,newChild] + * * @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. @@ -10001,6 +11909,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#exists * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @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. @@ -10314,16 +12225,16 @@ module.exports = Container; /***/ }), /***/ "../../../src/gameobjects/container/ContainerCanvasRenderer.js": -/*!*******************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! - \*******************************************************************************/ +/*!*****************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10343,6 +12254,8 @@ module.exports = Container; */ var ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix) { + camera.addToRenderList(container); + var children = container.list; if (children.length === 0) @@ -10350,8 +12263,6 @@ var ContainerCanvasRenderer = function (renderer, container, camera, parentMatri return; } - camera.addToRenderList(container); - var transformMatrix = container.localTransform; if (parentMatrix) @@ -10427,21 +12338,22 @@ module.exports = ContainerCanvasRenderer; /***/ }), /***/ "../../../src/gameobjects/container/ContainerRender.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerRender.js ***! - \***********************************************************************/ +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 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"); +var NOOP = __webpack_require__(/*! ../../utils/NOOP */ "../../../src/utils/NOOP.js"); +var renderWebGL = NOOP; +var renderCanvas = NOOP; if (false) {} @@ -10462,15 +12374,15 @@ module.exports = { /***/ }), /***/ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! - \*************************************************************************/ +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! + \***********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10482,6 +12394,7 @@ module.exports = { * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. * * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @type {string} * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. @@ -10493,29 +12406,31 @@ module.exports = 'addedtoscene'; /***/ }), /***/ "../../../src/gameobjects/events/DESTROY_EVENT.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. + * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. */ module.exports = 'destroy'; @@ -10523,15 +12438,15 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js": -/*!*****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! - \*****************************************************************************/ +/*!***************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! + \***************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10543,6 +12458,7 @@ module.exports = 'destroy'; * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. * * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @type {string} * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. @@ -10554,35 +12470,36 @@ module.exports = 'removedfromscene'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! - \*************************************************************************/ +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! + \***********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback. */ module.exports = 'complete'; @@ -10591,30 +12508,31 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. * @param {number} width - The width of the video. * @param {number} height - The height of the video. @@ -10625,28 +12543,29 @@ module.exports = 'created'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js": -/*!**********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! - \**********************************************************************/ +/*!********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! + \********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @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. */ @@ -10656,35 +12575,36 @@ module.exports = 'error'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped. */ module.exports = 'loop'; @@ -10693,31 +12613,32 @@ module.exports = 'loop'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback. */ module.exports = 'play'; @@ -10726,28 +12647,29 @@ module.exports = 'play'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! - \***********************************************************************/ +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! + \*********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking. */ module.exports = 'seeked'; @@ -10756,29 +12678,30 @@ module.exports = 'seeked'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking. */ module.exports = 'seeking'; @@ -10787,29 +12710,30 @@ module.exports = 'seeking'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_STOP_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback. */ module.exports = 'stop'; @@ -10818,29 +12742,30 @@ module.exports = 'stop'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out. */ module.exports = 'timeout'; @@ -10849,29 +12774,30 @@ module.exports = 'timeout'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! - \*************************************************************************/ +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! + \***********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. */ module.exports = 'unlocked'; @@ -10880,15 +12806,15 @@ module.exports = 'unlocked'; /***/ }), /***/ "../../../src/gameobjects/events/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10918,15 +12844,15 @@ module.exports = { /***/ }), /***/ "../../../src/geom/const.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/geom/const.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/const.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10934,7 +12860,7 @@ var GEOM_CONST = { /** * A Circle Geometry object type. - * + * * @name Phaser.Geom.CIRCLE * @type {number} * @since 3.19.0 @@ -10943,7 +12869,7 @@ var GEOM_CONST = { /** * An Ellipse Geometry object type. - * + * * @name Phaser.Geom.ELLIPSE * @type {number} * @since 3.19.0 @@ -10952,7 +12878,7 @@ var GEOM_CONST = { /** * A Line Geometry object type. - * + * * @name Phaser.Geom.LINE * @type {number} * @since 3.19.0 @@ -10961,7 +12887,7 @@ var GEOM_CONST = { /** * A Point Geometry object type. - * + * * @name Phaser.Geom.POINT * @type {number} * @since 3.19.0 @@ -10970,7 +12896,7 @@ var GEOM_CONST = { /** * A Polygon Geometry object type. - * + * * @name Phaser.Geom.POLYGON * @type {number} * @since 3.19.0 @@ -10979,7 +12905,7 @@ var GEOM_CONST = { /** * A Rectangle Geometry object type. - * + * * @name Phaser.Geom.RECTANGLE * @type {number} * @since 3.19.0 @@ -10988,7 +12914,7 @@ var GEOM_CONST = { /** * A Triangle Geometry object type. - * + * * @name Phaser.Geom.TRIANGLE * @type {number} * @since 3.19.0 @@ -11003,15 +12929,15 @@ module.exports = GEOM_CONST; /***/ }), /***/ "../../../src/geom/line/GetPoint.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/GetPoint.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11047,15 +12973,15 @@ module.exports = GetPoint; /***/ }), /***/ "../../../src/geom/line/GetPoints.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/GetPoints.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11117,15 +13043,15 @@ module.exports = GetPoints; /***/ }), /***/ "../../../src/geom/line/Length.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Length.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11150,15 +13076,15 @@ module.exports = Length; /***/ }), /***/ "../../../src/geom/line/Line.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Line.js ***! - \************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11492,15 +13418,15 @@ module.exports = Line; /***/ }), /***/ "../../../src/geom/line/Random.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Random.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11537,15 +13463,15 @@ module.exports = Random; /***/ }), /***/ "../../../src/geom/point/Point.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/point/Point.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11635,15 +13561,15 @@ module.exports = Point; /***/ }), /***/ "../../../src/geom/rectangle/Contains.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Contains.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11675,15 +13601,15 @@ module.exports = Contains; /***/ }), /***/ "../../../src/geom/rectangle/GetPoint.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoint.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11692,9 +13618,9 @@ var Point = __webpack_require__(/*! ../point/Point */ "../../../src/geom/point/P /** * 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 @@ -11761,24 +13687,21 @@ module.exports = GetPoint; /***/ }), /***/ "../../../src/geom/rectangle/GetPoints.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoints.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. * @@ -11820,15 +13743,15 @@ module.exports = GetPoints; /***/ }), /***/ "../../../src/geom/rectangle/Perimeter.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Perimeter.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11853,15 +13776,15 @@ module.exports = Perimeter; /***/ }), /***/ "../../../src/geom/rectangle/Random.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Random.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11896,15 +13819,15 @@ module.exports = Random; /***/ }), /***/ "../../../src/geom/rectangle/Rectangle.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Rectangle.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12011,9 +13934,9 @@ var Rectangle = new Class({ /** * 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 @@ -12412,15 +14335,15 @@ module.exports = Rectangle; /***/ }), /***/ "../../../src/geom/rectangle/Union.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Union.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12459,15 +14382,15 @@ module.exports = Union; /***/ }), /***/ "../../../src/loader/File.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/File.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/File.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12526,6 +14449,11 @@ var File = new Class({ */ this.type = GetFastValue(fileConfig, 'type', false); + if (!this.type) + { + throw new Error('Invalid File type: ' + this.type); + } + /** * Unique cache key (unique within its file type) * @@ -12542,9 +14470,9 @@ var File = new Class({ this.key = loader.prefix + loadKey; } - if (!this.type || !this.key) + if (!this.key) { - throw new Error('Invalid Loader.' + this.type + ' key'); + throw new Error('Invalid File key: ' + this.key); } var url = GetFastValue(fileConfig, 'url'); @@ -12553,7 +14481,7 @@ var File = new Class({ { url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)) + else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) { url = loader.path + url; } @@ -12777,7 +14705,12 @@ var File = new Class({ */ onLoad: function (xhr, event) { - var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0)); + var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme) + { + return xhr.responseURL.indexOf(scheme) === 0; + }); + + var localFileOk = (isLocalFile && event.target.status === 0); var success = !(event.target && event.target.status !== 200) || localFileOk; @@ -12874,6 +14807,9 @@ var File = new Class({ */ onProcessError: function () { + // eslint-disable-next-line no-console + console.error('Failed to process file: %s "%s"', this.type, this.key); + this.state = CONST.FILE_ERRORED; if (this.multiFile) @@ -12908,12 +14844,10 @@ var File = new Class({ */ addToCache: function () { - if (this.cache) + if (this.cache && this.data) { this.cache.add(this.key, this.data); } - - this.pendingDestroy(); }, /** @@ -12927,6 +14861,11 @@ var File = new Class({ */ pendingDestroy: function (data) { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + if (data === undefined) { data = this.data; } var key = this.key; @@ -12936,6 +14875,8 @@ var File = new Class({ this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); this.loader.flagForRemoval(this); + + this.state = CONST.FILE_PENDING_DESTROY; }, /** @@ -13014,15 +14955,15 @@ module.exports = File; /***/ }), /***/ "../../../src/loader/FileTypesManager.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/FileTypesManager.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13036,13 +14977,13 @@ var FileTypesManager = { /** * Static method called when a LoaderPlugin is created. - * + * * Loops through the local types object and injects all of them as * properties into the LoaderPlugin instance. * * @method Phaser.Loader.FileTypesManager.install * @since 3.0.0 - * + * * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. */ install: function (loader) @@ -13055,12 +14996,12 @@ var FileTypesManager = { /** * Static method called directly by the File Types. - * + * * The key is a reference to the function used to load the files via the Loader, i.e. `image`. * * @method Phaser.Loader.FileTypesManager.register * @since 3.0.0 - * + * * @param {string} key - The key that will be used as the method name in the LoaderPlugin. * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. */ @@ -13088,15 +15029,15 @@ module.exports = FileTypesManager; /***/ }), /***/ "../../../src/loader/GetURL.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/GetURL.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13118,7 +15059,7 @@ var GetURL = function (file, baseURL) return false; } - if (file.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)) + if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) { return file.url; } @@ -13134,15 +15075,15 @@ module.exports = GetURL; /***/ }), /***/ "../../../src/loader/MergeXHRSettings.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/MergeXHRSettings.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13187,19 +15128,21 @@ module.exports = MergeXHRSettings; /***/ }), /***/ "../../../src/loader/MultiFile.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/MultiFile.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var CONST = __webpack_require__(/*! ./const */ "../../../src/loader/const.js"); +var Events = __webpack_require__(/*! ./events */ "../../../src/loader/events/index.js"); /** * @classdesc @@ -13281,6 +15224,15 @@ var MultiFile = new Class({ */ this.files = finalFiles; + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.MultiFile#state + * @type {number} + * @since 3.60.0 + */ + this.state = CONST.FILE_PENDING; + /** * The completion status of this MultiFile. * @@ -13426,7 +15378,57 @@ var MultiFile = new Class({ if (index !== -1) { this.failed++; + + // eslint-disable-next-line no-console + console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); } + }, + + /** + * Called once all children of this multi file have been added to their caches and is now + * ready for deletion from the Loader. + * + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.MultiFile#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.60.0 + */ + pendingDestroy: function () + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); + + this.loader.flagForRemoval(this); + + for (var i = 0; i < this.files.length; i++) + { + this.files[i].pendingDestroy(); + } + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this Multi File and any references it holds. + * + * @method Phaser.Loader.MultiFile#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.loader = null; + this.files = null; + this.config = null; } }); @@ -13437,15 +15439,15 @@ module.exports = MultiFile; /***/ }), /***/ "../../../src/loader/XHRLoader.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/XHRLoader.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13523,15 +15525,15 @@ module.exports = XHRLoader; /***/ }), /***/ "../../../src/loader/XHRSettings.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/XHRSettings.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13598,15 +15600,15 @@ module.exports = XHRSettings; /***/ }), /***/ "../../../src/loader/const.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/const.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/const.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13614,7 +15616,7 @@ var FILE_CONST = { /** * The Loader is idle. - * + * * @name Phaser.Loader.LOADER_IDLE * @type {number} * @since 3.0.0 @@ -13623,7 +15625,7 @@ var FILE_CONST = { /** * The Loader is actively loading. - * + * * @name Phaser.Loader.LOADER_LOADING * @type {number} * @since 3.0.0 @@ -13632,7 +15634,7 @@ var FILE_CONST = { /** * The Loader is processing files is has loaded. - * + * * @name Phaser.Loader.LOADER_PROCESSING * @type {number} * @since 3.0.0 @@ -13641,7 +15643,7 @@ var FILE_CONST = { /** * The Loader has completed loading and processing. - * + * * @name Phaser.Loader.LOADER_COMPLETE * @type {number} * @since 3.0.0 @@ -13650,7 +15652,7 @@ var FILE_CONST = { /** * The Loader is shutting down. - * + * * @name Phaser.Loader.LOADER_SHUTDOWN * @type {number} * @since 3.0.0 @@ -13659,7 +15661,7 @@ var FILE_CONST = { /** * The Loader has been destroyed. - * + * * @name Phaser.Loader.LOADER_DESTROYED * @type {number} * @since 3.0.0 @@ -13667,8 +15669,8 @@ var FILE_CONST = { LOADER_DESTROYED: 5, /** - * File is in the load queue but not yet started - * + * File is in the load queue but not yet started. + * * @name Phaser.Loader.FILE_PENDING * @type {number} * @since 3.0.0 @@ -13677,7 +15679,7 @@ var FILE_CONST = { /** * File has been started to load by the loader (onLoad called) - * + * * @name Phaser.Loader.FILE_LOADING * @type {number} * @since 3.0.0 @@ -13685,8 +15687,8 @@ var FILE_CONST = { FILE_LOADING: 11, /** - * File has loaded successfully, awaiting processing - * + * File has loaded successfully, awaiting processing. + * * @name Phaser.Loader.FILE_LOADED * @type {number} * @since 3.0.0 @@ -13694,8 +15696,8 @@ var FILE_CONST = { FILE_LOADED: 12, /** - * File failed to load - * + * File failed to load. + * * @name Phaser.Loader.FILE_FAILED * @type {number} * @since 3.0.0 @@ -13704,7 +15706,7 @@ var FILE_CONST = { /** * File is being processed (onProcess callback) - * + * * @name Phaser.Loader.FILE_PROCESSING * @type {number} * @since 3.0.0 @@ -13713,7 +15715,7 @@ var FILE_CONST = { /** * The File has errored somehow during processing. - * + * * @name Phaser.Loader.FILE_ERRORED * @type {number} * @since 3.0.0 @@ -13722,7 +15724,7 @@ var FILE_CONST = { /** * File has finished processing. - * + * * @name Phaser.Loader.FILE_COMPLETE * @type {number} * @since 3.0.0 @@ -13730,8 +15732,8 @@ var FILE_CONST = { FILE_COMPLETE: 17, /** - * File has been destroyed - * + * File has been destroyed. + * * @name Phaser.Loader.FILE_DESTROYED * @type {number} * @since 3.0.0 @@ -13739,13 +15741,22 @@ var FILE_CONST = { FILE_DESTROYED: 18, /** - * File was populated from local data and doesn't need an HTTP request - * + * File was populated from local data and doesn't need an HTTP request. + * * @name Phaser.Loader.FILE_POPULATED * @type {number} * @since 3.0.0 */ - FILE_POPULATED: 19 + FILE_POPULATED: 19, + + /** + * File is pending being destroyed. + * + * @name Phaser.Loader.FILE_PENDING_DESTROY + * @type {number} + * @since 3.60.0 + */ + FILE_PENDING_DESTROY: 20 }; @@ -13755,30 +15766,31 @@ module.exports = FILE_CONST; /***/ }), /***/ "../../../src/loader/events/ADD_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Add File Event. - * + * * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. - * + * * Listen to it from a Scene using: `this.load.on('addfile', listener)`. - * + * * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. * * @event Phaser.Loader.Events#ADD + * @type {string} * @since 3.0.0 - * + * * @param {string} key - The unique key of the file that was added to the Loader. * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. @@ -13790,29 +15802,30 @@ module.exports = 'addfile'; /***/ }), /***/ "../../../src/loader/events/COMPLETE_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Complete Event. - * + * * This event is dispatched when the Loader has fully processed everything in the load queue. * By this point every loaded file will now be in its associated cache and ready for use. - * + * * Listen to it from a Scene using: `this.load.on('complete', listener)`. * * @event Phaser.Loader.Events#COMPLETE + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. * @param {number} totalComplete - The total number of files that successfully loaded. * @param {number} totalFailed - The total number of files that failed to load. @@ -13823,33 +15836,36 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/loader/events/FILE_COMPLETE_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * + * + * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. + * * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. - * + * + * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. + * * 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. * * @event Phaser.Loader.Events#FILE_COMPLETE + * @type {string} * @since 3.0.0 - * + * * @param {string} key - The key of the file that just loaded and finished processing. * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} data - The raw data the file contained. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ module.exports = 'filecomplete'; @@ -13857,25 +15873,25 @@ module.exports = 'filecomplete'; /***/ }), /***/ "../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! - \***********************************************************************/ +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! + \*********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Complete Event. - * + * * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * + * * It uses a special dynamic event name constructed from the key and type of the file. - * + * * For example, if you have loaded an `image` with a key of `monster`, you can listen for it * using the following: * @@ -13886,29 +15902,32 @@ module.exports = 'filecomplete'; * ``` * * Or, if you have loaded a texture `atlas` with a key of `Level1`: - * + * * ```javascript - * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { + * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) { * // Your handler code * }); * ``` - * + * * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: - * + * * ```javascript * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { * // Your handler code * }); * ``` - * + * + * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. + * * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. * * @event Phaser.Loader.Events#FILE_KEY_COMPLETE + * @type {string} * @since 3.0.0 - * + * * @param {string} key - The key of the file that just loaded and finished processing. * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} data - The raw data the file contained. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ module.exports = 'filecomplete-'; @@ -13916,28 +15935,29 @@ module.exports = 'filecomplete-'; /***/ }), /***/ "../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Error Event. - * + * * This event is dispatched by the Loader Plugin when a file fails to load. - * + * * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. * * @event Phaser.Loader.Events#FILE_LOAD_ERROR + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.File} file - A reference to the File which errored during load. */ module.exports = 'loaderror'; @@ -13946,29 +15966,30 @@ module.exports = 'loaderror'; /***/ }), /***/ "../../../src/loader/events/FILE_LOAD_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Event. - * + * * This event is dispatched by the Loader Plugin when a file finishes loading, * but _before_ it is processed and added to the internal Phaser caches. - * + * * Listen to it from a Scene using: `this.load.on('load', listener)`. * * @event Phaser.Loader.Events#FILE_LOAD + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. */ module.exports = 'load'; @@ -13977,29 +15998,30 @@ module.exports = 'load'; /***/ }), /***/ "../../../src/loader/events/FILE_PROGRESS_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Progress Event. - * + * * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. - * + * * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. * * @event Phaser.Loader.Events#FILE_PROGRESS + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.File} file - A reference to the File which errored during load. * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. */ @@ -14009,32 +16031,33 @@ module.exports = 'fileprogress'; /***/ }), /***/ "../../../src/loader/events/POST_PROCESS_EVENT.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Post Process Event. - * + * * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. * It is dispatched before the internal lists are cleared and each File is destroyed. - * + * * Use this hook to perform any last minute processing of files that can only happen once the * Loader has completed, but prior to it emitting the `complete` event. - * + * * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. * * @event Phaser.Loader.Events#POST_PROCESS + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. */ module.exports = 'postprocess'; @@ -14043,28 +16066,29 @@ module.exports = 'postprocess'; /***/ }), /***/ "../../../src/loader/events/PROGRESS_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Progress Event. - * + * * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. - * + * * Listen to it from a Scene using: `this.load.on('progress', listener)`. * * @event Phaser.Loader.Events#PROGRESS + * @type {string} * @since 3.0.0 - * + * * @param {number} progress - The current progress of the load. A value between 0 and 1. */ module.exports = 'progress'; @@ -14073,30 +16097,31 @@ module.exports = 'progress'; /***/ }), /***/ "../../../src/loader/events/START_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/START_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Start Event. - * + * * This event is dispatched when the Loader starts running. At this point load progress is zero. - * + * * This event is dispatched even if there aren't any files in the load queue. - * + * * Listen to it from a Scene using: `this.load.on('start', listener)`. * * @event Phaser.Loader.Events#START + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. */ module.exports = 'start'; @@ -14105,15 +16130,15 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/loader/events/index.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/index.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14140,15 +16165,15 @@ module.exports = { /***/ }), /***/ "../../../src/loader/filetypes/ImageFile.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14158,6 +16183,7 @@ var File = __webpack_require__(/*! ../File */ "../../../src/loader/File.js"); var FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "../../../src/loader/FileTypesManager.js"); var GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); +var GetURL = __webpack_require__(/*! ../GetURL */ "../../../src/loader/GetURL.js"); /** * @classdesc @@ -14232,6 +16258,14 @@ var ImageFile = new Class({ loader.addFile(normalMap); } + + this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; + + if (this.useImageElementLoad) + { + this.load = this.loadImage; + this.onProcess = this.onProcessImage; + } }, /** @@ -14268,6 +16302,70 @@ var ImageFile = new Class({ File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); }, + /** + * Handles image load processing. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage + * @private + * @since 3.60.0 + */ + onProcessImage: function () + { + var result = this.state; + + this.state = CONST.FILE_PROCESSING; + + if (result === CONST.FILE_LOADED) + { + this.onProcessComplete(); + } + else + { + this.onProcessError(); + } + }, + + /** + * Loads the image using either XHR or an Image tag. + * + * @method Phaser.Loader.FileTypes.ImageFile#loadImage + * @private + * @since 3.60.0 + */ + loadImage: function () + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) + { + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + _this.state = CONST.FILE_LOADED; + + _this.loader.nextFile(_this, true); + }; + + this.data.onerror = function () + { + _this.loader.nextFile(_this, false); + }; + + this.data.src = this.src; + } + }, + /** * Adds this file to its target cache upon successful loading and processing. * @@ -14276,29 +16374,35 @@ var ImageFile = new Class({ */ addToCache: function () { - var texture; + // Check if we have a linked normal map var linkFile = this.linkFile; - if (linkFile && linkFile.state === CONST.FILE_COMPLETE) + if (linkFile) { - if (this.type === 'image') + // We do, but has it loaded? + if (linkFile.state >= CONST.FILE_COMPLETE) { - texture = this.cache.addImage(this.key, this.data, linkFile.data); - } - else - { - texture = this.cache.addImage(linkFile.key, linkFile.data, this.data); + // Both files have loaded + if (this.type === 'normalMap') + { + // linkFile.data = Image + // this.data = Normal Map + this.cache.addImage(this.key, linkFile.data, this.data); + } + else + { + // linkFile.data = Normal Map + // this.data = Image + this.cache.addImage(this.key, this.data, linkFile.data); + } } - this.pendingDestroy(texture); - - linkFile.pendingDestroy(texture); + // Nothing to do here, we'll use the linkFile `addToCache` call + // to process this pair } - else if (!linkFile) + else { - texture = this.cache.addImage(this.key, this.data); - - this.pendingDestroy(texture); + this.cache.addImage(this.key, this.data); } } @@ -14382,6 +16486,10 @@ var ImageFile = new Class({ * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. * Normal maps are a WebGL only feature. * + * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. + * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images + * via the Image tag instead. + * * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser. * It is available in the default build but can be excluded from custom builds. * @@ -14419,15 +16527,15 @@ module.exports = ImageFile; /***/ }), /***/ "../../../src/loader/filetypes/JSONFile.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14496,9 +16604,9 @@ var JSONFile = new Class({ File.call(this, loader, fileConfig); + // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it. 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); @@ -14531,8 +16639,6 @@ var JSONFile = new Class({ } catch (e) { - console.warn('Invalid JSON: ' + this.key); - this.onProcessError(); throw e; @@ -14665,15 +16771,15 @@ module.exports = JSONFile; /***/ }), /***/ "../../../src/loader/filetypes/TextFile.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/TextFile.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14849,15 +16955,15 @@ module.exports = TextFile; /***/ }), /***/ "../../../src/math/Average.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Average.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Average.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14889,15 +16995,15 @@ module.exports = Average; /***/ }), /***/ "../../../src/math/Bernstein.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Bernstein.js ***! - \************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14925,15 +17031,15 @@ module.exports = Bernstein; /***/ }), /***/ "../../../src/math/Between.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Between.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Between.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14959,15 +17065,15 @@ module.exports = Between; /***/ }), /***/ "../../../src/math/CatmullRom.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/CatmullRom.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15001,15 +17107,15 @@ module.exports = CatmullRom; /***/ }), /***/ "../../../src/math/CeilTo.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/CeilTo.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15043,15 +17149,15 @@ module.exports = CeilTo; /***/ }), /***/ "../../../src/math/Clamp.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Clamp.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15078,15 +17184,15 @@ module.exports = Clamp; /***/ }), /***/ "../../../src/math/DegToRad.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/DegToRad.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15113,15 +17219,15 @@ module.exports = DegToRad; /***/ }), /***/ "../../../src/math/Difference.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Difference.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15147,15 +17253,15 @@ module.exports = Difference; /***/ }), /***/ "../../../src/math/Euler.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Euler.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15435,15 +17541,15 @@ module.exports = Euler; /***/ }), /***/ "../../../src/math/Factorial.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Factorial.js ***! - \************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15480,15 +17586,15 @@ module.exports = Factorial; /***/ }), /***/ "../../../src/math/FloatBetween.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/FloatBetween.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15514,15 +17620,15 @@ module.exports = FloatBetween; /***/ }), /***/ "../../../src/math/FloorTo.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/FloorTo.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15556,15 +17662,15 @@ module.exports = FloorTo; /***/ }), /***/ "../../../src/math/FromPercent.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/FromPercent.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15595,15 +17701,15 @@ module.exports = FromPercent; /***/ }), /***/ "../../../src/math/GetSpeed.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/GetSpeed.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15633,15 +17739,15 @@ module.exports = GetSpeed; /***/ }), /***/ "../../../src/math/IsEven.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/IsEven.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15669,15 +17775,15 @@ module.exports = IsEven; /***/ }), /***/ "../../../src/math/IsEvenStrict.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/IsEvenStrict.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15703,15 +17809,15 @@ module.exports = IsEvenStrict; /***/ }), /***/ "../../../src/math/Linear.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Linear.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15735,18 +17841,57 @@ var Linear = function (p0, p1, t) module.exports = Linear; +/***/ }), + +/***/ "../../../src/math/LinearXY.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Interpolates two given Vectors and returns a new Vector between them. + * + * Does not modify either of the passed Vectors. + * + * @function Phaser.Math.LinearXY + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} vector1 - Starting vector + * @param {Phaser.Math.Vector2} vector2 - Ending vector + * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * + * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + */ +var LinearXY = function (vector1, vector2, t) +{ + if (t === undefined) { t = 0; } + + return vector1.clone().lerp(vector2, t); +}; + +module.exports = LinearXY; + + /***/ }), /***/ "../../../src/math/Matrix3.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Matrix3.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16336,15 +18481,15 @@ module.exports = Matrix3; /***/ }), /***/ "../../../src/math/Matrix4.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Matrix4.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18134,15 +20279,15 @@ module.exports = Matrix4; /***/ }), /***/ "../../../src/math/MaxAdd.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/MaxAdd.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18166,18 +20311,64 @@ var MaxAdd = function (value, amount, max) module.exports = MaxAdd; +/***/ }), + +/***/ "../../../src/math/Median.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Median.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the median of the given values. The values are sorted and the middle value is returned. + * In case of an even number of values, the average of the two middle values is returned. + * + * @function Phaser.Math.Median + * @since 3.54.0 + * + * @param {number[]} values - The values to average. + * + * @return {number} The median value. + */ +var Median = function (values) +{ + var valuesNum = values.length; + if (valuesNum === 0) + { + return 0; + } + + values.sort(function (a, b) { return a - b; }); + + var halfIndex = Math.floor(valuesNum / 2); + + return valuesNum % 2 === 0 + ? (values[halfIndex] + values[halfIndex - 1]) / 2 + : values[halfIndex]; +}; + +module.exports = Median; + + /***/ }), /***/ "../../../src/math/MinSub.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/MinSub.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18204,15 +20395,15 @@ module.exports = MinSub; /***/ }), /***/ "../../../src/math/Percent.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Percent.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18268,15 +20459,15 @@ module.exports = Percent; /***/ }), /***/ "../../../src/math/Quaternion.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Quaternion.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19322,15 +21513,15 @@ module.exports = Quaternion; /***/ }), /***/ "../../../src/math/RadToDeg.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RadToDeg.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19357,15 +21548,15 @@ module.exports = RadToDeg; /***/ }), /***/ "../../../src/math/RandomXY.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXY.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19402,15 +21593,15 @@ module.exports = RandomXY; /***/ }), /***/ "../../../src/math/RandomXYZ.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXYZ.js ***! - \************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19446,15 +21637,15 @@ module.exports = RandomXYZ; /***/ }), /***/ "../../../src/math/RandomXYZW.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXYZW.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19487,15 +21678,15 @@ module.exports = RandomXYZW; /***/ }), /***/ "../../../src/math/Rotate.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Rotate.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19527,15 +21718,15 @@ module.exports = Rotate; /***/ }), /***/ "../../../src/math/RotateAround.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateAround.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19576,15 +21767,15 @@ module.exports = RotateAround; /***/ }), /***/ "../../../src/math/RotateAroundDistance.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateAroundDistance.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19622,15 +21813,15 @@ module.exports = RotateAroundDistance; /***/ }), /***/ "../../../src/math/RotateTo.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateTo.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19664,15 +21855,15 @@ module.exports = RotateTo; /***/ }), /***/ "../../../src/math/RotateVec3.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateVec3.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19717,15 +21908,15 @@ module.exports = RotateVec3; /***/ }), /***/ "../../../src/math/RoundAwayFromZero.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RoundAwayFromZero.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19751,31 +21942,31 @@ module.exports = RoundAwayFromZero; /***/ }), /***/ "../../../src/math/RoundTo.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RoundTo.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -19808,15 +21999,15 @@ module.exports = RoundTo; /***/ }), /***/ "../../../src/math/SinCosTableGenerator.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SinCosTableGenerator.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19866,15 +22057,15 @@ module.exports = SinCosTableGenerator; /***/ }), /***/ "../../../src/math/SmoothStep.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SmoothStep.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19918,15 +22109,15 @@ module.exports = SmoothStep; /***/ }), /***/ "../../../src/math/SmootherStep.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SmootherStep.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19962,15 +22153,15 @@ module.exports = SmootherStep; /***/ }), /***/ "../../../src/math/ToXY.js": -/*!*******************************************!*\ - !*** D:/wamp/www/phaser/src/math/ToXY.js ***! - \*******************************************/ +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19978,9 +22169,9 @@ var Vector2 = __webpack_require__(/*! ./Vector2 */ "../../../src/math/Vector2.js /** * 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 @@ -20012,11 +22203,9 @@ var ToXY = function (index, width, height, out) { x = index; } - - out.set(x, y); } - return out; + return out.set(x, y); }; module.exports = ToXY; @@ -20025,15 +22214,15 @@ module.exports = ToXY; /***/ }), /***/ "../../../src/math/TransformXY.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/TransformXY.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20085,15 +22274,15 @@ module.exports = TransformXY; /***/ }), /***/ "../../../src/math/Vector2.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector2.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20114,8 +22303,8 @@ var FuzzyEqual = __webpack_require__(/*! ../math/fuzzy/Equal */ "../../../src/ma * @constructor * @since 3.0.0 * - * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties. - * @param {number} [y] - The y component. + * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. + * @param {number} [y=x] - The y component. */ var Vector2 = new Class({ @@ -20176,7 +22365,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#copy * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to copy the components from. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20272,7 +22461,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#equals * @since 3.0.0 * - * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector. * * @return {boolean} Whether the given Vector is equal to this Vector. */ @@ -20287,7 +22476,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#fuzzyEquals * @since 3.23.0 * - * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {Phaser.Types.Math.Vector2Like} 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`. @@ -20340,7 +22529,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#add * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20358,7 +22547,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#subtract * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20378,7 +22567,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#multiply * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20424,7 +22613,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#divide * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20458,7 +22647,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#distance * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to. * * @return {number} The distance from this Vector to the given Vector. */ @@ -20476,7 +22665,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#distanceSq * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to. * * @return {number} The distance from this Vector to the given Vector, squared. */ @@ -20604,7 +22793,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#dot * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2. * * @return {number} The dot product of this Vector and the given Vector. */ @@ -20619,7 +22808,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#cross * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2. * * @return {number} The cross product of this Vector and the given Vector. */ @@ -20636,7 +22825,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#lerp * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards. * @param {number} [t=0] - The interpolation percentage, between 0 and 1. * * @return {Phaser.Math.Vector2} This Vector2. @@ -20784,6 +22973,23 @@ var Vector2 = new Class({ var sin = Math.sin(delta); return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); + }, + + /** + * Project this Vector onto another. + * + * @method Phaser.Math.Vector2#project + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} src - The vector to project onto. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + project: function (src) + { + var scalar = this.dot(src) / src.dot(src); + + return this.copy(src).scale(scalar); } }); @@ -20866,15 +23072,15 @@ module.exports = Vector2; /***/ }), /***/ "../../../src/math/Vector3.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector3.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21917,15 +24123,15 @@ module.exports = Vector3; /***/ }), /***/ "../../../src/math/Vector4.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector4.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22463,15 +24669,15 @@ module.exports = Vector4; /***/ }), /***/ "../../../src/math/Within.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Within.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Within.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22498,20 +24704,20 @@ module.exports = Within; /***/ }), /***/ "../../../src/math/Wrap.js": -/*!*******************************************!*\ - !*** D:/wamp/www/phaser/src/math/Wrap.js ***! - \*******************************************/ +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Wrap the given `value` between `min` and `max. + * Wrap the given `value` between `min` and `max`. * * @function Phaser.Math.Wrap * @since 3.0.0 @@ -22535,15 +24741,15 @@ module.exports = Wrap; /***/ }), /***/ "../../../src/math/angle/Between.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Between.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22571,15 +24777,15 @@ module.exports = Between; /***/ }), /***/ "../../../src/math/angle/BetweenPoints.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenPoints.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22607,15 +24813,15 @@ module.exports = BetweenPoints; /***/ }), /***/ "../../../src/math/angle/BetweenPointsY.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22644,15 +24850,15 @@ module.exports = BetweenPointsY; /***/ }), /***/ "../../../src/math/angle/BetweenY.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenY.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22683,15 +24889,15 @@ module.exports = BetweenY; /***/ }), /***/ "../../../src/math/angle/CounterClockwise.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/CounterClockwise.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22733,15 +24939,15 @@ module.exports = CounterClockwise; /***/ }), /***/ "../../../src/math/angle/Normalize.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Normalize.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22775,16 +24981,16 @@ module.exports = Normalize; /***/ }), /***/ "../../../src/math/angle/Random.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Random.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22809,16 +25015,16 @@ module.exports = Random; /***/ }), /***/ "../../../src/math/angle/RandomDegrees.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/RandomDegrees.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22843,15 +25049,15 @@ module.exports = RandomDegrees; /***/ }), /***/ "../../../src/math/angle/Reverse.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Reverse.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22878,15 +25084,15 @@ module.exports = Reverse; /***/ }), /***/ "../../../src/math/angle/RotateTo.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/RotateTo.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22950,15 +25156,15 @@ module.exports = RotateTo; /***/ }), /***/ "../../../src/math/angle/ShortestBetween.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/ShortestBetween.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23002,15 +25208,15 @@ module.exports = ShortestBetween; /***/ }), /***/ "../../../src/math/angle/Wrap.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Wrap.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23039,15 +25245,15 @@ module.exports = Wrap; /***/ }), /***/ "../../../src/math/angle/WrapDegrees.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/WrapDegrees.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23076,15 +25282,15 @@ module.exports = WrapDegrees; /***/ }), /***/ "../../../src/math/angle/index.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/index.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23114,15 +25320,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/const.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/const.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/const.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23130,7 +25336,7 @@ var MATH_CONST = { /** * The value of PI * 2. - * + * * @name Phaser.Math.PI2 * @type {number} * @since 3.0.0 @@ -23139,7 +25345,7 @@ var MATH_CONST = { /** * The value of PI * 0.5. - * + * * @name Phaser.Math.TAU * @type {number} * @since 3.0.0 @@ -23148,7 +25354,7 @@ var MATH_CONST = { /** * An epsilon value (1.0e-6) - * + * * @name Phaser.Math.EPSILON * @type {number} * @since 3.0.0 @@ -23157,7 +25363,7 @@ var MATH_CONST = { /** * For converting degrees to radians (PI / 180) - * + * * @name Phaser.Math.DEG_TO_RAD * @type {number} * @since 3.0.0 @@ -23166,7 +25372,7 @@ var MATH_CONST = { /** * For converting radians to degrees (180 / PI) - * + * * @name Phaser.Math.RAD_TO_DEG * @type {number} * @since 3.0.0 @@ -23176,7 +25382,7 @@ var MATH_CONST = { /** * 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 @@ -23186,7 +25392,7 @@ var MATH_CONST = { /** * 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 @@ -23196,7 +25402,7 @@ var MATH_CONST = { /** * 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 @@ -23211,15 +25417,15 @@ module.exports = MATH_CONST; /***/ }), /***/ "../../../src/math/distance/DistanceBetween.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetween.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23250,15 +25456,15 @@ module.exports = DistanceBetween; /***/ }), /***/ "../../../src/math/distance/DistanceBetweenPoints.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23287,15 +25493,15 @@ module.exports = DistanceBetweenPoints; /***/ }), /***/ "../../../src/math/distance/DistanceBetweenPointsSquared.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! - \****************************************************************************/ +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! + \**************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23324,15 +25530,15 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), /***/ "../../../src/math/distance/DistanceChebyshev.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23363,15 +25569,15 @@ module.exports = ChebyshevDistance; /***/ }), /***/ "../../../src/math/distance/DistancePower.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistancePower.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23402,15 +25608,15 @@ module.exports = DistancePower; /***/ }), /***/ "../../../src/math/distance/DistanceSnake.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceSnake.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23441,15 +25647,15 @@ module.exports = SnakeDistance; /***/ }), /***/ "../../../src/math/distance/DistanceSquared.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceSquared.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23480,15 +25686,15 @@ module.exports = DistanceSquared; /***/ }), /***/ "../../../src/math/distance/index.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/index.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23512,15 +25718,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/back/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/In.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23548,15 +25754,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/back/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/InOut.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23593,15 +25799,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/back/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/Out.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23629,15 +25835,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/back/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/index.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23657,15 +25863,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/bounce/In.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/In.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23707,15 +25913,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/bounce/InOut.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/InOut.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23776,15 +25982,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/bounce/Out.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/Out.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23824,15 +26030,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/bounce/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23852,15 +26058,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/circular/In.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/In.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23885,15 +26091,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/circular/InOut.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/InOut.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23925,15 +26131,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/circular/Out.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/Out.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23958,15 +26164,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/circular/index.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/index.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23986,15 +26192,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/cubic/In.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/In.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24019,15 +26225,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/cubic/InOut.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/InOut.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24059,15 +26265,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/cubic/Out.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/Out.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24092,15 +26298,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/cubic/index.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/index.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24120,15 +26326,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/elastic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/In.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24180,15 +26386,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/elastic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/InOut.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24247,15 +26453,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/elastic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/Out.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24307,15 +26513,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/elastic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/index.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24335,15 +26541,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/expo/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/In.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24368,15 +26574,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/expo/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/InOut.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24408,15 +26614,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/expo/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/Out.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24441,15 +26647,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/expo/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/index.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24469,15 +26675,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/index.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24506,15 +26712,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/linear/Linear.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/linear/Linear.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24539,15 +26745,15 @@ module.exports = Linear; /***/ }), /***/ "../../../src/math/easing/linear/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/linear/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24557,15 +26763,15 @@ 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/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24590,15 +26796,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quadratic/InOut.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24630,15 +26836,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quadratic/Out.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/Out.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24663,15 +26869,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quadratic/index.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/index.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24691,15 +26897,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/quartic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/In.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24724,15 +26930,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quartic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/InOut.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24764,15 +26970,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quartic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/Out.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24797,15 +27003,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quartic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/index.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24825,15 +27031,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/quintic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/In.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24858,15 +27064,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quintic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/InOut.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24898,15 +27104,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quintic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/Out.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24931,15 +27137,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quintic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/index.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24959,15 +27165,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/sine/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/In.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25003,15 +27209,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/sine/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/InOut.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25047,15 +27253,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/sine/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/Out.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25091,15 +27297,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/sine/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/index.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25119,15 +27325,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/stepped/Stepped.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25166,15 +27372,15 @@ module.exports = Stepped; /***/ }), /***/ "../../../src/math/easing/stepped/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/stepped/index.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25188,15 +27394,15 @@ module.exports = __webpack_require__(/*! ./Stepped */ "../../../src/math/easing/ /***/ }), /***/ "../../../src/math/fuzzy/Ceil.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Ceil.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25224,15 +27430,15 @@ module.exports = Ceil; /***/ }), /***/ "../../../src/math/fuzzy/Equal.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Equal.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25263,15 +27469,15 @@ module.exports = Equal; /***/ }), /***/ "../../../src/math/fuzzy/Floor.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Floor.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25299,15 +27505,15 @@ module.exports = Floor; /***/ }), /***/ "../../../src/math/fuzzy/GreaterThan.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25338,15 +27544,15 @@ module.exports = GreaterThan; /***/ }), /***/ "../../../src/math/fuzzy/LessThan.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/LessThan.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25377,15 +27583,15 @@ module.exports = LessThan; /***/ }), /***/ "../../../src/math/fuzzy/index.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/index.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25407,15 +27613,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/index.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/index.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/index.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25458,7 +27664,9 @@ var PhaserMath = { IsEven: __webpack_require__(/*! ./IsEven */ "../../../src/math/IsEven.js"), IsEvenStrict: __webpack_require__(/*! ./IsEvenStrict */ "../../../src/math/IsEvenStrict.js"), Linear: __webpack_require__(/*! ./Linear */ "../../../src/math/Linear.js"), + LinearXY: __webpack_require__(/*! ./LinearXY */ "../../../src/math/LinearXY.js"), MaxAdd: __webpack_require__(/*! ./MaxAdd */ "../../../src/math/MaxAdd.js"), + Median: __webpack_require__(/*! ./Median */ "../../../src/math/Median.js"), MinSub: __webpack_require__(/*! ./MinSub */ "../../../src/math/MinSub.js"), Percent: __webpack_require__(/*! ./Percent */ "../../../src/math/Percent.js"), RadToDeg: __webpack_require__(/*! ./RadToDeg */ "../../../src/math/RadToDeg.js"), @@ -25502,15 +27710,15 @@ module.exports = PhaserMath; /***/ }), /***/ "../../../src/math/interpolation/BezierInterpolation.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25546,15 +27754,15 @@ module.exports = BezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/CatmullRomInterpolation.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! - \****************************************************************************/ +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! + \**************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25608,15 +27816,15 @@ module.exports = CatmullRomInterpolation; /***/ }), /***/ "../../../src/math/interpolation/CubicBezierInterpolation.js": -/*!*****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! - \*****************************************************************************/ +/*!***************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! + \***************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25683,15 +27891,15 @@ module.exports = CubicBezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/LinearInterpolation.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25735,15 +27943,15 @@ module.exports = LinearInterpolation; /***/ }), /***/ "../../../src/math/interpolation/QuadraticBezierInterpolation.js": -/*!*********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! - \*********************************************************************************/ +/*!*******************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! + \*******************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25799,15 +28007,15 @@ module.exports = QuadraticBezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/SmoothStepInterpolation.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! - \****************************************************************************/ +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! + \**************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25837,15 +28045,15 @@ module.exports = SmoothStepInterpolation; /***/ }), /***/ "../../../src/math/interpolation/SmootherStepInterpolation.js": -/*!******************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! - \******************************************************************************/ +/*!****************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! + \****************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25875,15 +28083,15 @@ module.exports = SmootherStepInterpolation; /***/ }), /***/ "../../../src/math/interpolation/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25907,15 +28115,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/pow2/GetPowerOfTwo.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25942,15 +28150,15 @@ module.exports = GetPowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/IsSizePowerOfTwo.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25977,15 +28185,15 @@ module.exports = IsSizePowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/IsValuePowerOfTwo.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26010,15 +28218,15 @@ module.exports = IsValuePowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/index.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/index.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26038,15 +28246,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/random-data-generator/RandomDataGenerator.js": -/*!********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! - \********************************************************************************/ +/*!******************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! + \******************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26055,13 +28263,13 @@ var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Cla /** * @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. * @@ -26393,7 +28601,7 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 - * + * * @generic T * @genericUse {T[]} - [array] * @genericUse {T} - [$return] @@ -26553,15 +28761,15 @@ module.exports = RandomDataGenerator; /***/ }), /***/ "../../../src/math/snap/SnapCeil.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapCeil.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26602,15 +28810,15 @@ module.exports = SnapCeil; /***/ }), /***/ "../../../src/math/snap/SnapFloor.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapFloor.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26651,15 +28859,15 @@ module.exports = SnapFloor; /***/ }), /***/ "../../../src/math/snap/SnapTo.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapTo.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26699,15 +28907,15 @@ module.exports = SnapTo; /***/ }), /***/ "../../../src/math/snap/index.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/index.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26727,15 +28935,15 @@ module.exports = { /***/ }), /***/ "../../../src/plugins/BasePlugin.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/plugins/BasePlugin.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2020 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -26859,18 +29067,232 @@ var BasePlugin = new Class({ module.exports = BasePlugin; +/***/ }), + +/***/ "../../../src/plugins/PluginCache.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Contains the plugins that Phaser uses globally and locally. +// These are the source objects, not instantiated. +var corePlugins = {}; + +// Contains the plugins that the dev has loaded into their game +// These are the source objects, not instantiated. +var customPlugins = {}; + +var PluginCache = {}; + +/** + * @namespace Phaser.Plugins.PluginCache + */ + +/** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * + * @method Phaser.Plugins.PluginCache.register + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin? + */ +PluginCache.register = function (key, plugin, mapping, custom) +{ + if (custom === undefined) { custom = false; } + + corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom }; +}; + +/** + * Stores a custom plugin in the global plugin cache. + * The key must be unique, within the scope of the cache. + * + * @method Phaser.Plugins.PluginCache.registerCustom + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {?any} data - A value to be passed to the plugin's `init` method. + */ +PluginCache.registerCustom = function (key, plugin, mapping, data) +{ + customPlugins[key] = { plugin: plugin, mapping: mapping, data: data }; +}; + +/** + * Checks if the given key is already being used in the core plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCore + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`. + */ +PluginCache.hasCore = function (key) +{ + return corePlugins.hasOwnProperty(key); +}; + +/** + * Checks if the given key is already being used in the custom plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCustom + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`. + */ +PluginCache.hasCustom = function (key) +{ + return customPlugins.hasOwnProperty(key); +}; + +/** + * Returns the core plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCore + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to get. + * + * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object. + */ +PluginCache.getCore = function (key) +{ + return corePlugins[key]; +}; + +/** + * Returns the custom plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object. + */ +PluginCache.getCustom = function (key) +{ + return customPlugins[key]; +}; + +/** + * Returns an object from the custom cache based on the given key that can be instantiated. + * + * @method Phaser.Plugins.PluginCache.getCustomClass + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {function} The custom plugin object. + */ +PluginCache.getCustomClass = function (key) +{ + return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null; +}; + +/** + * Removes a core plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.remove + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to remove. + */ +PluginCache.remove = function (key) +{ + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } +}; + +/** + * Removes a custom plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.removeCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to remove. + */ +PluginCache.removeCustom = function (key) +{ + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } +}; + +/** + * Removes all Core Plugins. + * + * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. + * So be sure you only call this if you do not wish to run Phaser again. + * + * @method Phaser.Plugins.PluginCache.destroyCorePlugins + * @since 3.12.0 + */ +PluginCache.destroyCorePlugins = function () +{ + for (var key in corePlugins) + { + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } + } +}; + +/** + * Removes all Custom Plugins. + * + * @method Phaser.Plugins.PluginCache.destroyCustomPlugins + * @since 3.12.0 + */ +PluginCache.destroyCustomPlugins = function () +{ + for (var key in customPlugins) + { + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } + } +}; + +module.exports = PluginCache; + + /***/ }), /***/ "../../../src/plugins/ScenePlugin.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/plugins/ScenePlugin.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2020 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -26892,6 +29314,7 @@ var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene * * @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. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. */ var ScenePlugin = new Class({ @@ -26899,7 +29322,7 @@ var ScenePlugin = new Class({ initialize: - function ScenePlugin (scene, pluginManager) + function ScenePlugin (scene, pluginManager, pluginKey) { BasePlugin.call(this, pluginManager); @@ -26929,6 +29352,19 @@ var ScenePlugin = new Class({ */ this.systems = scene.sys; + /** + * The key under which this plugin was installed into the Scene Systems. + * + * 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#pluginKey + * @type {string} + * @readonly + * @since 3.54.0 + */ + this.pluginKey = pluginKey; + scene.sys.events.once(SceneEvents.BOOT, this.boot, this); }, @@ -26973,7 +29409,7 @@ var ScenePlugin = new Class({ /** * Game instance has been destroyed. - * + * * You must release everything in here, all references, all objects, free it all up. * * @method Phaser.Plugins.ScenePlugin#destroy @@ -26995,21 +29431,21 @@ module.exports = ScenePlugin; /***/ }), /***/ "../../../src/renderer/BlendModes.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/BlendModes.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Phaser Blend Modes. - * + * * @namespace Phaser.BlendModes * @since 3.0.0 */ @@ -27018,7 +29454,7 @@ module.exports = { /** * Skips the Blend Mode check in the renderer. - * + * * @name Phaser.BlendModes.SKIP_CHECK * @type {number} * @const @@ -27029,7 +29465,7 @@ module.exports = { /** * 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 {number} * @const @@ -27040,7 +29476,7 @@ module.exports = { /** * Add blend mode. For Canvas and WebGL. * Where both shapes overlap the color is determined by adding color values. - * + * * @name Phaser.BlendModes.ADD * @type {number} * @const @@ -27051,7 +29487,7 @@ module.exports = { /** * 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 {number} * @const @@ -27062,7 +29498,7 @@ module.exports = { /** * 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 {number} * @const @@ -27073,7 +29509,7 @@ module.exports = { /** * 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 {number} * @const @@ -27084,7 +29520,7 @@ module.exports = { /** * Darken blend mode. For Canvas only. * Retains the darkest pixels of both layers. - * + * * @name Phaser.BlendModes.DARKEN * @type {number} * @const @@ -27095,7 +29531,7 @@ module.exports = { /** * Lighten blend mode. For Canvas only. * Retains the lightest pixels of both layers. - * + * * @name Phaser.BlendModes.LIGHTEN * @type {number} * @const @@ -27106,7 +29542,7 @@ module.exports = { /** * Color Dodge blend mode. For Canvas only. * Divides the bottom layer by the inverted top layer. - * + * * @name Phaser.BlendModes.COLOR_DODGE * @type {number} * @const @@ -27117,7 +29553,7 @@ module.exports = { /** * 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 {number} * @const @@ -27128,7 +29564,7 @@ module.exports = { /** * 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 {number} * @const @@ -27139,7 +29575,7 @@ module.exports = { /** * 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 {number} * @const @@ -27150,7 +29586,7 @@ module.exports = { /** * 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 {number} * @const @@ -27161,7 +29597,7 @@ module.exports = { /** * Exclusion blend mode. For Canvas only. * Like difference, but with lower contrast. - * + * * @name Phaser.BlendModes.EXCLUSION * @type {number} * @const @@ -27172,7 +29608,7 @@ module.exports = { /** * 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 {number} * @const @@ -27183,7 +29619,7 @@ module.exports = { /** * 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 {number} * @const @@ -27194,7 +29630,7 @@ module.exports = { /** * 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 {number} * @const @@ -27205,7 +29641,7 @@ module.exports = { /** * 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 {number} * @const @@ -27215,7 +29651,7 @@ module.exports = { /** * Alpha erase blend mode. For Canvas and WebGL. - * + * * @name Phaser.BlendModes.ERASE * @type {number} * @const @@ -27226,7 +29662,7 @@ module.exports = { /** * 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 {number} * @const @@ -27237,7 +29673,7 @@ module.exports = { /** * 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 {number} * @const @@ -27248,7 +29684,7 @@ module.exports = { /** * 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 {number} * @const @@ -27259,7 +29695,7 @@ module.exports = { /** * Destination-over blend mode. For Canvas only. * New shapes are drawn behind the existing canvas content. - * + * * @name Phaser.BlendModes.DESTINATION_OVER * @type {number} * @const @@ -27270,7 +29706,7 @@ module.exports = { /** * 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 {number} * @const @@ -27281,7 +29717,7 @@ module.exports = { /** * 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 {number} * @const @@ -27292,7 +29728,7 @@ module.exports = { /** * 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 {number} * @const @@ -27303,7 +29739,7 @@ module.exports = { /** * Lighten blend mode. For Canvas only. * Where both shapes overlap the color is determined by adding color values. - * + * * @name Phaser.BlendModes.LIGHTER * @type {number} * @const @@ -27314,7 +29750,7 @@ module.exports = { /** * Copy blend mode. For Canvas only. * Only the new shape is shown. - * + * * @name Phaser.BlendModes.COPY * @type {number} * @const @@ -27325,7 +29761,7 @@ module.exports = { /** * Xor blend mode. For Canvas only. * Shapes are made transparent where both overlap and drawn normal everywhere else. - * + * * @name Phaser.BlendModes.XOR * @type {number} * @const @@ -27338,272 +29774,75 @@ module.exports = { /***/ }), -/***/ "../../../src/renderer/events/POST_RENDER_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/events/POST_RENDER_EVENT.js ***! - \*******************************************************************/ +/***/ "../../../src/renderer/ScaleModes.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Post-Render Event. + * Phaser Scale Modes. * - * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes, - * has completed, but before any pending snap shots have been taken. - * - * @event Phaser.Renderer.Events#POST_RENDER - * @since 3.50.0 - */ -module.exports = 'postrender'; - - -/***/ }), - -/***/ "../../../src/renderer/events/PRE_RENDER_EVENT.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/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} + * @namespace Phaser.ScaleModes + * @since 3.0.0 */ -/** - * The Pre-Render Event. - * - * This event is dispatched by the Phaser Renderer. This happens right at the start of the render - * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been - * reset ready for the render. - * - * @event Phaser.Renderer.Events#PRE_RENDER - * @since 3.50.0 - */ -module.exports = 'prerender'; +var ScaleModes = { + /** + * Default Scale Mode (Linear). + * + * @name Phaser.ScaleModes.DEFAULT + * @type {number} + * @readonly + * @since 3.0.0 + */ + DEFAULT: 0, -/***/ }), + /** + * Linear Scale Mode. + * + * @name Phaser.ScaleModes.LINEAR + * @type {number} + * @readonly + * @since 3.0.0 + */ + LINEAR: 0, -/***/ "../../../src/renderer/events/RENDER_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/events/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 Render Event. - * - * This event is dispatched by the Phaser Renderer for every camera in every Scene. - * - * It is dispatched before any of the children in the Scene have been rendered. - * - * @event Phaser.Renderer.Events#RENDER - * @since 3.50.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered. - */ -module.exports = 'render'; - - -/***/ }), - -/***/ "../../../src/renderer/events/RESIZE_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/events/RESIZE_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 Renderer Resize Event. - * - * This event is dispatched by the Phaser Renderer when it is resized, usually as a result - * of the Scale Manager resizing. - * - * @event Phaser.Renderer.Events#RESIZE - * @since 3.50.0 - * - * @param {number} width - The new width of the renderer. - * @param {number} height - The new height of the renderer. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ "../../../src/renderer/events/index.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/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.Renderer.Events - */ - -module.exports = { - - POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "../../../src/renderer/events/POST_RENDER_EVENT.js"), - PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "../../../src/renderer/events/PRE_RENDER_EVENT.js"), - RENDER: __webpack_require__(/*! ./RENDER_EVENT */ "../../../src/renderer/events/RENDER_EVENT.js"), - RESIZE: __webpack_require__(/*! ./RESIZE_EVENT */ "../../../src/renderer/events/RESIZE_EVENT.js") + /** + * Nearest Scale Mode. + * + * @name Phaser.ScaleModes.NEAREST + * @type {number} + * @readonly + * @since 3.0.0 + */ + NEAREST: 1 }; - -/***/ }), - -/***/ "../../../src/renderer/webgl/pipelines/const.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/webgl/pipelines/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 PIPELINE_CONST = { - - /** - * The Bitmap Mask Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', - - /** - * The Light 2D Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - LIGHT_PIPELINE: 'Light2D', - - /** - * The Point Light Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POINTLIGHT_PIPELINE: 'PointLightPipeline', - - /** - * The Single Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - SINGLE_PIPELINE: 'SinglePipeline', - - /** - * The Multi Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - MULTI_PIPELINE: 'MultiPipeline', - - /** - * The Rope Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - ROPE_PIPELINE: 'RopePipeline', - - /** - * The Graphics and Shapes Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - GRAPHICS_PIPELINE: 'GraphicsPipeline', - - /** - * The Post FX Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POSTFX_PIPELINE: 'PostFXPipeline', - - /** - * The Utility Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - UTILITY_PIPELINE: 'UtilityPipeline' -}; - -module.exports = PIPELINE_CONST; +module.exports = ScaleModes; /***/ }), /***/ "../../../src/scale/events/RESIZE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27616,6 +29855,7 @@ module.exports = PIPELINE_CONST; * scaling your own game content. * * @event Phaser.Scale.Events#RESIZE + * @type {string} * @since 3.16.1 * * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. @@ -27630,15 +29870,15 @@ module.exports = 'resize'; /***/ }), /***/ "../../../src/scene/events/ADDED_TO_SCENE_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27647,9 +29887,10 @@ module.exports = 'resize'; * * 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)`. + * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`. * * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @type {string} * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. @@ -27661,28 +29902,29 @@ module.exports = 'addedtoscene'; /***/ }), /***/ "../../../src/scene/events/BOOT_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('boot', listener)`. + * * @event Phaser.Scenes.Events#BOOT + * @type {string} * @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'; @@ -27691,32 +29933,33 @@ module.exports = 'boot'; /***/ }), /***/ "../../../src/scene/events/CREATE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('create', listener)`. + * * @event Phaser.Scenes.Events#CREATE + * @type {string} * @since 3.17.0 - * + * * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. */ module.exports = 'create'; @@ -27725,30 +29968,31 @@ module.exports = 'create'; /***/ }), /***/ "../../../src/scene/events/DESTROY_EVENT.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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'; @@ -27757,29 +30001,30 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/scene/events/PAUSE_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('pause', listener)`. + * * @event Phaser.Scenes.Events#PAUSE + * @type {string} * @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. */ @@ -27789,25 +30034,25 @@ module.exports = 'pause'; /***/ }), /***/ "../../../src/scene/events/POST_UPDATE_EVENT.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -27815,13 +30060,14 @@ module.exports = 'pause'; * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`. - * + * Listen to it from a Scene using `this.events.on('postupdate', listener)`. + * * A Scene will only run its step if it is active. - * + * * @event Phaser.Scenes.Events#POST_UPDATE + * @type {string} * @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. @@ -27832,9 +30078,9 @@ module.exports = 'postupdate'; /***/ }), /***/ "../../../src/scene/events/PRE_RENDER_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/PRE_RENDER_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27858,12 +30104,14 @@ module.exports = 'postupdate'; * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to this event from a Scene using `this.scene.events.on('prerender', listener)`. + * Listen to this event from a Scene using `this.events.on('prerender', listener)`. * * A Scene will only render if it is visible. + * * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. * * @event Phaser.Scenes.Events#PRE_RENDER + * @type {string} * @since 3.53.0 * * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. @@ -27874,25 +30122,25 @@ module.exports = 'prerender'; /***/ }), /***/ "../../../src/scene/events/PRE_UPDATE_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -27900,13 +30148,14 @@ module.exports = 'prerender'; * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`. - * + * Listen to it from a Scene using `this.events.on('preupdate', listener)`. + * * A Scene will only run its step if it is active. - * + * * @event Phaser.Scenes.Events#PRE_UPDATE + * @type {string} * @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. @@ -27917,30 +30166,31 @@ module.exports = 'preupdate'; /***/ }), /***/ "../../../src/scene/events/READY_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/READY_EVENT.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('ready', listener)`. + * * @event Phaser.Scenes.Events#READY + * @type {string} * @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. */ @@ -27950,15 +30200,15 @@ module.exports = 'ready'; /***/ }), /***/ "../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! - \***********************************************************************/ +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! + \*********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27967,9 +30217,10 @@ module.exports = 'ready'; * * 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)`. + * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`. * * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @type {string} * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. @@ -27981,25 +30232,25 @@ module.exports = 'removedfromscene'; /***/ }), /***/ "../../../src/scene/events/RENDER_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -28007,14 +30258,16 @@ module.exports = 'removedfromscene'; * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to it from a Scene using `this.scene.events.on('render', listener)`. + * Listen to it from a Scene using `this.events.on('render', listener)`. * * A Scene will only render if it is visible. + * * By the time this event is dispatched, the Scene will have already been rendered. - * + * * @event Phaser.Scenes.Events#RENDER + * @type {string} * @since 3.0.0 - * + * * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. */ module.exports = 'render'; @@ -28023,29 +30276,30 @@ module.exports = 'render'; /***/ }), /***/ "../../../src/scene/events/RESUME_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('resume', listener)`. + * * @event Phaser.Scenes.Events#RESUME + * @type {string} * @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. */ @@ -28055,32 +30309,33 @@ module.exports = 'resume'; /***/ }), /***/ "../../../src/scene/events/SHUTDOWN_EVENT.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28090,29 +30345,30 @@ module.exports = 'shutdown'; /***/ }), /***/ "../../../src/scene/events/SLEEP_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('sleep', listener)`. + * * @event Phaser.Scenes.Events#SLEEP + * @type {string} * @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. */ @@ -28122,28 +30378,29 @@ module.exports = 'sleep'; /***/ }), /***/ "../../../src/scene/events/START_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/START_EVENT.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('start', listener)`. + * * @event Phaser.Scenes.Events#START + * @type {string} * @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'; @@ -28152,39 +30409,40 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @since 3.5.0 - * + * * @param {Phaser.Scene} scene -The Scene on which the transitioned completed. */ module.exports = 'transitioncomplete'; @@ -28193,39 +30451,40 @@ module.exports = 'transitioncomplete'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_INIT_EVENT.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28235,36 +30494,37 @@ module.exports = 'transitioninit'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_OUT_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28274,42 +30534,43 @@ module.exports = 'transitionout'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_START_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28319,37 +30580,38 @@ module.exports = 'transitionstart'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_WAKE_EVENT.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28359,39 +30621,40 @@ module.exports = 'transitionwake'; /***/ }), /***/ "../../../src/scene/events/UPDATE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped. * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to it from a Scene using `this.scene.events.on('update', listener)`. - * + * Listen to it from a Scene using `this.events.on('update', listener)`. + * * A Scene will only run its step if it is active. - * + * * @event Phaser.Scenes.Events#UPDATE + * @type {string} * @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. @@ -28402,29 +30665,30 @@ module.exports = 'update'; /***/ }), /***/ "../../../src/scene/events/WAKE_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('wake', listener)`. + * * @event Phaser.Scenes.Events#WAKE + * @type {string} * @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. */ @@ -28434,15 +30698,15 @@ module.exports = 'wake'; /***/ }), /***/ "../../../src/scene/events/index.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/index.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28478,18 +30742,880 @@ module.exports = { }; +/***/ }), + +/***/ "../../../src/textures/Frame.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var Clamp = __webpack_require__(/*! ../math/Clamp */ "../../../src/math/Clamp.js"); +var Extend = __webpack_require__(/*! ../utils/object/Extend */ "../../../src/utils/object/Extend.js"); + +/** + * @classdesc + * A Frame is a section of a Texture. + * + * @class Frame + * @memberof Phaser.Textures + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of. + * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture. + * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of. + * @param {number} x - The x coordinate of the top-left of this Frame. + * @param {number} y - The y coordinate of the top-left of this Frame. + * @param {number} width - The width of this Frame. + * @param {number} height - The height of this Frame. + */ +var Frame = new Class({ + + initialize: + + function Frame (texture, name, sourceIndex, x, y, width, height) + { + /** + * The Texture this Frame is a part of. + * + * @name Phaser.Textures.Frame#texture + * @type {Phaser.Textures.Texture} + * @since 3.0.0 + */ + this.texture = texture; + + /** + * The name of this Frame. + * The name is unique within the Texture. + * + * @name Phaser.Textures.Frame#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The TextureSource this Frame is part of. + * + * @name Phaser.Textures.Frame#source + * @type {Phaser.Textures.TextureSource} + * @since 3.0.0 + */ + this.source = texture.source[sourceIndex]; + + /** + * The index of the TextureSource in the Texture sources array. + * + * @name Phaser.Textures.Frame#sourceIndex + * @type {number} + * @since 3.0.0 + */ + this.sourceIndex = sourceIndex; + + /** + * A reference to the Texture Source WebGL Texture that this Frame is using. + * + * @name Phaser.Textures.Frame#glTexture + * @type {?WebGLTexture} + * @default null + * @since 3.11.0 + */ + this.glTexture = this.source.glTexture; + + /** + * X position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutX + * @type {number} + * @since 3.0.0 + */ + this.cutX; + + /** + * Y position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutY + * @type {number} + * @since 3.0.0 + */ + this.cutY; + + /** + * The width of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutWidth + * @type {number} + * @since 3.0.0 + */ + this.cutWidth; + + /** + * The height of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutHeight + * @type {number} + * @since 3.0.0 + */ + this.cutHeight; + + /** + * The X rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The Y rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The rendering width of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#width + * @type {number} + * @since 3.0.0 + */ + this.width; + + /** + * The rendering height of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#height + * @type {number} + * @since 3.0.0 + */ + this.height; + + /** + * Half the width, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfWidth + * @type {number} + * @since 3.0.0 + */ + this.halfWidth; + + /** + * Half the height, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfHeight + * @type {number} + * @since 3.0.0 + */ + this.halfHeight; + + /** + * The x center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerX + * @type {number} + * @since 3.0.0 + */ + this.centerX; + + /** + * The y center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerY + * @type {number} + * @since 3.0.0 + */ + this.centerY; + + /** + * The horizontal pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotX = 0; + + /** + * The vertical pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotY = 0; + + /** + * Does this Frame have a custom pivot point? + * + * @name Phaser.Textures.Frame#customPivot + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.customPivot = false; + + /** + * **CURRENTLY UNSUPPORTED** + * + * Is this frame is rotated or not in the Texture? + * Rotation allows you to use rotated frames in texture atlas packing. + * It has nothing to do with Sprite rotation. + * + * @name Phaser.Textures.Frame#rotated + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.rotated = false; + + /** + * Over-rides the Renderer setting. + * -1 = use Renderer Setting + * 0 = No rounding + * 1 = Round + * + * @name Phaser.Textures.Frame#autoRound + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.autoRound = -1; + + /** + * Any Frame specific custom data can be stored here. + * + * @name Phaser.Textures.Frame#customData + * @type {object} + * @since 3.0.0 + */ + this.customData = {}; + + /** + * WebGL UV u0 value. + * + * @name Phaser.Textures.Frame#u0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u0 = 0; + + /** + * WebGL UV v0 value. + * + * @name Phaser.Textures.Frame#v0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v0 = 0; + + /** + * WebGL UV u1 value. + * + * @name Phaser.Textures.Frame#u1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u1 = 0; + + /** + * WebGL UV v1 value. + * + * @name Phaser.Textures.Frame#v1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v1 = 0; + + /** + * The un-modified source frame, trim and UV data. + * + * @name Phaser.Textures.Frame#data + * @type {object} + * @private + * @since 3.0.0 + */ + this.data = { + cut: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + trim: false, + sourceSize: { + w: 0, + h: 0 + }, + spriteSourceSize: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + radius: 0, + drawImage: { + x: 0, + y: 0, + width: 0, + height: 0 + } + }; + + this.setSize(width, height, x, y); + }, + + /** + * Sets the width, height, x and y of this Frame. + * + * This is called automatically by the constructor + * and should rarely be changed on-the-fly. + * + * @method Phaser.Textures.Frame#setSize + * @since 3.7.0 + * + * @param {number} width - The width of the frame before being trimmed. + * @param {number} height - The height of the frame before being trimmed. + * @param {number} [x=0] - The x coordinate of the top-left of this Frame. + * @param {number} [y=0] - The y coordinate of the top-left of this Frame. + * + * @return {this} This Frame object. + */ + setSize: function (width, height, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.cutX = x; + this.cutY = y; + this.cutWidth = width; + this.cutHeight = height; + + this.width = width; + this.height = height; + + this.halfWidth = Math.floor(width * 0.5); + this.halfHeight = Math.floor(height * 0.5); + + this.centerX = Math.floor(width / 2); + this.centerY = Math.floor(height / 2); + + var data = this.data; + var cut = data.cut; + + cut.x = x; + cut.y = y; + cut.w = width; + cut.h = height; + cut.r = x + width; + cut.b = y + height; + + data.sourceSize.w = width; + data.sourceSize.h = height; + + data.spriteSourceSize.w = width; + data.spriteSourceSize.h = height; + + data.radius = 0.5 * Math.sqrt(width * width + height * height); + + var drawImage = data.drawImage; + + drawImage.x = x; + drawImage.y = y; + drawImage.width = width; + drawImage.height = height; + + return this.updateUVs(); + }, + + /** + * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data. + * + * @method Phaser.Textures.Frame#setTrim + * @since 3.0.0 + * + * @param {number} actualWidth - The width of the frame before being trimmed. + * @param {number} actualHeight - The height of the frame before being trimmed. + * @param {number} destX - The destination X position of the trimmed frame for display. + * @param {number} destY - The destination Y position of the trimmed frame for display. + * @param {number} destWidth - The destination width of the trimmed frame for display. + * @param {number} destHeight - The destination height of the trimmed frame for display. + * + * @return {this} This Frame object. + */ + setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight) + { + var data = this.data; + var ss = data.spriteSourceSize; + + // Store actual values + + data.trim = true; + + data.sourceSize.w = actualWidth; + data.sourceSize.h = actualHeight; + + ss.x = destX; + ss.y = destY; + ss.w = destWidth; + ss.h = destHeight; + ss.r = destX + destWidth; + ss.b = destY + destHeight; + + // Adjust properties + this.x = destX; + this.y = destY; + + this.width = destWidth; + this.height = destHeight; + + this.halfWidth = destWidth * 0.5; + this.halfHeight = destHeight * 0.5; + + this.centerX = Math.floor(destWidth / 2); + this.centerY = Math.floor(destHeight / 2); + + return this.updateUVs(); + }, + + /** + * Takes a crop data object and, based on the rectangular region given, calculates the + * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. + * + * This is called directly by the Game Object Texture Components `setCrop` method. + * Please use that method to crop a Game Object. + * + * @method Phaser.Textures.Frame#setCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. + * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height. + * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width. + * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + setCropUVs: function (crop, x, y, width, height, flipX, flipY) + { + // Clamp the input values + + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + var rw = this.realWidth; + var rh = this.realHeight; + + x = Clamp(x, 0, rw); + y = Clamp(y, 0, rh); + + width = Clamp(width, 0, rw - x); + height = Clamp(height, 0, rh - y); + + var ox = cx + x; + var oy = cy + y; + var ow = width; + var oh = height; + + var data = this.data; + + if (data.trim) + { + var ss = data.spriteSourceSize; + + // Need to check for intersection between the cut area and the crop area + // If there is none, we set UV to be empty, otherwise set it to be the intersection area + + width = Clamp(width, 0, cw - x); + height = Clamp(height, 0, ch - y); + + var cropRight = x + width; + var cropBottom = y + height; + + var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom); + + if (intersects) + { + var ix = Math.max(ss.x, x); + var iy = Math.max(ss.y, y); + var iw = Math.min(ss.r, cropRight) - ix; + var ih = Math.min(ss.b, cropBottom) - iy; + + ow = iw; + oh = ih; + + if (flipX) + { + ox = cx + (cw - (ix - ss.x) - iw); + } + else + { + ox = cx + (ix - ss.x); + } + + if (flipY) + { + oy = cy + (ch - (iy - ss.y) - ih); + } + else + { + oy = cy + (iy - ss.y); + } + + x = ix; + y = iy; + + width = iw; + height = ih; + } + else + { + ox = 0; + oy = 0; + ow = 0; + oh = 0; + } + } + else + { + if (flipX) + { + ox = cx + (cw - x - width); + } + + if (flipY) + { + oy = cy + (ch - y - height); + } + } + + var tw = this.source.width; + var th = this.source.height; + + // Map the given coordinates into UV space, clamping to the 0-1 range. + + crop.u0 = Math.max(0, ox / tw); + crop.v0 = Math.max(0, oy / th); + crop.u1 = Math.min(1, (ox + ow) / tw); + crop.v1 = Math.min(1, (oy + oh) / th); + + crop.x = x; + crop.y = y; + + crop.cx = ox; + crop.cy = oy; + crop.cw = ow; + crop.ch = oh; + + crop.width = width; + crop.height = height; + + crop.flipX = flipX; + crop.flipY = flipY; + + return crop; + }, + + /** + * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object. + * Called automatically by `setFrame`. + * + * @method Phaser.Textures.Frame#updateCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + updateCropUVs: function (crop, flipX, flipY) + { + return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY); + }, + + /** + * Directly sets the canvas and WebGL UV data for this frame. + * + * Use this if you need to override the values that are generated automatically + * when the Frame is created. + * + * @method Phaser.Textures.Frame#setUVs + * @since 3.50.0 + * + * @param {number} width - Width of this frame for the Canvas data. + * @param {number} height - Height of this frame for the Canvas data. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * + * @return {this} This Frame object. + */ + setUVs: function (width, height, u0, v0, u1, v1) + { + // Canvas data + + var cd = this.data.drawImage; + + cd.width = width; + cd.height = height; + + // WebGL data + + this.u0 = u0; + this.v0 = v0; + + this.u1 = u1; + this.v1 = v1; + + return this; + }, + + /** + * Updates the internal WebGL UV cache and the drawImage cache. + * + * @method Phaser.Textures.Frame#updateUVs + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVs: function () + { + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + + // Canvas data + + var cd = this.data.drawImage; + + cd.width = cw; + cd.height = ch; + + // WebGL data + + var tw = this.source.width; + var th = this.source.height; + + this.u0 = cx / tw; + this.v0 = cy / th; + + this.u1 = (cx + cw) / tw; + this.v1 = (cy + ch) / th; + + return this; + }, + + /** + * Updates the internal WebGL UV cache. + * + * @method Phaser.Textures.Frame#updateUVsInverted + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVsInverted: function () + { + var tw = this.source.width; + var th = this.source.height; + + this.u0 = (this.cutX + this.cutHeight) / tw; + this.v0 = this.cutY / th; + + this.u1 = this.cutX / tw; + this.v1 = (this.cutY + this.cutWidth) / th; + + return this; + }, + + /** + * Clones this Frame into a new Frame object. + * + * @method Phaser.Textures.Frame#clone + * @since 3.0.0 + * + * @return {Phaser.Textures.Frame} A clone of this Frame. + */ + clone: function () + { + var clone = new Frame(this.texture, this.name, this.sourceIndex); + + clone.cutX = this.cutX; + clone.cutY = this.cutY; + clone.cutWidth = this.cutWidth; + clone.cutHeight = this.cutHeight; + + clone.x = this.x; + clone.y = this.y; + + clone.width = this.width; + clone.height = this.height; + + clone.halfWidth = this.halfWidth; + clone.halfHeight = this.halfHeight; + + clone.centerX = this.centerX; + clone.centerY = this.centerY; + + clone.rotated = this.rotated; + + clone.data = Extend(true, clone.data, this.data); + + clone.updateUVs(); + + return clone; + }, + + /** + * Destroys this Frame by nulling its reference to the parent Texture and and data objects. + * + * @method Phaser.Textures.Frame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.source = null; + this.texture = null; + this.glTexture = null; + this.customData = null; + this.data = null; + }, + + /** + * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realWidth + * @type {number} + * @readonly + * @since 3.0.0 + */ + realWidth: { + + get: function () + { + return this.data.sourceSize.w; + } + + }, + + /** + * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realHeight + * @type {number} + * @readonly + * @since 3.0.0 + */ + realHeight: { + + get: function () + { + return this.data.sourceSize.h; + } + + }, + + /** + * The radius of the Frame (derived from sqrt(w * w + h * h) / 2) + * + * @name Phaser.Textures.Frame#radius + * @type {number} + * @readonly + * @since 3.0.0 + */ + radius: { + + get: function () + { + return this.data.radius; + } + + }, + + /** + * Is the Frame trimmed or not? + * + * @name Phaser.Textures.Frame#trimmed + * @type {boolean} + * @readonly + * @since 3.0.0 + */ + trimmed: { + + get: function () + { + return this.data.trim; + } + + }, + + /** + * The Canvas drawImage data object. + * + * @name Phaser.Textures.Frame#canvasData + * @type {object} + * @readonly + * @since 3.0.0 + */ + canvasData: { + + get: function () + { + return this.data.drawImage; + } + + } + +}); + +module.exports = Frame; + + /***/ }), /***/ "../../../src/tweens/builders/GetBoolean.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/tweens/builders/GetBoolean.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28501,9 +31627,9 @@ module.exports = { * * @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. + * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. * - * @return {*} The retrieved value. + * @return {boolean} The retrieved value. */ var GetBoolean = function (source, key, defaultValue) { @@ -28527,106 +31653,116 @@ module.exports = GetBoolean; /***/ }), /***/ "../../../src/tweens/tween/const.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/tweens/tween/const.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +/** + * Phaser Tween States. + * + * @namespace Phaser.Tweens.States + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + +/** + * Phaser Tween state constants. + * + * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + var TWEEN_CONST = { /** * TweenData state. - * - * @name Phaser.Tweens.CREATED + * + * @name Phaser.Tweens.States.CREATED * @type {number} + * @const * @since 3.0.0 */ CREATED: 0, - /** - * TweenData state. - * - * @name Phaser.Tweens.INIT - * @type {number} - * @since 3.0.0 - */ - INIT: 1, + // 1 used to be INIT prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.DELAY + * + * @name Phaser.Tweens.States.DELAY * @type {number} + * @const * @since 3.0.0 */ DELAY: 2, - /** - * TweenData state. - * - * @name Phaser.Tweens.OFFSET_DELAY - * @type {number} - * @since 3.0.0 - */ - OFFSET_DELAY: 3, + // 3 used to be OFFSET_DELAY prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.PENDING_RENDER + * + * @name Phaser.Tweens.States.PENDING_RENDER * @type {number} + * @const * @since 3.0.0 */ PENDING_RENDER: 4, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_FORWARD + * + * @name Phaser.Tweens.States.PLAYING_FORWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_FORWARD: 5, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_BACKWARD + * + * @name Phaser.Tweens.States.PLAYING_BACKWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_BACKWARD: 6, /** * TweenData state. - * - * @name Phaser.Tweens.HOLD_DELAY + * + * @name Phaser.Tweens.States.HOLD_DELAY * @type {number} + * @const * @since 3.0.0 */ HOLD_DELAY: 7, /** * TweenData state. - * - * @name Phaser.Tweens.REPEAT_DELAY + * + * @name Phaser.Tweens.States.REPEAT_DELAY * @type {number} + * @const * @since 3.0.0 */ REPEAT_DELAY: 8, /** * TweenData state. - * - * @name Phaser.Tweens.COMPLETE + * + * @name Phaser.Tweens.States.COMPLETE * @type {number} + * @const * @since 3.0.0 */ COMPLETE: 9, @@ -28634,67 +31770,110 @@ var TWEEN_CONST = { // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_ADD + * Tween state. The Tween has been created but has not yet been added to the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING * @type {number} + * @const * @since 3.0.0 */ - PENDING_ADD: 20, + PENDING: 20, /** - * Tween state. - * - * @name Phaser.Tweens.PAUSED + * Tween state. The Tween is active within the Tween Manager. This means it is either playing, + * or was playing and is currently paused, but in both cases it's still being processed by + * the Tween Manager, so is considered 'active'. + * + * @name Phaser.Tweens.States.ACTIVE * @type {number} + * @const * @since 3.0.0 */ - PAUSED: 21, + ACTIVE: 21, /** - * Tween state. - * - * @name Phaser.Tweens.LOOP_DELAY + * Tween state. The Tween is waiting for a loop countdown to elapse. + * + * @name Phaser.Tweens.States.LOOP_DELAY * @type {number} + * @const * @since 3.0.0 */ LOOP_DELAY: 22, /** - * Tween state. - * - * @name Phaser.Tweens.ACTIVE + * Tween state. The Tween is waiting for a complete delay to elapse. + * + * @name Phaser.Tweens.States.COMPLETE_DELAY * @type {number} + * @const * @since 3.0.0 */ - ACTIVE: 23, + COMPLETE_DELAY: 23, /** - * Tween state. - * - * @name Phaser.Tweens.COMPLETE_DELAY + * Tween state. The Tween is waiting for a starting delay to elapse. + * + * @name Phaser.Tweens.States.START_DELAY * @type {number} + * @const * @since 3.0.0 */ - COMPLETE_DELAY: 24, + START_DELAY: 24, /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_REMOVE + * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING_REMOVE * @type {number} + * @const * @since 3.0.0 */ PENDING_REMOVE: 25, /** - * Tween state. - * - * @name Phaser.Tweens.REMOVED + * Tween state. The Tween has been removed from the Tween Manager. + * + * @name Phaser.Tweens.States.REMOVED * @type {number} + * @const * @since 3.0.0 */ - REMOVED: 26 + REMOVED: 26, + + /** + * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation, + * so will not be automatically removed by the Tween Manager. + * + * @name Phaser.Tweens.States.FINISHED + * @type {number} + * @const + * @since 3.60.0 + */ + FINISHED: 27, + + /** + * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager. + * + * @name Phaser.Tweens.States.DESTROYED + * @type {number} + * @const + * @since 3.60.0 + */ + DESTROYED: 28, + + /** + * A large integer value used for 'infinite' style countdowns. + * + * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not + * supported on IE. + * + * @name Phaser.Tweens.States.MAX + * @type {number} + * @const + * @since 3.60.0 + */ + MAX: 999999999999 }; @@ -28704,15 +31883,15 @@ module.exports = TWEEN_CONST; /***/ }), /***/ "../../../src/utils/Class.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/utils/Class.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28965,15 +32144,15 @@ module.exports = Class; /***/ }), /***/ "../../../src/utils/NOOP.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/utils/NOOP.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28997,15 +32176,15 @@ module.exports = NOOP; /***/ }), /***/ "../../../src/utils/array/Add.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Add.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29119,30 +32298,30 @@ module.exports = Add; /***/ }), /***/ "../../../src/utils/array/AddAt.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/AddAt.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -29246,15 +32425,15 @@ module.exports = AddAt; /***/ }), /***/ "../../../src/utils/array/BringToTop.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/BringToTop.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29289,15 +32468,15 @@ module.exports = BringToTop; /***/ }), /***/ "../../../src/utils/array/CountAllMatching.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/CountAllMatching.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29346,15 +32525,15 @@ module.exports = CountAllMatching; /***/ }), /***/ "../../../src/utils/array/Each.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Each.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29397,15 +32576,15 @@ module.exports = Each; /***/ }), /***/ "../../../src/utils/array/EachInRange.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/EachInRange.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29458,15 +32637,15 @@ module.exports = EachInRange; /***/ }), /***/ "../../../src/utils/array/FindClosestInSorted.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/FindClosestInSorted.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29544,18 +32723,66 @@ var FindClosestInSorted = function (value, array, key) module.exports = FindClosestInSorted; +/***/ }), + +/***/ "../../../src/utils/array/Flatten.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes an array and flattens it, returning a shallow-copy flattened array. + * + * @function Phaser.Utils.Array.Flatten + * @since 3.60.0 + * + * @param {array} array - The array to flatten. + * @param {array} [output] - An array to hold the results in. + * + * @return {array} The flattened output array. + */ +var Flatten = function (array, output) +{ + if (output === undefined) { output = []; } + + for (var i = 0; i < array.length; i++) + { + if (Array.isArray(array[i])) + { + Flatten(array[i], output); + } + else + { + output.push(array[i]); + } + } + + return output; +}; + +module.exports = Flatten; + + /***/ }), /***/ "../../../src/utils/array/GetAll.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetAll.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29614,15 +32841,15 @@ module.exports = GetAll; /***/ }), /***/ "../../../src/utils/array/GetFirst.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetFirst.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29678,15 +32905,15 @@ module.exports = GetFirst; /***/ }), /***/ "../../../src/utils/array/GetRandom.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetRandom.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29717,16 +32944,154 @@ module.exports = GetRandom; /***/ }), -/***/ "../../../src/utils/array/MoveDown.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveDown.js ***! - \******************************************************/ +/***/ "../../../src/utils/array/MoveAbove.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element above another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveAbove + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move above base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveAbove = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex > baseIndex) + { + // item1 is already above item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === array.length - 1) + { + array.push(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveAbove; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveBelow.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element below another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveBelow + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move below base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveBelow = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex < baseIndex) + { + // item1 is already below item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === 0) + { + array.unshift(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveBelow; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveDown.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29765,15 +33130,15 @@ module.exports = MoveDown; /***/ }), /***/ "../../../src/utils/array/MoveTo.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveTo.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29817,15 +33182,15 @@ module.exports = MoveTo; /***/ }), /***/ "../../../src/utils/array/MoveUp.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveUp.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29864,15 +33229,15 @@ module.exports = MoveUp; /***/ }), /***/ "../../../src/utils/array/NumberArray.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/NumberArray.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29962,15 +33327,15 @@ module.exports = NumberArray; /***/ }), /***/ "../../../src/utils/array/NumberArrayStep.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/NumberArrayStep.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29984,7 +33349,7 @@ var RoundAwayFromZero = __webpack_require__(/*! ../../math/RoundAwayFromZero */ * * 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] @@ -30044,15 +33409,15 @@ module.exports = NumberArrayStep; /***/ }), /***/ "../../../src/utils/array/QuickSelect.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/QuickSelect.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30171,15 +33536,15 @@ module.exports = QuickSelect; /***/ }), /***/ "../../../src/utils/array/Range.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Range.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30209,29 +33574,29 @@ var BuildChunk = function (a, b, qty) * * 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 * @@ -30314,15 +33679,15 @@ module.exports = Range; /***/ }), /***/ "../../../src/utils/array/Remove.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Remove.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30408,15 +33773,15 @@ module.exports = Remove; /***/ }), /***/ "../../../src/utils/array/RemoveAt.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveAt.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30424,9 +33789,9 @@ var SpliceOne = __webpack_require__(/*! ./SpliceOne */ "../../../src/utils/array /** * 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 @@ -30464,15 +33829,15 @@ module.exports = RemoveAt; /***/ }), /***/ "../../../src/utils/array/RemoveBetween.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveBetween.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30480,9 +33845,9 @@ var SafeRange = __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array /** * 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 @@ -30532,15 +33897,15 @@ module.exports = RemoveBetween; /***/ }), /***/ "../../../src/utils/array/RemoveRandomElement.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveRandomElement.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30575,15 +33940,15 @@ module.exports = RemoveRandomElement; /***/ }), /***/ "../../../src/utils/array/Replace.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Replace.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30624,15 +33989,15 @@ module.exports = Replace; /***/ }), /***/ "../../../src/utils/array/RotateLeft.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RotateLeft.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30669,15 +34034,15 @@ module.exports = RotateLeft; /***/ }), /***/ "../../../src/utils/array/RotateRight.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RotateRight.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30714,21 +34079,21 @@ module.exports = RotateRight; /***/ }), /***/ "../../../src/utils/array/SafeRange.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SafeRange.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 * @@ -30746,8 +34111,7 @@ var SafeRange = function (array, startIndex, endIndex, throwError) if (startIndex < 0 || startIndex > len || startIndex >= endIndex || - endIndex > len || - startIndex + endIndex > len) + endIndex > len) { if (throwError) { @@ -30768,15 +34132,15 @@ module.exports = SafeRange; /***/ }), /***/ "../../../src/utils/array/SendToBack.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SendToBack.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30811,15 +34175,15 @@ module.exports = SendToBack; /***/ }), /***/ "../../../src/utils/array/SetAll.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SetAll.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30871,15 +34235,15 @@ module.exports = SetAll; /***/ }), /***/ "../../../src/utils/array/Shuffle.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Shuffle.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30917,15 +34281,15 @@ module.exports = Shuffle; /***/ }), /***/ "../../../src/utils/array/SortByDigits.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SortByDigits.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30960,15 +34324,15 @@ module.exports = SortByDigits; /***/ }), /***/ "../../../src/utils/array/SpliceOne.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SpliceOne.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31011,19 +34375,21 @@ module.exports = SpliceOne; /***/ }), /***/ "../../../src/utils/array/StableSort.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/StableSort.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js ***! + \******************************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Angry Bytes (and contributors) - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Device = __webpack_require__(/*! ../../device */ "../../../src/device/index.js"); + /** * The comparator function. * @@ -31175,6 +34541,17 @@ var StableSort = function (array, compare) { if (compare === undefined) { compare = Compare; } + // Short-circuit when there's nothing to sort. + if (!array || array.length < 2) + { + return array; + } + + if (Device.features.stableSort) + { + return array.sort(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. @@ -31192,15 +34569,15 @@ module.exports = StableSort; /***/ }), /***/ "../../../src/utils/array/Swap.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Swap.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31222,7 +34599,7 @@ var Swap = function (array, item1, item2) { if (item1 === item2) { - return; + return array; } var index1 = array.indexOf(item1); @@ -31245,15 +34622,15 @@ module.exports = Swap; /***/ }), /***/ "../../../src/utils/array/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/index.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31272,12 +34649,15 @@ module.exports = { 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"), + Flatten: __webpack_require__(/*! ./Flatten */ "../../../src/utils/array/Flatten.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"), + MoveAbove: __webpack_require__(/*! ./MoveAbove */ "../../../src/utils/array/MoveAbove.js"), + MoveBelow: __webpack_require__(/*! ./MoveBelow */ "../../../src/utils/array/MoveBelow.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"), @@ -31304,15 +34684,15 @@ module.exports = { /***/ }), /***/ "../../../src/utils/array/matrix/CheckMatrix.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/CheckMatrix.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31320,7 +34700,7 @@ module.exports = { * 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. This is an example matrix: + * have the same length. This is an example matrix: * * ``` * [ @@ -31345,7 +34725,7 @@ module.exports = { */ var CheckMatrix = function (matrix) { - if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0])) + if (!Array.isArray(matrix) || !Array.isArray(matrix[0])) { return false; } @@ -31371,15 +34751,15 @@ module.exports = CheckMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/MatrixToString.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/MatrixToString.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31471,15 +34851,15 @@ module.exports = MatrixToString; /***/ }), /***/ "../../../src/utils/array/matrix/ReverseColumns.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseColumns.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31521,15 +34901,15 @@ module.exports = ReverseColumns; /***/ }), /***/ "../../../src/utils/array/matrix/ReverseRows.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseRows.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31576,15 +34956,15 @@ module.exports = ReverseRows; /***/ }), /***/ "../../../src/utils/array/matrix/Rotate180.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/Rotate180.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31628,15 +35008,15 @@ module.exports = Rotate180; /***/ }), /***/ "../../../src/utils/array/matrix/RotateLeft.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateLeft.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31680,15 +35060,15 @@ module.exports = RotateLeft; /***/ }), /***/ "../../../src/utils/array/matrix/RotateMatrix.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateMatrix.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31771,15 +35151,15 @@ module.exports = RotateMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/RotateRight.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateRight.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31823,15 +35203,15 @@ module.exports = RotateRight; /***/ }), /***/ "../../../src/utils/array/matrix/TranslateMatrix.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/TranslateMatrix.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31917,15 +35297,15 @@ module.exports = TranslateMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/TransposeMatrix.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/TransposeMatrix.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31984,15 +35364,15 @@ module.exports = TransposeMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32019,15 +35399,15 @@ module.exports = { /***/ }), /***/ "../../../src/utils/object/DeepCopy.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/DeepCopy.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32073,15 +35453,15 @@ module.exports = DeepCopy; /***/ }), /***/ "../../../src/utils/object/Extend.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/Extend.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32179,15 +35559,15 @@ module.exports = Extend; /***/ }), /***/ "../../../src/utils/object/GetAdvancedValue.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32198,7 +35578,7 @@ var GetValue = __webpack_require__(/*! ./GetValue */ "../../../src/utils/object/ * Retrieves a value from an object. Allows for more advanced selection options, including: * * Allowed types: - * + * * Implicit * { * x: 4 @@ -32223,7 +35603,7 @@ var GetValue = __webpack_require__(/*! ./GetValue */ "../../../src/utils/object/ * { * x: { randFloat: [min, max] } * } - * + * * * @function Phaser.Utils.Objects.GetAdvancedValue * @since 3.0.0 @@ -32271,15 +35651,15 @@ module.exports = GetAdvancedValue; /***/ }), /***/ "../../../src/utils/object/GetFastValue.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetFastValue.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32319,69 +35699,116 @@ module.exports = GetFastValue; /***/ }), /***/ "../../../src/utils/object/GetValue.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetValue.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. + * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. + * + * The key is a string, which can be split based on the use of the period character. + * + * For example: + * + * ```javascript + * const source = { + * lives: 3, + * render: { + * screen: { + * width: 1024 + * } + * } + * } + * + * const lives = GetValue(source, 'lives', 1); + * const width = GetValue(source, 'render.screen.width', 800); + * const height = GetValue(source, 'render.screen.height', 600); + * ``` + * + * In the code above, `lives` will be 3 because it's defined at the top level of `source`. + * The `width` value will be 1024 because it can be found inside the `render.screen` object. + * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. * * @function Phaser.Utils.Objects.GetValue * @since 3.0.0 * - * @param {object} source - The object to retrieve the value from. + * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. * @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. + * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. * * @return {*} The value of the requested key. */ -var GetValue = function (source, key, defaultValue) +var GetValue = function (source, key, defaultValue, altSource) { - if (!source || typeof source === 'number') + if ((!source && !altSource) || typeof source === 'number') { return defaultValue; } - else if (source.hasOwnProperty(key)) + else if (source && source.hasOwnProperty(key)) { return source[key]; } + else if (altSource && altSource.hasOwnProperty(key)) + { + return altSource[key]; + } else if (key.indexOf('.') !== -1) { var keys = key.split('.'); - var parent = source; - var value = defaultValue; + var parentA = source; + var parentB = altSource; + var valueA = defaultValue; + var valueB = defaultValue; + var valueAFound = true; + var valueBFound = true; // Use for loop here so we can break early for (var i = 0; i < keys.length; i++) { - if (parent.hasOwnProperty(keys[i])) + if (parentA && parentA.hasOwnProperty(keys[i])) { - // Yes it has a key property, let's carry on down - value = parent[keys[i]]; - - parent = parent[keys[i]]; + // Yes parentA has a key property, let's carry on down + valueA = parentA[keys[i]]; + parentA = parentA[keys[i]]; } else { - // Can't go any further, so reset to default - value = defaultValue; - break; + valueAFound = false; + } + + if (parentB && parentB.hasOwnProperty(keys[i])) + { + // Yes parentB has a key property, let's carry on down + valueB = parentB[keys[i]]; + parentB = parentB[keys[i]]; + } + else + { + valueBFound = false; } } - return value; + if (valueAFound) + { + return valueA; + } + else if (valueBFound) + { + return valueB; + } + else + { + return defaultValue; + } } else { @@ -32395,15 +35822,15 @@ module.exports = GetValue; /***/ }), /***/ "../../../src/utils/object/IsPlainObject.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/IsPlainObject.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32424,7 +35851,7 @@ var IsPlainObject = function (obj) // - Any object or value whose internal [[Class]] property is not "[object Object]" // - DOM nodes // - window - if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) + if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) { return false; } @@ -32456,15 +35883,15 @@ module.exports = IsPlainObject; /***/ }), /***/ "../../../src/utils/string/Pad.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/string/Pad.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/string/Pad.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32477,13 +35904,13 @@ module.exports = IsPlainObject; * 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**` @@ -32495,7 +35922,7 @@ module.exports = IsPlainObject; * @param {number} [len=0] - The number of characters to be added. * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). - * + * * @return {string} The padded string. */ var Pad = function (str, len, pad, dir) @@ -32545,7 +35972,7 @@ module.exports = Pad; /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -32810,7 +36237,7 @@ module.exports = SpineFile; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -32825,9 +36252,6 @@ var SpineGameObject = __webpack_require__(/*! ./gameobject/SpineGameObject */ ". var SpineContainer = __webpack_require__(/*! ./container/SpineContainer */ "./container/SpineContainer.js"); var NOOP = __webpack_require__(/*! ../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); -// Plugin specific instance of the Spine Scene Renderer -var sceneRenderer; - /** * @classdesc * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. @@ -32880,6 +36304,17 @@ var sceneRenderer; * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any * subsequent Scenes. * + * ## A note about inlined data: + * + * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader + * at all. Instead, call the functions directly as required: + * + * scene.cache.json.add + * scene.cache.custom.spine.add + * scene.textures.addBase64 + * + * ## Using the plugin + * * 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 @@ -32931,6 +36366,7 @@ var sceneRenderer; * * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. */ var SpinePlugin = new Class({ @@ -32938,9 +36374,9 @@ var SpinePlugin = new Class({ initialize: - function SpinePlugin (scene, pluginManager) + function SpinePlugin (scene, pluginManager, pluginKey) { - ScenePlugin.call(this, scene, pluginManager); + ScenePlugin.call(this, scene, pluginManager, pluginKey); var game = pluginManager.game; @@ -33120,11 +36556,10 @@ var SpinePlugin = new Class({ }; } - var _this = this; - var add = function (x, y, key, animationName, loop) { - var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop); + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop); this.displayList.add(spineGO); this.updateList.add(spineGO); @@ -33140,7 +36575,8 @@ var SpinePlugin = new Class({ var animationName = GetValue(config, 'animationName', null); var loop = GetValue(config, 'loop', false); - var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop); + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop); if (addToScene !== undefined) { @@ -33170,7 +36606,8 @@ var SpinePlugin = new Class({ var addContainer = function (x, y, children) { - var spineGO = new SpineContainer(this.scene, _this, x, y, children); + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children); this.displayList.add(spineGO); @@ -33185,7 +36622,8 @@ var SpinePlugin = new Class({ var y = GetValue(config, 'y', 0); var children = GetValue(config, 'children', null); - var container = new SpineContainer(this.scene, _this, x, y, children); + var spinePlugin = this.scene.sys[pluginKey]; + var container = new SpineContainer(this.scene, spinePlugin, x, y, children); if (addToScene !== undefined) { @@ -33270,14 +36708,18 @@ var SpinePlugin = new Class({ } }; + var sceneRenderer = this.renderer.spineSceneRenderer; + if (!sceneRenderer) { sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); sceneRenderer.batcher.setBlendMode = setBlendMode; sceneRenderer.shapes.setBlendMode = setBlendMode; + + this.renderer.spineSceneRenderer = sceneRenderer; } - // All share the same instance + // All scene share the same instance this.sceneRenderer = sceneRenderer; this.skeletonRenderer = sceneRenderer.skeletonRenderer; this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; @@ -33448,12 +36890,14 @@ var SpinePlugin = new Class({ * @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. - * + * @param {object} [settings] - An external Settings configuration object { prefix: '' } + * * @return {Phaser.Loader.LoaderPlugin} The Loader instance. */ - spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) + spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings) { var multifile; + settings = settings || {}; if (Array.isArray(key)) { @@ -33461,6 +36905,9 @@ var SpinePlugin = new Class({ { multifile = new SpineFile(this, key[i]); + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + this.addFile(multifile.files); } } @@ -33468,6 +36915,9 @@ var SpinePlugin = new Class({ { multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + this.addFile(multifile.files); } @@ -33943,12 +37393,14 @@ var SpinePlugin = new Class({ this.pluginManager = null; + var sceneRenderer = this.renderer.spineSceneRenderer; + if (sceneRenderer) { sceneRenderer.dispose(); - sceneRenderer = null; } + this.renderer.spineSceneRenderer = null; this.sceneRenderer = null; } @@ -34037,7 +37489,7 @@ module.exports = SpinePlugin; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -34144,7 +37596,7 @@ module.exports = SpineContainer; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34256,7 +37708,7 @@ module.exports = SpineContainerCanvasRenderer; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34290,7 +37742,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34314,7 +37766,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34338,7 +37790,7 @@ module.exports = 'dispose'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34362,7 +37814,7 @@ module.exports = 'end'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34386,7 +37838,7 @@ module.exports = 'event'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34410,7 +37862,7 @@ module.exports = 'interrupted'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34434,7 +37886,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34465,7 +37917,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -34531,9 +37983,10 @@ var SpineGameObjectRender = __webpack_require__(/*! ./SpineGameObjectRender */ " * ``` * * 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. + * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup + * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable + * to get an accurate bounds. You can 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 @@ -34544,6 +37997,7 @@ var SpineGameObjectRender = __webpack_require__(/*! ./SpineGameObjectRender */ " * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. * * @class SpineGameObject + * @extends Phaser.GameObjects.GameObject * @constructor * @since 3.19.0 * @@ -34977,9 +38431,9 @@ var SpineGameObject = new Class({ * @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. * @param {boolean} [loop=false] - Should the animation, if set, loop or not? + * @param {object} [skeletonJSON] - The JSON data for the Skeleton. * * @return {this} This Game Object. */ @@ -36085,7 +39539,7 @@ module.exports = SpineGameObject; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -36212,7 +39666,7 @@ module.exports = SpineGameObjectCanvasRenderer; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -36257,6 +39711,8 @@ var __extends = (this && this.__extends) || (function () { return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); @@ -36947,7 +40403,7 @@ var spine; .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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; return AttachmentTimeline; }()); @@ -37747,7 +41203,7 @@ var spine; var slot = slots[i]; if (slot.attachmentState == setupState) { var attachmentName = slot.data.attachmentName; - slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); } } this.unkeyedState += 2; @@ -37860,7 +41316,7 @@ var spine; 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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; }; @@ -38490,9 +41946,9 @@ var spine; _this.toLoad--; _this.loaded++; }, function (state, responseText) { - _this.errors[path] = "Couldn't load binary " + path + ": status " + status + ", " + responseText; + _this.errors[path] = "Couldn't load binary ".concat(path, ": status ").concat(status, ", ").concat(responseText); if (error) - error(path, "Couldn't load binary " + path + ": status " + status + ", " + responseText); + error(path, "Couldn't load binary ".concat(path, ": status ").concat(status, ", ").concat(responseText)); _this.toLoad--; _this.loaded++; }); @@ -38510,9 +41966,9 @@ var spine; _this.toLoad--; _this.loaded++; }, function (state, responseText) { - _this.errors[path] = "Couldn't load text " + path + ": status " + status + ", " + responseText; + _this.errors[path] = "Couldn't load text ".concat(path, ": status ").concat(status, ", ").concat(responseText); if (error) - error(path, "Couldn't load text " + path + ": status " + status + ", " + responseText); + error(path, "Couldn't load text ".concat(path, ": status ").concat(status, ", ").concat(responseText)); _this.toLoad--; _this.loaded++; }); @@ -38535,11 +41991,11 @@ var spine; success(path, img); }; img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; + _this.errors[path] = "Couldn't load image ".concat(path); _this.toLoad--; _this.loaded++; if (error) - error(path, "Couldn't load image " + path); + error(path, "Couldn't load image ".concat(path)); }; if (this.rawDataUris[path]) path = this.rawDataUris[path]; @@ -38566,9 +42022,9 @@ var spine; } catch (e) { var ex = e; - _this.errors[path] = "Couldn't load texture atlas " + path + ": " + ex.message; + _this.errors[path] = "Couldn't load texture atlas ".concat(path, ": ").concat(ex.message); if (error) - error(path, "Couldn't load texture atlas " + path + ": " + ex.message); + error(path, "Couldn't load texture atlas ".concat(path, ": ").concat(ex.message)); _this.toLoad--; _this.loaded++; return; @@ -38591,17 +42047,17 @@ var spine; } catch (e) { var ex = e; - _this.errors[path] = "Couldn't load texture atlas " + path + ": " + ex.message; + _this.errors[path] = "Couldn't load texture atlas ".concat(path, ": ").concat(ex.message); if (error) - error(path, "Couldn't load texture atlas " + path + ": " + ex.message); + error(path, "Couldn't load texture atlas ".concat(path, ": ").concat(ex.message)); _this.toLoad--; _this.loaded++; } } else { - _this.errors[path] = "Couldn't load texture atlas page " + imagePath + "} of atlas " + path; + _this.errors[path] = "Couldn't load texture atlas page ".concat(imagePath, "} of atlas ").concat(path); if (error) - error(path, "Couldn't load texture atlas page " + imagePath + " of atlas " + path); + error(path, "Couldn't load texture atlas page ".concat(imagePath, " of atlas ").concat(path)); _this.toLoad--; _this.loaded++; } @@ -38610,9 +42066,9 @@ var spine; pageLoadError = true; pagesLoaded.count++; if (pagesLoaded.count == atlasPages.length) { - _this.errors[path] = "Couldn't load texture atlas page " + imagePath + "} of atlas " + path; + _this.errors[path] = "Couldn't load texture atlas page ".concat(imagePath, "} of atlas ").concat(path); if (error) - error(path, "Couldn't load texture atlas page " + imagePath + " of atlas " + path); + error(path, "Couldn't load texture atlas page ".concat(imagePath, " of atlas ").concat(path)); _this.toLoad--; _this.loaded++; } @@ -38623,9 +42079,9 @@ var spine; _loop_1(atlasPage); } }, function (state, responseText) { - _this.errors[path] = "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText; + _this.errors[path] = "Couldn't load texture atlas ".concat(path, ": status ").concat(status, ", ").concat(responseText); if (error) - error(path, "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText); + error(path, "Couldn't load texture atlas ".concat(path, ": status ").concat(status, ", ").concat(responseText)); _this.toLoad--; _this.loaded++; }); @@ -39791,7 +43247,7 @@ var spine; _this.rawAssets[path] = request.responseText; } else { - _this.errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + _this.errors[path] = "Couldn't load text ".concat(path, ": status ").concat(request.status, ", ").concat(request.responseText); } } }; @@ -39811,7 +43267,7 @@ var spine; _this.rawAssets[path] = JSON.parse(request.responseText); } else { - _this.errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + _this.errors[path] = "Couldn't load text ".concat(path, ": status ").concat(request.status, ", ").concat(request.responseText); } } }; @@ -39848,7 +43304,7 @@ var spine; _this.rawAssets[path] = img_1; }; img_1.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; + _this.errors[path] = "Couldn't load image ".concat(path); }; img_1.src = path; } @@ -42502,7 +45958,7 @@ var spine; return spine.BlendMode.Multiply; if (str == "screen") return spine.BlendMode.Screen; - throw new Error("Unknown blend mode: " + str); + throw new Error("Unknown blend mode: ".concat(str)); }; SkeletonJson.positionModeFromString = function (str) { str = str.toLowerCase(); @@ -42510,7 +45966,7 @@ var spine; return spine.PositionMode.Fixed; if (str == "percent") return spine.PositionMode.Percent; - throw new Error("Unknown position mode: " + str); + throw new Error("Unknown position mode: ".concat(str)); }; SkeletonJson.spacingModeFromString = function (str) { str = str.toLowerCase(); @@ -42520,7 +45976,7 @@ var spine; return spine.SpacingMode.Fixed; if (str == "percent") return spine.SpacingMode.Percent; - throw new Error("Unknown position mode: " + str); + throw new Error("Unknown position mode: ".concat(str)); }; SkeletonJson.rotateModeFromString = function (str) { str = str.toLowerCase(); @@ -42530,7 +45986,7 @@ var spine; return spine.RotateMode.Chain; if (str == "chainscale") return spine.RotateMode.ChainScale; - throw new Error("Unknown rotate mode: " + str); + throw new Error("Unknown rotate mode: ".concat(str)); }; SkeletonJson.transformModeFromString = function (str) { str = str.toLowerCase(); @@ -42544,7 +46000,7 @@ var spine; return spine.TransformMode.NoScale; if (str == "noscaleorreflection") return spine.TransformMode.NoScaleOrReflection; - throw new Error("Unknown transform mode: " + str); + throw new Error("Unknown transform mode: ".concat(str)); }; return SkeletonJson; }()); @@ -42809,7 +46265,7 @@ var spine; case "mipmaplinearnearest": return TextureFilter.MipMapLinearNearest; case "mipmapnearestlinear": return TextureFilter.MipMapNearestLinear; case "mipmaplinearlinear": return TextureFilter.MipMapLinearLinear; - default: throw new Error("Unknown texture filter " + text); + default: throw new Error("Unknown texture filter ".concat(text)); } }; Texture.wrapFromString = function (text) { @@ -42817,7 +46273,7 @@ var spine; case "mirroredtepeat": return TextureWrap.MirroredRepeat; case "clamptoedge": return TextureWrap.ClampToEdge; case "repeat": return TextureWrap.Repeat; - default: throw new Error("Unknown texture wrap " + text); + default: throw new Error("Unknown texture wrap ".concat(text)); } }; return Texture; @@ -44551,9 +48007,7 @@ var spine; } ctx.scale(1, -1); ctx.translate(-w / 2, -h / 2); - if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) { - ctx.globalAlpha = color.a; - } + ctx.globalAlpha = color.a; ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h); if (this.debugRendering) ctx.strokeRect(0, 0, w, h); @@ -44599,9 +48053,7 @@ var spine; var color = this.tempColor; color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha); var ctx = this.ctx; - if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) { - ctx.globalAlpha = color.a; - } + ctx.globalAlpha = color.a; for (var j = 0; j < triangles.length; j += 3) { var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8; var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7]; diff --git a/plugins/spine/dist/SpineCanvasPluginDebug.js.map b/plugins/spine/dist/SpineCanvasPluginDebug.js.map index e2793dc2b..dbfa5b89d 100644 --- a/plugins/spine/dist/SpineCanvasPluginDebug.js.map +++ b/plugins/spine/dist/SpineCanvasPluginDebug.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/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/DESTROY_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/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/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/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/Euler.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/renderer/events/POST_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/renderer/events/PRE_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/renderer/events/RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/renderer/events/RESIZE_EVENT.js","webpack:///D:/wamp/www/phaser/src/renderer/events/index.js","webpack:///D:/wamp/www/phaser/src/renderer/webgl/pipelines/const.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_RENDER_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/SortByDigits.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/TranslateMatrix.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/DeepCopy.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:///./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:///./runtimes/spine-canvas.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;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;;;;;;;;;;;;ACdA;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,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,mBAAmB,mBAAO,CAAC,oEAAuB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;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;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5TA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACx3BA;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,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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;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;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,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,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,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;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;;;;;;;;;;;;AC9IA;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,eAAe,mBAAO,CAAC,0EAA6B;AACpD,qBAAqB,mBAAO,CAAC,4FAAsC;AACnE,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qCAAqC,0CAA0C;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AChaA;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,gBAAgB;AAC/B;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,gBAAgB;AAC/B,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,gBAAgB;AAC/B;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,gBAAgB;AAC/B,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;AC5lBA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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;;;;;;;;;;;;AClCA;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACz0CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;;AAE7C,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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,OAAO;AAClB,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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;;;;;;;;;;;;AC/hBA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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,uBAAuB;AAC9C;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;;;;;;;;;;;;AC9OA;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,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;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;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;;;;;;;;;;;;AC1OA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACnFA;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,OAAO;AACnB;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;;;;;;;;;;;;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,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;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;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,8EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,4EAAoB;AAC5C,YAAY,mBAAO,CAAC,oEAAgB;AACpC,YAAY,mBAAO,CAAC,oEAAgB;;AAEpC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnGA;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;AACA;;;;;;;;;;;;ACvBA;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC9BA;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzKA;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,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AC/CA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,yCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;;AAE5C;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,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;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,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;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;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;;;;;;;;;;;;AC/rCA;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;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;;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;ACxkDA;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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAGC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;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;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;;AAEA,CAAC","file":"SpineCanvasPluginDebug.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\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(Events.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 {number}\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 Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @since 3.50.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 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 DESTROY: require('./DESTROY_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 Class = require('../../utils/Class');\r\nvar GameEvents = require('../../core/events');\r\nvar RenderEvents = require('../../renderer/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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\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.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 masks 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 * 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.\r\n * 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 this.createMask();\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this);\r\n\r\n if (renderer)\r\n {\r\n renderer.on(RenderEvents.RESIZE, this.createMask, this);\r\n }\r\n },\r\n\r\n /**\r\n * Creates the WebGL Texture2D objects and Framebuffers required for this\r\n * mask. If this mask has already been created, then `clearMask` is called first.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#createMask\r\n * @since 3.50.0\r\n */\r\n createMask: function ()\r\n {\r\n var renderer = this.renderer;\r\n\r\n if (!renderer || !renderer.gl)\r\n {\r\n return;\r\n }\r\n\r\n if (this.mainTexture)\r\n {\r\n this.clearMask();\r\n }\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\r\n /**\r\n * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes\r\n * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references.\r\n *\r\n * This is called when this mask is destroyed, or if you try to creat a new\r\n * mask from this object when one is already set.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#clearMask\r\n * @since 3.50.0\r\n */\r\n clearMask: function ()\r\n {\r\n var renderer = this.renderer;\r\n\r\n if (!renderer || !renderer.gl || !this.mainTexture)\r\n {\r\n return;\r\n }\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 this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\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.BITMAPMASK_PIPELINE.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.BITMAPMASK_PIPELINE.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.clearMask();\r\n\r\n if (this.renderer)\r\n {\r\n this.renderer.off(RenderEvents.RESIZE, this.createMask, this);\r\n }\r\n \r\n this.bitmapMask = 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 * This is a WebGL only feature.\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 *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\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 current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\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 current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.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, 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","/**\r\n * @author Richard 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 ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\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 change 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 {(number|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 {number}\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 {number}\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 Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * 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.\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 * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\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 {this} This GameObject.\r\n */\r\n incData: 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.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\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.\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 * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\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 {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\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 * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\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)} [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.\r\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.\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 (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, 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 * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\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 {number[]} 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));\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 if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\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 destroy: function ()\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 this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\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\r\n this.body = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\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 {number} 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 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 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 {number}\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 {number}\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 if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\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 {number} 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 * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 {number}\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","/**\r\n * @author Richard 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 DeepCopy = require('../../utils/object/DeepCopy');\r\nvar PIPELINE_CONST = require('../../renderer/webgl/pipelines/const');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#postPipeline\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; }\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n this.postPipelines = [];\r\n this.pipelineData = {};\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * Both the pipeline and post pipelines share the same pipeline data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * Both the pipeline and post pipelines share the pipeline data object together.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * Both the pipeline and post pipelines share the pipeline data object together.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline)\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetPostPipelines, resetData)\r\n {\r\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetPostPipelines)\r\n {\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n }\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (typeof pipeline === 'string' && instance.name === pipeline) ||\r\n (typeof pipeline !== 'string' && instance instanceof pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @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|number)} [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|number)} 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|number)} [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|number)} 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\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\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","/**\r\n * @author Richard 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('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\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 *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\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 {number}\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, PI/2 is down, +-PI is left\r\n * and -PI/2 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 * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.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 * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\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 * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.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} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\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 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 * @namespace Phaser.GameObjects.Components\n */\n\nmodule.exports = {\n\n Alpha: require('./Alpha'),\n AlphaSingle: require('./AlphaSingle'),\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","/**\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 ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\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.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\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 Container.\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.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\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 Container.\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.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.clearAlpha();\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} 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 output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.removeFromDisplayList();\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n gameObject.addToDisplayList(displayList);\r\n\r\n gameObject.parentContainer = this;\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\r\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.\r\n *\r\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output = new Vector2(source.x, source.y);\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\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.Container#setScrollFactor\r\n * @since 3.4.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 * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\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 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 Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.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 {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\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 ContainerCanvasRenderer = function (renderer, container, 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 camera.addToRenderList(container);\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 var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; 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 childAlpha = child.alpha;\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 // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\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\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","/**\n * @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 {number} width - The width of the video.\r\n * @param {number} 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number} 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 {number}\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 {number} 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[])} [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 {number}\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 {number} 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 {number}\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 {number} 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('Invalid Loader.' + this.type + ' key');\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\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 {number}\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 = finalFiles;\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 {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.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 {number}\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 < finalFiles.length; i++)\r\n {\r\n finalFiles[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 {number} [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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} 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","/**\r\n * @author Richard 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 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 {(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.\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 try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n console.warn('Invalid JSON: ' + this.key);\r\n\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\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#ADD\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 {(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.\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 {this} 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 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 type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\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 {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} 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 {number} [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 {number} 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\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.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 Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @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 {number} [place=0] - The place to round to.\r\n * @param {number} [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 + min;\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 {number} 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\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\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\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 /**\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 {this} 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 * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\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 {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\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 {this} 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 {this} 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 {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\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 {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\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 {this} 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 this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\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 {this} 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 return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\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 {this} 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 {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\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 {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 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 // 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 return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\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 return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\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 {this} This Matrix4.\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 return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\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 {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\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 return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\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 return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\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 {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\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 return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\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 {this} 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 {this} 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)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.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 var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\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 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 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\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 Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\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=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - 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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\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 x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\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 return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\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 if (update)\r\n {\r\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\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 return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\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 return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\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 return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\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 this.onChangeCallback(this);\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 return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\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 return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\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 return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\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 this.onChangeCallback(this);\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 {number} 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 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [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 {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 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\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 * @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 Euler: require('./Euler'),\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 {number} 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 Post-Render Event.\r\n *\r\n * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes,\r\n * has completed, but before any pending snap shots have been taken.\r\n *\r\n * @event Phaser.Renderer.Events#POST_RENDER\r\n * @since 3.50.0\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 Pre-Render Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer. This happens right at the start of the render\r\n * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been\r\n * reset ready for the render.\r\n *\r\n * @event Phaser.Renderer.Events#PRE_RENDER\r\n * @since 3.50.0\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 Render Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer for every camera in every Scene.\r\n *\r\n * It is dispatched before any of the children in the Scene have been rendered.\r\n *\r\n * @event Phaser.Renderer.Events#RENDER\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered.\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 Renderer Resize Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer when it is resized, usually as a result\r\n * of the Scale Manager resizing.\r\n *\r\n * @event Phaser.Renderer.Events#RESIZE\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - The new width of the renderer.\r\n * @param {number} height - The new height of the renderer.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @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.Renderer.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n POST_RENDER: require('./POST_RENDER_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESIZE: require('./RESIZE_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 PIPELINE_CONST = {\r\n\r\n /**\r\n * The Bitmap Mask Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n BITMAPMASK_PIPELINE: 'BitmapMaskPipeline',\r\n\r\n /**\r\n * The Light 2D Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n LIGHT_PIPELINE: 'Light2D',\r\n\r\n /**\r\n * The Point Light Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n POINTLIGHT_PIPELINE: 'PointLightPipeline',\r\n\r\n /**\r\n * The Single Texture Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n SINGLE_PIPELINE: 'SinglePipeline',\r\n\r\n /**\r\n * The Multi Texture Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n MULTI_PIPELINE: 'MultiPipeline',\r\n\r\n /**\r\n * The Rope Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n ROPE_PIPELINE: 'RopePipeline',\r\n\r\n /**\r\n * The Graphics and Shapes Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n GRAPHICS_PIPELINE: 'GraphicsPipeline',\r\n\r\n /**\r\n * The Post FX Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n POSTFX_PIPELINE: 'PostFXPipeline',\r\n\r\n /**\r\n * The Utility Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n UTILITY_PIPELINE: 'UtilityPipeline'\r\n};\r\n\r\nmodule.exports = PIPELINE_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 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.\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} 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [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 samme\r\n * @copyright 2021 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-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.scene.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @since 3.53.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 = '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 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [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.\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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [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","/**\r\n * @author Richard Davey \r\n * @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.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\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_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_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 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 * @ignore\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 * @ignore\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 {number} [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 {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} 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 {number} startIndex - The start index to search from.\r\n * @param {number} 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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [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 {number} [startIndex=0] - An optional start index.\r\n * @param {number} [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 {number} 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","/**\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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard 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 {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [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 var removed = [];\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 removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\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 {number} 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 {number} startIndex - The start index to remove from.\r\n * @param {number} 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 {number} [start=0] - The array index to start the search from.\r\n * @param {number} [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 {number} [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 {number} [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 {number} startIndex - The start index.\r\n * @param {number} 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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [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","/**\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 array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @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 {number} 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 * @author Angry Bytes (and contributors)\r\n * @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 comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\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\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\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\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\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 {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @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","/**\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\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 * 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)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 Translate: require('./TranslateMatrix'),\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\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard 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 {number} [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 {number} [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","/**\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|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 * @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\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\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 + '!' + i,\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', file.src.match(/^.*\\//))[0];\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 = textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\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 var textureManager = this.loader.textureManager;\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.replace(/![\\d]$/, '');\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 if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\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 2020 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\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n// Plugin specific instance of the Spine Scene Renderer\r\nvar sceneRenderer;\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 * Find more details about Spine itself at http://esotericsoftware.com/.\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.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\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 two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\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 preMultipliedAlpha 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 * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\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 var addContainer = function (x, y, children)\r\n {\r\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var container = new SpineContainer(this.scene, _this, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\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 this.game.events.once('destroy', this.gameDestroy, 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 // 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 if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n }\r\n\r\n // All share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = 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(atlasEntry.prefix + 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(atlasEntry.prefix + 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 preMultipliedAlpha 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#ADD\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} [preMultipliedAlpha=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.setViewport(viewportWidth, 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 if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\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 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.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n sceneRenderer = null;\r\n }\r\n\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\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 2020 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 Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.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 {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\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 * 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 {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, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\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, 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\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","/**\r\n * @author Richard Davey \r\n * @copyright 2020 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 = -1;\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 * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\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 the animation specified by the track index 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(trackIndex);\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 if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\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 2020 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 {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, 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 camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n camera.addToRenderList(src);\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 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","/**\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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\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 isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n };\r\n img_1.src = 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 var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\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 (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\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 else {\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 };\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(this.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(this.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(this.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(this.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\n//# sourceMappingURL=spine-canvas.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/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/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:///./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:///./runtimes/spine-canvas.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;;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;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,yCAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;ACxtCA;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;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;;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAGC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;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,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,yGAAyG;AACzG;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;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;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,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,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;;AAEA,CAAC","file":"SpineCanvasPluginDebug.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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\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, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 // 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n sceneRenderer.batcher.setBlendMode = setBlendMode;\n sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * \n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 {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, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\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, 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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 {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, 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 camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n camera.addToRenderList(src);\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 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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\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 if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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.setAttachment(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.setAttachment(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.setAttachment(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path);\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \".concat(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 \".concat(path, \": \").concat(ex.message);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(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 \".concat(path, \": \").concat(ex.message);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\n _this.toLoad--;\n _this.loaded++;\n }\n }\n else {\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\n if (error)\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(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 \".concat(imagePath, \"} of atlas \").concat(path);\n if (error)\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path, \": status \").concat(request.status, \", \").concat(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 \".concat(path, \": status \").concat(request.status, \", \").concat(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 isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\n if (isWebWorker) {\n var options = { mode: \"cors\" };\n fetch(path, options).then(function (response) {\n if (!response.ok) {\n _this.errors[path] = \"Couldn't load image \" + path;\n }\n return response.blob();\n }).then(function (blob) {\n return createImageBitmap(blob, {\n premultiplyAlpha: 'none',\n colorSpaceConversion: 'none'\n });\n }).then(function (bitmap) {\n _this.rawAssets[path] = bitmap;\n });\n }\n else {\n var img_1 = new Image();\n img_1.crossOrigin = \"anonymous\";\n img_1.onload = function (ev) {\n _this.rawAssets[path] = img_1;\n };\n img_1.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \".concat(path);\n };\n img_1.src = path;\n }\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 var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\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 (isWebWorker) {\n if (rawAsset instanceof ImageBitmap) {\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\n }\n else {\n clientAssets.assets[path] = rawAsset;\n }\n }\n else {\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 };\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: \".concat(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: \".concat(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: \".concat(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: \".concat(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: \".concat(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 \".concat(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 \".concat(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(this.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(this.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(this.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(this.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 ctx.globalAlpha = color.a;\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 ctx.globalAlpha = color.a;\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 = {}));\n//# sourceMappingURL=spine-canvas.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/SpinePlugin.js b/plugins/spine/dist/SpinePlugin.js index 492110b1b..06918342a 100644 --- a/plugins/spine/dist/SpinePlugin.js +++ b/plugins/spine/dist/SpinePlugin.js @@ -1,352 +1,21865 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 4399: -/***/ ((module) => { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; +window["SpinePlugin"] = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ 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 ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 69); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { /** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Taken from klasse by mattdesl https://github.com/mattdesl/klasse + +function hasGetterOrSetter (def) +{ + return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); +} + +function getProperty (definition, k, isClassDescriptor) +{ + // This may be a lightweight object, OR it might be a property that was defined previously. + + // For simple class descriptors we can just assume its NOT previously defined. + var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); + + if (!isClassDescriptor && def.value && typeof def.value === 'object') + { + def = def.value; + } + + // This might be a regular property, or it may be a getter/setter the user defined in a class. + if (def && hasGetterOrSetter(def)) + { + if (typeof def.enumerable === 'undefined') + { + def.enumerable = true; + } + + if (typeof def.configurable === 'undefined') + { + def.configurable = true; + } + + return def; + } + else + { + return false; + } +} + +function hasNonConfigurable (obj, k) +{ + var prop = Object.getOwnPropertyDescriptor(obj, k); + + if (!prop) + { + return false; + } + + if (prop.value && typeof prop.value === 'object') + { + prop = prop.value; + } + + if (prop.configurable === false) + { + return true; + } + + return false; +} + +/** + * Extends the given `myClass` object's prototype with the properties of `definition`. * + * @function extend + * @ignore + * @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) + { + if (!definition.hasOwnProperty(k)) + { + continue; + } + + var def = getProperty(definition, k, isClassDescriptor); + + if (def !== false) + { + // If Extends is used, we will check its prototype to see if the final variable exists. + + var parent = extend || ctor; + + if (hasNonConfigurable(parent.prototype, k)) + { + // Just skip the final property + if (Class.ignoreFinals) + { + continue; + } + + // We cannot re-define a property that is configurable=false. + // So we will consider them final and throw an error. This is by + // default so it is clear to the developer what is happening. + // You can set ignoreFinals to true if you need to extend a class + // which has configurable=false; it will simply not re-define final properties. + throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); + } + + Object.defineProperty(ctor.prototype, k, def); + } + else + { + ctor.prototype[k] = definition[k]; + } + } +} + +/** + * Applies the given `mixins` to the prototype of `myClass`. + * + * @function mixin + * @ignore + * @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) + { + return; + } + + if (!Array.isArray(mixins)) + { + mixins = [ mixins ]; + } + + for (var i = 0; i < mixins.length; i++) + { + extend(myClass, mixins[i].prototype || mixins[i]); + } +} + +/** + * Creates a new class with the given descriptor. + * The constructor, defined by the name `initialize`, + * is an optional function. If unspecified, an anonymous + * function will be used which calls the parent class (if + * one exists). + * + * You can also use `Extends` and `Mixins` to provide subclassing + * and inheritance. + * + * @class Phaser.Class * @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 {Object} definition a dictionary of functions for the class + * @example * - * @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. + * var MyClass = new Phaser.Class({ * - * @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. + * initialize: function() { + * this.foo = 2.0; + * }, * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private + * bar: function() { + * return this.foo + 5; + * } + * }); */ -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; +function Class (definition) +{ + if (!definition) + { + definition = {}; } - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; + // The variable name here dictates what we see in Chrome debugger + var initialize; + var Extends; + + if (definition.initialize) + { + if (typeof definition.initialize !== 'function') + { + throw new Error('initialize must be a function'); + } + + initialize = definition.initialize; + + // Usually we should avoid 'delete' in V8 at all costs. + // However, its unlikely to make any performance difference + // here since we only call this on class creation (i.e. not object creation). + delete definition.initialize; + } + else if (definition.Extends) + { + var base = definition.Extends; + + initialize = function () + { + base.apply(this, arguments); + }; + } + else + { + initialize = function () {}; } - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; + if (definition.Extends) + { + initialize.prototype = Object.create(definition.Extends.prototype); + initialize.prototype.constructor = initialize; - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) - 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]; - } + Extends = definition.Extends; - listeners[i].fn.apply(listeners[i].context, args); - } + delete definition.Extends; } - } - - 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]); - } + else + { + initialize.prototype.constructor = initialize; } - // - // 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); - } + // Grab the mixins, if they are specified... + var mixins = null; - return this; -}; + if (definition.Mixins) + { + mixins = definition.Mixins; + delete definition.Mixins; + } -/** - * 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; + // First, mixin if we can. + mixin(initialize, mixins); - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } + // Now we grab the actual definition which defines the overrides. + extend(initialize, definition, true, Extends); - 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; + return initialize; } +Class.extend = extend; +Class.mixin = mixin; +Class.ignoreFinals = false; + +module.exports = Class; + /***/ }), +/* 1 */ +/***/ (function(module, exports) { -/***/ 1847: -/***/ ((module) => { +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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__(35); + +/** + * @classdesc + * A representation of a vector in 2D space. + * + * A two-component vector. + * + * @class Vector2 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. + * @param {number} [y=x] - The y component. + */ +var Vector2 = new Class({ + + initialize: + + function Vector2 (x, y) + { + /** + * The x component of this Vector. + * + * @name Phaser.Math.Vector2#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The y component of this Vector. + * + * @name Phaser.Math.Vector2#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; + } + }, + + /** + * Make a clone of this Vector2. + * + * @method Phaser.Math.Vector2#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} A clone of this Vector2. + */ + 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.Types.Math.Vector2Like} 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 (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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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); + }, + + /** + * Project this Vector onto another. + * + * @method Phaser.Math.Vector2#project + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} src - The vector to project onto. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + project: function (src) + { + var scalar = this.dot(src) / src.dot(src); + + return this.copy(src).scale(scalar); + } + +}); + +/** + * 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; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index. + * @param {number} 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) + { + 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 2013-2023 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 2013-2023 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 (!obj || 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, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(4); + +/** + * 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; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(4); + +/** + * 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 {number} The given angle converted to degrees. + */ +var RadToDeg = function (radians) +{ + return radians * CONST.RAD_TO_DEG; +}; + +module.exports = RadToDeg; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. + * + * The key is a string, which can be split based on the use of the period character. + * + * For example: + * + * ```javascript + * const source = { + * lives: 3, + * render: { + * screen: { + * width: 1024 + * } + * } + * } + * + * const lives = GetValue(source, 'lives', 1); + * const width = GetValue(source, 'render.screen.width', 800); + * const height = GetValue(source, 'render.screen.height', 600); + * ``` + * + * In the code above, `lives` will be 3 because it's defined at the top level of `source`. + * The `width` value will be 1024 because it can be found inside the `render.screen` object. + * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. + * + * @function Phaser.Utils.Objects.GetValue + * @since 3.0.0 + * + * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. + * @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. + * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. + * + * @return {*} The value of the requested key. + */ +var GetValue = function (source, key, defaultValue, altSource) +{ + if ((!source && !altSource) || typeof source === 'number') + { + return defaultValue; + } + else if (source && source.hasOwnProperty(key)) + { + return source[key]; + } + else if (altSource && altSource.hasOwnProperty(key)) + { + return altSource[key]; + } + else if (key.indexOf('.') !== -1) + { + var keys = key.split('.'); + var parentA = source; + var parentB = altSource; + var valueA = defaultValue; + var valueB = defaultValue; + var valueAFound = true; + var valueBFound = true; + + // Use for loop here so we can break early + for (var i = 0; i < keys.length; i++) + { + if (parentA && parentA.hasOwnProperty(keys[i])) + { + // Yes parentA has a key property, let's carry on down + valueA = parentA[keys[i]]; + parentA = parentA[keys[i]]; + } + else + { + valueAFound = false; + } + + if (parentB && parentB.hasOwnProperty(keys[i])) + { + // Yes parentB has a key property, let's carry on down + valueB = parentB[keys[i]]; + parentB = parentB[keys[i]]; + } + else + { + valueBFound = false; + } + } + + if (valueAFound) + { + return valueA; + } + else if (valueBFound) + { + return valueB; + } + else + { + return defaultValue; + } + } + else + { + return defaultValue; + } +}; + +module.exports = GetValue; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FILE_CONST = { + + /** + * The Loader is idle. + * + * @name Phaser.Loader.LOADER_IDLE + * @type {number} + * @since 3.0.0 + */ + LOADER_IDLE: 0, + + /** + * The Loader is actively loading. + * + * @name Phaser.Loader.LOADER_LOADING + * @type {number} + * @since 3.0.0 + */ + LOADER_LOADING: 1, + + /** + * The Loader is processing files is has loaded. + * + * @name Phaser.Loader.LOADER_PROCESSING + * @type {number} + * @since 3.0.0 + */ + LOADER_PROCESSING: 2, + + /** + * The Loader has completed loading and processing. + * + * @name Phaser.Loader.LOADER_COMPLETE + * @type {number} + * @since 3.0.0 + */ + LOADER_COMPLETE: 3, + + /** + * The Loader is shutting down. + * + * @name Phaser.Loader.LOADER_SHUTDOWN + * @type {number} + * @since 3.0.0 + */ + LOADER_SHUTDOWN: 4, + + /** + * The Loader has been destroyed. + * + * @name Phaser.Loader.LOADER_DESTROYED + * @type {number} + * @since 3.0.0 + */ + LOADER_DESTROYED: 5, + + /** + * File is in the load queue but not yet started. + * + * @name Phaser.Loader.FILE_PENDING + * @type {number} + * @since 3.0.0 + */ + FILE_PENDING: 10, + + /** + * File has been started to load by the loader (onLoad called) + * + * @name Phaser.Loader.FILE_LOADING + * @type {number} + * @since 3.0.0 + */ + FILE_LOADING: 11, + + /** + * File has loaded successfully, awaiting processing. + * + * @name Phaser.Loader.FILE_LOADED + * @type {number} + * @since 3.0.0 + */ + FILE_LOADED: 12, + + /** + * File failed to load. + * + * @name Phaser.Loader.FILE_FAILED + * @type {number} + * @since 3.0.0 + */ + FILE_FAILED: 13, + + /** + * File is being processed (onProcess callback) + * + * @name Phaser.Loader.FILE_PROCESSING + * @type {number} + * @since 3.0.0 + */ + FILE_PROCESSING: 14, + + /** + * The File has errored somehow during processing. + * + * @name Phaser.Loader.FILE_ERRORED + * @type {number} + * @since 3.0.0 + */ + FILE_ERRORED: 16, + + /** + * File has finished processing. + * + * @name Phaser.Loader.FILE_COMPLETE + * @type {number} + * @since 3.0.0 + */ + FILE_COMPLETE: 17, + + /** + * File has been destroyed. + * + * @name Phaser.Loader.FILE_DESTROYED + * @type {number} + * @since 3.0.0 + */ + FILE_DESTROYED: 18, + + /** + * File was populated from local data and doesn't need an HTTP request. + * + * @name Phaser.Loader.FILE_POPULATED + * @type {number} + * @since 3.0.0 + */ + FILE_POPULATED: 19, + + /** + * File is pending being destroyed. + * + * @name Phaser.Loader.FILE_PENDING_DESTROY + * @type {number} + * @since 3.60.0 + */ + FILE_PENDING_DESTROY: 20 + +}; + +module.exports = FILE_CONST; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GEOM_CONST = __webpack_require__(30); + +/** + * @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 {number} + * @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; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + DIFFERENCE: 11, + + /** + * Exclusion blend mode. For Canvas only. + * Like difference, but with lower contrast. + * + * @name Phaser.BlendModes.EXCLUSION + * @type {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + LUMINOSITY: 16, + + /** + * Alpha erase blend mode. For Canvas and WebGL. + * + * @name Phaser.BlendModes.ERASE + * @type {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + LIGHTER: 25, + + /** + * Copy blend mode. For Canvas only. + * Only the new shape is shown. + * + * @name Phaser.BlendModes.COPY + * @type {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + XOR: 27 + +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + }, + + /** + * Sets the components of this Vector to be the `Math.min` result from the given vector. + * + * @method Phaser.Math.Vector3#min + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + min: function (v) + { + this.x = Math.min(this.x, v.x); + this.y = Math.min(this.y, v.y); + this.z = Math.min(this.z, v.z); + + return this; + }, + + /** + * Sets the components of this Vector to be the `Math.max` result from the given vector. + * + * @method Phaser.Math.Vector3#max + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + max: function (v) + { + this.x = Math.max(this.x, v.x); + this.y = Math.max(this.y, v.y); + this.z = Math.max(this.z, v.z); + + 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); + }, + + /** + * Adds the two given Vector3s and sets the results into this Vector3. + * + * @method Phaser.Math.Vector3#addVectors + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} a - The first Vector to add. + * @param {Phaser.Math.Vector3} b - The second Vector to add. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addVectors: function (a, b) + { + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + + return this; + }, + + /** + * 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; + }, + + /** + * Sets the components of this Vector3 from the position of the given Matrix4. + * + * @method Phaser.Math.Vector3#setFromMatrixPosition + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + setFromMatrixPosition: function (m) + { + return this.fromArray(m.val, 12); + }, + + /** + * Sets the components of this Vector3 from the Matrix4 column specified. + * + * @method Phaser.Math.Vector3#setFromMatrixColumn + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from. + * @param {number} index - The column index. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + setFromMatrixColumn: function (mat4, index) + { + return this.fromArray(mat4.val, index * 4); + }, + + /** + * Sets the components of this Vector3 from the given array, based on the offset. + * + * Vector3.x = array[offset] + * Vector3.y = array[offset + 1] + * Vector3.z = array[offset + 2] + * + * @method Phaser.Math.Vector3#fromArray + * @since 3.50.0 + * + * @param {number[]} array - The array of values to get this Vector from. + * @param {number} [offset=0] - The offset index into the array. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + fromArray: function (array, offset) + { + if (offset === undefined) { offset = 0; } + + this.x = array[offset]; + this.y = array[offset + 1]; + this.z = array[offset + 2]; + + 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; + }, + + /** + * Add the given value to each component of this Vector. + * + * @method Phaser.Math.Vector3#addScalar + * @since 3.50.0 + * + * @param {number} s - The amount to add to this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScalar: function (s) + { + this.x += s; + this.y += s; + this.z += s; + + return this; + }, + + /** + * Add and scale a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector3#addScale + * @since 3.50.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. + * @param {number} scale - The amount to scale `v` by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScale: function (v, scale) + { + this.x += v.x * scale; + this.y += v.y * scale; + this.z += v.z * scale || 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; + }, + + /** + * Takes a Matrix3 and applies it to this Vector3. + * + * @method Phaser.Math.Vector3#applyMatrix3 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + applyMatrix3: function (mat3) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat3.val; + + this.x = m[0] * x + m[3] * y + m[6] * z; + this.y = m[1] * x + m[4] * y + m[7] * z; + this.z = m[2] * x + m[5] * y + m[8] * z; + + return this; + }, + + /** + * Takes a Matrix4 and applies it to this Vector3. + * + * @method Phaser.Math.Vector3#applyMatrix4 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + applyMatrix4: function (mat4) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat4.val; + + var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]); + + 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; + + 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 Matrix4. + * + * @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; + }, + + /** + * Multiplies this Vector3 by the given view and projection matrices. + * + * @method Phaser.Math.Vector3#projectViewMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix. + * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + projectViewMatrix: function (viewMatrix, projectionMatrix) + { + return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix); + }, + + /** + * Multiplies this Vector3 by the given inversed projection matrix and world matrix. + * + * @method Phaser.Math.Vector3#unprojectViewMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix. + * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + unprojectViewMatrix: function (projectionMatrix, worldMatrix) + { + return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix); + }, + + /** + * 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; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CheckMatrix = __webpack_require__(27); +var TransposeMatrix = __webpack_require__(61); + +/** + * 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/}. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(28); + +/** + * Determines the browser type and version running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.browser` from within any Scene. + * + * @typedef {object} Phaser.Device.Browser + * @since 3.0.0 + * + * @property {boolean} chrome - Set to true if running in Chrome. + * @property {boolean} edge - Set to true if running in Microsoft Edge browser. + * @property {boolean} firefox - Set to true if running in Firefox. + * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge). + * @property {boolean} mobileSafari - Set to true if running in Mobile Safari. + * @property {boolean} opera - Set to true if running in Opera. + * @property {boolean} safari - Set to true if running in Safari. + * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle) + * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+) + * @property {number} chromeVersion - If running in Chrome this will contain the major version number. + * @property {number} firefoxVersion - If running in Firefox this will contain the major version number. + * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion. + * @property {number} safariVersion - If running in Safari this will contain the major version number. + * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx} + */ +var Browser = { + + chrome: false, + chromeVersion: 0, + edge: false, + firefox: false, + firefoxVersion: 0, + ie: false, + ieVersion: 0, + mobileSafari: false, + opera: false, + safari: false, + safariVersion: 0, + silk: false, + trident: false, + tridentVersion: 0, + es2019: false + +}; + +function init () +{ + var ua = navigator.userAgent; + + if ((/Edg\/\d+/).test(ua)) + { + Browser.edge = true; + Browser.es2019 = true; + } + else if ((/OPR/).test(ua)) { + Browser.opera = true; + Browser.es2019 = true; + } + else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) + { + Browser.chrome = true; + Browser.chromeVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.chromeVersion > 69); + } + else if ((/Firefox\D+(\d+)/).test(ua)) + { + Browser.firefox = true; + Browser.firefoxVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.firefoxVersion > 10); + } + else if ((/AppleWebKit/).test(ua) && OS.iOS) + { + Browser.mobileSafari = true; + } + else if ((/MSIE (\d+\.\d+);/).test(ua)) + { + Browser.ie = true; + Browser.ieVersion = parseInt(RegExp.$1, 10); + } + else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) + { + Browser.safari = true; + Browser.safariVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.safariVersion > 10); + } + else if ((/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/).test(ua)) + { + Browser.ie = true; + Browser.trident = true; + Browser.tridentVersion = parseInt(RegExp.$1, 10); + Browser.ieVersion = parseInt(RegExp.$3, 10); + } + + // Silk gets its own if clause because its ua also contains 'Safari' + if ((/Silk/).test(ua)) + { + Browser.silk = true; + } + + return Browser; +} + +module.exports = init(); + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. +// @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; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(4); + +/** + * Convert the given angle from degrees, to the equivalent angle in radians. + * + * @function Phaser.Math.DegToRad + * @since 3.0.0 + * + * @param {number} 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; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Vector3 = __webpack_require__(16); + +/** + * @ignore + */ +var EPSILON = 0.000001; + +/** + * @classdesc + * A four-dimensional matrix. + * + * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji + * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + * + * @class Matrix4 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from. + */ +var Matrix4 = new Class({ + + initialize: + + function Matrix4 (m) + { + /** + * The matrix values. + * + * @name Phaser.Math.Matrix4#val + * @type {Float32Array} + * @since 3.0.0 + */ + this.val = new Float32Array(16); + + if (m) + { + // Assume Matrix4 with val: + this.copy(m); + } + else + { + // Default to identity + this.identity(); + } + }, + + /** + * Make a clone of this Matrix4. + * + * @method Phaser.Math.Matrix4#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix4} A clone of this Matrix4. + */ + clone: function () + { + return new Matrix4(this); + }, + + /** + * This method is an alias for `Matrix4.copy`. + * + * @method Phaser.Math.Matrix4#set + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from. + * + * @return {this} This Matrix4. + */ + set: function (src) + { + return this.copy(src); + }, + + /** + * Sets all values of this Matrix4. + * + * @method Phaser.Math.Matrix4#setValues + * @since 3.50.0 + * + * @param {number} m00 - The m00 value. + * @param {number} m01 - The m01 value. + * @param {number} m02 - The m02 value. + * @param {number} m03 - The m03 value. + * @param {number} m10 - The m10 value. + * @param {number} m11 - The m11 value. + * @param {number} m12 - The m12 value. + * @param {number} m13 - The m13 value. + * @param {number} m20 - The m20 value. + * @param {number} m21 - The m21 value. + * @param {number} m22 - The m22 value. + * @param {number} m23 - The m23 value. + * @param {number} m30 - The m30 value. + * @param {number} m31 - The m31 value. + * @param {number} m32 - The m32 value. + * @param {number} m33 - The m33 value. + * + * @return {this} This Matrix4 instance. + */ + setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) + { + var out = this.val; + + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + + return this; + }, + + /** + * Copy the values of a given Matrix into this Matrix. + * + * @method Phaser.Math.Matrix4#copy + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from. + * + * @return {this} This Matrix4. + */ + copy: function (src) + { + var a = src.val; + + return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + }, + + /** + * Set the values of this Matrix from the given array. + * + * @method Phaser.Math.Matrix4#fromArray + * @since 3.0.0 + * + * @param {number[]} a - The array to copy the values from. Must have at least 16 elements. + * + * @return {this} This Matrix4. + */ + fromArray: function (a) + { + return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + }, + + /** + * Reset this Matrix. + * + * Sets all values to `0`. + * + * @method Phaser.Math.Matrix4#zero + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix4} This Matrix4. + */ + zero: function () + { + return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + }, + + /** + * Generates a transform matrix based on the given position, scale and rotation. + * + * @method Phaser.Math.Matrix4#transform + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} position - The position vector. + * @param {Phaser.Math.Vector3} scale - The scale vector. + * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion. + * + * @return {this} This Matrix4. + */ + transform: function (position, scale, rotation) + { + var rotMatrix = _tempMat1.fromQuat(rotation); + + var rm = rotMatrix.val; + + var sx = scale.x; + var sy = scale.y; + var sz = scale.z; + + return this.setValues( + rm[0] * sx, + rm[1] * sx, + rm[2] * sx, + 0, + + rm[4] * sy, + rm[5] * sy, + rm[6] * sy, + 0, + + rm[8] * sz, + rm[9] * sz, + rm[10] * sz, + 0, + + position.x, + position.y, + position.z, + 1 + ); + }, + + /** + * Set the `x`, `y` and `z` values of this Matrix. + * + * @method Phaser.Math.Matrix4#xyz + * @since 3.0.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} z - The z value. + * + * @return {this} This Matrix4. + */ + xyz: function (x, y, z) + { + this.identity(); + + var out = this.val; + + out[12] = x; + out[13] = y; + out[14] = z; + + return this; + }, + + /** + * Set the scaling values of this Matrix. + * + * @method Phaser.Math.Matrix4#scaling + * @since 3.0.0 + * + * @param {number} x - The x scaling value. + * @param {number} y - The y scaling value. + * @param {number} z - The z scaling value. + * + * @return {this} This Matrix4. + */ + scaling: function (x, y, z) + { + this.zero(); + + var out = this.val; + + out[0] = x; + out[5] = y; + out[10] = z; + out[15] = 1; + + return this; + }, + + /** + * Reset this Matrix to an identity (default) matrix. + * + * @method Phaser.Math.Matrix4#identity + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + identity: function () + { + return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + }, + + /** + * Transpose this Matrix. + * + * @method Phaser.Math.Matrix4#transpose + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + transpose: function () + { + var a = this.val; + + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + var a12 = a[6]; + var a13 = a[7]; + var a23 = a[11]; + + a[1] = a[4]; + a[2] = a[8]; + a[3] = a[12]; + a[4] = a01; + a[6] = a[9]; + a[7] = a[13]; + a[8] = a02; + a[9] = a12; + a[11] = a[14]; + a[12] = a03; + a[13] = a13; + a[14] = a23; + + return this; + }, + + /** + * Copies the given Matrix4 into this Matrix and then inverses it. + * + * @method Phaser.Math.Matrix4#getInverse + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4. + * + * @return {this} This Matrix4. + */ + getInverse: function (m) + { + this.copy(m); + + return this.invert(); + }, + + /** + * Invert this Matrix. + * + * @method Phaser.Math.Matrix4#invert + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + invert: function () + { + var a = 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 this; + } + + det = 1 / det; + + return this.setValues( + (a11 * b11 - a12 * b10 + a13 * b09) * det, + (a02 * b10 - a01 * b11 - a03 * b09) * det, + (a31 * b05 - a32 * b04 + a33 * b03) * det, + (a22 * b04 - a21 * b05 - a23 * b03) * det, + (a12 * b08 - a10 * b11 - a13 * b07) * det, + (a00 * b11 - a02 * b08 + a03 * b07) * det, + (a32 * b02 - a30 * b05 - a33 * b01) * det, + (a20 * b05 - a22 * b02 + a23 * b01) * det, + (a10 * b10 - a11 * b08 + a13 * b06) * det, + (a01 * b08 - a00 * b10 - a03 * b06) * det, + (a30 * b04 - a31 * b02 + a33 * b00) * det, + (a21 * b02 - a20 * b04 - a23 * b00) * det, + (a11 * b07 - a10 * b09 - a12 * b06) * det, + (a00 * b09 - a01 * b07 + a02 * b06) * det, + (a31 * b01 - a30 * b03 - a32 * b00) * det, + (a20 * b03 - a21 * b01 + a22 * b00) * det + ); + }, + + /** + * Calculate the adjoint, or adjugate, of this Matrix. + * + * @method Phaser.Math.Matrix4#adjoint + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + adjoint: function () + { + var a = 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]; + + return this.setValues( + (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)), + -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)), + (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)), + -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)), + -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)), + (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)), + -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)), + (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)), + (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)), + -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)), + (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)), + -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)), + -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)), + (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)), + -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)), + (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)) + ); + }, + + /** + * Calculate the determinant of this Matrix. + * + * @method Phaser.Math.Matrix4#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 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 + return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + }, + + /** + * Multiply this Matrix by the given Matrix. + * + * @method Phaser.Math.Matrix4#multiply + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by. + * + * @return {this} This Matrix4. + */ + multiply: function (src) + { + var a = 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 b = src.val; + + // Cache only the current line of the second matrix + var b0 = b[0]; + var b1 = b[1]; + var b2 = b[2]; + var b3 = b[3]; + + a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[4]; + b1 = b[5]; + b2 = b[6]; + b3 = b[7]; + + a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[8]; + b1 = b[9]; + b2 = b[10]; + b3 = b[11]; + + a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[12]; + b1 = b[13]; + b2 = b[14]; + b3 = b[15]; + + a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + return this; + }, + + /** + * 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 - The source Matrix4 that this Matrix4 is multiplied by. + * + * @return {this} This Matrix4. + */ + multiplyLocal: function (src) + { + var a = this.val; + var b = src.val; + + return this.setValues( + a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12], + a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13], + a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14], + a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15], + + a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12], + a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13], + a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14], + a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15], + + a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12], + a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13], + a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14], + a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15], + + a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12], + a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13], + a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14], + a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15] + ); + }, + + /** + * Multiplies the given Matrix4 object with this Matrix. + * + * This is the same as calling `multiplyMatrices(m, this)`. + * + * @method Phaser.Math.Matrix4#premultiply + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one. + * + * @return {this} This Matrix4. + */ + premultiply: function (m) + { + return this.multiplyMatrices(m, this); + }, + + /** + * Multiplies the two given Matrix4 objects and stores the results in this Matrix. + * + * @method Phaser.Math.Matrix4#multiplyMatrices + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply. + * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply. + * + * @return {this} This Matrix4. + */ + multiplyMatrices: function (a, b) + { + var am = a.val; + var bm = b.val; + + var a11 = am[0]; + var a12 = am[4]; + var a13 = am[8]; + var a14 = am[12]; + var a21 = am[1]; + var a22 = am[5]; + var a23 = am[9]; + var a24 = am[13]; + var a31 = am[2]; + var a32 = am[6]; + var a33 = am[10]; + var a34 = am[14]; + var a41 = am[3]; + var a42 = am[7]; + var a43 = am[11]; + var a44 = am[15]; + + var b11 = bm[0]; + var b12 = bm[4]; + var b13 = bm[8]; + var b14 = bm[12]; + var b21 = bm[1]; + var b22 = bm[5]; + var b23 = bm[9]; + var b24 = bm[13]; + var b31 = bm[2]; + var b32 = bm[6]; + var b33 = bm[10]; + var b34 = bm[14]; + var b41 = bm[3]; + var b42 = bm[7]; + var b43 = bm[11]; + var b44 = bm[15]; + + return this.setValues( + a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41, + a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41, + a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41, + a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41, + a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42, + a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42, + a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42, + a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42, + a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43, + a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43, + a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43, + a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43, + a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44, + a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44, + a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44, + a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44 + ); + }, + + /** + * Translate this Matrix using the given Vector. + * + * @method Phaser.Math.Matrix4#translate + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. + * + * @return {this} This Matrix4. + */ + translate: function (v) + { + return this.translateXYZ(v.x, v.y, v.z); + }, + + /** + * 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 {this} 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. + * + * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. + * + * @method Phaser.Math.Matrix4#scale + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. + * + * @return {this} This Matrix4. + */ + scale: function (v) + { + return this.scaleXYZ(v.x, v.y, v.z); + }, + + /** + * 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 {this} 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. + * + * @method Phaser.Math.Matrix4#makeRotationAxis + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis. + * @param {number} angle - The rotation angle in radians. + * + * @return {this} This Matrix4. + */ + makeRotationAxis: function (axis, angle) + { + // Based on http://www.gamedev.net/reference/articles/article1199.asp + + var c = Math.cos(angle); + var s = Math.sin(angle); + var t = 1 - c; + var x = axis.x; + var y = axis.y; + var z = axis.z; + var tx = t * x; + var ty = t * y; + + return this.setValues( + tx * x + c, tx * y - s * z, tx * z + s * y, 0, + tx * y + s * z, ty * y + c, ty * z - s * x, 0, + tx * z - s * y, ty * z + s * x, t * z * z + c, 0, + 0, 0, 0, 1 + ); + }, + + /** + * Apply a rotation transformation to this Matrix. + * + * @method Phaser.Math.Matrix4#rotate + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * @param {Phaser.Math.Vector3} axis - The axis to rotate upon. + * + * @return {this} This Matrix4. + */ + rotate: function (rad, axis) + { + var a = this.val; + var x = axis.x; + var y = axis.y; + var z = axis.z; + var len = Math.sqrt(x * x + y * y + z * z); + + if (Math.abs(len) < EPSILON) + { + return this; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + + var s = Math.sin(rad); + var c = Math.cos(rad); + var t = 1 - c; + + 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]; + + // Construct the elements of the rotation matrix + var b00 = x * x * t + c; + var b01 = y * x * t + z * s; + var b02 = z * x * t - y * s; + + var b10 = x * y * t - z * s; + var b11 = y * y * t + c; + var b12 = z * y * t + x * s; + + var b20 = x * z * t + y * s; + var b21 = y * z * t - x * s; + var b22 = z * z * t + c; + + // Perform rotation-specific matrix multiplication + return this.setValues( + a00 * b00 + a10 * b01 + a20 * b02, + a01 * b00 + a11 * b01 + a21 * b02, + a02 * b00 + a12 * b01 + a22 * b02, + a03 * b00 + a13 * b01 + a23 * b02, + a00 * b10 + a10 * b11 + a20 * b12, + a01 * b10 + a11 * b11 + a21 * b12, + a02 * b10 + a12 * b11 + a22 * b12, + a03 * b10 + a13 * b11 + a23 * b12, + a00 * b20 + a10 * b21 + a20 * b22, + a01 * b20 + a11 * b21 + a21 * b22, + a02 * b20 + a12 * b21 + a22 * b22, + a03 * b20 + a13 * b21 + a23 * b22, + a30, a31, a32, a33 + ); + }, + + /** + * Rotate this matrix on its X axis. + * + * @method Phaser.Math.Matrix4#rotateX + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * + * @return {this} This Matrix4. + */ + rotateX: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + 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]; + + // Perform axis-specific matrix multiplication + a[4] = a10 * c + a20 * s; + a[5] = a11 * c + a21 * s; + a[6] = a12 * c + a22 * s; + a[7] = a13 * c + a23 * s; + a[8] = a20 * c - a10 * s; + a[9] = a21 * c - a11 * s; + a[10] = a22 * c - a12 * s; + a[11] = a23 * c - a13 * s; + + return this; + }, + + /** + * Rotate this matrix on its Y axis. + * + * @method Phaser.Math.Matrix4#rotateY + * @since 3.0.0 + * + * @param {number} rad - The angle to rotate by, in radians. + * + * @return {this} This Matrix4. + */ + rotateY: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + + // Perform axis-specific matrix multiplication + a[0] = a00 * c - a20 * s; + a[1] = a01 * c - a21 * s; + a[2] = a02 * c - a22 * s; + a[3] = a03 * c - a23 * s; + a[8] = a00 * s + a20 * c; + a[9] = a01 * s + a21 * c; + a[10] = a02 * s + a22 * c; + a[11] = a03 * s + a23 * c; + + return this; + }, + + /** + * Rotate this matrix on its Z axis. + * + * @method Phaser.Math.Matrix4#rotateZ + * @since 3.0.0 + * + * @param {number} rad - The angle to rotate by, in radians. + * + * @return {this} This Matrix4. + */ + rotateZ: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + 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]; + + // Perform axis-specific matrix multiplication + a[0] = a00 * c + a10 * s; + a[1] = a01 * c + a11 * s; + a[2] = a02 * c + a12 * s; + a[3] = a03 * c + a13 * s; + a[4] = a10 * c - a00 * s; + a[5] = a11 * c - a01 * s; + a[6] = a12 * c - a02 * s; + a[7] = a13 * c - a03 * s; + + return this; + }, + + /** + * Set the values of this Matrix from the given rotation Quaternion and translation Vector. + * + * @method Phaser.Math.Matrix4#fromRotationTranslation + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from. + * @param {Phaser.Math.Vector3} v - The Vector to set translation from. + * + * @return {this} This Matrix4. + */ + fromRotationTranslation: function (q, v) + { + // Quaternion math + 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; + + return this.setValues( + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + v.x, + v.y, + v.z, + 1 + ); + }, + + /** + * Set the values of this Matrix from the given Quaternion. + * + * @method Phaser.Math.Matrix4#fromQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. + * + * @return {this} This Matrix4. + */ + 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; + + return this.setValues( + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + 0, + 0, + 0, + 1 + ); + }, + + /** + * Generate a frustum matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#frustum + * @since 3.0.0 + * + * @param {number} left - The left bound of the frustum. + * @param {number} right - The right bound of the frustum. + * @param {number} bottom - The bottom bound of the frustum. + * @param {number} top - The top bound of the frustum. + * @param {number} near - The near bound of the frustum. + * @param {number} far - The far bound of the frustum. + * + * @return {this} This Matrix4. + */ + frustum: function (left, right, bottom, top, near, far) + { + var rl = 1 / (right - left); + var tb = 1 / (top - bottom); + var nf = 1 / (near - far); + + return this.setValues( + (near * 2) * rl, + 0, + 0, + 0, + + 0, + (near * 2) * tb, + 0, + 0, + + (right + left) * rl, + (top + bottom) * tb, + (far + near) * nf, + -1, + + 0, + 0, + (far * near * 2) * nf, + 0 + ); + }, + + /** + * Generate a perspective projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#perspective + * @since 3.0.0 + * + * @param {number} fovy - Vertical field of view in radians + * @param {number} aspect - Aspect ratio. Typically viewport width /height. + * @param {number} near - Near bound of the frustum. + * @param {number} far - Far bound of the frustum. + * + * @return {this} This Matrix4. + */ + perspective: function (fovy, aspect, near, far) + { + var f = 1.0 / Math.tan(fovy / 2); + var nf = 1 / (near - far); + + return this.setValues( + f / aspect, + 0, + 0, + 0, + + 0, + f, + 0, + 0, + + 0, + 0, + (far + near) * nf, + -1, + + 0, + 0, + (2 * far * near) * nf, + 0 + ); + }, + + /** + * Generate a perspective projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#perspectiveLH + * @since 3.0.0 + * + * @param {number} width - The width of the frustum. + * @param {number} height - The height of the frustum. + * @param {number} near - Near bound of the frustum. + * @param {number} far - Far bound of the frustum. + * + * @return {this} This Matrix4. + */ + perspectiveLH: function (width, height, near, far) + { + return this.setValues( + (2 * near) / width, + 0, + 0, + 0, + + 0, + (2 * near) / height, + 0, + 0, + + 0, + 0, + -far / (near - far), + 1, + + 0, + 0, + (near * far) / (near - far), + 0 + ); + }, + + /** + * Generate an orthogonal projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#ortho + * @since 3.0.0 + * + * @param {number} left - The left bound of the frustum. + * @param {number} right - The right bound of the frustum. + * @param {number} bottom - The bottom bound of the frustum. + * @param {number} top - The top bound of the frustum. + * @param {number} near - The near bound of the frustum. + * @param {number} far - The far bound of the frustum. + * + * @return {this} This Matrix4. + */ + ortho: function (left, right, bottom, top, near, far) + { + var lr = left - right; + var bt = bottom - top; + var nf = near - far; + + // Avoid division by zero + lr = (lr === 0) ? lr : 1 / lr; + bt = (bt === 0) ? bt : 1 / bt; + nf = (nf === 0) ? nf : 1 / nf; + + return this.setValues( + -2 * lr, + 0, + 0, + 0, + + 0, + -2 * bt, + 0, + 0, + + 0, + 0, + 2 * nf, + 0, + + (left + right) * lr, + (top + bottom) * bt, + (far + near) * nf, + 1 + ); + }, + + /** + * Generate a right-handed look-at matrix with the given eye position, target and up axis. + * + * @method Phaser.Math.Matrix4#lookAtRH + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} eye - Position of the viewer. + * @param {Phaser.Math.Vector3} target - Point the viewer is looking at. + * @param {Phaser.Math.Vector3} up - vec3 pointing up. + * + * @return {this} This Matrix4. + */ + lookAtRH: function (eye, target, up) + { + var m = this.val; + + _z.subVectors(eye, target); + + if (_z.getLengthSquared() === 0) + { + // eye and target are in the same position + _z.z = 1; + } + + _z.normalize(); + _x.crossVectors(up, _z); + + if (_x.getLengthSquared() === 0) + { + // up and z are parallel + + if (Math.abs(up.z) === 1) + { + _z.x += 0.0001; + } + else + { + _z.z += 0.0001; + } + + _z.normalize(); + _x.crossVectors(up, _z); + } + + _x.normalize(); + _y.crossVectors(_z, _x); + + m[0] = _x.x; + m[1] = _x.y; + m[2] = _x.z; + m[4] = _y.x; + m[5] = _y.y; + m[6] = _y.z; + m[8] = _z.x; + m[9] = _z.y; + m[10] = _z.z; + + return this; + }, + + /** + * Generate a look-at matrix with the given eye position, focal point, and up axis. + * + * @method Phaser.Math.Matrix4#lookAt + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} eye - Position of the viewer + * @param {Phaser.Math.Vector3} center - Point the viewer is looking at + * @param {Phaser.Math.Vector3} up - vec3 pointing up. + * + * @return {this} This Matrix4. + */ + lookAt: function (eye, center, up) + { + var eyex = eye.x; + var eyey = eye.y; + var eyez = eye.z; + + var upx = up.x; + var upy = up.y; + var upz = up.z; + + var centerx = center.x; + var centery = center.y; + var centerz = center.z; + + if (Math.abs(eyex - centerx) < EPSILON && + Math.abs(eyey - centery) < EPSILON && + Math.abs(eyez - centerz) < EPSILON) + { + return this.identity(); + } + + var z0 = eyex - centerx; + var z1 = eyey - centery; + var z2 = eyez - centerz; + + var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); + + z0 *= len; + z1 *= len; + z2 *= len; + + var x0 = upy * z2 - upz * z1; + var x1 = upz * z0 - upx * z2; + var x2 = upx * z1 - upy * z0; + + len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); + + if (!len) + { + x0 = 0; + x1 = 0; + x2 = 0; + } + else + { + len = 1 / len; + x0 *= len; + x1 *= len; + x2 *= len; + } + + var y0 = z1 * x2 - z2 * x1; + var y1 = z2 * x0 - z0 * x2; + var y2 = z0 * x1 - z1 * x0; + + len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); + + if (!len) + { + y0 = 0; + y1 = 0; + y2 = 0; + } + else + { + len = 1 / len; + y0 *= len; + y1 *= len; + y2 *= len; + } + + return this.setValues( + x0, + y0, + z0, + 0, + + x1, + y1, + z1, + 0, + + x2, + y2, + z2, + 0, + + -(x0 * eyex + x1 * eyey + x2 * eyez), + -(y0 * eyex + y1 * eyey + y2 * eyez), + -(z0 * eyex + z1 * eyey + z2 * eyez), + 1 + ); + }, + + /** + * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. + * + * @method Phaser.Math.Matrix4#yawPitchRoll + * @since 3.0.0 + * + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. + * + * @return {this} This Matrix4. + */ + yawPitchRoll: function (yaw, pitch, roll) + { + this.zero(); + _tempMat1.zero(); + _tempMat2.zero(); + + var m0 = this.val; + var m1 = _tempMat1.val; + var m2 = _tempMat2.val; + + // Rotate Z + var s = Math.sin(roll); + var c = Math.cos(roll); + + m0[10] = 1; + m0[15] = 1; + m0[0] = c; + m0[1] = s; + m0[4] = -s; + m0[5] = c; + + // Rotate X + s = Math.sin(pitch); + c = Math.cos(pitch); + + m1[0] = 1; + m1[15] = 1; + m1[5] = c; + m1[10] = c; + m1[9] = -s; + m1[6] = s; + + // Rotate Y + s = Math.sin(yaw); + c = Math.cos(yaw); + + m2[5] = 1; + m2[15] = 1; + m2[0] = c; + m2[2] = -s; + m2[8] = s; + m2[10] = c; + + this.multiplyLocal(_tempMat1); + this.multiplyLocal(_tempMat2); + + return this; + }, + + /** + * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. + * + * @method Phaser.Math.Matrix4#setWorldMatrix + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix. + * @param {Phaser.Math.Vector3} position - The position of the world matrix. + * @param {Phaser.Math.Vector3} scale - The scale of the world matrix. + * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix. + * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix. + * + * @return {this} This Matrix4. + */ + setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix) + { + this.yawPitchRoll(rotation.y, rotation.x, rotation.z); + + _tempMat1.scaling(scale.x, scale.y, scale.z); + _tempMat2.xyz(position.x, position.y, position.z); + + this.multiplyLocal(_tempMat1); + this.multiplyLocal(_tempMat2); + + if (viewMatrix) + { + this.multiplyLocal(viewMatrix); + } + + if (projectionMatrix) + { + this.multiplyLocal(projectionMatrix); + } + + return this; + }, + + /** + * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4. + * + * @method Phaser.Math.Matrix4#multiplyToMat4 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one. + * @param {Phaser.Math.Matrix4} out - The receiving Matrix. + * + * @return {Phaser.Math.Matrix4} This `out` Matrix4. + */ + multiplyToMat4: function (src, out) + { + var a = this.val; + var b = src.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 = b[0]; + var b01 = b[1]; + var b02 = b[2]; + var b03 = b[3]; + var b10 = b[4]; + var b11 = b[5]; + var b12 = b[6]; + var b13 = b[7]; + var b20 = b[8]; + var b21 = b[9]; + var b22 = b[10]; + var b23 = b[11]; + var b30 = b[12]; + var b31 = b[13]; + var b32 = b[14]; + var b33 = b[15]; + + return out.setValues( + b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, + b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31, + b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32, + b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33, + + b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, + b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, + b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, + b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, + + b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, + b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, + b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, + b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, + + b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, + b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, + b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, + b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 + ); + }, + + /** + * Takes the rotation and position vectors and builds this Matrix4 from them. + * + * @method Phaser.Math.Matrix4#fromRotationXYTranslation + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} rotation - The rotation vector. + * @param {Phaser.Math.Vector3} position - The position vector. + * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`) + * + * @return {this} This Matrix4. + */ + fromRotationXYTranslation: function (rotation, position, translateFirst) + { + var x = position.x; + var y = position.y; + var z = position.z; + + var sx = Math.sin(rotation.x); + var cx = Math.cos(rotation.x); + + var sy = Math.sin(rotation.y); + var cy = Math.cos(rotation.y); + + var a30 = x; + var a31 = y; + var a32 = z; + + // Rotate X + + var b21 = -sx; + + // Rotate Y + + var c01 = 0 - b21 * sy; + + var c02 = 0 - cx * sy; + + var c21 = b21 * cy; + + var c22 = cx * cy; + + // Translate + if (!translateFirst) + { + // a30 = cy * x + 0 * y + sy * z; + a30 = cy * x + sy * z; + a31 = c01 * x + cx * y + c21 * z; + a32 = c02 * x + sx * y + c22 * z; + } + + return this.setValues( + cy, + c01, + c02, + 0, + 0, + cx, + sx, + 0, + sy, + c21, + c22, + 0, + a30, + a31, + a32, + 1 + ); + }, + + /** + * Returns the maximum axis scale from this Matrix4. + * + * @method Phaser.Math.Matrix4#getMaxScaleOnAxis + * @since 3.50.0 + * + * @return {number} The maximum axis scale. + */ + getMaxScaleOnAxis: function () + { + var m = this.val; + + var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2]; + var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6]; + var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10]; + + return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); + } + +}); + +/** + * @ignore + */ +var _tempMat1 = new Matrix4(); + +/** + * @ignore + */ +var _tempMat2 = new Matrix4(); + +/** + * @ignore + */ +var _x = new Vector3(); + +/** + * @ignore + */ +var _y = new Vector3(); + +/** + * @ignore + */ +var _z = new Vector3(); + +module.exports = Matrix4; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Scenes.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(187), + BOOT: __webpack_require__(188), + CREATE: __webpack_require__(189), + DESTROY: __webpack_require__(190), + PAUSE: __webpack_require__(191), + POST_UPDATE: __webpack_require__(192), + PRE_RENDER: __webpack_require__(193), + PRE_UPDATE: __webpack_require__(194), + READY: __webpack_require__(195), + REMOVED_FROM_SCENE: __webpack_require__(196), + RENDER: __webpack_require__(197), + RESUME: __webpack_require__(198), + SHUTDOWN: __webpack_require__(199), + SLEEP: __webpack_require__(200), + START: __webpack_require__(201), + TRANSITION_COMPLETE: __webpack_require__(202), + TRANSITION_INIT: __webpack_require__(203), + TRANSITION_OUT: __webpack_require__(204), + TRANSITION_START: __webpack_require__(205), + TRANSITION_WAKE: __webpack_require__(206), + UPDATE: __webpack_require__(207), + WAKE: __webpack_require__(208) + +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(12); +var Events = __webpack_require__(47); +var GetFastValue = __webpack_require__(11); +var GetURL = __webpack_require__(48); +var MergeXHRSettings = __webpack_require__(49); +var XHRLoader = __webpack_require__(222); +var XHRSettings = __webpack_require__(50); + +/** + * @classdesc + * The base File class used by all File Types that the Loader can support. + * 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. + * + * @class File + * @memberof Phaser.Loader + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File. + * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type. + */ +var File = new Class({ + + initialize: + + function File (loader, fileConfig) + { + /** + * A reference to the Loader that is going to load this file. + * + * @name Phaser.Loader.File#loader + * @type {Phaser.Loader.LoaderPlugin} + * @since 3.0.0 + */ + this.loader = loader; + + /** + * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. + * + * @name Phaser.Loader.File#cache + * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)} + * @since 3.7.0 + */ + this.cache = GetFastValue(fileConfig, 'cache', false); + + /** + * The file type string (image, json, etc) for sorting within the Loader. + * + * @name Phaser.Loader.File#type + * @type {string} + * @since 3.0.0 + */ + this.type = GetFastValue(fileConfig, 'type', false); + + if (!this.type) + { + throw new Error('Invalid File type: ' + this.type); + } + + /** + * Unique cache key (unique within its file type) + * + * @name Phaser.Loader.File#key + * @type {string} + * @since 3.0.0 + */ + this.key = GetFastValue(fileConfig, 'key', false); + + var loadKey = this.key; + + if (loader.prefix && loader.prefix !== '') + { + this.key = loader.prefix + loadKey; + } + + if (!this.key) + { + throw new Error('Invalid File key: ' + this.key); + } + + var url = GetFastValue(fileConfig, 'url'); + + if (url === undefined) + { + url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); + } + else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) + { + url = loader.path + url; + } + + /** + * The URL of the file, not including baseURL. + * + * 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 {object|string} + * @since 3.0.0 + */ + this.url = url; + + /** + * The final URL this file will load from, including baseURL and path. + * Set automatically when the Loader calls 'load' on this file. + * + * @name Phaser.Loader.File#src + * @type {string} + * @since 3.0.0 + */ + this.src = ''; + + /** + * The merged XHRSettings for this file. + * + * @name Phaser.Loader.File#xhrSettings + * @type {Phaser.Types.Loader.XHRSettingsObject} + * @since 3.0.0 + */ + this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined)); + + if (GetFastValue(fileConfig, 'xhrSettings', false)) + { + this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {})); + } + + /** + * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. + * + * @name Phaser.Loader.File#xhrLoader + * @type {?XMLHttpRequest} + * @since 3.0.0 + */ + this.xhrLoader = null; + + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.File#state + * @type {number} + * @since 3.0.0 + */ + this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING; + + /** + * The total size of this file. + * Set by onProgress and only if loading via XHR. + * + * @name Phaser.Loader.File#bytesTotal + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.bytesTotal = 0; + + /** + * Updated as the file loads. + * Only set if loading via XHR. + * + * @name Phaser.Loader.File#bytesLoaded + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.bytesLoaded = -1; + + /** + * A percentage value between 0 and 1 indicating how much of this file has loaded. + * Only set if loading via XHR. + * + * @name Phaser.Loader.File#percentComplete + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.percentComplete = -1; + + /** + * For CORs based loading. + * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) + * + * @name Phaser.Loader.File#crossOrigin + * @type {(string|undefined)} + * @since 3.0.0 + */ + this.crossOrigin = undefined; + + /** + * The processed file data, stored here after the file has loaded. + * + * @name Phaser.Loader.File#data + * @type {*} + * @since 3.0.0 + */ + this.data = undefined; + + /** + * A config object that can be used by file types to store transitional data. + * + * @name Phaser.Loader.File#config + * @type {*} + * @since 3.0.0 + */ + this.config = GetFastValue(fileConfig, 'config', {}); + + /** + * If this is a multipart file, i.e. an atlas and its json together, then this is a reference + * to the parent MultiFile. Set and used internally by the Loader or specific file types. + * + * @name Phaser.Loader.File#multiFile + * @type {?Phaser.Loader.MultiFile} + * @since 3.7.0 + */ + this.multiFile; + + /** + * Does this file have an associated linked file? Such as an image and a normal map. + * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't + * actually bound by data, where-as a linkFile is. + * + * @name Phaser.Loader.File#linkFile + * @type {?Phaser.Loader.File} + * @since 3.7.0 + */ + this.linkFile; + }, + + /** + * Links this File with another, so they depend upon each other for loading and processing. + * + * @method Phaser.Loader.File#setLink + * @since 3.7.0 + * + * @param {Phaser.Loader.File} fileB - The file to link to this one. + */ + setLink: function (fileB) + { + this.linkFile = fileB; + + fileB.linkFile = this; + }, + + /** + * Resets the XHRLoader instance this file is using. + * + * @method Phaser.Loader.File#resetXHR + * @since 3.0.0 + */ + resetXHR: function () + { + if (this.xhrLoader) + { + this.xhrLoader.onload = undefined; + this.xhrLoader.onerror = undefined; + this.xhrLoader.onprogress = undefined; + } + }, + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + * + * @method Phaser.Loader.File#load + * @since 3.0.0 + */ + load: function () + { + if (this.state === CONST.FILE_POPULATED) + { + // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL + this.loader.nextFile(this, true); + } + else + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) + { + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + // 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 + + this.xhrLoader = XHRLoader(this, this.loader.xhr); + } + } + }, + + /** + * Called when the file finishes loading, is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onLoad + * @since 3.0.0 + * + * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. + * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load. + */ + onLoad: function (xhr, event) + { + var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme) + { + return xhr.responseURL.indexOf(scheme) === 0; + }); + + var localFileOk = (isLocalFile && event.target.status === 0); + + var success = !(event.target && event.target.status !== 200) || localFileOk; + + // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called. + if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) + { + success = false; + } + + this.state = CONST.FILE_LOADED; + + this.resetXHR(); + + this.loader.nextFile(this, success); + }, + + /** + * Called if the file errors while loading, is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onError + * @since 3.0.0 + * + * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. + * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. + */ + onError: function () + { + this.resetXHR(); + + this.loader.nextFile(this, false); + }, + + /** + * Called during the file load progress. Is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onProgress + * @fires Phaser.Loader.Events#FILE_PROGRESS + * @since 3.0.0 + * + * @param {ProgressEvent} event - The DOM ProgressEvent. + */ + onProgress: function (event) + { + if (event.lengthComputable) + { + this.bytesLoaded = event.loaded; + this.bytesTotal = event.total; + + this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1); + + this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete); + } + }, + + /** + * Usually overridden by the FileTypes and is called by Loader.nextFile. + * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. + * + * @method Phaser.Loader.File#onProcess + * @since 3.0.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.onProcessComplete(); + }, + + /** + * Called when the File has completed processing. + * Checks on the state of its multifile, if set. + * + * @method Phaser.Loader.File#onProcessComplete + * @since 3.7.0 + */ + onProcessComplete: function () + { + this.state = CONST.FILE_COMPLETE; + + if (this.multiFile) + { + this.multiFile.onFileComplete(this); + } + + this.loader.fileProcessComplete(this); + }, + + /** + * Called when the File has completed processing but it generated an error. + * Checks on the state of its multifile, if set. + * + * @method Phaser.Loader.File#onProcessError + * @since 3.7.0 + */ + onProcessError: function () + { + // eslint-disable-next-line no-console + console.error('Failed to process file: %s "%s"', this.type, this.key); + + this.state = CONST.FILE_ERRORED; + + if (this.multiFile) + { + this.multiFile.onFileFailed(this); + } + + this.loader.fileProcessComplete(this); + }, + + /** + * Checks if a key matching the one used by this file exists in the target Cache or not. + * This is called automatically by the LoaderPlugin to decide if the file can be safely + * loaded or will conflict. + * + * @method Phaser.Loader.File#hasCacheConflict + * @since 3.7.0 + * + * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`. + */ + hasCacheConflict: function () + { + return (this.cache && this.cache.exists(this.key)); + }, + + /** + * Adds this file to its target cache upon successful loading and processing. + * This method is often overridden by specific file types. + * + * @method Phaser.Loader.File#addToCache + * @since 3.7.0 + */ + addToCache: function () + { + if (this.cache && this.data) + { + this.cache.add(this.key, this.data); + } + }, + + /** + * Called once the file has been added to its cache and is now ready for deletion from the Loader. + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.File#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.7.0 + */ + pendingDestroy: function (data) + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + if (data === undefined) { data = this.data; } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type, data); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); + + this.loader.flagForRemoval(this); + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this File and any references it holds. + * + * @method Phaser.Loader.File#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.loader = null; + this.cache = null; + this.xhrSettings = null; + this.multiFile = null; + this.linkFile = null; + this.data = null; + } + +}); + +/** + * Static method for creating object URL using URL API and setting it as image 'src' attribute. + * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. + * + * @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. + */ +File.createObjectURL = function (image, blob, defaultType) +{ + if (typeof URL === 'function') + { + image.src = URL.createObjectURL(blob); + } + else + { + var reader = new FileReader(); + + reader.onload = function () + { + image.removeAttribute('crossOrigin'); + image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1]; + }; + + reader.onerror = image.onerror; + + reader.readAsDataURL(blob); + } +}; + +/** + * Static method for releasing an existing object URL which was previously created + * by calling {@link File#createObjectURL} method. + * + * @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) +{ + if (typeof URL === 'function') + { + URL.revokeObjectURL(image.src); + } +}; + +module.exports = File; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var types = {}; + +/** + * @namespace Phaser.Loader.FileTypesManager + */ + +var FileTypesManager = { + + /** + * Static method called when a LoaderPlugin is created. + * + * Loops through the local types object and injects all of them as + * properties into the LoaderPlugin instance. + * + * @method Phaser.Loader.FileTypesManager.install + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. + */ + install: function (loader) + { + for (var key in types) + { + loader[key] = types[key]; + } + }, + + /** + * Static method called directly by the File Types. + * + * The key is a reference to the function used to load the files via the Loader, i.e. `image`. + * + * @method Phaser.Loader.FileTypesManager.register + * @since 3.0.0 + * + * @param {string} key - The key that will be used as the method name in the LoaderPlugin. + * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. + */ + register: function (key, factoryFunction) + { + types[key] = factoryFunction; + }, + + /** + * Removed all associated file types. + * + * @method Phaser.Loader.FileTypesManager.destroy + * @since 3.0.0 + */ + destroy: function () + { + types = {}; + } + +}; + +module.exports = FileTypesManager; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var MATH_CONST = __webpack_require__(4); +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 temporary quad value cache. + * + * @name Phaser.GameObjects.Components.TransformMatrix#quad + * @type {Float32Array} + * @since 3.60.0 + */ + this.quad = new Float32Array(8); + }, + + /** + * 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) ? matrix : out.matrix; + + destinationMatrix[0] = (sourceA * localA) + (sourceB * localC); + destinationMatrix[1] = (sourceA * localB) + (sourceB * localD); + destinationMatrix[2] = (sourceC * localA) + (sourceD * localC); + destinationMatrix[3] = (sourceC * localB) + (sourceD * localD); + destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. + * + * @return {Phaser.Types.Math.Vector2Like} 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; + }, + + /** + * Performs the 8 calculations required to create the vertices of + * a quad based on this matrix and the given x/y/xw/yh values. + * + * The result is stored in `TransformMatrix.quad`, which is returned + * from this method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setQuad + * @since 3.60.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} xw - The xw value. + * @param {number} yh - The yh value. + * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. + * + * @return {Float32Array} The quad Float32Array. + */ + setQuad: function (x, y, xw, yh, roundPixels, quad) + { + if (quad === undefined) { quad = this.quad; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var e = matrix[4]; + var f = matrix[5]; + + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; + + if (roundPixels) + { + quad.forEach(function (value, index) + { + quad[index] = Math.round(value); + }); + } + + return quad; + }, + + /** + * 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.quad = null; + this.decomposedMatrix = null; + } + +}); + +module.exports = TransformMatrix; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. This is an example matrix: + * + * ``` + * [ + * [ 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) || !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; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the operating system of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.os` from within any Scene. + * + * @typedef {object} Phaser.Device.OS + * @since 3.0.0 + * + * @property {boolean} android - Is running on android? + * @property {boolean} chromeOS - Is running on chromeOS? + * @property {boolean} cordova - Is the game running under Apache Cordova? + * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK? + * @property {boolean} desktop - Is running on a desktop? + * @property {boolean} ejecta - Is the game running under Ejecta? + * @property {boolean} electron - Is the game running under GitHub Electron? + * @property {boolean} iOS - Is running on iOS? + * @property {boolean} iPad - Is running on iPad? + * @property {boolean} iPhone - Is running on iPhone? + * @property {boolean} kindle - Is running on an Amazon Kindle? + * @property {boolean} linux - Is running on linux? + * @property {boolean} macOS - Is running on macOS? + * @property {boolean} node - Is the game running under Node.js? + * @property {boolean} nodeWebkit - Is the game running under Node-Webkit? + * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView + * @property {boolean} windows - Is running on windows? + * @property {boolean} windowsPhone - Is running on a Windows Phone? + * @property {number} iOSVersion - If running in iOS this will contain the major version number. + * @property {number} pixelRatio - PixelRatio of the host device? + */ +var OS = { + + android: false, + chromeOS: false, + cordova: false, + crosswalk: false, + desktop: false, + ejecta: false, + electron: false, + iOS: false, + iOSVersion: 0, + iPad: false, + iPhone: false, + kindle: false, + linux: false, + macOS: false, + node: false, + nodeWebkit: false, + pixelRatio: 1, + webApp: false, + windows: false, + windowsPhone: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return OS; + } + + var ua = navigator.userAgent; + + if ((/Windows/).test(ua)) + { + OS.windows = true; + } + else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua))) + { + // Because iOS 13 identifies as Mac OS: + if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2) + { + OS.iOS = true; + OS.iPad = true; + + (navigator.appVersion).match(/Version\/(\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + } + else + { + OS.macOS = true; + } + } + else if ((/Android/).test(ua)) + { + OS.android = true; + } + else if ((/Linux/).test(ua)) + { + OS.linux = true; + } + else if ((/iP[ao]d|iPhone/i).test(ua)) + { + OS.iOS = true; + + (navigator.appVersion).match(/OS (\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + + OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1; + OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1; + } + else if ((/Kindle/).test(ua) || (/\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua)) + { + OS.kindle = true; + + // This will NOT detect early generations of Kindle Fire, I think there is no reliable way... + // E.g. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true" + } + else if ((/CrOS/).test(ua)) + { + OS.chromeOS = true; + } + + if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua)) + { + OS.android = false; + OS.iOS = false; + OS.macOS = false; + OS.windows = true; + OS.windowsPhone = true; + } + + var silk = (/Silk/).test(ua); + + if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS) + { + OS.desktop = true; + } + + // Windows Phone / Table reset + if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua)))) + { + OS.desktop = false; + } + + // WebApp mode in iOS + if (navigator.standalone) + { + OS.webApp = true; + } + + if (typeof importScripts !== 'function') + { + if (window.cordova !== undefined) + { + OS.cordova = true; + } + + if (window.ejecta !== undefined) + { + OS.ejecta = true; + } + } + + if (typeof process !== 'undefined' && process.versions && process.versions.node) + { + OS.node = true; + } + + if (OS.node && typeof process.versions === 'object') + { + OS.nodeWebkit = !!process.versions['node-webkit']; + + OS.electron = !!process.versions.electron; + } + + if ((/Crosswalk/).test(ua)) + { + OS.crosswalk = true; + } + + OS.pixelRatio = window['devicePixelRatio'] || 1; + + return OS; +} + +module.exports = init(); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(301))) + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Contains = __webpack_require__(319); +var GetPoint = __webpack_require__(66); +var GetPoints = __webpack_require__(320); +var GEOM_CONST = __webpack_require__(30); +var Line = __webpack_require__(321); +var Random = __webpack_require__(326); + +/** + * @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 {number} + * @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 {number} 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; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {number} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {number} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {number} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {number} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {number} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {number} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MathWrap = __webpack_require__(6); + +/** + * 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; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Wrap = __webpack_require__(6); + +/** + * 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; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Factorial = __webpack_require__(37); + +/** + * 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; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 Matrix3 = __webpack_require__(45); +var NOOP = __webpack_require__(2); +var Vector3 = __webpack_require__(16); + +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=0] - The x component. + * @param {number} [y=0] - The y component. + * @param {number} [z=0] - The z component. + * @param {number} [w=1] - 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 + * @private + * @since 3.50.0 + */ + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_y + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_z + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_w + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * This callback is invoked, if set, each time a value in this quaternion is changed. + * The callback is passed one argument, a reference to this quaternion. + * + * @name Phaser.Math.Quaternion#onChangeCallback + * @type {function} + * @since 3.50.0 + */ + this.onChangeCallback = NOOP; + + this.set(x, y, z, w); + }, + + /** + * The x component of this Quaternion. + * + * @name Phaser.Math.Quaternion#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + x: { + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + + this.onChangeCallback(this); + } + }, + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + y: { + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + + this.onChangeCallback(this); + } + }, + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + z: { + get: function () + { + return this._z; + }, + + set: function (value) + { + this._z = value; + + this.onChangeCallback(this); + } + }, + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + w: { + get: function () + { + return this._w; + }, + + set: function (value) + { + this._w = value; + + this.onChangeCallback(this); + } + }, + + /** + * 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) + { + return this.set(src); + }, + + /** + * Set the components of this Quaternion and optionally call the `onChangeCallback`. + * + * @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. + * @param {boolean} [update=true] - Call the `onChangeCallback`? + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + set: function (x, y, z, w, update) + { + if (update === undefined) { update = true; } + + 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; + } + + if (update) + { + this.onChangeCallback(this); + } + + 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; + + this.onChangeCallback(this); + + 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; + + this.onChangeCallback(this); + + 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; + + this.onChangeCallback(this); + + 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; + } + + this.onChangeCallback(this); + + 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; + + return this.set( + ax + t * (v.x - ax), + ay + t * (v.y - ay), + az + t * (v.z - az), + aw + t * (v.w - aw) + ); + }, + + /** + * 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) + { + return this.set(0, 0, 0, 1); + } + 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 () + { + return this.set(0, 0, 0, 1); + }, + + /** + * 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); + + return this.set( + s * axis.x, + s * axis.y, + s * axis.z, + Math.cos(rad) + ); + }, + + /** + * 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; + + return this.set( + ax * bw + aw * bx + ay * bz - az * by, + ay * bw + aw * by + az * bx - ax * bz, + az * bw + aw * bz + ax * by - ay * bx, + aw * bw - ax * bx - ay * by - az * bz + ); + }, + + /** + * 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 + return this.set( + scale0 * ax + scale1 * bx, + scale0 * ay + scale1 * by, + scale0 * az + scale1 * bz, + scale0 * aw + scale1 * bw + ); + }, + + /** + * 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; + + return this.set( + -a0 * invDot, + -a1 * invDot, + -a2 * invDot, + a3 * invDot + ); + }, + + /** + * 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; + + this.onChangeCallback(this); + + 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); + + return this.set( + ax * bw + aw * bx, + ay * bw + az * bx, + az * bw - ay * bx, + aw * bw - ax * bx + ); + }, + + /** + * 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); + + return this.set( + ax * bw - az * by, + ay * bw + aw * by, + az * bw + ax * by, + aw * bw - ay * by + ); + }, + + /** + * 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); + + return this.set( + ax * bw + ay * bz, + ay * bw - ax * bz, + az * bw + aw * bz, + aw * bw - az * bz + ); + }, + + /** + * 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; + }, + + /** + * Set this Quaternion from the given Euler, based on Euler order. + * + * @method Phaser.Math.Quaternion#setFromEuler + * @since 3.50.0 + * + * @param {Phaser.Math.Euler} euler - The Euler to convert from. + * @param {boolean} [update=true] - Run the `onChangeCallback`? + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setFromEuler: function (euler, update) + { + var x = euler.x / 2; + var y = euler.y / 2; + var z = euler.z / 2; + + var c1 = Math.cos(x); + var c2 = Math.cos(y); + var c3 = Math.cos(z); + + var s1 = Math.sin(x); + var s2 = Math.sin(y); + var s3 = Math.sin(z); + + switch (euler.order) + { + case 'XYZ': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'YXZ': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + + case 'ZXY': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'ZYX': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + + case 'YZX': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'XZY': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + } + + return this; + }, + + /** + * Sets the rotation of this Quaternion from the given Matrix4. + * + * @method Phaser.Math.Quaternion#setFromRotationMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setFromRotationMatrix: function (mat4) + { + var m = mat4.val; + + var m11 = m[0]; + var m12 = m[4]; + var m13 = m[8]; + var m21 = m[1]; + var m22 = m[5]; + var m23 = m[9]; + var m31 = m[2]; + var m32 = m[6]; + var m33 = m[10]; + + var trace = m11 + m22 + m33; + var s; + + if (trace > 0) + { + s = 0.5 / Math.sqrt(trace + 1.0); + + this.set( + (m32 - m23) * s, + (m13 - m31) * s, + (m21 - m12) * s, + 0.25 / s + ); + } + else if (m11 > m22 && m11 > m33) + { + s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); + + this.set( + 0.25 * s, + (m12 + m21) / s, + (m13 + m31) / s, + (m32 - m23) / s + ); + } + else if (m22 > m33) + { + s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); + + this.set( + (m12 + m21) / s, + 0.25 * s, + (m23 + m32) / s, + (m13 - m31) / s + ); + } + else + { + s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); + + this.set( + (m13 + m31) / s, + (m23 + m32) / s, + 0.25 * s, + (m21 - m12) / s + ); + } + + 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; + } + + this.onChangeCallback(this); + + return this; + } + +}); + +module.exports = Quaternion; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Loader.Events + */ + +module.exports = { + + ADD: __webpack_require__(212), + COMPLETE: __webpack_require__(213), + FILE_COMPLETE: __webpack_require__(214), + FILE_KEY_COMPLETE: __webpack_require__(215), + FILE_LOAD_ERROR: __webpack_require__(216), + FILE_LOAD: __webpack_require__(217), + FILE_PROGRESS: __webpack_require__(218), + POST_PROCESS: __webpack_require__(219), + PROGRESS: __webpack_require__(220), + START: __webpack_require__(221) + +}; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a File and a baseURL value this returns the URL the File will use to download from. + * + * @function Phaser.Loader.GetURL + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - The File object. + * @param {string} baseURL - A default base URL. + * + * @return {string} The URL the File will use. + */ +var GetURL = function (file, baseURL) +{ + if (!file.url) + { + return false; + } + + if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) + { + return file.url; + } + else + { + return baseURL + file.url; + } +}; + +module.exports = GetURL; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Extend = __webpack_require__(19); +var XHRSettings = __webpack_require__(50); + +/** + * Takes two XHRSettings Objects and creates a new XHRSettings object from them. + * + * The new object is seeded by the values given in the global settings, but any setting in + * the local object overrides the global ones. + * + * @function Phaser.Loader.MergeXHRSettings + * @since 3.0.0 + * + * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object. + * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object. + * + * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object. + */ +var MergeXHRSettings = function (global, local) +{ + var output = (global === undefined) ? XHRSettings() : Extend({}, global); + + if (local) + { + for (var setting in local) + { + if (local[setting] !== undefined) + { + output[setting] = local[setting]; + } + } + } + + return output; +}; + +module.exports = MergeXHRSettings; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Creates an XHRSettings Object with default values. + * + * @function Phaser.Loader.XHRSettings + * @since 3.0.0 + * + * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'. + * @param {boolean} [async=true] - Should the XHR request use async or not? + * @param {string} [user=''] - Optional username for the XHR request. + * @param {string} [password=''] - Optional password for the XHR request. + * @param {number} [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, 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. + // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". + + return { + + // Ignored by the Loader, only used by File. + responseType: responseType, + + async: async, + + // credentials + user: user, + password: password, + + // timeout in ms (0 = no timeout) + timeout: timeout, + + // setRequestHeader + headers: undefined, + header: undefined, + headerValue: undefined, + requestedWith: false, + + // overrideMimeType + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials + + }; +}; + +module.exports = XHRSettings; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @private + * @default 0 + * @since 3.0.0 + */ + _depth: 0, + + /** + * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type. + * + * 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) + { + if (this.displayList) + { + this.displayList.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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type. + * + * @return {this} This Game Object instance. + */ + setDepth: function (value) + { + if (value === undefined) { value = 0; } + + this.depth = value; + + return this; + } + +}; + +module.exports = Depth; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(4); +var TransformMatrix = __webpack_require__(26); +var TransformXY = __webpack_require__(44); +var WrapAngle = __webpack_require__(33); +var WrapAngleDegrees = __webpack_require__(34); +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 = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Transform#hasTransformComponent + * @type {boolean} + * @readonly + * @default true + * @since 3.60.0 + */ + hasTransformComponent: true, + + /** + * 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 {number} + * @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; + }, + + /** + * Copies an object's coordinates to this Game Object's position. + * + * @method Phaser.GameObjects.Components.Transform#copyPosition + * @since 3.50.0 + * + * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. + * + * @return {this} This Game Object instance. + */ + copyPosition: function (source) + { + if (source.x !== undefined) { this.x = source.x; } + if (source.y !== undefined) { this.y = source.y; } + if (source.z !== undefined) { this.z = source.z; } + if (source.w !== undefined) { this.w = source.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; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var ComponentsToJSON = __webpack_require__(58); +var DataManager = __webpack_require__(227); +var EventEmitter = __webpack_require__(234); +var Events = __webpack_require__(59); +var SceneEvents = __webpack_require__(23); + +/** + * @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); + + /** + * A reference to the Scene to which this Game Object belongs. + * + * Game Objects can only belong to one Scene. + * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + * + * @name Phaser.GameObjects.GameObject#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene = scene; + + /** + * Holds a reference to the Display List that contains this Game Object. + * + * This is set automatically when this Game Object is added to a Scene or Layer. + * + * You should treat this property as being read-only. + * + * @name Phaser.GameObjects.GameObject#displayList + * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} + * @default null + * @since 3.50.0 + */ + this.displayList = null; + + /** + * 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 {(number|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 {number} + * @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 {number} + * @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; + + this.on(Events.ADDED_TO_SCENE, this.addedToScene, this); + this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this); + + // 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 {(number|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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 () + { + this.scene.sys.input.disable(this); + + 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) + { + var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; + + return !(!listWillRender || 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 {number[]} 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)); + + child = parent; + + if (!parent.parentContainer) + { + break; + } + else + { + parent = parent.parentContainer; + } + } + + if (this.displayList) + { + indexes.unshift(this.displayList.getIndex(child)); + } + else + { + indexes.unshift(this.scene.sys.displayList.getIndex(child)); + } + + return indexes; + }, + + /** + * Adds this Game Object to the given Display List. + * + * If no Display List is specified, it will default to the Display List owned by the Scene to which + * this Game Object belongs. + * + * A Game Object can only exist on one Display List at any given time, but may move freely between them. + * + * If this Game Object is already on another Display List when this method is called, it will first + * be removed from it, before being added to the new list. + * + * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. + * + * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly + * disable it from rendering, consider using the `setVisible` method, instead. + * + * @method Phaser.GameObjects.GameObject#addToDisplayList + * @fires Phaser.Scenes.Events#ADDED_TO_SCENE + * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.53.0 + * + * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List. + * + * @return {this} This Game Object. + */ + addToDisplayList: function (displayList) + { + if (displayList === undefined) { displayList = this.scene.sys.displayList; } + + if (this.displayList && this.displayList !== displayList) + { + this.removeFromDisplayList(); + } + + // Don't repeat if it's already on this list + if (!displayList.exists(this)) + { + this.displayList = displayList; + + displayList.add(this, true); + + displayList.queueDepthSort(); + + this.emit(Events.ADDED_TO_SCENE, this, this.scene); + + displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene); + } + + return this; + }, + + /** + * Adds this Game Object to the Update List belonging to the Scene. + * + * When a Game Object is added to the Update List it will have its `preUpdate` method called + * every game frame. This method is passed two parameters: `delta` and `time`. + * + * If you wish to run your own logic within `preUpdate` then you should always call + * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, + * such as Sprite animations. + * + * @method Phaser.GameObjects.GameObject#addToUpdateList + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + addToUpdateList: function () + { + if (this.scene && this.preUpdate) + { + this.scene.sys.updateList.add(this); + } + + return this; + }, + + /** + * Removes this Game Object from the Display List it is currently on. + * + * A Game Object can only exist on one Display List at any given time, but may move freely removed + * and added back at a later stage. + * + * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. + * + * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly + * disable it from rendering, consider using the `setVisible` method, instead. + * + * @method Phaser.GameObjects.GameObject#removeFromDisplayList + * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + removeFromDisplayList: function () + { + var displayList = this.displayList || this.scene.sys.displayList; + + if (displayList && displayList.exists(this)) + { + displayList.remove(this, true); + + displayList.queueDepthSort(); + + this.displayList = null; + + this.emit(Events.REMOVED_FROM_SCENE, this, this.scene); + + displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene); + } + + return this; + }, + + /** + * Removes this Game Object from the Scene's Update List. + * + * When a Game Object is on the Update List, it will have its `preUpdate` method called + * every game frame. Calling this method will remove it from the list, preventing this. + * + * Removing a Game Object from the Update List will stop most internal functions working. + * For example, removing a Sprite from the Update List will prevent it from being able to + * run animations. + * + * @method Phaser.GameObjects.GameObject#removeFromUpdateList + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + removeFromUpdateList: function () + { + if (this.scene && this.preUpdate) + { + this.scene.sys.updateList.remove(this); + } + + return this; + }, + + /** + * 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] - `True` if this Game Object is being destroyed by the Scene, `false` if not. + */ + destroy: function (fromScene) + { + // This Game Object has already been destroyed + if (!this.scene || this.ignoreDestroy) + { + return; + } + + if (fromScene === undefined) { fromScene = false; } + + if (this.preDestroy) + { + this.preDestroy.call(this); + } + + this.emit(Events.DESTROY, this, fromScene); + + this.removeAllListeners(); + + if (this.postPipelines) + { + this.resetPostPipeline(true); + } + + this.removeFromDisplayList(); + this.removeFromUpdateList(); + + if (this.input) + { + this.scene.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; + } + + this.active = false; + this.visible = false; + + this.scene = undefined; + this.parentContainer = undefined; + } + +}); + +/** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * + * @constant {number} RENDER_MASK + * @memberof Phaser.GameObjects.GameObject + * @default + */ +GameObject.RENDER_MASK = 15; + +module.exports = GameObject; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(235), + DESTROY: __webpack_require__(236), + REMOVED_FROM_SCENE: __webpack_require__(237), + VIDEO_COMPLETE: __webpack_require__(238), + VIDEO_CREATED: __webpack_require__(239), + VIDEO_ERROR: __webpack_require__(240), + VIDEO_LOOP: __webpack_require__(241), + VIDEO_PLAY: __webpack_require__(242), + VIDEO_SEEKED: __webpack_require__(243), + VIDEO_SEEKING: __webpack_require__(244), + VIDEO_STOP: __webpack_require__(245), + VIDEO_TIMEOUT: __webpack_require__(246), + VIDEO_UNLOCKED: __webpack_require__(247) + +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TransformMatrix = __webpack_require__(26); + +var tempMatrix1 = new TransformMatrix(); +var tempMatrix2 = new TransformMatrix(); +var tempMatrix3 = new TransformMatrix(); + +var result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 }; + +/** + * Calculates the Transform Matrix of the given Game Object and Camera, factoring in + * the parent matrix if provided. + * + * Note that the object this results contains _references_ to the Transform Matrices, + * not new instances of them. Therefore, you should use their values immediately, or + * copy them to your own matrix, as they will be replaced as soon as another Game + * Object is rendered. + * + * @function Phaser.GameObjects.GetCalcMatrix + * @memberof Phaser.GameObjects + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any. + * + * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices. + */ +var GetCalcMatrix = function (src, camera, parentMatrix) +{ + var camMatrix = tempMatrix1; + var spriteMatrix = tempMatrix2; + var calcMatrix = tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + + camMatrix.copyFrom(camera.matrix); + + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + } + else + { + spriteMatrix.e -= camera.scrollX * src.scrollFactorX; + spriteMatrix.f -= camera.scrollY * src.scrollFactorY; + } + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + + return result; +}; + +module.exports = GetCalcMatrix; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(303); +var Smoothing = __webpack_require__(305); + +// The pool into which the canvas elements are placed. +var pool = []; + +// Automatically apply smoothing(false) to created Canvas elements +var _disableContextSmoothing = false; + +/** + * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements. + * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, + * which is useless for some of the Phaser pipelines / renderer. + * + * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created. + * Which means all instances of Phaser Games on the same page can share the one single pool. + * + * @namespace Phaser.Display.Canvas.CanvasPool + * @since 3.0.0 + */ +var CanvasPool = function () +{ + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent? + * + * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool + */ + var create = function (parent, width, height, canvasType, selfParent) + { + if (width === undefined) { width = 1; } + if (height === undefined) { height = 1; } + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + if (selfParent === undefined) { selfParent = false; } + + var canvas; + var container = first(canvasType); + + if (container === null) + { + container = { + parent: parent, + canvas: document.createElement('canvas'), + type: canvasType + }; + + if (canvasType === CONST.CANVAS) + { + pool.push(container); + } + + canvas = container.canvas; + } + else + { + container.parent = parent; + + canvas = container.canvas; + } + + if (selfParent) + { + container.parent = canvas; + } + + canvas.width = width; + canvas.height = height; + + if (_disableContextSmoothing && canvasType === CONST.CANVAS) + { + Smoothing.disable(canvas.getContext('2d')); + } + + return canvas; + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create2D + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created canvas. + */ + var create2D = function (parent, width, height) + { + return create(parent, width, height, CONST.CANVAS); + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.createWebGL + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created WebGL canvas. + */ + var createWebGL = function (parent, width, height) + { + return create(parent, width, height, CONST.WEBGL); + }; + + /** + * Gets the first free canvas index from the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.first + * @since 3.0.0 + * + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * + * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases. + */ + var first = function (canvasType) + { + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + + if (canvasType === CONST.WEBGL) + { + return null; + } + + for (var i = 0; i < pool.length; i++) + { + var container = pool[i]; + + if (!container.parent && container.type === canvasType) + { + return container; + } + } + + return null; + }; + + /** + * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use. + * The canvas has its width and height set to 1, and its parent attribute nulled. + * + * @function Phaser.Display.Canvas.CanvasPool.remove + * @since 3.0.0 + * + * @param {*} parent - The canvas or the parent of the canvas to free. + */ + var remove = function (parent) + { + // Check to see if the parent is a canvas object + var isCanvas = parent instanceof HTMLCanvasElement; + + pool.forEach(function (container) + { + if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent)) + { + container.parent = null; + container.canvas.width = 1; + container.canvas.height = 1; + } + }); + }; + + /** + * Gets the total number of used canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.total + * @since 3.0.0 + * + * @return {number} The number of used canvases. + */ + var total = function () + { + var c = 0; + + pool.forEach(function (container) + { + if (container.parent) + { + c++; + } + }); + + return c; + }; + + /** + * Gets the total number of free canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.free + * @since 3.0.0 + * + * @return {number} The number of free canvases. + */ + var free = function () + { + return pool.length - total(); + }; + + /** + * Disable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing + * @since 3.0.0 + */ + var disableSmoothing = function () + { + _disableContextSmoothing = true; + }; + + /** + * Enable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing + * @since 3.0.0 + */ + var enableSmoothing = function () + { + _disableContextSmoothing = false; + }; + + return { + create2D: create2D, + create: create, + createWebGL: createWebGL, + disableSmoothing: disableSmoothing, + enableSmoothing: enableSmoothing, + first: first, + free: free, + pool: pool, + remove: remove, + total: total + }; +}; + +// If we export the called function here, it'll only be invoked once (not every time it's required). +module.exports = CanvasPool(); + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(67); +var Point = __webpack_require__(14); + +/** + * 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; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Clamp = __webpack_require__(1); +var Extend = __webpack_require__(19); + +/** + * @classdesc + * A Frame is a section of a Texture. + * + * @class Frame + * @memberof Phaser.Textures + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of. + * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture. + * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of. + * @param {number} x - The x coordinate of the top-left of this Frame. + * @param {number} y - The y coordinate of the top-left of this Frame. + * @param {number} width - The width of this Frame. + * @param {number} height - The height of this Frame. + */ +var Frame = new Class({ + + initialize: + + function Frame (texture, name, sourceIndex, x, y, width, height) + { + /** + * The Texture this Frame is a part of. + * + * @name Phaser.Textures.Frame#texture + * @type {Phaser.Textures.Texture} + * @since 3.0.0 + */ + this.texture = texture; + + /** + * The name of this Frame. + * The name is unique within the Texture. + * + * @name Phaser.Textures.Frame#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The TextureSource this Frame is part of. + * + * @name Phaser.Textures.Frame#source + * @type {Phaser.Textures.TextureSource} + * @since 3.0.0 + */ + this.source = texture.source[sourceIndex]; + + /** + * The index of the TextureSource in the Texture sources array. + * + * @name Phaser.Textures.Frame#sourceIndex + * @type {number} + * @since 3.0.0 + */ + this.sourceIndex = sourceIndex; + + /** + * A reference to the Texture Source WebGL Texture that this Frame is using. + * + * @name Phaser.Textures.Frame#glTexture + * @type {?WebGLTexture} + * @default null + * @since 3.11.0 + */ + this.glTexture = this.source.glTexture; + + /** + * X position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutX + * @type {number} + * @since 3.0.0 + */ + this.cutX; + + /** + * Y position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutY + * @type {number} + * @since 3.0.0 + */ + this.cutY; + + /** + * The width of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutWidth + * @type {number} + * @since 3.0.0 + */ + this.cutWidth; + + /** + * The height of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutHeight + * @type {number} + * @since 3.0.0 + */ + this.cutHeight; + + /** + * The X rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The Y rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The rendering width of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#width + * @type {number} + * @since 3.0.0 + */ + this.width; + + /** + * The rendering height of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#height + * @type {number} + * @since 3.0.0 + */ + this.height; + + /** + * Half the width, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfWidth + * @type {number} + * @since 3.0.0 + */ + this.halfWidth; + + /** + * Half the height, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfHeight + * @type {number} + * @since 3.0.0 + */ + this.halfHeight; + + /** + * The x center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerX + * @type {number} + * @since 3.0.0 + */ + this.centerX; + + /** + * The y center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerY + * @type {number} + * @since 3.0.0 + */ + this.centerY; + + /** + * The horizontal pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotX = 0; + + /** + * The vertical pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotY = 0; + + /** + * Does this Frame have a custom pivot point? + * + * @name Phaser.Textures.Frame#customPivot + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.customPivot = false; + + /** + * **CURRENTLY UNSUPPORTED** + * + * Is this frame is rotated or not in the Texture? + * Rotation allows you to use rotated frames in texture atlas packing. + * It has nothing to do with Sprite rotation. + * + * @name Phaser.Textures.Frame#rotated + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.rotated = false; + + /** + * Over-rides the Renderer setting. + * -1 = use Renderer Setting + * 0 = No rounding + * 1 = Round + * + * @name Phaser.Textures.Frame#autoRound + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.autoRound = -1; + + /** + * Any Frame specific custom data can be stored here. + * + * @name Phaser.Textures.Frame#customData + * @type {object} + * @since 3.0.0 + */ + this.customData = {}; + + /** + * WebGL UV u0 value. + * + * @name Phaser.Textures.Frame#u0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u0 = 0; + + /** + * WebGL UV v0 value. + * + * @name Phaser.Textures.Frame#v0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v0 = 0; + + /** + * WebGL UV u1 value. + * + * @name Phaser.Textures.Frame#u1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u1 = 0; + + /** + * WebGL UV v1 value. + * + * @name Phaser.Textures.Frame#v1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v1 = 0; + + /** + * The un-modified source frame, trim and UV data. + * + * @name Phaser.Textures.Frame#data + * @type {object} + * @private + * @since 3.0.0 + */ + this.data = { + cut: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + trim: false, + sourceSize: { + w: 0, + h: 0 + }, + spriteSourceSize: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + radius: 0, + drawImage: { + x: 0, + y: 0, + width: 0, + height: 0 + } + }; + + this.setSize(width, height, x, y); + }, + + /** + * Sets the width, height, x and y of this Frame. + * + * This is called automatically by the constructor + * and should rarely be changed on-the-fly. + * + * @method Phaser.Textures.Frame#setSize + * @since 3.7.0 + * + * @param {number} width - The width of the frame before being trimmed. + * @param {number} height - The height of the frame before being trimmed. + * @param {number} [x=0] - The x coordinate of the top-left of this Frame. + * @param {number} [y=0] - The y coordinate of the top-left of this Frame. + * + * @return {this} This Frame object. + */ + setSize: function (width, height, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.cutX = x; + this.cutY = y; + this.cutWidth = width; + this.cutHeight = height; + + this.width = width; + this.height = height; + + this.halfWidth = Math.floor(width * 0.5); + this.halfHeight = Math.floor(height * 0.5); + + this.centerX = Math.floor(width / 2); + this.centerY = Math.floor(height / 2); + + var data = this.data; + var cut = data.cut; + + cut.x = x; + cut.y = y; + cut.w = width; + cut.h = height; + cut.r = x + width; + cut.b = y + height; + + data.sourceSize.w = width; + data.sourceSize.h = height; + + data.spriteSourceSize.w = width; + data.spriteSourceSize.h = height; + + data.radius = 0.5 * Math.sqrt(width * width + height * height); + + var drawImage = data.drawImage; + + drawImage.x = x; + drawImage.y = y; + drawImage.width = width; + drawImage.height = height; + + return this.updateUVs(); + }, + + /** + * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data. + * + * @method Phaser.Textures.Frame#setTrim + * @since 3.0.0 + * + * @param {number} actualWidth - The width of the frame before being trimmed. + * @param {number} actualHeight - The height of the frame before being trimmed. + * @param {number} destX - The destination X position of the trimmed frame for display. + * @param {number} destY - The destination Y position of the trimmed frame for display. + * @param {number} destWidth - The destination width of the trimmed frame for display. + * @param {number} destHeight - The destination height of the trimmed frame for display. + * + * @return {this} This Frame object. + */ + setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight) + { + var data = this.data; + var ss = data.spriteSourceSize; + + // Store actual values + + data.trim = true; + + data.sourceSize.w = actualWidth; + data.sourceSize.h = actualHeight; + + ss.x = destX; + ss.y = destY; + ss.w = destWidth; + ss.h = destHeight; + ss.r = destX + destWidth; + ss.b = destY + destHeight; + + // Adjust properties + this.x = destX; + this.y = destY; + + this.width = destWidth; + this.height = destHeight; + + this.halfWidth = destWidth * 0.5; + this.halfHeight = destHeight * 0.5; + + this.centerX = Math.floor(destWidth / 2); + this.centerY = Math.floor(destHeight / 2); + + return this.updateUVs(); + }, + + /** + * Takes a crop data object and, based on the rectangular region given, calculates the + * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. + * + * This is called directly by the Game Object Texture Components `setCrop` method. + * Please use that method to crop a Game Object. + * + * @method Phaser.Textures.Frame#setCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. + * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height. + * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width. + * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + setCropUVs: function (crop, x, y, width, height, flipX, flipY) + { + // Clamp the input values + + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + var rw = this.realWidth; + var rh = this.realHeight; + + x = Clamp(x, 0, rw); + y = Clamp(y, 0, rh); + + width = Clamp(width, 0, rw - x); + height = Clamp(height, 0, rh - y); + + var ox = cx + x; + var oy = cy + y; + var ow = width; + var oh = height; + + var data = this.data; + + if (data.trim) + { + var ss = data.spriteSourceSize; + + // Need to check for intersection between the cut area and the crop area + // If there is none, we set UV to be empty, otherwise set it to be the intersection area + + width = Clamp(width, 0, cw - x); + height = Clamp(height, 0, ch - y); + + var cropRight = x + width; + var cropBottom = y + height; + + var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom); + + if (intersects) + { + var ix = Math.max(ss.x, x); + var iy = Math.max(ss.y, y); + var iw = Math.min(ss.r, cropRight) - ix; + var ih = Math.min(ss.b, cropBottom) - iy; + + ow = iw; + oh = ih; + + if (flipX) + { + ox = cx + (cw - (ix - ss.x) - iw); + } + else + { + ox = cx + (ix - ss.x); + } + + if (flipY) + { + oy = cy + (ch - (iy - ss.y) - ih); + } + else + { + oy = cy + (iy - ss.y); + } + + x = ix; + y = iy; + + width = iw; + height = ih; + } + else + { + ox = 0; + oy = 0; + ow = 0; + oh = 0; + } + } + else + { + if (flipX) + { + ox = cx + (cw - x - width); + } + + if (flipY) + { + oy = cy + (ch - y - height); + } + } + + var tw = this.source.width; + var th = this.source.height; + + // Map the given coordinates into UV space, clamping to the 0-1 range. + + crop.u0 = Math.max(0, ox / tw); + crop.v0 = Math.max(0, oy / th); + crop.u1 = Math.min(1, (ox + ow) / tw); + crop.v1 = Math.min(1, (oy + oh) / th); + + crop.x = x; + crop.y = y; + + crop.cx = ox; + crop.cy = oy; + crop.cw = ow; + crop.ch = oh; + + crop.width = width; + crop.height = height; + + crop.flipX = flipX; + crop.flipY = flipY; + + return crop; + }, + + /** + * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object. + * Called automatically by `setFrame`. + * + * @method Phaser.Textures.Frame#updateCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + updateCropUVs: function (crop, flipX, flipY) + { + return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY); + }, + + /** + * Directly sets the canvas and WebGL UV data for this frame. + * + * Use this if you need to override the values that are generated automatically + * when the Frame is created. + * + * @method Phaser.Textures.Frame#setUVs + * @since 3.50.0 + * + * @param {number} width - Width of this frame for the Canvas data. + * @param {number} height - Height of this frame for the Canvas data. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * + * @return {this} This Frame object. + */ + setUVs: function (width, height, u0, v0, u1, v1) + { + // Canvas data + + var cd = this.data.drawImage; + + cd.width = width; + cd.height = height; + + // WebGL data + + this.u0 = u0; + this.v0 = v0; + + this.u1 = u1; + this.v1 = v1; + + return this; + }, + + /** + * Updates the internal WebGL UV cache and the drawImage cache. + * + * @method Phaser.Textures.Frame#updateUVs + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVs: function () + { + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + + // Canvas data + + var cd = this.data.drawImage; + + cd.width = cw; + cd.height = ch; + + // WebGL data + + var tw = this.source.width; + var th = this.source.height; + + this.u0 = cx / tw; + this.v0 = cy / th; + + this.u1 = (cx + cw) / tw; + this.v1 = (cy + ch) / th; + + return this; + }, + + /** + * Updates the internal WebGL UV cache. + * + * @method Phaser.Textures.Frame#updateUVsInverted + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVsInverted: function () + { + var tw = this.source.width; + var th = this.source.height; + + this.u0 = (this.cutX + this.cutHeight) / tw; + this.v0 = this.cutY / th; + + this.u1 = this.cutX / tw; + this.v1 = (this.cutY + this.cutWidth) / th; + + return this; + }, + + /** + * Clones this Frame into a new Frame object. + * + * @method Phaser.Textures.Frame#clone + * @since 3.0.0 + * + * @return {Phaser.Textures.Frame} A clone of this Frame. + */ + clone: function () + { + var clone = new Frame(this.texture, this.name, this.sourceIndex); + + clone.cutX = this.cutX; + clone.cutY = this.cutY; + clone.cutWidth = this.cutWidth; + clone.cutHeight = this.cutHeight; + + clone.x = this.x; + clone.y = this.y; + + clone.width = this.width; + clone.height = this.height; + + clone.halfWidth = this.halfWidth; + clone.halfHeight = this.halfHeight; + + clone.centerX = this.centerX; + clone.centerY = this.centerY; + + clone.rotated = this.rotated; + + clone.data = Extend(true, clone.data, this.data); + + clone.updateUVs(); + + return clone; + }, + + /** + * Destroys this Frame by nulling its reference to the parent Texture and and data objects. + * + * @method Phaser.Textures.Frame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.source = null; + this.texture = null; + this.glTexture = null; + this.customData = null; + this.data = null; + }, + + /** + * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realWidth + * @type {number} + * @readonly + * @since 3.0.0 + */ + realWidth: { + + get: function () + { + return this.data.sourceSize.w; + } + + }, + + /** + * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realHeight + * @type {number} + * @readonly + * @since 3.0.0 + */ + realHeight: { + + get: function () + { + return this.data.sourceSize.h; + } + + }, + + /** + * The radius of the Frame (derived from sqrt(w * w + h * h) / 2) + * + * @name Phaser.Textures.Frame#radius + * @type {number} + * @readonly + * @since 3.0.0 + */ + radius: { + + get: function () + { + return this.data.radius; + } + + }, + + /** + * Is the Frame trimmed or not? + * + * @name Phaser.Textures.Frame#trimmed + * @type {boolean} + * @readonly + * @since 3.0.0 + */ + trimmed: { + + get: function () + { + return this.data.trim; + } + + }, + + /** + * The Canvas drawImage data object. + * + * @name Phaser.Textures.Frame#canvasData + * @type {object} + * @readonly + * @since 3.0.0 + */ + canvasData: { + + get: function () + { + return this.data.drawImage; + } + + } + +}); + +module.exports = Frame; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BuildGameObject = __webpack_require__(70); +var Class = __webpack_require__(0); +var GetValue = __webpack_require__(10); +var ResizeEvent = __webpack_require__(184); +var ScenePlugin = __webpack_require__(185); +var Spine = __webpack_require__(209); +var SpineFile = __webpack_require__(210); +var SpineGameObject = __webpack_require__(226); +var SpineContainer = __webpack_require__(259); +var NOOP = __webpack_require__(2); + +/** + * @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.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: [ + * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } + * ] + * } + * ``` + * + * 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, + * create: create, + * pack: { + * files: [ + * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' } + * ] + * } + * } + * ``` + * + * 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. + * + * ## A note about inlined data: + * + * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader + * at all. Instead, call the functions directly as required: + * + * scene.cache.json.add + * scene.cache.custom.spine.add + * scene.textures.addBase64 + * + * ## Using the plugin + * + * 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 two Game Object Factory methods, allowing you to create Spine Game Objects + * and Spine Containers: + * + * ```javascript + * 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 + * 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 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. + * + * 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 + * @extends Phaser.Plugins.ScenePlugin + * @constructor + * @since 3.19.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. + * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + */ +var SpinePlugin = new Class({ + + Extends: ScenePlugin, + + initialize: + + function SpinePlugin (scene, pluginManager, pluginKey) + { + ScenePlugin.call(this, scene, pluginManager, pluginKey); + + var game = pluginManager.game; + + /** + * A read-only flag that indicates if the game is running under WebGL or Canvas. + * + * @name SpinePlugin#isWebGL + * @type {boolean} + * @readonly + * @since 3.19.0 + */ + this.isWebGL = (game.config.renderType === 2); + + /** + * 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. + * + * @name SpinePlugin#cache + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.cache = game.cache.addCustom('spine'); + + /** + * 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. + * + * @name SpinePlugin#spineTextures + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.spineTextures = game.cache.addCustom('spineTextures'); + + /** + * A reference to the global JSON Cache. + * + * @name SpinePlugin#json + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.json = game.cache.json; + + /** + * A reference to the global Texture Manager. + * + * @name SpinePlugin#textures + * @type {Phaser.Textures.TextureManager} + * @since 3.19.0 + */ + this.textures = game.textures; + + /** + * A flag that sets if the Skeleton Renderers will render debug information over the top + * of the skeleton or not. + * + * @name SpinePlugin#drawDebug + * @type {boolean} + * @since 3.19.0 + */ + this.drawDebug = false; + + /** + * The underlying WebGL context of the Phaser renderer. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#gl + * @type {WebGLRenderingContext} + * @since 3.19.0 + */ + this.gl; + + /** + * A reference to either the Canvas or WebGL Renderer that this Game is using. + * + * @name SpinePlugin#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.19.0 + */ + this.renderer; + + /** + * An instance of the Spine WebGL Scene Renderer. + * + * There is only one instance of the Scene Renderer shared across the whole plugin. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#sceneRenderer + * @type {spine.webgl.SceneRenderer} + * @since 3.19.0 + */ + this.sceneRenderer; + + /** + * An instance of the Spine Skeleton Renderer. + * + * @name SpinePlugin#skeletonRenderer + * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)} + * @since 3.19.0 + */ + this.skeletonRenderer; + + /** + * An instance of the Spine Skeleton Debug Renderer. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#skeletonDebugRenderer + * @type {spine.webgl.skeletonDebugRenderer} + * @since 3.19.0 + */ + this.skeletonDebugRenderer; + + /** + * A reference to the Spine runtime. + * This is the runtime created by Esoteric Software. + * + * @name SpinePlugin#plugin + * @type {spine} + * @since 3.19.0 + */ + this.plugin = Spine; + + /** + * An internal vector3 used by the screen to world method. + * + * @name SpinePlugin#temp1 + * @private + * @type {spine.webgl.Vector3} + * @since 3.19.0 + */ + this.temp1; + + /** + * An internal vector3 used by the screen to world method. + * + * @name SpinePlugin#temp2 + * @private + * @type {spine.webgl.Vector3} + * @since 3.19.0 + */ + this.temp2; + + if (this.isWebGL) + { + this.runtime = Spine.webgl; + + this.renderer = game.renderer; + this.gl = game.renderer.gl; + + this.getAtlas = this.getAtlasWebGL; + } + else + { + this.runtime = Spine.canvas; + + this.renderer = game.renderer; + + 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 add = function (x, y, key, animationName, loop) + { + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 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(); + }; + + var addContainer = function (x, y, children) + { + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; + var container = new SpineContainer(this.scene, spinePlugin, 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); + }, + + /** + * Internal boot handler. + * + * @method SpinePlugin#boot + * @private + * @since 3.19.0 + */ + boot: function () + { + if (this.isWebGL) + { + this.bootWebGL(); + this.onResize(); + this.game.scale.on(ResizeEvent, this.onResize, this); + } + else + { + this.bootCanvas(); + } + + var eventEmitter = this.systems.events; + + eventEmitter.once('shutdown', this.shutdown, this); + eventEmitter.once('destroy', this.destroy, this); + + this.game.events.once('destroy', this.gameDestroy, this); + }, + + /** + * Internal boot handler for the Canvas Renderer. + * + * @method SpinePlugin#bootCanvas + * @private + * @since 3.19.0 + */ + bootCanvas: function () + { + this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context); + }, + + /** + * Internal boot handler for the WebGL Renderer. + * + * @method SpinePlugin#bootWebGL + * @private + * @since 3.19.0 + */ + bootWebGL: function () + { + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! + + var setBlendMode = function (srcBlend, dstBlend) + { + if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend) + { + var gl = this.context.gl; + + this.srcBlend = srcBlend; + this.dstBlend = dstBlend; + + if (this.isDrawing) + { + this.flush(); + gl.blendFunc(this.srcBlend, this.dstBlend); + } + } + }; + + var sceneRenderer = this.renderer.spineSceneRenderer; + + if (!sceneRenderer) + { + sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); + sceneRenderer.batcher.setBlendMode = setBlendMode; + sceneRenderer.shapes.setBlendMode = setBlendMode; + + this.renderer.spineSceneRenderer = sceneRenderer; + } + + // All scene share the same instance + this.sceneRenderer = sceneRenderer; + this.skeletonRenderer = sceneRenderer.skeletonRenderer; + this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; + + this.temp1 = new Spine.webgl.Vector3(0, 0, 0); + this.temp2 = new Spine.webgl.Vector3(0, 0, 0); + }, + + /** + * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, + * then returns it. You do not normally need to invoke this method directly. + * + * @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) + { + var atlasEntry = this.cache.get(key); + + if (!atlasEntry) + { + console.warn('No atlas data for: ' + key); + return; + } + + var atlas; + var spineTextures = this.spineTextures; + + if (spineTextures.has(key)) + { + atlas = spineTextures.get(key); + } + else + { + var textures = this.textures; + + atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) + { + return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); + }); + } + + return atlas; + }, + + /** + * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, + * then returns it. You do not normally need to invoke this method directly. + * + * @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) + { + var atlasEntry = this.cache.get(key); + + if (!atlasEntry) + { + console.warn('No atlas data for: ' + key); + return; + } + + var atlas; + var spineTextures = this.spineTextures; + + if (spineTextures.has(key)) + { + atlas = spineTextures.get(key); + } + else + { + var textures = this.textures; + + var gl = this.sceneRenderer.context.gl; + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); + + atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) + { + return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); + }); + } + + return atlas; + }, + + /** + * 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 () + * { + * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true); + * } + * ``` + * + * 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. + * + * 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 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', + * jsonURL: 'boy.json', + * atlasURL: 'boy.atlas', + * preMultipliedAlpha: true + * }); + * ``` + * + * If you need to load multiple Spine atlas files, provide them as an array: + * + * ```javascript + * function preload () + * { + * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true); + * } + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details. + * + * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the data from the Spine plugin. + * + * 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 "alien" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * 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#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} [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. + * @param {object} [settings] - An external Settings configuration object { prefix: '' } + * + * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + */ + spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings) + { + var multifile; + settings = settings || {}; + + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + multifile = new SpineFile(this, key[i]); + + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + + this.addFile(multifile.files); + } + } + else + { + multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); + + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + + 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) + { + var temp1 = this.temp1; + var temp2 = this.temp2; + var camera = this.sceneRenderer.camera; + + temp1.set(x + skeleton.x, y - skeleton.y, 0); + + var width = camera.viewportWidth; + var height = camera.viewportHeight; + + camera.screenToWorld(temp1, width, height); + + if (bone && bone.parent !== null) + { + bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0)); + + return new Spine.Vector2(temp2.x, temp2.y); + } + else if (bone) + { + return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y); + } + else + { + return new Spine.Vector2(temp1.x, temp1.y); + } + }, + + /** + * Returns a Spine Vector2 based on the given x and y values. + * + * @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) + { + return new Spine.Vector2(x, y); + }, + + /** + * 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) + { + return new Spine.webgl.Vector3(x, y, z); + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawBones = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawRegionAttachments = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawBoundingBoxes = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawMeshHull = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawMeshTriangles = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawPaths = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawSkeletonXY = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawClipping = value; + + return this; + }, + + /** + * 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) + { + this.sceneRenderer.skeletonRenderer.vertexEffect = effect; + + return this; + }, + + /** + * 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) + { + var atlasKey = key; + var jsonKey = key; + var split = (key.indexOf('.') !== -1); + + if (split) + { + var parts = key.split('.'); + + atlasKey = parts.shift(); + jsonKey = parts.join('.'); + } + + var atlasData = this.cache.get(atlasKey); + var atlas = this.getAtlas(atlasKey); + + if (!atlas) + { + return null; + } + + if (!this.spineTextures.has(atlasKey)) + { + this.spineTextures.add(atlasKey, atlas); + } + + var preMultipliedAlpha = atlasData.preMultipliedAlpha; + + var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); + + var skeletonJson = new Spine.SkeletonJson(atlasLoader); + + var data; + + if (skeletonJSON) + { + data = skeletonJSON; + } + else + { + var json = this.json.get(atlasKey); + + data = (split) ? GetValue(json, jsonKey) : json; + } + + if (data) + { + var skeletonData = skeletonJson.readSkeletonData(data); + + var skeleton = new Spine.Skeleton(skeletonData); + + return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; + } + else + { + return null; + } + }, + + /** + * 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) + { + var stateData = new Spine.AnimationStateData(skeleton.data); + + var state = new Spine.AnimationState(stateData); + + return { stateData: stateData, state: state }; + }, + + /** + * 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) + { + var offset = new Spine.Vector2(); + var size = new Spine.Vector2(); + + skeleton.getBounds(offset, size, []); + + return { offset: offset, size: size }; + }, + + /** + * Internal handler for when the renderer resizes. + * + * Only called if running in WebGL. + * + * @method SpinePlugin#onResize + * @since 3.19.0 + */ + onResize: function () + { + var renderer = this.renderer; + var sceneRenderer = this.sceneRenderer; + + var viewportWidth = renderer.width; + var viewportHeight = renderer.height; + + sceneRenderer.camera.position.x = viewportWidth / 2; + sceneRenderer.camera.position.y = viewportHeight / 2; + + sceneRenderer.camera.setViewport(viewportWidth, 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 + * @private + * @since 3.19.0 + */ + shutdown: function () + { + 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 + * @private + * @since 3.19.0 + */ + destroy: function () + { + this.shutdown(); + + this.game = null; + this.scene = null; + this.systems = null; + + this.cache = null; + this.spineTextures = null; + this.json = null; + this.textures = 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.pluginManager.removeGameObject('spine', true, true); + this.pluginManager.removeGameObject('spineContainer', true, true); + + this.pluginManager = null; + + var sceneRenderer = this.renderer.spineSceneRenderer; + + if (sceneRenderer) + { + sceneRenderer.dispose(); + } + + this.renderer.spineSceneRenderer = null; + this.sceneRenderer = null; + } + +}); + +SpinePlugin.SpineGameObject = SpineGameObject; +SpinePlugin.SpineContainer = SpineContainer; + +/** + * 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. + * @param {string} [animationName] - The name of the animation to set on this Skeleton. + * @param {boolean} [loop=false] - Should the animation playback be looped or not? + * + * @return {SpineGameObject} The Game Object that was created. + */ + +/** + * 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', + * scale: 1.5, + * skinName: 'square_Green', + * animationName: 'jelly-idle', loop: true, + * slotName: 'hat', attachmentName: 'images/La_14' + * }); + * ``` + * + * @method SpinePlugin#make + * @since 3.19.0 + * + * @param {any} config - The configuration object this Game Object will use to create itself. + * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + * + * @return {SpineGameObject} The Game Object that was created. + */ + +module.exports = SpinePlugin; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(71); + +/** + * 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; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH = __webpack_require__(72); +var GetValue = __webpack_require__(10); + +/** + * 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 - 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 GetAdvancedValue = function (source, key, defaultValue) +{ + var value = GetValue(source, key, null); + + if (value === null) + { + return defaultValue; + } + else if (Array.isArray(value)) + { + return MATH.RND.pick(value); + } + else if (typeof value === 'object') + { + if (value.hasOwnProperty('randInt')) + { + return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]); + } + else if (value.hasOwnProperty('randFloat')) + { + return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]); + } + } + else if (typeof value === 'function') + { + return value(key); + } + + return value; +}; + +module.exports = GetAdvancedValue; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(4); +var Extend = __webpack_require__(19); + +/** + * @namespace Phaser.Math + */ + +var PhaserMath = { + + // Collections of functions + Angle: __webpack_require__(73), + Distance: __webpack_require__(82), + Easing: __webpack_require__(90), + Fuzzy: __webpack_require__(135), + Interpolation: __webpack_require__(140), + Pow2: __webpack_require__(148), + Snap: __webpack_require__(152), + + // Expose the RNG Class + RandomDataGenerator: __webpack_require__(156), + + // Single functions + Average: __webpack_require__(157), + Bernstein: __webpack_require__(36), + Between: __webpack_require__(158), + CatmullRom: __webpack_require__(38), + CeilTo: __webpack_require__(159), + Clamp: __webpack_require__(1), + DegToRad: __webpack_require__(21), + Difference: __webpack_require__(160), + Euler: __webpack_require__(161), + Factorial: __webpack_require__(37), + FloatBetween: __webpack_require__(20), + FloorTo: __webpack_require__(162), + FromPercent: __webpack_require__(163), + GetSpeed: __webpack_require__(164), + IsEven: __webpack_require__(165), + IsEvenStrict: __webpack_require__(166), + Linear: __webpack_require__(39), + LinearXY: __webpack_require__(167), + MaxAdd: __webpack_require__(168), + Median: __webpack_require__(169), + MinSub: __webpack_require__(170), + Percent: __webpack_require__(171), + RadToDeg: __webpack_require__(9), + RandomXY: __webpack_require__(172), + RandomXYZ: __webpack_require__(173), + RandomXYZW: __webpack_require__(174), + Rotate: __webpack_require__(175), + RotateAround: __webpack_require__(42), + RotateAroundDistance: __webpack_require__(176), + RotateTo: __webpack_require__(177), + RoundAwayFromZero: __webpack_require__(43), + RoundTo: __webpack_require__(178), + SinCosTableGenerator: __webpack_require__(179), + SmootherStep: __webpack_require__(41), + SmoothStep: __webpack_require__(40), + ToXY: __webpack_require__(180), + TransformXY: __webpack_require__(44), + Within: __webpack_require__(181), + Wrap: __webpack_require__(6), + + // Vector classes + Vector2: __webpack_require__(3), + Vector3: __webpack_require__(16), + Vector4: __webpack_require__(182), + Matrix3: __webpack_require__(45), + Matrix4: __webpack_require__(22), + Quaternion: __webpack_require__(46), + RotateVec3: __webpack_require__(183) + +}; + +// Merge in the consts + +PhaserMath = Extend(false, PhaserMath, CONST); + +// Export it + +module.exports = PhaserMath; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Angle + */ + +module.exports = { + + Between: __webpack_require__(31), + BetweenPoints: __webpack_require__(74), + BetweenPointsY: __webpack_require__(75), + BetweenY: __webpack_require__(76), + CounterClockwise: __webpack_require__(8), + Normalize: __webpack_require__(32), + Random: __webpack_require__(77), + RandomDegrees: __webpack_require__(78), + Reverse: __webpack_require__(79), + RotateTo: __webpack_require__(80), + ShortestBetween: __webpack_require__(81), + Wrap: __webpack_require__(33), + WrapDegrees: __webpack_require__(34) + +}; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(20); + +/** + * 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; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(20); + +/** + * 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; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Normalize = __webpack_require__(32); + +/** + * 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; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(4); + +/** + * 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; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * @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; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Distance + */ + +module.exports = { + + Between: __webpack_require__(83), + BetweenPoints: __webpack_require__(84), + BetweenPointsSquared: __webpack_require__(85), + Chebyshev: __webpack_require__(86), + Power: __webpack_require__(87), + Snake: __webpack_require__(88), + Squared: __webpack_require__(89) + +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing + */ + +module.exports = { + + Back: __webpack_require__(91), + Bounce: __webpack_require__(95), + Circular: __webpack_require__(99), + Cubic: __webpack_require__(103), + Elastic: __webpack_require__(107), + Expo: __webpack_require__(111), + Linear: __webpack_require__(115), + Quadratic: __webpack_require__(117), + Quartic: __webpack_require__(121), + Quintic: __webpack_require__(125), + Sine: __webpack_require__(129), + Stepped: __webpack_require__(133) + +}; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Back + */ + +module.exports = { + + In: __webpack_require__(92), + Out: __webpack_require__(93), + InOut: __webpack_require__(94) + +}; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Bounce + */ + +module.exports = { + + In: __webpack_require__(96), + Out: __webpack_require__(97), + InOut: __webpack_require__(98) + +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Circular + */ + +module.exports = { + + In: __webpack_require__(100), + Out: __webpack_require__(101), + InOut: __webpack_require__(102) + +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Cubic + */ + +module.exports = { + + In: __webpack_require__(104), + Out: __webpack_require__(105), + InOut: __webpack_require__(106) + +}; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(108), + Out: __webpack_require__(109), + InOut: __webpack_require__(110) + +}; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(112), + Out: __webpack_require__(113), + InOut: __webpack_require__(114) + +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 113 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(116); + + +/***/ }), +/* 116 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(118), + Out: __webpack_require__(119), + InOut: __webpack_require__(120) + +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(122), + Out: __webpack_require__(123), + InOut: __webpack_require__(124) + +}; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(126), + Out: __webpack_require__(127), + InOut: __webpack_require__(128) + +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(130), + Out: __webpack_require__(131), + InOut: __webpack_require__(132) + +}; + + +/***/ }), +/* 130 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 131 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(134); + + +/***/ }), +/* 134 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Fuzzy + */ + +module.exports = { + + Ceil: __webpack_require__(136), + Equal: __webpack_require__(35), + Floor: __webpack_require__(137), + GreaterThan: __webpack_require__(138), + LessThan: __webpack_require__(139) + +}; + + +/***/ }), +/* 136 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 137 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 138 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 139 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Interpolation + */ + +module.exports = { + + Bezier: __webpack_require__(141), + CatmullRom: __webpack_require__(142), + CubicBezier: __webpack_require__(143), + Linear: __webpack_require__(144), + QuadraticBezier: __webpack_require__(145), + SmoothStep: __webpack_require__(146), + SmootherStep: __webpack_require__(147) + +}; + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bernstein = __webpack_require__(36); + +/** + * 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; + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CatmullRom = __webpack_require__(38); + +/** + * 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; + + +/***/ }), +/* 143 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Linear = __webpack_require__(39); + +/** + * 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; + + +/***/ }), +/* 145 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmoothStep = __webpack_require__(40); + +/** + * 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; + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmootherStep = __webpack_require__(41); + +/** + * 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; + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Pow2 + */ + +module.exports = { + + GetNext: __webpack_require__(149), + IsSize: __webpack_require__(150), + IsValue: __webpack_require__(151) + +}; + + +/***/ }), +/* 149 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 150 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 151 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Snap + */ + +module.exports = { + + Ceil: __webpack_require__(153), + Floor: __webpack_require__(154), + To: __webpack_require__(155) + +}; + + +/***/ }), +/* 153 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 154 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 155 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(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; + + +/***/ }), +/* 157 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 158 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The random integer. + */ +var Between = function (min, max) +{ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +module.exports = Between; + + +/***/ }), +/* 159 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(1); +var Class = __webpack_require__(0); +var Matrix4 = __webpack_require__(22); +var NOOP = __webpack_require__(2); + +var tempMatrix = new Matrix4(); + +/** + * @classdesc + * + * @class Euler + * @memberof Phaser.Math + * @constructor + * @since 3.50.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + */ +var Euler = new Class({ + + initialize: + + function Euler (x, y, z, order) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (z === undefined) { z = 0; } + if (order === undefined) { order = Euler.DefaultOrder; } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this.onChangeCallback = NOOP; + }, + + x: { + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + + this.onChangeCallback(this); + } + }, + + y: { + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + + this.onChangeCallback(this); + } + }, + + z: { + get: function () + { + return this._z; + }, + + set: function (value) + { + this._z = value; + + this.onChangeCallback(this); + } + }, + + order: { + get: function () + { + return this._order; + }, + + set: function (value) + { + this._order = value; + + this.onChangeCallback(this); + } + }, + + set: function (x, y, z, order) + { + if (order === undefined) { order = this._order; } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this.onChangeCallback(this); + + return this; + }, + + copy: function (euler) + { + return this.set(euler.x, euler.y, euler.z, euler.order); + }, + + setFromQuaternion: function (quaternion, order, update) + { + if (order === undefined) { order = this._order; } + if (update === undefined) { update = false; } + + tempMatrix.fromQuat(quaternion); + + return this.setFromRotationMatrix(tempMatrix, order, update); + }, + + setFromRotationMatrix: function (matrix, order, update) + { + if (order === undefined) { order = this._order; } + if (update === undefined) { update = false; } + + var elements = matrix.val; + + // Upper 3x3 of matrix is un-scaled rotation matrix + var m11 = elements[0]; + var m12 = elements[4]; + var m13 = elements[8]; + var m21 = elements[1]; + var m22 = elements[5]; + var m23 = elements[9]; + var m31 = elements[2]; + var m32 = elements[6]; + var m33 = elements[10]; + + var x = 0; + var y = 0; + var z = 0; + var epsilon = 0.99999; + + switch (order) + { + case 'XYZ': + { + y = Math.asin(Clamp(m13, -1, 1)); + + if (Math.abs(m13) < epsilon) + { + x = Math.atan2(-m23, m33); + z = Math.atan2(-m12, m11); + } + else + { + x = Math.atan2(m32, m22); + } + + break; + } + + case 'YXZ': + { + x = Math.asin(-Clamp(m23, -1, 1)); + + if (Math.abs(m23) < epsilon) + { + y = Math.atan2(m13, m33); + z = Math.atan2(m21, m22); + } + else + { + y = Math.atan2(-m31, m11); + } + + break; + } + + case 'ZXY': + { + x = Math.asin(Clamp(m32, -1, 1)); + + if (Math.abs(m32) < epsilon) + { + y = Math.atan2(-m31, m33); + z = Math.atan2(-m12, m22); + } + else + { + z = Math.atan2(m21, m11); + } + + break; + } + + case 'ZYX': + { + y = Math.asin(-Clamp(m31, -1, 1)); + + if (Math.abs(m31) < epsilon) + { + x = Math.atan2(m32, m33); + z = Math.atan2(m21, m11); + } + else + { + z = Math.atan2(-m12, m22); + } + + break; + } + + case 'YZX': + { + z = Math.asin(Clamp(m21, -1, 1)); + + if (Math.abs(m21) < epsilon) + { + x = Math.atan2(-m23, m22); + y = Math.atan2(-m31, m11); + } + else + { + y = Math.atan2(m13, m33); + } + + break; + } + + case 'XZY': + { + z = Math.asin(-Clamp(m12, -1, 1)); + + if (Math.abs(m12) < epsilon) + { + x = Math.atan2(m32, m22); + y = Math.atan2(m13, m11); + } + else + { + x = Math.atan2(-m23, m33); + } + + break; + } + } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + if (update) + { + this.onChangeCallback(this); + } + + return this; + } + +}); + +Euler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ]; + +Euler.DefaultOrder = 'XYZ'; + +module.exports = Euler; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [place=0] - The place to round to. + * @param {number} [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; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(1); + +/** + * 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 + min; +}; + +module.exports = FromPercent; + + +/***/ }), +/* 164 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 166 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports) { + +/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Interpolates two given Vectors and returns a new Vector between them. + * + * Does not modify either of the passed Vectors. + * + * @function Phaser.Math.LinearXY + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} vector1 - Starting vector + * @param {Phaser.Math.Vector2} vector2 - Ending vector + * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * + * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + */ +var LinearXY = function (vector1, vector2, t) +{ + if (t === undefined) { t = 0; } + + return vector1.clone().lerp(vector2, t); +}; + +module.exports = LinearXY; + + +/***/ }), +/* 168 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports) { + +/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the median of the given values. The values are sorted and the middle value is returned. + * In case of an even number of values, the average of the two middle values is returned. + * + * @function Phaser.Math.Median + * @since 3.54.0 + * + * @param {number[]} values - The values to average. + * + * @return {number} The median value. + */ +var Median = function (values) +{ + var valuesNum = values.length; + if (valuesNum === 0) + { + return 0; + } + + values.sort(function (a, b) { return a - b; }); + + var halfIndex = Math.floor(valuesNum / 2); + + return valuesNum % 2 === 0 + ? (values[halfIndex] + values[halfIndex - 1]) / 2 + : values[halfIndex]; +}; + +module.exports = Median; + + +/***/ }), +/* 170 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 171 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 172 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 173 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 174 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; } + + 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; + + +/***/ }), +/* 175 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 176 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 177 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 178 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. + * @param {number} [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; + + +/***/ }), +/* 179 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(3); + +/** + * 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 {number} index - The position within the grid to get the x/y value for. + * @param {number} width - The width of the grid. + * @param {number} 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; + } + } + + return out.set(x, y); +}; + +module.exports = ToXY; + + +/***/ }), +/* 181 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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) + { + 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; + } + +}); + +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; + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(16); +var Matrix4 = __webpack_require__(22); +var Quaternion = __webpack_require__(46); + +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; + + +/***/ }), +/* 184 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scale Manager Resize Event. + * + * This event is dispatched whenever the Scale Manager detects a resize event from the browser. + * It sends three parameters to the callback, each of them being Size components. You can read + * the `width`, `height`, `aspectRatio` and other properties of these components to help with + * scaling your own game content. + * + * @event Phaser.Scale.Events#RESIZE + * @type {string} + * @since 3.16.1 + * + * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. + * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. + * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. + * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. + * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. + */ +module.exports = 'resize'; + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +var BasePlugin = __webpack_require__(186); +var Class = __webpack_require__(0); +var SceneEvents = __webpack_require__(23); + +/** + * @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. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + */ +var ScenePlugin = new Class({ + + Extends: BasePlugin, + + initialize: + + function ScenePlugin (scene, pluginManager, pluginKey) + { + 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; + + /** + * The key under which this plugin was installed into the Scene Systems. + * + * 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#pluginKey + * @type {string} + * @readonly + * @since 3.54.0 + */ + this.pluginKey = pluginKey; + + 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; + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2013-2023 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; + + +/***/ }), +/* 187 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @type {string} + * @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'; + + +/***/ }), +/* 188 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('boot', listener)`. + * + * @event Phaser.Scenes.Events#BOOT + * @type {string} + * @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'; + + +/***/ }), +/* 189 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('create', listener)`. + * + * @event Phaser.Scenes.Events#CREATE + * @type {string} + * @since 3.17.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. + */ +module.exports = 'create'; + + +/***/ }), +/* 190 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 191 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('pause', listener)`. + * + * @event Phaser.Scenes.Events#PAUSE + * @type {string} + * @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'; + + +/***/ }), +/* 192 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('postupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#POST_UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 193 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to this event from a Scene using `this.events.on('prerender', listener)`. + * + * A Scene will only render if it is visible. + * + * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. + * + * @event Phaser.Scenes.Events#PRE_RENDER + * @type {string} + * @since 3.53.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'prerender'; + + +/***/ }), +/* 194 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('preupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#PRE_UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 195 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('ready', listener)`. + * + * @event Phaser.Scenes.Events#READY + * @type {string} + * @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'; + + +/***/ }), +/* 196 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @type {string} + * @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'; + + +/***/ }), +/* 197 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('render', listener)`. + * + * A Scene will only render if it is visible. + * + * By the time this event is dispatched, the Scene will have already been rendered. + * + * @event Phaser.Scenes.Events#RENDER + * @type {string} + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'render'; + + +/***/ }), +/* 198 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('resume', listener)`. + * + * @event Phaser.Scenes.Events#RESUME + * @type {string} + * @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'; + + +/***/ }), +/* 199 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 200 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('sleep', listener)`. + * + * @event Phaser.Scenes.Events#SLEEP + * @type {string} + * @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'; + + +/***/ }), +/* 201 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('start', listener)`. + * + * @event Phaser.Scenes.Events#START + * @type {string} + * @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'; + + +/***/ }), +/* 202 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @since 3.5.0 + * + * @param {Phaser.Scene} scene -The Scene on which the transitioned completed. + */ +module.exports = 'transitioncomplete'; + + +/***/ }), +/* 203 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 204 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 205 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 206 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 207 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped. + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('update', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 208 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('wake', listener)`. + * + * @event Phaser.Scenes.Events#WAKE + * @type {string} + * @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'; + + +/***/ }), +/* 209 */ +/***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ @@ -1051,7 +22564,7 @@ var spine; .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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; return AttachmentTimeline; }()); @@ -1851,7 +23364,7 @@ var spine; var slot = slots[i]; if (slot.attachmentState == setupState) { var attachmentName = slot.data.attachmentName; - slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); } } this.unkeyedState += 2; @@ -1964,7 +23477,7 @@ var spine; 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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; }; @@ -8655,9 +30168,7 @@ var spine; } ctx.scale(1, -1); ctx.translate(-w / 2, -h / 2); - if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) { - ctx.globalAlpha = color.a; - } + ctx.globalAlpha = color.a; ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h); if (this.debugRendering) ctx.strokeRect(0, 0, w, h); @@ -8703,9 +30214,7 @@ var spine; var color = this.tempColor; color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha); var ctx = this.ctx; - if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) { - ctx.globalAlpha = color.a; - } + ctx.globalAlpha = color.a; for (var j = 0; j < triangles.length; j += 3) { var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8; var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7]; @@ -11095,7 +32604,7 @@ var spine; function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) { if (contextConfig === void 0) { contextConfig = { alpha: "true" }; } this.restorables = new Array(); - if (canvasOrContext instanceof HTMLCanvasElement || canvasOrContext instanceof EventTarget) { + if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) { this.setupCanvas(canvasOrContext, contextConfig); } else { @@ -11174,23 +32683,22 @@ module.exports = spine; /***/ }), - -/***/ 3524: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Class = __webpack_require__(7473); -var GetFastValue = __webpack_require__(4597); -var ImageFile = __webpack_require__(6732); -var IsPlainObject = __webpack_require__(2482); -var JSONFile = __webpack_require__(704); -var MultiFile = __webpack_require__(3137); -var TextFile = __webpack_require__(1192); +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(11); +var ImageFile = __webpack_require__(211); +var IsPlainObject = __webpack_require__(7); +var JSONFile = __webpack_require__(223); +var MultiFile = __webpack_require__(224); +var TextFile = __webpack_require__(225); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig @@ -11435,1777 +32943,1506 @@ module.exports = SpineFile; /***/ }), - -/***/ 4513: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 211 */ +/***/ (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} + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(2494); -var Class = __webpack_require__(7473); -var GetValue = __webpack_require__(5851); -var ResizeEvent = __webpack_require__(3527); -var ScenePlugin = __webpack_require__(5722); -var Spine = __webpack_require__(1847); -var SpineFile = __webpack_require__(3524); -var SpineGameObject = __webpack_require__(8332); -var SpineContainer = __webpack_require__(5782); -var NOOP = __webpack_require__(1984); +var Class = __webpack_require__(0); +var CONST = __webpack_require__(12); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(11); +var IsPlainObject = __webpack_require__(7); +var GetURL = __webpack_require__(48); /** * @classdesc - * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. + * A single Image File suitable for loading by the Loader. * - * Find more details about Spine itself at http://esotericsoftware.com/. + * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. * - * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin - * 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. + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. * - * 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: [ - * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } - * ] - * } - * ``` - * - * 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, - * create: create, - * pack: { - * files: [ - * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' } - * ] - * } - * } - * ``` - * - * 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 two Game Object Factory methods, allowing you to create Spine Game Objects - * and Spine Containers: - * - * ```javascript - * 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 - * 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 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. - * - * 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 - * @extends Phaser.Plugins.ScenePlugin + * @class ImageFile + * @extends Phaser.Loader.File + * @memberof Phaser.Loader.FileTypes * @constructor - * @since 3.19.0 + * @since 3.0.0 * - * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. - * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. - * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object. + * @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] - Extra XHR Settings specifically for this file. + * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets. */ -var SpinePlugin = new Class({ +var ImageFile = new Class({ - Extends: ScenePlugin, + Extends: File, initialize: - function SpinePlugin (scene, pluginManager, pluginKey) + function ImageFile (loader, key, url, xhrSettings, frameConfig) { - ScenePlugin.call(this, scene, pluginManager, pluginKey); + var extension = 'png'; + var normalMapURL; - var game = pluginManager.game; - - /** - * A read-only flag that indicates if the game is running under WebGL or Canvas. - * - * @name SpinePlugin#isWebGL - * @type {boolean} - * @readonly - * @since 3.19.0 - */ - this.isWebGL = (game.config.renderType === 2); - - /** - * 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. - * - * @name SpinePlugin#cache - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.cache = game.cache.addCustom('spine'); - - /** - * 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. - * - * @name SpinePlugin#spineTextures - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.spineTextures = game.cache.addCustom('spineTextures'); - - /** - * A reference to the global JSON Cache. - * - * @name SpinePlugin#json - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.json = game.cache.json; - - /** - * A reference to the global Texture Manager. - * - * @name SpinePlugin#textures - * @type {Phaser.Textures.TextureManager} - * @since 3.19.0 - */ - this.textures = game.textures; - - /** - * A flag that sets if the Skeleton Renderers will render debug information over the top - * of the skeleton or not. - * - * @name SpinePlugin#drawDebug - * @type {boolean} - * @since 3.19.0 - */ - this.drawDebug = false; - - /** - * The underlying WebGL context of the Phaser renderer. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#gl - * @type {WebGLRenderingContext} - * @since 3.19.0 - */ - this.gl; - - /** - * A reference to either the Canvas or WebGL Renderer that this Game is using. - * - * @name SpinePlugin#renderer - * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} - * @since 3.19.0 - */ - this.renderer; - - /** - * An instance of the Spine WebGL Scene Renderer. - * - * There is only one instance of the Scene Renderer shared across the whole plugin. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#sceneRenderer - * @type {spine.webgl.SceneRenderer} - * @since 3.19.0 - */ - this.sceneRenderer; - - /** - * An instance of the Spine Skeleton Renderer. - * - * @name SpinePlugin#skeletonRenderer - * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)} - * @since 3.19.0 - */ - this.skeletonRenderer; - - /** - * An instance of the Spine Skeleton Debug Renderer. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#skeletonDebugRenderer - * @type {spine.webgl.skeletonDebugRenderer} - * @since 3.19.0 - */ - this.skeletonDebugRenderer; - - /** - * A reference to the Spine runtime. - * This is the runtime created by Esoteric Software. - * - * @name SpinePlugin#plugin - * @type {spine} - * @since 3.19.0 - */ - this.plugin = Spine; - - /** - * An internal vector3 used by the screen to world method. - * - * @name SpinePlugin#temp1 - * @private - * @type {spine.webgl.Vector3} - * @since 3.19.0 - */ - this.temp1; - - /** - * An internal vector3 used by the screen to world method. - * - * @name SpinePlugin#temp2 - * @private - * @type {spine.webgl.Vector3} - * @since 3.19.0 - */ - this.temp2; - - if (this.isWebGL) + if (IsPlainObject(key)) { - this.runtime = Spine.webgl; + var config = key; - this.renderer = game.renderer; - this.gl = game.renderer.gl; + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + normalMapURL = GetFastValue(config, 'normalMap'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + frameConfig = GetFastValue(config, 'frameConfig'); + } - this.getAtlas = this.getAtlasWebGL; + if (Array.isArray(url)) + { + normalMapURL = url[1]; + url = url[0]; + } + + var fileConfig = { + type: 'image', + cache: loader.textureManager, + extension: extension, + responseType: 'blob', + key: key, + url: url, + xhrSettings: xhrSettings, + config: frameConfig + }; + + File.call(this, loader, fileConfig); + + // Do we have a normal map to load as well? + if (normalMapURL) + { + var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig); + + normalMap.type = 'normalMap'; + + this.setLink(normalMap); + + loader.addFile(normalMap); + } + + this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; + + if (this.useImageElementLoad) + { + this.load = this.loadImage; + this.onProcess = this.onProcessImage; + } + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + File.revokeObjectURL(_this.data); + + _this.onProcessComplete(); + }; + + this.data.onerror = function () + { + File.revokeObjectURL(_this.data); + + _this.onProcessError(); + }; + + File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); + }, + + /** + * Handles image load processing. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage + * @private + * @since 3.60.0 + */ + onProcessImage: function () + { + var result = this.state; + + this.state = CONST.FILE_PROCESSING; + + if (result === CONST.FILE_LOADED) + { + this.onProcessComplete(); } else { - this.runtime = Spine.canvas; - - this.renderer = game.renderer; - - this.getAtlas = this.getAtlasCanvas; + this.onProcessError(); } + }, - // Headless mode? - if (!this.renderer) + /** + * Loads the image using either XHR or an Image tag. + * + * @method Phaser.Loader.FileTypes.ImageFile#loadImage + * @private + * @since 3.60.0 + */ + loadImage: function () + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) { - this.renderer = { - width: game.scale.width, - height: game.scale.height, - preRender: NOOP, - postRender: NOOP, - render: NOOP, - destroy: NOOP + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + _this.state = CONST.FILE_LOADED; + + _this.loader.nextFile(_this, true); }; + + this.data.onerror = function () + { + _this.loader.nextFile(_this, false); + }; + + this.data.src = this.src; } - - var add = function (x, y, key, animationName, loop) - { - var spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineGameObject(this.scene, spinePlugin, 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(); - }; - - var addContainer = function (x, y, children) - { - var spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; - var container = new SpineContainer(this.scene, spinePlugin, 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); }, /** - * Internal boot handler. + * Adds this file to its target cache upon successful loading and processing. * - * @method SpinePlugin#boot - * @private - * @since 3.19.0 + * @method Phaser.Loader.FileTypes.ImageFile#addToCache + * @since 3.7.0 */ - boot: function () + addToCache: function () { - if (this.isWebGL) + // Check if we have a linked normal map + var linkFile = this.linkFile; + + if (linkFile) { - this.bootWebGL(); - this.onResize(); - this.game.scale.on(ResizeEvent, this.onResize, this); - } - else - { - this.bootCanvas(); - } - - var eventEmitter = this.systems.events; - - eventEmitter.once('shutdown', this.shutdown, this); - eventEmitter.once('destroy', this.destroy, this); - - this.game.events.once('destroy', this.gameDestroy, this); - }, - - /** - * Internal boot handler for the Canvas Renderer. - * - * @method SpinePlugin#bootCanvas - * @private - * @since 3.19.0 - */ - bootCanvas: function () - { - this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context); - }, - - /** - * Internal boot handler for the WebGL Renderer. - * - * @method SpinePlugin#bootWebGL - * @private - * @since 3.19.0 - */ - bootWebGL: function () - { - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! - - var setBlendMode = function (srcBlend, dstBlend) - { - if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend) + // We do, but has it loaded? + if (linkFile.state >= CONST.FILE_COMPLETE) { - var gl = this.context.gl; - - this.srcBlend = srcBlend; - this.dstBlend = dstBlend; - - if (this.isDrawing) + // Both files have loaded + if (this.type === 'normalMap') { - this.flush(); - gl.blendFunc(this.srcBlend, this.dstBlend); + // linkFile.data = Image + // this.data = Normal Map + this.cache.addImage(this.key, linkFile.data, this.data); + } + else + { + // linkFile.data = Normal Map + // this.data = Image + this.cache.addImage(this.key, this.data, linkFile.data); } } - }; - var sceneRenderer = this.renderer.spineSceneRenderer; - - if (!sceneRenderer) - { - sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - sceneRenderer.batcher.setBlendMode = setBlendMode; - sceneRenderer.shapes.setBlendMode = setBlendMode; - - this.renderer.spineSceneRenderer = sceneRenderer; - } - - // All scene share the same instance - this.sceneRenderer = sceneRenderer; - this.skeletonRenderer = sceneRenderer.skeletonRenderer; - this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; - - this.temp1 = new Spine.webgl.Vector3(0, 0, 0); - this.temp2 = new Spine.webgl.Vector3(0, 0, 0); - }, - - /** - * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, - * then returns it. You do not normally need to invoke this method directly. - * - * @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) - { - var atlasEntry = this.cache.get(key); - - if (!atlasEntry) - { - console.warn('No atlas data for: ' + key); - return; - } - - var atlas; - var spineTextures = this.spineTextures; - - if (spineTextures.has(key)) - { - atlas = spineTextures.get(key); + // Nothing to do here, we'll use the linkFile `addToCache` call + // to process this pair } else { - var textures = this.textures; - - atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) - { - return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); - }); + this.cache.addImage(this.key, this.data); } - - return atlas; - }, - - /** - * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, - * then returns it. You do not normally need to invoke this method directly. - * - * @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) - { - var atlasEntry = this.cache.get(key); - - if (!atlasEntry) - { - console.warn('No atlas data for: ' + key); - return; - } - - var atlas; - var spineTextures = this.spineTextures; - - if (spineTextures.has(key)) - { - atlas = spineTextures.get(key); - } - else - { - var textures = this.textures; - - var gl = this.sceneRenderer.context.gl; - - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - - atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) - { - return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); - }); - } - - return atlas; - }, - - /** - * 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 () - * { - * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true); - * } - * ``` - * - * 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. - * - * 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 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', - * jsonURL: 'boy.json', - * atlasURL: 'boy.atlas', - * preMultipliedAlpha: true - * }); - * ``` - * - * If you need to load multiple Spine atlas files, provide them as an array: - * - * ```javascript - * function preload () - * { - * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true); - * } - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details. - * - * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the data from the Spine plugin. - * - * 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 "alien" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * 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#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} [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. - * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. - */ - 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); - } - } - else - { - multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); - - 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) - { - var temp1 = this.temp1; - var temp2 = this.temp2; - var camera = this.sceneRenderer.camera; - - temp1.set(x + skeleton.x, y - skeleton.y, 0); - - var width = camera.viewportWidth; - var height = camera.viewportHeight; - - camera.screenToWorld(temp1, width, height); - - if (bone && bone.parent !== null) - { - bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0)); - - return new Spine.Vector2(temp2.x, temp2.y); - } - else if (bone) - { - return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y); - } - else - { - return new Spine.Vector2(temp1.x, temp1.y); - } - }, - - /** - * Returns a Spine Vector2 based on the given x and y values. - * - * @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) - { - return new Spine.Vector2(x, y); - }, - - /** - * 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) - { - return new Spine.webgl.Vector3(x, y, z); - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawBones = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawRegionAttachments = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawBoundingBoxes = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawMeshHull = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawMeshTriangles = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawPaths = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawSkeletonXY = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawClipping = value; - - return this; - }, - - /** - * 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) - { - this.sceneRenderer.skeletonRenderer.vertexEffect = effect; - - return this; - }, - - /** - * 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) - { - var atlasKey = key; - var jsonKey = key; - var split = (key.indexOf('.') !== -1); - - if (split) - { - var parts = key.split('.'); - - atlasKey = parts.shift(); - jsonKey = parts.join('.'); - } - - var atlasData = this.cache.get(atlasKey); - var atlas = this.getAtlas(atlasKey); - - if (!atlas) - { - return null; - } - - if (!this.spineTextures.has(atlasKey)) - { - this.spineTextures.add(atlasKey, atlas); - } - - var preMultipliedAlpha = atlasData.preMultipliedAlpha; - - var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); - - var skeletonJson = new Spine.SkeletonJson(atlasLoader); - - var data; - - if (skeletonJSON) - { - data = skeletonJSON; - } - else - { - var json = this.json.get(atlasKey); - - data = (split) ? GetValue(json, jsonKey) : json; - } - - if (data) - { - var skeletonData = skeletonJson.readSkeletonData(data); - - var skeleton = new Spine.Skeleton(skeletonData); - - return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; - } - else - { - return null; - } - }, - - /** - * 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) - { - var stateData = new Spine.AnimationStateData(skeleton.data); - - var state = new Spine.AnimationState(stateData); - - return { stateData: stateData, state: state }; - }, - - /** - * 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) - { - var offset = new Spine.Vector2(); - var size = new Spine.Vector2(); - - skeleton.getBounds(offset, size, []); - - return { offset: offset, size: size }; - }, - - /** - * Internal handler for when the renderer resizes. - * - * Only called if running in WebGL. - * - * @method SpinePlugin#onResize - * @since 3.19.0 - */ - onResize: function () - { - var renderer = this.renderer; - var sceneRenderer = this.sceneRenderer; - - var viewportWidth = renderer.width; - var viewportHeight = renderer.height; - - sceneRenderer.camera.position.x = viewportWidth / 2; - sceneRenderer.camera.position.y = viewportHeight / 2; - - sceneRenderer.camera.setViewport(viewportWidth, 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 - * @private - * @since 3.19.0 - */ - shutdown: function () - { - 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 - * @private - * @since 3.19.0 - */ - destroy: function () - { - this.shutdown(); - - this.game = null; - this.scene = null; - this.systems = null; - - this.cache = null; - this.spineTextures = null; - this.json = null; - this.textures = 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.pluginManager.removeGameObject('spine', true, true); - this.pluginManager.removeGameObject('spineContainer', true, true); - - this.pluginManager = null; - - var sceneRenderer = this.renderer.spineSceneRenderer; - - if (sceneRenderer) - { - sceneRenderer.dispose(); - } - - this.renderer.spineSceneRenderer = null; - this.sceneRenderer = null; } }); -SpinePlugin.SpineGameObject = SpineGameObject; -SpinePlugin.SpineContainer = SpineContainer; - /** - * Creates a new Spine Game Object and adds it to the Scene. + * Adds an Image, or array of Images, to the current load queue. * - * 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. + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: * * ```javascript - * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); + * function preload () + * { + * this.load.image('logo', 'images/phaserLogo.png'); + * } * ``` * - * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it. + * 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 animation name is also optional and can be set later via `SpineGameObject.setAnimation`. + * 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. * - * Should you wish for more control over the object creation, such as setting a slot attachment or skin - * name, then use `SpinePlugin.make` instead. + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * 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 Texture Manager first, before loading a new one. * - * @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. - * @param {string} [animationName] - The name of the animation to set on this Skeleton. - * @param {boolean} [loop=false] - Should the animation playback be looped or not? - * - * @return {SpineGameObject} The Game Object that was created. - */ - -/** - * 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. + * Instead of passing arguments you can pass a configuration object, such as: * * ```javascript - * let jelly = this.make.spine({ - * x: 500, y: 500, key: 'jelly', - * scale: 1.5, - * skinName: 'square_Green', - * animationName: 'jelly-idle', loop: true, - * slotName: 'hat', attachmentName: 'images/La_14' + * this.load.image({ + * key: 'logo', + * url: 'images/AtariLogo.png' * }); * ``` * - * @method SpinePlugin#make - * @since 3.19.0 + * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details. * - * @param {any} config - The configuration object this Game Object will use to create itself. - * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - * - * @return {SpineGameObject} The Game Object that was created. - */ - -module.exports = SpinePlugin; - - -/***/ }), - -/***/ 5782: -/***/ ((module, __unused_webpack_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__(7473); -var Container = __webpack_require__(7361); -var SpineContainerRender = __webpack_require__(2437); - -/** - * @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 must only add ever Spine Game Objects, or other Spine Containers, 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: + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: * * ```javascript - * this.add.spineContainer(); + * this.load.image('logo', 'images/AtariLogo.png'); + * // and later in your game ... + * this.add.image(x, y, 'logo'); * ``` * - * or + * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * 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 "alien" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * 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.make.spineContainer(); + * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * - * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the - * container children. You can, however, mask children of Spine Containers if they are embedded within other - * Spine Containers. In short, if you need masking, don't mix and match the types. + * Or, if you are using a config object use the `normalMap` property: * - * See the Container documentation for further details about what Containers can do. + * ```javascript + * this.load.image({ + * key: 'logo', + * url: 'images/AtariLogo.png', + * normalMap: 'images/AtariLogo-n.png' + * }); + * ``` * - * @class SpineContainer - * @extends Phaser.GameObjects.Container - * @constructor - * @since 3.50.0 + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. * - * @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. + * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. + * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images + * via the Image tag instead. + * + * Note: The ability to load this type of file will only be available if the Image 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#image + * @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 {this} The Loader instance. */ -var SpineContainer = new Class({ - - Extends: Container, - - Mixins: [ - SpineContainerRender - ], - - initialize: - - function SpineContainer (scene, plugin, x, y, children) +FileTypesManager.register('image', function (key, url, xhrSettings) +{ + if (Array.isArray(key)) { - 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 SpineContainer#plugin - * @type {SpinePlugin} - * @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 () + 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 ImageFile(this, key[i])); + } + } + else { - this.removeAll(!!this.exclusive); - - this.localTransform.destroy(); - this.tempTransformMatrix.destroy(); - - this.list = []; - this._displayList = null; - this.plugin = null; + this.addFile(new ImageFile(this, key, url, xhrSettings)); } + return this; }); -module.exports = SpineContainer; +module.exports = ImageFile; /***/ }), - -/***/ 8064: -/***/ ((module) => { +/* 212 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. + * The Loader Plugin Add File Event. * - * @method Phaser.GameObjects.Container#renderCanvas - * @since 3.4.0 - * @private + * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. * - * @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 {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 + * Listen to it from a Scene using: `this.load.on('addfile', listener)`. + * + * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. + * + * @event Phaser.Loader.Events#ADD + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The unique key of the file that was added to the Loader. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader. */ -var SpineContainerCanvasRenderer = function (renderer, container, camera, parentMatrix) -{ - var children = container.list; - - if (children.length === 0) - { - return; - } - - camera.addToRenderList(container); - - 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, camera, transformMatrix); - - // Restore original values - child.setAlpha(childAlpha); - child.setScrollFactor(childScrollFactorX, childScrollFactorY); - } - - if (container.mask) - { - container.mask.postRenderCanvas(renderer); - } -}; - -module.exports = SpineContainerCanvasRenderer; +module.exports = 'addfile'; /***/ }), - -/***/ 2437: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 213 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var renderWebGL = __webpack_require__(1984); -var renderCanvas = __webpack_require__(1984); - -if (true) -{ - renderWebGL = __webpack_require__(434); -} - -if (true) -{ - renderCanvas = __webpack_require__(8064); -} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas - -}; - - -/***/ }), - -/***/ 434: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. + * The Loader Plugin Complete Event. * - * @method SpineContainerWebGLRenderer#renderWebGL - * @since 3.50.0 - * @private + * This event is dispatched when the Loader has fully processed everything in the load queue. + * By this point every loaded file will now be in its associated cache and ready for use. * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineContainer} container - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var SpineContainerWebGLRenderer = function (renderer, container, 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(); - - renderer.pipelines.rebind(); - } - - return; - } - - camera.addToRenderList(container); - - 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); - } - - if (renderer.newType) - { - // flush + clear if this is a new type - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - - var rendererNextType = renderer.nextTypeMatch; - - // Force these to avoid batch flushing during SpineGameObject.renderWebGL - renderer.nextTypeMatch = true; - renderer.newType = false; - - for (var i = 0; i < children.length; i++) - { - var child = children[i]; - - if (child.willRender(camera, container)) - { - var mask = child.mask; - - if (mask) - { - sceneRenderer.end(); - - renderer.pipelines.rebind(); - - mask.preRenderWebGL(renderer, child, camera); - - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - - child.renderWebGL(renderer, child, camera, transformMatrix, container); - - if (mask) - { - sceneRenderer.end(); - - renderer.pipelines.rebind(); - - mask.postRenderWebGL(renderer, camera); - - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - } - } - - renderer.nextTypeMatch = rendererNextType; - - if (!rendererNextType) - { - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch - sceneRenderer.end(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); - } -}; - -module.exports = SpineContainerWebGLRenderer; - - -/***/ }), - -/***/ 6576: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Complete Event. + * Listen to it from a Scene using: `this.load.on('complete', listener)`. * - * @event SpinePluginEvents#COMPLETE - * @since 3.19.0 + * @event Phaser.Loader.Events#COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + * @param {number} totalComplete - The total number of files that successfully loaded. + * @param {number} totalFailed - The total number of files that failed to load. */ module.exports = 'complete'; /***/ }), - -/***/ 8621: -/***/ ((module) => { +/* 214 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Dispose Event. + * The File Load Complete Event. * - * @event SpinePluginEvents#DISPOSE - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. + * + * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. + * + * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. + * + * 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. + * + * @event Phaser.Loader.Events#FILE_COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The key of the file that just loaded and finished processing. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ -module.exports = 'dispose'; +module.exports = 'filecomplete'; /***/ }), - -/***/ 8944: -/***/ ((module) => { +/* 215 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The End Event. + * The File Load Complete Event. * - * @event SpinePluginEvents#END - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. + * + * It uses a special dynamic event name constructed from the key and type of the file. + * + * For example, if you have loaded an `image` with a key of `monster`, you can listen for it + * using the following: + * + * ```javascript + * this.load.on('filecomplete-image-monster', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a texture `atlas` with a key of `Level1`: + * + * ```javascript + * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: + * + * ```javascript + * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. + * + * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. + * + * @event Phaser.Loader.Events#FILE_KEY_COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The key of the file that just loaded and finished processing. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ -module.exports = 'end'; +module.exports = 'filecomplete-'; /***/ }), - -/***/ 7494: -/***/ ((module) => { +/* 216 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Custom Event Event. + * The File Load Error Event. * - * @event SpinePluginEvents#EVENT - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when a file fails to load. + * + * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. + * + * @event Phaser.Loader.Events#FILE_LOAD_ERROR + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which errored during load. */ -module.exports = 'event'; +module.exports = 'loaderror'; /***/ }), - -/***/ 1908: -/***/ ((module) => { +/* 217 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Interrupted Event. + * The File Load Event. * - * @event SpinePluginEvents#INTERRUPTED - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when a file finishes loading, + * but _before_ it is processed and added to the internal Phaser caches. + * + * Listen to it from a Scene using: `this.load.on('load', listener)`. + * + * @event Phaser.Loader.Events#FILE_LOAD + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. */ -module.exports = 'interrupted'; +module.exports = 'load'; /***/ }), - -/***/ 5591: -/***/ ((module) => { +/* 218 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Start Event. + * The File Load Progress Event. * - * @event SpinePluginEvents#START - * @since 3.19.0 + * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and + * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. + * + * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. + * + * @event Phaser.Loader.Events#FILE_PROGRESS + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which errored during load. + * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. + */ +module.exports = 'fileprogress'; + + +/***/ }), +/* 219 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Post Process Event. + * + * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. + * It is dispatched before the internal lists are cleared and each File is destroyed. + * + * Use this hook to perform any last minute processing of files that can only happen once the + * Loader has completed, but prior to it emitting the `complete` event. + * + * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. + * + * @event Phaser.Loader.Events#POST_PROCESS + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + */ +module.exports = 'postprocess'; + + +/***/ }), +/* 220 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Progress Event. + * + * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. + * + * Listen to it from a Scene using: `this.load.on('progress', listener)`. + * + * @event Phaser.Loader.Events#PROGRESS + * @type {string} + * @since 3.0.0 + * + * @param {number} progress - The current progress of the load. A value between 0 and 1. + */ +module.exports = 'progress'; + + +/***/ }), +/* 221 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Start Event. + * + * This event is dispatched when the Loader starts running. At this point load progress is zero. + * + * This event is dispatched even if there aren't any files in the load queue. + * + * Listen to it from a Scene using: `this.load.on('start', listener)`. + * + * @event Phaser.Loader.Events#START + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. */ module.exports = 'start'; /***/ }), - -/***/ 5146: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var MergeXHRSettings = __webpack_require__(49); + /** - * @namespace SpinePluginEvents + * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings + * and starts the download of it. It uses the Files own XHRSettings and merges them + * with the global XHRSettings object to set the xhr values before download. + * + * @function Phaser.Loader.XHRLoader + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - The File to download. + * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object. + * + * @return {XMLHttpRequest} The XHR object. */ +var XHRLoader = function (file, globalXHRSettings) +{ + var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings); -module.exports = { + var xhr = new XMLHttpRequest(); - COMPLETE: __webpack_require__(6576), - DISPOSE: __webpack_require__(8621), - END: __webpack_require__(8944), - EVENT: __webpack_require__(7494), - INTERRUPTED: __webpack_require__(1908), - START: __webpack_require__(5591) + xhr.open('GET', file.src, config.async, config.user, config.password); + 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); + } + + if (config.requestedWith) + { + xhr.setRequestHeader('X-Requested-With', config.requestedWith); + } + + if (config.overrideMimeType) + { + 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); + xhr.onerror = file.onError.bind(file, xhr); + xhr.onprogress = file.onProgress.bind(file); + + // This is the only standard method, the ones above are browser additions (maybe not universal?) + // xhr.onreadystatechange + + xhr.send(); + + return xhr; }; +module.exports = XHRLoader; + /***/ }), - -/***/ 8332: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(12); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(11); +var GetValue = __webpack_require__(10); +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); + + // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it. + if (IsPlainObject(url)) + { + 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; + + try + { + var json = JSON.parse(this.xhrLoader.responseText); + } + catch (e) + { + this.onProcessError(); + + throw e; + } + + 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; + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(12); +var Events = __webpack_require__(47); + +/** + * @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) + { + var finalFiles = []; + + // Clean out any potential 'null' or 'undefined' file entries + files.forEach(function (file) + { + if (file) + { + finalFiles.push(file); + } + }); + + /** + * 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 {number} + * @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 = finalFiles; + + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.MultiFile#state + * @type {number} + * @since 3.60.0 + */ + this.state = CONST.FILE_PENDING; + + /** + * 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 {number} + * @since 3.7.0 + */ + + this.pending = finalFiles.length; + + /** + * The number of files that failed to load. + * + * @name Phaser.Loader.MultiFile#failed + * @type {number} + * @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 < finalFiles.length; i++) + { + finalFiles[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++; + + // eslint-disable-next-line no-console + console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); + } + }, + + /** + * Called once all children of this multi file have been added to their caches and is now + * ready for deletion from the Loader. + * + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.MultiFile#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.60.0 + */ + pendingDestroy: function () + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); + + this.loader.flagForRemoval(this); + + for (var i = 0; i < this.files.length; i++) + { + this.files[i].pendingDestroy(); + } + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this Multi File and any references it holds. + * + * @method Phaser.Loader.MultiFile#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.loader = null; + this.files = null; + this.config = null; + } + +}); + +module.exports = MultiFile; + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(12); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(11); +var IsPlainObject = __webpack_require__(7); + +/** + * @classdesc + * A single Text File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. + * + * @class TextFile + * @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.TextFileConfig)} 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 `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + */ +var TextFile = new Class({ + + Extends: File, + + initialize: + + function TextFile (loader, key, url, xhrSettings) + { + var type = 'text'; + var extension = 'txt'; + var cache = loader.cacheManager.text; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + type = GetFastValue(config, 'type', type); + cache = GetFastValue(config, 'cache', cache); + } + + var fileConfig = { + type: type, + cache: cache, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings + }; + + File.call(this, loader, fileConfig); + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.TextFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = this.xhrLoader.responseText; + + this.onProcessComplete(); + } + +}); + +/** + * Adds a Text file, or array of Text 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.text('story', 'files/IntroStory.txt'); + * } + * ``` + * + * 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 Text Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Text 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 Text Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.text({ + * key: 'story', + * url: 'files/IntroStory.txt' + * }); + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.text('story', 'files/IntroStory.txt'); + * // and later in your game ... + * var data = this.cache.text.get('story'); + * ``` + * + * 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 `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the text from the Text 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 "story" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Text 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#text + * @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 {this} The Loader instance. + */ +FileTypesManager.register('text', function (key, url, 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 TextFile(this, key[i])); + } + } + else + { + this.addFile(new TextFile(this, key, url, xhrSettings)); + } + + return this; +}); + +module.exports = TextFile; + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(6412); -var Clamp = __webpack_require__(2915); -var Class = __webpack_require__(7473); -var ComponentsComputedSize = __webpack_require__(1991); -var ComponentsDepth = __webpack_require__(3131); -var ComponentsFlip = __webpack_require__(9660); -var ComponentsScrollFactor = __webpack_require__(4627); -var ComponentsTransform = __webpack_require__(3212); -var ComponentsVisible = __webpack_require__(8414); -var CounterClockwise = __webpack_require__(3426); -var DegToRad = __webpack_require__(7149); -var GameObject = __webpack_require__(2273); -var RadToDeg = __webpack_require__(4208); -var SpineEvents = __webpack_require__(5146); -var SpineGameObjectRender = __webpack_require__(2762); +var AngleBetween = __webpack_require__(31); +var Clamp = __webpack_require__(1); +var Class = __webpack_require__(0); +var ComponentsComputedSize = __webpack_require__(51); +var ComponentsDepth = __webpack_require__(52); +var ComponentsFlip = __webpack_require__(53); +var ComponentsScrollFactor = __webpack_require__(54); +var ComponentsTransform = __webpack_require__(55); +var ComponentsVisible = __webpack_require__(56); +var CounterClockwise = __webpack_require__(8); +var DegToRad = __webpack_require__(21); +var GameObject = __webpack_require__(57); +var RadToDeg = __webpack_require__(9); +var SpineEvents = __webpack_require__(248); +var SpineGameObjectRender = __webpack_require__(255); /** * @classdesc @@ -13253,9 +34490,10 @@ var SpineGameObjectRender = __webpack_require__(2762); * ``` * * 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. + * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup + * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable + * to get an accurate bounds. You can 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 @@ -13266,6 +34504,7 @@ var SpineGameObjectRender = __webpack_require__(2762); * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. * * @class SpineGameObject + * @extends Phaser.GameObjects.GameObject * @constructor * @since 3.19.0 * @@ -13699,9 +34938,9 @@ var SpineGameObject = new Class({ * @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. * @param {boolean} [loop=false] - Should the animation, if set, loop or not? + * @param {object} [skeletonJSON] - The JSON data for the Skeleton. * * @return {this} This Game Object. */ @@ -14797,891 +36036,17 @@ module.exports = SpineGameObject; /***/ }), - -/***/ 2753: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 227 */ +/***/ (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 CounterClockwise = __webpack_require__(3426); -var RadToDeg = __webpack_require__(4208); -var Wrap = __webpack_require__(8445); - -/** - * 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 SpineGameObject#renderCanvas - * @since 3.19.0 - * @private - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix) -{ - var context = renderer.currentContext; - - var plugin = src.plugin; - var skeleton = src.skeleton; - var skeletonRenderer = plugin.skeletonRenderer; - - var camMatrix = renderer._tempMatrix1; - var spriteMatrix = renderer._tempMatrix2; - var calcMatrix = renderer._tempMatrix3; - - camera.addToRenderList(src); - - spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.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); - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - - skeleton.x = calcMatrix.tx; - skeleton.y = calcMatrix.ty; - - skeleton.scaleX = calcMatrix.scaleX; - - // Inverse or we get upside-down skeletons - skeleton.scaleY = calcMatrix.scaleY * -1; - - 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) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - - skeleton.updateWorldTransform(); - - skeletonRenderer.ctx = context; - skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug); - - context.save(); - - skeletonRenderer.draw(skeleton); - - context.restore(); -}; - -module.exports = SpineGameObjectCanvasRenderer; - - -/***/ }), - -/***/ 2762: -/***/ ((module, __unused_webpack_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 renderWebGL = __webpack_require__(1984); -var renderCanvas = __webpack_require__(1984); -var renderDirect = __webpack_require__(1984); - -if (true) -{ - renderWebGL = __webpack_require__(4290); - renderDirect = __webpack_require__(780); -} - -if (true) -{ - renderCanvas = __webpack_require__(2753); -} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas, - renderDirect: renderDirect - -}; - - -/***/ }), - -/***/ 780: -/***/ ((module, __unused_webpack_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 Clamp = __webpack_require__(2915); -var CounterClockwise = __webpack_require__(3426); -var GetCalcMatrix = __webpack_require__(2208); -var RadToDeg = __webpack_require__(4208); -var Wrap = __webpack_require__(8445); - -/** - * Directly 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 SpineGameObject#renderDirect - * @since 3.50.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. - */ -var SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container) -{ - var plugin = src.plugin; - var skeleton = src.skeleton; - var sceneRenderer = plugin.sceneRenderer; - - // flush + clear previous pipeline if this is a new type - renderer.pipelines.clear(); - - sceneRenderer.begin(); - - var scrollFactorX = src.scrollFactorX; - var scrollFactorY = src.scrollFactorY; - var alpha = skeleton.color.a; - - if (container) - { - src.scrollFactorX = container.scrollFactorX; - src.scrollFactorY = container.scrollFactorY; - - skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); - } - - camera.addToRenderList(src); - - var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - - 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; - - // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled - src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); - } - 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 (renderer.currentFramebuffer !== null) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - */ - - skeleton.updateWorldTransform(); - - // Draw the current skeleton - - sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); - - if (container) - { - src.scrollFactorX = scrollFactorX; - src.scrollFactorY = scrollFactorY; - skeleton.color.a = alpha; - } - - if (plugin.drawDebug || src.drawDebug) - { - // Because if we don't, the bones render positions are completely wrong (*sigh*) - var oldX = skeleton.x; - var oldY = skeleton.y; - - skeleton.x = 0; - skeleton.y = 0; - - sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); - - skeleton.x = oldX; - skeleton.y = oldY; - } - - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch - sceneRenderer.end(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); -}; - -module.exports = SpineGameObjectWebGLDirect; - - -/***/ }), - -/***/ 4290: -/***/ ((module, __unused_webpack_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 Clamp = __webpack_require__(2915); -var CounterClockwise = __webpack_require__(3426); -var GetCalcMatrix = __webpack_require__(2208); -var RadToDeg = __webpack_require__(4208); -var Wrap = __webpack_require__(8445); - -/** - * 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 SpineGameObject#renderWebGL - * @since 3.19.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. - */ -var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container) -{ - var plugin = src.plugin; - var skeleton = src.skeleton; - var sceneRenderer = plugin.sceneRenderer; - - if (renderer.newType) - { - // flush + clear previous pipeline if this is a new type - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - - var scrollFactorX = src.scrollFactorX; - var scrollFactorY = src.scrollFactorY; - var alpha = skeleton.color.a; - - if (container) - { - src.scrollFactorX = container.scrollFactorX; - src.scrollFactorY = container.scrollFactorY; - - skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); - } - - camera.addToRenderList(src); - - var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - - 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; - - // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled - src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); - } - 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 (renderer.currentFramebuffer !== null) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - */ - - skeleton.updateWorldTransform(); - - // Draw the current skeleton - - sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); - - if (container) - { - src.scrollFactorX = scrollFactorX; - src.scrollFactorY = scrollFactorY; - skeleton.color.a = alpha; - } - - if (plugin.drawDebug || src.drawDebug) - { - // Because if we don't, the bones render positions are completely wrong (*sigh*) - var oldX = skeleton.x; - var oldY = skeleton.y; - - skeleton.x = 0; - skeleton.y = 0; - - sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); - - skeleton.x = oldX; - skeleton.y = oldY; - } - - 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(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); - } -}; - -module.exports = SpineGameObjectWebGLRenderer; - - -/***/ }), - -/***/ 8599: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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'; - - -/***/ }), - -/***/ 3570: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 7950: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5389: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4679: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 6903: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 9638: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2505: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8616: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 1868: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2075: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 918: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8136: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5113: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2029: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 527: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5215: -/***/ ((module, __unused_webpack_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__(8599), - BOOT: __webpack_require__(3570), - CONTEXT_LOST: __webpack_require__(7950), - CONTEXT_RESTORED: __webpack_require__(5389), - DESTROY: __webpack_require__(4679), - FOCUS: __webpack_require__(6903), - HIDDEN: __webpack_require__(9638), - PAUSE: __webpack_require__(2505), - POST_RENDER: __webpack_require__(8616), - POST_STEP: __webpack_require__(1868), - PRE_RENDER: __webpack_require__(2075), - PRE_STEP: __webpack_require__(918), - READY: __webpack_require__(8136), - RESUME: __webpack_require__(5113), - STEP: __webpack_require__(2029), - VISIBLE: __webpack_require__(527) - -}; - - -/***/ }), - -/***/ 1081: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var Events = __webpack_require__(6748); +var Class = __webpack_require__(0); +var Events = __webpack_require__(228); /** * @callback DataEachCallback @@ -15928,6 +36293,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.0.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @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. * @@ -15966,6 +36334,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to increase the value for. * @param {*} [data] - The value to increase for the given key. * @@ -16005,6 +36376,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to toggle the value for. * * @return {Phaser.Data.DataManager} This DataManager object. @@ -16378,157 +36752,12 @@ module.exports = DataManager; /***/ }), - -/***/ 9044: -/***/ ((module) => { +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { /** * @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'; - - -/***/ }), - -/***/ 7801: -/***/ ((module) => { - -/** - * @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-'; - - -/***/ }), - -/***/ 4873: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Data Manager Destroy Event. - * - * The Data Manager will listen for the destroy event from its parent, and then close itself down. - * - * @event Phaser.Data.Events#DESTROY - * @since 3.50.0 - */ -module.exports = 'destroy'; - - -/***/ }), - -/***/ 9966: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4586: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 6748: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16538,1744 +36767,1370 @@ module.exports = 'setdata'; module.exports = { - CHANGE_DATA: __webpack_require__(9044), - CHANGE_DATA_KEY: __webpack_require__(7801), - DESTROY: __webpack_require__(4873), - REMOVE_DATA: __webpack_require__(9966), - SET_DATA: __webpack_require__(4586) + CHANGE_DATA: __webpack_require__(229), + CHANGE_DATA_KEY: __webpack_require__(230), + DESTROY: __webpack_require__(231), + REMOVE_DATA: __webpack_require__(232), + SET_DATA: __webpack_require__(233) }; /***/ }), - -/***/ 7499: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 229 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var GameEvents = __webpack_require__(5215); -var RenderEvents = __webpack_require__(8604); - /** - * @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. + * The Change Data Event. * - * 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. + * This event is dispatched by a Data Manager when an item in the data store is changed. * - * 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. + * 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.on('changedata', listener)`. * - * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, - * combine Geometry Masks and Blend Modes together. + * 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. * - * 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 + * @event Phaser.Data.Events#CHANGE_DATA + * @type {string} * @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. + * @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. */ -var BitmapMask = new Class({ - - initialize: - - function BitmapMask (scene, renderable) - { - var renderer = scene.sys.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 masks 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; - - /** - * 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; - - /** - * The Scene which this Bitmap Mask will be used in. - * - * @name Phaser.Display.Masks.BitmapMask#scene - * @type {Phaser.Scene} - * @since 3.60.0 - */ - this.scene = scene; - - this.createMask(); - - scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (renderer) - { - renderer.on(RenderEvents.RESIZE, this.createMask, this); - } - }, - - /** - * Creates the WebGL Texture2D objects and Framebuffers required for this - * mask. If this mask has already been created, then `clearMask` is called first. - * - * @method Phaser.Display.Masks.BitmapMask#createMask - * @since 3.50.0 - */ - createMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl) - { - return; - } - - if (this.mainTexture) - { - this.clearMask(); - } - - 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); - }, - - /** - * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes - * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references. - * - * This is called when this mask is destroyed, or if you try to creat a new - * mask from this object when one is already set. - * - * @method Phaser.Display.Masks.BitmapMask#clearMask - * @since 3.50.0 - */ - clearMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl || !this.mainTexture) - { - return; - } - - 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; - }, - - /** - * 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.BITMAPMASK_PIPELINE.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.BITMAPMASK_PIPELINE.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.clearMask(); - - this.scene.sys.game.events.off(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (this.renderer) - { - this.renderer.off(RenderEvents.RESIZE, this.createMask, this); - } - - this.bitmapMask = null; - this.prevFramebuffer = null; - this.renderer = null; - } - -}); - -module.exports = BitmapMask; +module.exports = 'changedata'; /***/ }), - -/***/ 6726: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 230 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); - /** - * @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). + * The Change Data Key Event. * - * 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. + * This event is dispatched by a Data Manager when an item in the data store is changed. * - * 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. + * 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.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.on('changedata-gold')`. * - * @class GeometryMask - * @memberof Phaser.Display.Masks - * @constructor - * @since 3.0.0 + * @event Phaser.Data.Events#CHANGE_DATA_KEY + * @type {string} + * @since 3.16.1 * - * @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. + * @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. */ -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. - * - * This is a WebGL only feature. - * - * @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. - * - * This is a WebGL only feature. - * - * @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, 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--; - - // Force flush before disabling stencil test - renderer.flush(); - - var current = renderer.currentMask; - - if (renderer.maskStack.length === 0) - { - // If this is the only mask in the stack, flush and disable - current.mask = null; - - gl.disable(gl.STENCIL_TEST); - } - else - { - var prev = renderer.maskStack[renderer.maskStack.length - 1]; - - prev.mask.applyStencil(renderer, prev.camera, false); - - if (renderer.currentCameraMask.mask !== prev.mask) - { - current.mask = prev.mask; - current.camera = prev.camera; - } - else - { - current.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, 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; +module.exports = 'changedata-'; /***/ }), - -/***/ 2494: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 231 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(8351); -var GetAdvancedValue = __webpack_require__(8361); +/** + * The Data Manager Destroy Event. + * + * The Data Manager will listen for the destroy event from its parent, and then close itself down. + * + * @event Phaser.Data.Events#DESTROY + * @type {string} + * @since 3.50.0 + */ +module.exports = 'destroy'; + + +/***/ }), +/* 232 */ +/***/ (function(module, exports) { /** - * Builds a Game Object using the provided configuration object. + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Data Event. * - * @function Phaser.GameObjects.BuildGameObject + * 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.on('removedata', listener)`. + * + * @event Phaser.Data.Events#REMOVE_DATA + * @type {string} * @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. + * @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. */ -var BuildGameObject = function (scene, gameObject, config) -{ - // Position +module.exports = 'removedata'; - gameObject.x = GetAdvancedValue(config, 'x', 0); - gameObject.y = GetAdvancedValue(config, 'y', 0); - gameObject.depth = GetAdvancedValue(config, 'depth', 0); - // Flip +/***/ }), +/* 233 */ +/***/ (function(module, exports) { - gameObject.flipX = GetAdvancedValue(config, 'flipX', false); - gameObject.flipY = GetAdvancedValue(config, 'flipY', false); +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ - // Scale - // Either: { scale: 2 } or { scale: { x: 2, y: 2 }} +/** + * 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.on('setdata', listener)`. + * + * @event Phaser.Data.Events#SET_DATA + * @type {string} + * @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'; - 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); - } +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { - // ScrollFactor - // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }} +"use strict"; - 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); - } +var has = Object.prototype.hasOwnProperty + , prefix = '~'; - // Rotation +/** + * 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() {} - gameObject.rotation = GetAdvancedValue(config, 'rotation', 0); +// +// 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); - var angle = GetAdvancedValue(config, 'angle', 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; +} - if (angle !== null) - { - gameObject.angle = angle; - } +/** + * 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; +} - // Alpha +/** + * 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'); + } - gameObject.alpha = GetAdvancedValue(config, 'alpha', 1); + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; - // Origin - // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }} + 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]; - var origin = GetAdvancedValue(config, 'origin', null); + return emitter; +} - 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); +/** + * 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]; +} - gameObject.setOrigin(ox, oy); - } +/** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ +function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; +} - // BlendMode +/** + * 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; - gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL); + if (this._eventsCount === 0) return names; - // Visible + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } - gameObject.visible = GetAdvancedValue(config, 'visible', true); + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } - // 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; + return names; }; -module.exports = BuildGameObject; +/** + * 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; + } -/***/ 2273: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + return ee; +}; /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} + * 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]; -var Class = __webpack_require__(7473); -var ComponentsToJSON = __webpack_require__(6125); -var DataManager = __webpack_require__(1081); -var EventEmitter = __webpack_require__(4399); -var Events = __webpack_require__(3389); -var SceneEvents = __webpack_require__(204); + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; +}; /** - * @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. + * Calls each of the listeners registered for a given event. * - * @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`. + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public */ -var GameObject = new Class({ - - Extends: EventEmitter, - - initialize: - - function GameObject (scene, type) - { - EventEmitter.call(this); - - /** - * A reference to the Scene to which this Game Object belongs. - * - * Game Objects can only belong to one Scene. - * - * You should consider this property as being read-only. You cannot move a - * Game Object to another Scene by simply changing it. - * - * @name Phaser.GameObjects.GameObject#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * Holds a reference to the Display List that contains this Game Object. - * - * This is set automatically when this Game Object is added to a Scene or Layer. - * - * You should treat this property as being read-only. - * - * @name Phaser.GameObjects.GameObject#displayList - * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} - * @default null - * @since 3.50.0 - */ - this.displayList = null; - - /** - * 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 {(number|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 {number} - * @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 {number} - * @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; - - this.on(Events.ADDED_TO_SCENE, this.addedToScene, this); - this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this); - - // 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 {(number|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 () - { - this.scene.sys.input.disable(this); - - 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) - { - var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; - - return !(!listWillRender || 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 {number[]} 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)); - - child = parent; - - if (!parent.parentContainer) - { - break; - } - else - { - parent = parent.parentContainer; - } - } - - if (this.displayList) - { - indexes.unshift(this.displayList.getIndex(child)); - } - else - { - indexes.unshift(this.scene.sys.displayList.getIndex(child)); - } - - return indexes; - }, - - /** - * Adds this Game Object to the given Display List. - * - * If no Display List is specified, it will default to the Display List owned by the Scene to which - * this Game Object belongs. - * - * A Game Object can only exist on one Display List at any given time, but may move freely between them. - * - * If this Game Object is already on another Display List when this method is called, it will first - * be removed from it, before being added to the new list. - * - * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. - * - * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly - * disable it from rendering, consider using the `setVisible` method, instead. - * - * @method Phaser.GameObjects.GameObject#addToDisplayList - * @fires Phaser.Scenes.Events#ADDED_TO_SCENE - * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE - * @since 3.53.0 - * - * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List. - * - * @return {this} This Game Object. - */ - addToDisplayList: function (displayList) - { - if (displayList === undefined) { displayList = this.scene.sys.displayList; } - - if (this.displayList && this.displayList !== displayList) - { - this.removeFromDisplayList(); - } - - // Don't repeat if it's already on this list - if (!displayList.exists(this)) - { - this.displayList = displayList; - - displayList.add(this, true); - - displayList.queueDepthSort(); - - this.emit(Events.ADDED_TO_SCENE, this, this.scene); - - displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene); - } - - return this; - }, - - /** - * Adds this Game Object to the Update List belonging to the Scene. - * - * When a Game Object is added to the Update List it will have its `preUpdate` method called - * every game frame. This method is passed two parameters: `delta` and `time`. - * - * If you wish to run your own logic within `preUpdate` then you should always call - * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, - * such as Sprite animations. - * - * @method Phaser.GameObjects.GameObject#addToUpdateList - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - addToUpdateList: function () - { - if (this.scene && this.preUpdate) - { - this.scene.sys.updateList.add(this); - } - - return this; - }, - - /** - * Removes this Game Object from the Display List it is currently on. - * - * A Game Object can only exist on one Display List at any given time, but may move freely removed - * and added back at a later stage. - * - * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. - * - * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly - * disable it from rendering, consider using the `setVisible` method, instead. - * - * @method Phaser.GameObjects.GameObject#removeFromDisplayList - * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE - * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - removeFromDisplayList: function () - { - var displayList = this.displayList || this.scene.sys.displayList; - - if (displayList.exists(this)) - { - displayList.remove(this, true); - - displayList.queueDepthSort(); - - this.displayList = null; - - this.emit(Events.REMOVED_FROM_SCENE, this, this.scene); - - displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene); - } - - return this; - }, - - /** - * Removes this Game Object from the Scene's Update List. - * - * When a Game Object is on the Update List, it will have its `preUpdate` method called - * every game frame. Calling this method will remove it from the list, preventing this. - * - * Removing a Game Object from the Update List will stop most internal functions working. - * For example, removing a Sprite from the Update List will prevent it from being able to - * run animations. - * - * @method Phaser.GameObjects.GameObject#removeFromUpdateList - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - removeFromUpdateList: function () - { - if (this.scene && this.preUpdate) - { - this.scene.sys.updateList.remove(this); - } - - return this; - }, - - /** - * 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] - `True` if this Game Object is being destroyed by the Scene, `false` if not. - */ - destroy: function (fromScene) - { - // This Game Object has already been destroyed - if (!this.scene || this.ignoreDestroy) - { - return; - } - - if (fromScene === undefined) { fromScene = false; } - - if (this.preDestroy) - { - this.preDestroy.call(this); - } - - this.emit(Events.DESTROY, this, fromScene); - - this.removeAllListeners(); - - if (this.postPipelines) - { - this.resetPostPipeline(true); - } - - this.removeFromDisplayList(); - this.removeFromUpdateList(); - - if (this.input) - { - this.scene.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; - } - - this.active = false; - this.visible = false; - - this.scene = undefined; - this.parentContainer = undefined; +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; +}; /** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * Add a listener for a given event. * - * @constant {number} RENDER_MASK - * @memberof Phaser.GameObjects.GameObject - * @default + * @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 */ -GameObject.RENDER_MASK = 15; +EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); +}; -module.exports = GameObject; +/** + * 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; +} /***/ }), - -/***/ 2208: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 235 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TransformMatrix = __webpack_require__(4227); - -var tempMatrix1 = new TransformMatrix(); -var tempMatrix2 = new TransformMatrix(); -var tempMatrix3 = new TransformMatrix(); - -var result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 }; - /** - * Calculates the Transform Matrix of the given Game Object and Camera, factoring in - * the parent matrix if provided. + * The Game Object Added to Scene Event. * - * Note that the object this results contains _references_ to the Transform Matrices, - * not new instances of them. Therefore, you should use their values immediately, or - * copy them to your own matrix, as they will be replaced as soon as another Game - * Object is rendered. + * This event is dispatched when a Game Object is added to a Scene. * - * @function Phaser.GameObjects.GetCalcMatrix - * @memberof Phaser.GameObjects + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @type {string} * @since 3.50.0 * - * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any. - * - * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices. + * @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. */ -var GetCalcMatrix = function (src, camera, parentMatrix) -{ - var camMatrix = tempMatrix1; - var spriteMatrix = tempMatrix2; - var calcMatrix = tempMatrix3; +module.exports = 'addedtoscene'; - spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + +/***/ }), +/* 236 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. + * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. + */ +module.exports = 'destroy'; + + +/***/ }), +/* 237 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @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'; + + +/***/ }), +/* 238 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback. + */ +module.exports = 'complete'; + + +/***/ }), +/* 239 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + * @param {number} width - The width of the video. + * @param {number} height - The height of the video. + */ +module.exports = 'created'; + + +/***/ }), +/* 240 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @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'; + + +/***/ }), +/* 241 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped. + */ +module.exports = 'loop'; + + +/***/ }), +/* 242 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback. + */ +module.exports = 'play'; + + +/***/ }), +/* 243 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking. + */ +module.exports = 'seeked'; + + +/***/ }), +/* 244 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking. + */ +module.exports = 'seeking'; + + +/***/ }), +/* 245 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback. + */ +module.exports = 'stop'; + + +/***/ }), +/* 246 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out. + */ +module.exports = 'timeout'; + + +/***/ }), +/* 247 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + */ +module.exports = 'unlocked'; + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace SpinePluginEvents + */ + +module.exports = { + + COMPLETE: __webpack_require__(249), + DISPOSE: __webpack_require__(250), + END: __webpack_require__(251), + EVENT: __webpack_require__(252), + INTERRUPTED: __webpack_require__(253), + START: __webpack_require__(254) + +}; + + +/***/ }), +/* 249 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Complete Event. + * + * @event SpinePluginEvents#COMPLETE + * @since 3.19.0 + */ +module.exports = 'complete'; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Dispose Event. + * + * @event SpinePluginEvents#DISPOSE + * @since 3.19.0 + */ +module.exports = 'dispose'; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The End Event. + * + * @event SpinePluginEvents#END + * @since 3.19.0 + */ +module.exports = 'end'; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Custom Event Event. + * + * @event SpinePluginEvents#EVENT + * @since 3.19.0 + */ +module.exports = 'event'; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Interrupted Event. + * + * @event SpinePluginEvents#INTERRUPTED + * @since 3.19.0 + */ +module.exports = 'interrupted'; + + +/***/ }), +/* 254 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Start Event. + * + * @event SpinePluginEvents#START + * @since 3.19.0 + */ +module.exports = 'start'; + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var renderWebGL = __webpack_require__(2); +var renderCanvas = __webpack_require__(2); +var renderDirect = __webpack_require__(2); + +if (true) +{ + renderWebGL = __webpack_require__(256); + renderDirect = __webpack_require__(257); +} + +if (true) +{ + renderCanvas = __webpack_require__(258); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas, + renderDirect: renderDirect + +}; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(1); +var CounterClockwise = __webpack_require__(8); +var GetCalcMatrix = __webpack_require__(60); +var RadToDeg = __webpack_require__(9); +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 SpineGameObject#renderWebGL + * @since 3.19.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. + */ +var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container) +{ + var plugin = src.plugin; + var skeleton = src.skeleton; + var sceneRenderer = plugin.sceneRenderer; + + if (renderer.newType) + { + // flush + clear previous pipeline if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + var scrollFactorX = src.scrollFactorX; + var scrollFactorY = src.scrollFactorY; + var alpha = skeleton.color.a; + + if (container) + { + src.scrollFactorX = container.scrollFactorX; + src.scrollFactorY = container.scrollFactorY; + + skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); + } + + camera.addToRenderList(src); + + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; + + 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; + + // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled + src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); + } + 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 (renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + */ + + skeleton.updateWorldTransform(); + + // Draw the current skeleton + + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + if (container) + { + src.scrollFactorX = scrollFactorX; + src.scrollFactorY = scrollFactorY; + skeleton.color.a = alpha; + } + + if (plugin.drawDebug || src.drawDebug) + { + // Because if we don't, the bones render positions are completely wrong (*sigh*) + var oldX = skeleton.x; + var oldY = skeleton.y; + + skeleton.x = 0; + skeleton.y = 0; + + sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); + + skeleton.x = oldX; + skeleton.y = oldY; + } + + 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(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); + } +}; + +module.exports = SpineGameObjectWebGLRenderer; + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(1); +var CounterClockwise = __webpack_require__(8); +var GetCalcMatrix = __webpack_require__(60); +var RadToDeg = __webpack_require__(9); +var Wrap = __webpack_require__(6); + +/** + * Directly 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 SpineGameObject#renderDirect + * @since 3.50.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. + */ +var SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container) +{ + var plugin = src.plugin; + var skeleton = src.skeleton; + var sceneRenderer = plugin.sceneRenderer; + + // flush + clear previous pipeline if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + + var scrollFactorX = src.scrollFactorX; + var scrollFactorY = src.scrollFactorY; + var alpha = skeleton.color.a; + + if (container) + { + src.scrollFactorX = container.scrollFactorX; + src.scrollFactorY = container.scrollFactorY; + + skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); + } + + camera.addToRenderList(src); + + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; + + 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; + + // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled + src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); + } + 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 (renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + */ + + skeleton.updateWorldTransform(); + + // Draw the current skeleton + + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + if (container) + { + src.scrollFactorX = scrollFactorX; + src.scrollFactorY = scrollFactorY; + skeleton.color.a = alpha; + } + + if (plugin.drawDebug || src.drawDebug) + { + // Because if we don't, the bones render positions are completely wrong (*sigh*) + var oldX = skeleton.x; + var oldY = skeleton.y; + + skeleton.x = 0; + skeleton.y = 0; + + sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); + + skeleton.x = oldX; + skeleton.y = oldY; + } + + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch + sceneRenderer.end(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); +}; + +module.exports = SpineGameObjectWebGLDirect; + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var CounterClockwise = __webpack_require__(8); +var RadToDeg = __webpack_require__(9); +var Wrap = __webpack_require__(6); + +/** + * 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 SpineGameObject#renderCanvas + * @since 3.19.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix) +{ + var context = renderer.currentContext; + + var plugin = src.plugin; + var skeleton = src.skeleton; + var skeletonRenderer = plugin.skeletonRenderer; + + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; + + camera.addToRenderList(src); + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); camMatrix.copyFrom(camera.matrix); @@ -18287,5484 +38142,197 @@ var GetCalcMatrix = function (src, camera, parentMatrix) // 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); } else { spriteMatrix.e -= camera.scrollX * src.scrollFactorX; spriteMatrix.f -= camera.scrollY * src.scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); } - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); + skeleton.x = calcMatrix.tx; + skeleton.y = calcMatrix.ty; - return result; -}; + skeleton.scaleX = calcMatrix.scaleX; -module.exports = GetCalcMatrix; + // Inverse or we get upside-down skeletons + skeleton.scaleY = calcMatrix.scaleY * -1; - -/***/ }), - -/***/ 4344: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -// 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 () + if (src.scaleX < 0) { - return this.setAlpha(1); - }, + skeleton.scaleX *= -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) + src.root.rotation = RadToDeg(calcMatrix.rotationNormalized); + } + else { - if (topLeft === undefined) { topLeft = 1; } + // +90 degrees to account for the difference in Spine vs. Phaser rotation + src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360); + } - // Treat as if there is only one alpha value for the whole Game Object - if (topRight === undefined) + if (src.scaleY < 0) + { + skeleton.scaleY *= -1; + + if (src.scaleX < 0) { - this.alpha = topLeft; + src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2); } 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; - - -/***/ }), - -/***/ 4518: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -// 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; - - -/***/ }), - -/***/ 5173: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BlendModes = __webpack_require__(8351); - -/** - * 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 {number} - * @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; - - -/***/ }), - -/***/ 1991: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8305: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3131: -/***/ ((module) => { - -/** - * @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 {number} - * @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) - { - if (this.displayList) - { - this.displayList.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 {number} 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; - - -/***/ }), - -/***/ 1626: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for setting the FX values of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.FX - * @webglOnly - * @since 3.60.0 - */ - -var FX = { - - /** - * The amount of extra padding to be applied to this Game Object - * when it is being rendered by a SpriteFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shaddow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * @name Phaser.GameObjects.Components.FX#fxPadding - * @type {number} - * @default 0 - * @since 3.60.0 - */ - fxPadding: 0, - - /** - * Sets the amount of extra padding to be applied to this Game Object - * when it is being rendered by a SpriteFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shaddow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * @method Phaser.GameObjects.Components.FX#setFXPadding - * @webglOnly - * @since 3.60.0 - * - * @param {number} [padding=0] - The amount of padding to add to the texture. - * - * @return {this} This Game Object instance. - */ - setFXPadding: function (padding) - { - if (padding === undefined) { padding = 0; } - - this.fxPadding = padding; - - return this; - }, - - /** - * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. - * - * This happens when the pipeline uses its `copySprite` method. - * - * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFXCopy - * @webglOnly - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. - */ - onFXCopy: function () - { - }, - - /** - * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. - * - * This happens when the pipeline uses its `drawSprite` method. - * - * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFX - * @webglOnly - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. - */ - onFX: function () - { - } - -}; - -module.exports = FX; - - -/***/ }), - -/***/ 9660: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3671: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Rectangle = __webpack_require__(2150); -var RotateAround = __webpack_require__(9876); -var Vector2 = __webpack_require__(2529); - -/** - * 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; - - -/***/ }), - -/***/ 2246: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BitmapMask = __webpack_require__(7499); -var GeometryMask = __webpack_require__(6726); - -/** - * 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. - * - * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. - * - * 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|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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 instanceof Phaser.GameObjects.Graphics || this instanceof Phaser.GameObjects.Shape)) - { - // eslint-disable-next-line consistent-this - graphics = this; - } - - return new GeometryMask(this.scene, graphics); - } - -}; - -module.exports = Mask; - - -/***/ }), - -/***/ 5085: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 77: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var DegToRad = __webpack_require__(7149); -var GetBoolean = __webpack_require__(1864); -var GetValue = __webpack_require__(5851); -var TWEEN_CONST = __webpack_require__(3747); -var Vector2 = __webpack_require__(2529); - -/** - * 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 {number} - * @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(tweenData.end, 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); - } + src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2); } } -}; - -module.exports = PathFollower; - - -/***/ }), - -/***/ 986: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var DeepCopy = __webpack_require__(3911); -var PIPELINE_CONST = __webpack_require__(5412); -var SpliceOne = __webpack_require__(8935); - -/** - * 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. - * - * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default. - * - * @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, - - /** - * Does this Game Object have any Post Pipelines set? - * - * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline - * @type {boolean} - * @webglOnly - * @since 3.50.0 - */ - hasPostPipeline: false, - - /** - * The WebGL Post FX Pipelines this Game Object uses for post-render effects. - * - * The pipelines are processed in the order in which they appear in this array. - * - * If you modify this array directly, be sure to set the - * `hasPostPipeline` property accordingly. - * - * @name Phaser.GameObjects.Components.Pipeline#postPipelines - * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} - * @webglOnly - * @since 3.50.0 - */ - postPipelines: null, - - /** - * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses. - * - * @name Phaser.GameObjects.Components.Pipeline#pipelineData - * @type {object} - * @webglOnly - * @since 3.50.0 - */ - pipelineData: null, - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * - * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`. - * - * @method Phaser.GameObjects.Components.Pipeline#initPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - initPipeline: function (pipeline) + if (camera.renderToTexture) { - if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; } - - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return false; - } - - var pipelines = renderer.pipelines; - - this.postPipelines = []; - this.pipelineData = {}; - - if (pipelines) - { - var instance = pipelines.get(pipeline); - - if (instance) - { - this.defaultPipeline = instance; - this.pipeline = instance; - - return true; - } - } - - return false; - }, - - /** - * Sets the main WebGL Pipeline of this Game Object. - * - * Also sets the `pipelineData` property, if the parameter is given. - * - * Both the pipeline and post pipelines share the same pipeline data object. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. - * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. - * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. - * - * @return {this} This Game Object instance. - */ - setPipeline: function (pipeline, pipelineData, copyData) - { - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return this; - } - - var pipelines = renderer.pipelines; - - if (pipelines) - { - var instance = pipelines.get(pipeline); - - if (instance) - { - this.pipeline = instance; - } - - if (pipelineData) - { - this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; - } - } - - return this; - }, - - /** - * Sets one, or more, Post Pipelines on this Game Object. - * - * Post Pipelines are invoked after this Game Object has rendered to its target and - * are commonly used for post-fx. - * - * The post pipelines are appended to the `postPipelines` array belonging to this - * Game Object. When the renderer processes this Game Object, it iterates through the post - * pipelines in the order in which they appear in the array. If you are stacking together - * multiple effects, be aware that the order is important. - * - * If you call this method multiple times, the new pipelines will be appended to any existing - * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. - * - * You can optionally also set the `pipelineData` property, if the parameter is given. - * - * Both the pipeline and post pipelines share the pipeline data object together. - * - * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them. - * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. - * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. - * - * @return {this} This Game Object instance. - */ - setPostPipeline: function (pipelines, pipelineData, copyData) - { - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return this; - } - - var pipelineManager = renderer.pipelines; - - if (pipelineManager) - { - if (!Array.isArray(pipelines)) - { - pipelines = [ pipelines ]; - } - - for (var i = 0; i < pipelines.length; i++) - { - var instance = pipelineManager.getPostPipeline(pipelines[i], this); - - if (instance) - { - this.postPipelines.push(instance); - } - } - - if (pipelineData) - { - this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; - } - } - - this.hasPostPipeline = (this.postPipelines.length > 0); - - return this; - }, - - /** - * Adds an entry to the `pipelineData` object belonging to this Game Object. - * - * If the 'key' already exists, its value is updated. If it doesn't exist, it is created. - * - * If `value` is undefined, and `key` exists, `key` is removed from the data object. - * - * Both the pipeline and post pipelines share the pipeline data object together. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipelineData - * @webglOnly - * @since 3.50.0 - * - * @param {string} key - The key of the pipeline data to set, update, or delete. - * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object. - * - * @return {this} This Game Object instance. - */ - setPipelineData: function (key, value) - { - var data = this.pipelineData; - - if (value === undefined) - { - delete data[key]; - } - else - { - data[key] = value; - } - - return this; - }, - - /** - * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it. - * - * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class. - * - * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array. - */ - getPostPipeline: function (pipeline) - { - var pipelines = this.postPipelines; - - var results = []; - - for (var i = 0; i < pipelines.length; i++) - { - var instance = pipelines[i]; - - if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline) - { - results.push(instance); - } - } - - return (results.length === 1) ? results[0] : results; - }, - - /** - * 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 - * - * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines? - * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? - * - * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`. - */ - resetPipeline: function (resetPostPipelines, resetData) - { - if (resetPostPipelines === undefined) { resetPostPipelines = false; } - if (resetData === undefined) { resetData = false; } - - this.pipeline = this.defaultPipeline; - - if (resetPostPipelines) - { - this.postPipelines = []; - this.hasPostPipeline = false; - } - - if (resetData) - { - this.pipelineData = {}; - } - - return (this.pipeline !== null); - }, - - /** - * Resets the WebGL Post Pipelines of this Game Object. It does this by calling - * the `destroy` method on each post pipeline and then clearing the local array. - * - * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? - */ - resetPostPipeline: function (resetData) - { - if (resetData === undefined) { resetData = false; } - - var pipelines = this.postPipelines; - - for (var i = 0; i < pipelines.length; i++) - { - pipelines[i].destroy(); - } - - this.postPipelines = []; - this.hasPostPipeline = false; - - if (resetData) - { - this.pipelineData = {}; - } - }, - - /** - * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them. - * - * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead. - * - * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class. - * - * @return {this} This Game Object. - */ - removePostPipeline: function (pipeline) - { - var pipelines = this.postPipelines; - - for (var i = pipelines.length - 1; i >= 0; i--) - { - var instance = pipelines[i]; - - if ( - (typeof pipeline === 'string' && instance.name === pipeline) || - (typeof pipeline !== 'string' && instance instanceof pipeline)) - { - instance.destroy(); - - SpliceOne(pipelines, i); - } - } - - this.hasPostPipeline = (this.postPipelines.length > 0); - - return this; - }, - - /** - * 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; + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; } + skeleton.updateWorldTransform(); + + skeletonRenderer.ctx = context; + skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug); + + context.save(); + + skeletonRenderer.draw(skeleton); + + context.restore(); }; -module.exports = Pipeline; +module.exports = SpineGameObjectCanvasRenderer; /***/ }), - -/***/ 4627: -/***/ ((module) => { +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|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; - - -/***/ }), - -/***/ 4759: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4976: -/***/ ((module) => { - -/** - * @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|number)} [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|number)} 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; - - -/***/ }), - -/***/ 9243: -/***/ ((module) => { - -/** - * @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|number)} [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|number)} 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; - - -/***/ }), - -/***/ 5693: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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 = { - - /** - * The tint value being applied to the top-left vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintTopLeft - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintTopLeft: 0xffffff, - - /** - * The tint value being applied to the top-right vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintTopRight - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintTopRight: 0xffffff, - - /** - * The tint value being applied to the bottom-left vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomLeft - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintBottomLeft: 0xffffff, - - /** - * The tint value being applied to the bottom-right vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomRight - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintBottomRight: 0xffffff, - - /** - * The tint fill mode. - * - * `false` = An additive tint (the default), where vertices colors are blended with the texture. - * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. - * - * @name Phaser.GameObjects.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); - - 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {number} [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.tintTopLeft = topLeft; - this.tintTopRight = topRight; - this.tintBottomLeft = bottomLeft; - this.tintBottomRight = bottomRight; - - 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {number} [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 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 {number} - * @webglOnly - * @since 3.0.0 - */ - tint: { - - set: function (value) - { - this.setTint(value, value, value, value); - } - }, - - /** - * Does this Game Object have a tint applied? - * - * It checks to see if the 4 tint properties are set to the value 0xffffff - * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. - * - * @name Phaser.GameObjects.Components.Tint#isTinted - * @type {boolean} - * @webglOnly - * @readonly - * @since 3.11.0 - */ - isTinted: { - - get: function () - { - var white = 0xffffff; - - return ( - this.tintFill || - this.tintTopLeft !== white || - this.tintTopRight !== white || - this.tintBottomLeft !== white || - this.tintBottomRight !== white - ); - } - - } - -}; - -module.exports = Tint; - - -/***/ }), - -/***/ 6125: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3212: -/***/ ((module, __unused_webpack_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__(7425); -var TransformMatrix = __webpack_require__(4227); -var TransformXY = __webpack_require__(7556); -var WrapAngle = __webpack_require__(3692); -var WrapAngleDegrees = __webpack_require__(2820); -var Vector2 = __webpack_require__(2529); - -// 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 {number} - * @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; - }, - - /** - * Copies an object's coordinates to this Game Object's position. - * - * @method Phaser.GameObjects.Components.Transform#copyPosition - * @since 3.50.0 - * - * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. - * - * @return {this} This Game Object instance. - */ - copyPosition: function (source) - { - if (source.x !== undefined) { this.x = source.x; } - if (source.y !== undefined) { this.y = source.y; } - if (source.z !== undefined) { this.z = source.z; } - if (source.w !== undefined) { this.w = source.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; - - -/***/ }), - -/***/ 4227: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var MATH_CONST = __webpack_require__(7425); -var Vector2 = __webpack_require__(2529); +var Class = __webpack_require__(0); +var Container = __webpack_require__(260); +var SpineContainerRender = __webpack_require__(346); /** * @classdesc - * A Matrix used for display transformations for rendering. + * A Spine Container is a special kind of Container created specifically for Spine Game Objects. * - * It is represented like so: + * You have all of the same features of a standard Container, but the rendering functions are optimized specifically + * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, 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. * - * ``` - * | a | c | tx | - * | b | d | ty | - * | 0 | 0 | 1 | + * To create one in a Scene, use the factory methods: + * + * ```javascript + * this.add.spineContainer(); * ``` * - * @class TransformMatrix - * @memberof Phaser.GameObjects.Components + * or + * + * ```javascript + * this.make.spineContainer(); + * ``` + * + * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the + * container children. You can, however, mask children of Spine Containers if they are embedded within other + * Spine Containers. In short, if you need masking, don't mix and match the types. + * + * See the Container documentation for further details about what Containers can do. + * + * @class SpineContainer + * @extends Phaser.GameObjects.Container * @constructor - * @since 3.0.0 + * @since 3.50.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. + * @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 TransformMatrix = new Class({ +var SpineContainer = new Class({ + + Extends: Container, + + Mixins: [ + SpineContainerRender + ], initialize: - function TransformMatrix (a, b, c, d, tx, ty) + function SpineContainer (scene, plugin, x, y, children) { - 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; } + Container.call(this, scene, x, y, children); + + // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching + this.type = 'Spine'; /** - * The matrix values. + * A reference to the Spine Plugin. * - * @name Phaser.GameObjects.Components.TransformMatrix#matrix - * @type {Float32Array} - * @since 3.0.0 + * @name SpineContainer#plugin + * @type {SpinePlugin} + * @since 3.50.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 - }; + this.plugin = plugin; }, /** - * The Scale X value. + * Internal destroy handler, called as part of the destroy process. * - * @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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. - * - * @return {Phaser.Types.Math.Vector2Like} 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 + * @method SpineContainer#preDestroy + * @protected * @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) + preDestroy: function () { - var v = this.getX(x, y); + this.removeAll(!!this.exclusive); - if (round) - { - v = Math.round(v); - } + this.localTransform.destroy(); + this.tempTransformMatrix.destroy(); - 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; + this.list = []; + this._displayList = null; + this.plugin = null; } }); -module.exports = TransformMatrix; +module.exports = SpineContainer; /***/ }), - -/***/ 8414: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4286: -/***/ ((module, __unused_webpack_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__(4344), - AlphaSingle: __webpack_require__(4518), - BlendMode: __webpack_require__(5173), - ComputedSize: __webpack_require__(1991), - Crop: __webpack_require__(8305), - Depth: __webpack_require__(3131), - Flip: __webpack_require__(9660), - FX: __webpack_require__(1626), - GetBounds: __webpack_require__(3671), - Mask: __webpack_require__(2246), - Origin: __webpack_require__(5085), - PathFollower: __webpack_require__(77), - Pipeline: __webpack_require__(986), - ScrollFactor: __webpack_require__(4627), - Size: __webpack_require__(4759), - Texture: __webpack_require__(4976), - TextureCrop: __webpack_require__(9243), - Tint: __webpack_require__(5693), - ToJSON: __webpack_require__(6125), - Transform: __webpack_require__(3212), - TransformMatrix: __webpack_require__(4227), - Visible: __webpack_require__(8414) - -}; - - -/***/ }), - -/***/ 7361: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(1953); -var BlendModes = __webpack_require__(8351); -var Class = __webpack_require__(7473); -var Components = __webpack_require__(4286); -var Events = __webpack_require__(3389); -var GameObject = __webpack_require__(2273); -var Rectangle = __webpack_require__(2150); -var Render = __webpack_require__(3232); -var Union = __webpack_require__(9422); -var Vector2 = __webpack_require__(2529); +var ArrayUtils = __webpack_require__(261); +var BlendModes = __webpack_require__(15); +var Class = __webpack_require__(0); +var Components = __webpack_require__(312); +var Events = __webpack_require__(59); +var GameObject = __webpack_require__(57); +var Rectangle = __webpack_require__(29); +var Render = __webpack_require__(342); +var Union = __webpack_require__(345); +var Vector2 = __webpack_require__(3); /** * @classdesc @@ -24199,9 +38767,11 @@ var Container = new Class({ gameObject.parentContainer.remove(gameObject); } + gameObject.parentContainer = this; + gameObject.removeFromDisplayList(); - gameObject.parentContainer = this; + gameObject.addedToScene(); } }, @@ -24216,12 +38786,14 @@ var Container = new Class({ */ removeHandler: function (gameObject) { - gameObject.off(Events.DESTROY, this.remove); + gameObject.off(Events.DESTROY, this.remove, this); if (this.exclusive) { gameObject.parentContainer = null; + gameObject.removedFromScene(); + gameObject.addToDisplayList(); } }, @@ -24233,10 +38805,10 @@ var Container = new Class({ * @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. + * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed. + * @param {Phaser.Types.Math.Vector2Like} [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. + * @return {Phaser.Types.Math.Vector2Like} The transformed point. */ pointToContainer: function (source, output) { @@ -24248,7 +38820,8 @@ var Container = new Class({ } else { - output = new Vector2(source.x, source.y); + output.x = source.x; + output.y = source.y; } var tempMatrix = this.tempTransformMatrix; @@ -24286,6 +38859,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#add * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. @@ -24307,6 +38883,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#addAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * @param {number} [index=0] - The position to insert the Game Object/s at. * @@ -24325,6 +38904,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} 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. @@ -24340,6 +38922,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getIndex * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. * * @return {number} The index of the Game Object in this Container, or -1 if not found. @@ -24388,6 +38973,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getByName * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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. @@ -24403,6 +38991,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getRandom * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} [startIndex=0] - An optional start index. * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from. * @@ -24426,6 +39017,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getFirst * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -24456,6 +39050,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAll * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T[]} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -24498,6 +39095,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#swap * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. * @@ -24521,6 +39121,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveTo * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. * @param {number} index - The new position of the Game Object in this Container. * @@ -24541,6 +39144,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveAbove * @since 3.55.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object. * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. * @@ -24561,6 +39167,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveBelow * @since 3.55.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object. * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. * @@ -24583,6 +39192,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#remove * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. * @@ -24676,14 +39288,25 @@ var Container = new Class({ */ removeAll: function (destroyChild) { - var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + var list = this.list; if (destroyChild) { - for (var i = 0; i < removed.length; i++) + for (var i = 0; i < list.length; i++) { - removed[i].destroy(); + if (list[i] && list[i].scene) + { + list[i].off(Events.DESTROY, this.remove, this); + + list[i].destroy(); + } } + + this.list = []; + } + else + { + ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this); } return this; @@ -24696,6 +39319,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#bringToTop * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. * * @return {this} This Container instance. @@ -24714,6 +39340,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#sendToBack * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. * * @return {this} This Container instance. @@ -24731,6 +39360,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveUp * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -24748,6 +39380,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveDown * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -24796,6 +39431,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#replace * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [oldChild,newChild] + * * @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. @@ -24828,6 +39466,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#exists * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @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. @@ -25139,880 +39780,5178 @@ module.exports = Container; /***/ }), - -/***/ 2840: -/***/ ((module) => { +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 {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 + * @namespace Phaser.Utils.Array */ -var ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix) -{ - camera.addToRenderList(container); - - 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, camera, transformMatrix); - - // Restore original values - child.setAlpha(childAlpha); - child.setScrollFactor(childScrollFactorX, childScrollFactorY); - } - - if (container.mask) - { - container.mask.postRenderCanvas(renderer); - } -}; - -module.exports = ContainerCanvasRenderer; - - -/***/ }), - -/***/ 3232: -/***/ ((module, __unused_webpack_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__(1984); -var renderCanvas = __webpack_require__(1984); - -if (true) -{ - renderWebGL = __webpack_require__(4343); -} - -if (true) -{ - renderCanvas = __webpack_require__(2840); -} module.exports = { - renderWebGL: renderWebGL, - renderCanvas: renderCanvas + Matrix: __webpack_require__(262), + + Add: __webpack_require__(271), + AddAt: __webpack_require__(272), + BringToTop: __webpack_require__(273), + CountAllMatching: __webpack_require__(274), + Each: __webpack_require__(275), + EachInRange: __webpack_require__(276), + FindClosestInSorted: __webpack_require__(277), + Flatten: __webpack_require__(278), + GetAll: __webpack_require__(279), + GetFirst: __webpack_require__(280), + GetRandom: __webpack_require__(281), + MoveDown: __webpack_require__(282), + MoveTo: __webpack_require__(283), + MoveUp: __webpack_require__(284), + MoveAbove: __webpack_require__(285), + MoveBelow: __webpack_require__(286), + NumberArray: __webpack_require__(287), + NumberArrayStep: __webpack_require__(288), + QuickSelect: __webpack_require__(289), + Range: __webpack_require__(290), + Remove: __webpack_require__(291), + RemoveAt: __webpack_require__(292), + RemoveBetween: __webpack_require__(293), + RemoveRandomElement: __webpack_require__(294), + Replace: __webpack_require__(295), + RotateLeft: __webpack_require__(62), + RotateRight: __webpack_require__(63), + SafeRange: __webpack_require__(5), + SendToBack: __webpack_require__(296), + SetAll: __webpack_require__(297), + Shuffle: __webpack_require__(64), + SortByDigits: __webpack_require__(298), + SpliceOne: __webpack_require__(13), + StableSort: __webpack_require__(299), + Swap: __webpack_require__(311) }; /***/ }), - -/***/ 4343: -/***/ ((module) => { +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 {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 + * @namespace Phaser.Utils.Array.Matrix */ -var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix) + +module.exports = { + + CheckMatrix: __webpack_require__(27), + MatrixToString: __webpack_require__(263), + ReverseColumns: __webpack_require__(265), + ReverseRows: __webpack_require__(266), + Rotate180: __webpack_require__(267), + RotateLeft: __webpack_require__(268), + RotateMatrix: __webpack_require__(17), + RotateRight: __webpack_require__(269), + Translate: __webpack_require__(270), + TransposeMatrix: __webpack_require__(61) + +}; + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Pad = __webpack_require__(264); +var CheckMatrix = __webpack_require__(27); + +/** + * Generates a string (which you can pass to console.log) from the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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) { - camera.addToRenderList(container); + var str = ''; - var children = container.list; - var childCount = children.length; - - if (childCount === 0) + if (!CheckMatrix(matrix)) { - return; + return str; } - var transformMatrix = container.localTransform; - - if (parentMatrix) + for (var r = 0; r < matrix.length; r++) { - 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); - } - - renderer.pipelines.preBatch(container); - - 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; - - for (var i = 0; i < childCount; i++) - { - var child = children[i]; - - if (!child.willRender(camera)) + for (var c = 0; c < matrix[r].length; c++) { - continue; + var cell = matrix[r][c].toString(); + + if (cell !== 'undefined') + { + str += Pad(cell, 2); + } + else + { + str += '?'; + } + + if (c < matrix[r].length - 1) + { + str += ' |'; + } } - var childAlphaTopLeft; - var childAlphaTopRight; - var childAlphaBottomLeft; - var childAlphaBottomRight; - - if (child.alphaTopLeft !== undefined) + if (r < matrix.length - 1) { - childAlphaTopLeft = child.alphaTopLeft; - childAlphaTopRight = child.alphaTopRight; - childAlphaBottomLeft = child.alphaBottomLeft; - childAlphaBottomRight = child.alphaBottomRight; + 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; + + +/***/ }), +/* 264 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {number} [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; + + +/***/ }), +/* 265 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the columns in the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the rows in the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(17); + +/** + * Rotates the array matrix 180 degrees. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(17); + +/** + * Rotates the array matrix to the left (or 90 degrees) + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(17); + +/** + * Rotates the array matrix to the left (or -90 degrees) + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateLeft = __webpack_require__(62); +var RotateRight = __webpack_require__(63); + +/** + * Translates the given Array Matrix by shifting each column and row the + * amount specified. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.Translate + * @since 3.50.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to translate. + * @param {number} [x=0] - The amount to horizontally translate the matrix by. + * @param {number} [y=0] - The amount to vertically translate the matrix by. + * + * @return {T[][]} The translated matrix. + */ +var TranslateMatrix = function (matrix, x, y) +{ + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + // Vertical translation + + if (y !== 0) + { + if (y < 0) + { + // Shift Up + RotateLeft(matrix, Math.abs(y)); } else { - var childAlpha = child.alpha; - - childAlphaTopLeft = childAlpha; - childAlphaTopRight = childAlpha; - childAlphaBottomLeft = childAlpha; - childAlphaBottomRight = childAlpha; + // Shift Down + RotateRight(matrix, y); } - - 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) ? (children[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, camera, transformMatrix); - - // Restore original values - - child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); - - child.setScrollFactor(childScrollFactorX, childScrollFactorY); - - if (mask) - { - mask.postRenderWebGL(renderer, camera); - } - - renderer.newType = false; } - renderer.pipelines.postBatch(container); + // Horizontal translation + + if (x !== 0) + { + for (var i = 0; i < matrix.length; i++) + { + var row = matrix[i]; + + if (x < 0) + { + RotateLeft(row, Math.abs(x)); + } + else + { + RotateRight(row, x); + } + } + } + + return matrix; }; -module.exports = ContainerWebGLRenderer; +module.exports = TranslateMatrix; /***/ }), - -/***/ 6608: -/***/ ((module) => { +/* 271 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Game Object Added to Scene Event. + * Adds the given item, or array of items, to the array. * - * This event is dispatched when a Game Object is added to a Scene. + * Each item must be unique within the array. * - * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * The array is modified in-place and returned. * - * @event Phaser.GameObjects.Events#ADDED_TO_SCENE - * @since 3.50.0 + * 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. * - * @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'; - - -/***/ }), - -/***/ 4265: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Game Object Destroy Event. + * You can optionally specify a callback to be invoked for each item successfully added to the array. * - * This event is dispatched when a Game Object instance is being destroyed. + * @function Phaser.Utils.Array.Add + * @since 3.4.0 * - * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`. + * @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 {number} [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. * - * @event Phaser.GameObjects.Events#DESTROY - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. - * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. + * @return {array} The input array. */ -module.exports = 'destroy'; - - -/***/ }), - -/***/ 8671: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3420: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 601: -/***/ ((module) => { - -/** - * @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 {number} width - The width of the video. - * @param {number} height - The height of the video. - */ -module.exports = 'created'; - - -/***/ }), - -/***/ 7919: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5241: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3356: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 7513: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5788: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8118: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5529: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4287: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3389: -/***/ ((module, __unused_webpack_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__(6608), - DESTROY: __webpack_require__(4265), - REMOVED_FROM_SCENE: __webpack_require__(8671), - VIDEO_COMPLETE: __webpack_require__(3420), - VIDEO_CREATED: __webpack_require__(601), - VIDEO_ERROR: __webpack_require__(7919), - VIDEO_LOOP: __webpack_require__(5241), - VIDEO_PLAY: __webpack_require__(3356), - VIDEO_SEEKED: __webpack_require__(7513), - VIDEO_SEEKING: __webpack_require__(5788), - VIDEO_STOP: __webpack_require__(8118), - VIDEO_TIMEOUT: __webpack_require__(5529), - VIDEO_UNLOCKED: __webpack_require__(4287) - -}; - - -/***/ }), - -/***/ 1643: -/***/ ((module) => { - -/** - * @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 {number} - * @since 3.19.0 - */ - CIRCLE: 0, - - /** - * An Ellipse Geometry object type. - * - * @name Phaser.Geom.ELLIPSE - * @type {number} - * @since 3.19.0 - */ - ELLIPSE: 1, - - /** - * A Line Geometry object type. - * - * @name Phaser.Geom.LINE - * @type {number} - * @since 3.19.0 - */ - LINE: 2, - - /** - * A Point Geometry object type. - * - * @name Phaser.Geom.POINT - * @type {number} - * @since 3.19.0 - */ - POINT: 3, - - /** - * A Polygon Geometry object type. - * - * @name Phaser.Geom.POLYGON - * @type {number} - * @since 3.19.0 - */ - POLYGON: 4, - - /** - * A Rectangle Geometry object type. - * - * @name Phaser.Geom.RECTANGLE - * @type {number} - * @since 3.19.0 - */ - RECTANGLE: 5, - - /** - * A Triangle Geometry object type. - * - * @name Phaser.Geom.TRIANGLE - * @type {number} - * @since 3.19.0 - */ - TRIANGLE: 6 - -}; - -module.exports = GEOM_CONST; - - -/***/ }), - -/***/ 8881: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(7655); - -/** - * 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) +var Add = function (array, item, limit, callback, context) { - if (out === undefined) { out = new Point(); } + if (context === undefined) { context = array; } - out.x = line.x1 + (line.x2 - line.x1) * position; - out.y = line.y1 + (line.y2 - line.y1) * position; + 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; + + +/***/ }), +/* 272 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted. + * @param {number} [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; + + +/***/ }), +/* 273 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [endIndex] - An optional end index to search to. + * + * @return {number} 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; + + +/***/ }), +/* 275 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index to search from. + * @param {number} 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; + + +/***/ }), +/* 277 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 278 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes an array and flattens it, returning a shallow-copy flattened array. + * + * @function Phaser.Utils.Array.Flatten + * @since 3.60.0 + * + * @param {array} array - The array to flatten. + * @param {array} [output] - An array to hold the results in. + * + * @return {array} The flattened output array. + */ +var Flatten = function (array, output) +{ + if (output === undefined) { output = []; } + + for (var i = 0; i < array.length; i++) + { + if (Array.isArray(array[i])) + { + Flatten(array[i], output); + } + else + { + output.push(array[i]); + } + } + + return output; +}; + +module.exports = Flatten; + + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 281 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex=0] - An optional start index. + * @param {number} [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; + + +/***/ }), +/* 282 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 283 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 284 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 285 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element above another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveAbove + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move above base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveAbove = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex > baseIndex) + { + // item1 is already above item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === array.length - 1) + { + array.push(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveAbove; + + +/***/ }), +/* 286 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element below another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveBelow + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move below base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveBelow = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex < baseIndex) + { + // item1 is already below item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === 0) + { + array.unshift(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveBelow; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RoundAwayFromZero = __webpack_require__(43); + +/** + * 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; + + +/***/ }), +/* 289 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} k - The k-th element index. + * @param {number} [left=0] - The index of the left part of the range. + * @param {number} [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; + + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetValue = __webpack_require__(10); +var Shuffle = __webpack_require__(64); + +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; }; -module.exports = GetPoint; +/** + * 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; /***/ }), - -/***/ 4479: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(4771); -var Point = __webpack_require__(7655); +var SpliceOne = __webpack_require__(13); /** - * Get a number of points along a line's length. + * Removes the given item, or array of items, from the array. * - * Provide a `quantity` to get an exact number of points along the line. + * The array is modified in-place. * - * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when - * providing a `stepRate`. + * You can optionally specify a callback to be invoked for each item successfully removed from the array. * - * @function Phaser.Geom.Line.GetPoints + * @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; + var removed = []; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + removed.push(entry); + + if (callback) + { + callback.call(context, entry); + } + } + + itemLength--; + } + + return removed; +}; + +module.exports = Remove; + + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index to remove from. + * @param {number} 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; + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [start=0] - The array index to start the search from. + * @param {number} [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; + + +/***/ }), +/* 295 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 296 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 298 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Device = __webpack_require__(300); + +/** + * 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); +} + +/** + * 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 = 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) + { + RunPass(array, compare, chk, buffer); + + var tmp = array; + + array = buffer; + + buffer = tmp; + } + + return array; +} + +/** + * 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) + { + 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++]; + } + } + else if (li < r) + { + // Nothing to compare, just flush what's left. + result[i++] = arr[li++]; + } + else if (ri < e) + { + result[i++] = arr[ri++]; + } + 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; } + + // Short-circuit when there's nothing to sort. + if (!array || array.length < 2) + { + return array; + } + + if (Device.features.stableSort) + { + return array.sort(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; +}; + +module.exports = StableSort; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// This singleton is instantiated as soon as Phaser loads, +// before a Phaser.Game instance has even been created. +// Which means all instances of Phaser Games can share it, +// without having to re-poll the device all over again + +/** + * @namespace Phaser.Device + * @since 3.0.0 + */ + +/** + * @typedef {object} Phaser.DeviceConf + * + * @property {Phaser.Device.OS} os - The OS Device functions. + * @property {Phaser.Device.Browser} browser - The Browser Device functions. + * @property {Phaser.Device.Features} features - The Features Device functions. + * @property {Phaser.Device.Input} input - The Input Device functions. + * @property {Phaser.Device.Audio} audio - The Audio Device functions. + * @property {Phaser.Device.Video} video - The Video Device functions. + * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions. + * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions. + */ + +module.exports = { + + os: __webpack_require__(28), + browser: __webpack_require__(18), + features: __webpack_require__(302), + input: __webpack_require__(306), + audio: __webpack_require__(307), + video: __webpack_require__(308), + fullscreen: __webpack_require__(309), + canvasFeatures: __webpack_require__(310) + +}; + + +/***/ }), +/* 301 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(28); +var Browser = __webpack_require__(18); +var CanvasPool = __webpack_require__(65); + +/** + * Determines the features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.features` from within any Scene. + * + * @typedef {object} Phaser.Device.Features + * @since 3.0.0 + * + * @property {boolean} canvas - Is canvas available? + * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap. + * @property {boolean} file - Is file available? + * @property {boolean} fileSystem - Is fileSystem available? + * @property {boolean} getUserMedia - Does the device support the getUserMedia API? + * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays) + * @property {boolean} localStorage - Is localStorage available? + * @property {boolean} pointerLock - Is Pointer Lock available? + * @property {boolean} stableSort - Is Array.sort stable? + * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views? + * @property {boolean} vibration - Does the device support the Vibration API? + * @property {boolean} webGL - Is webGL available? + * @property {boolean} worker - Is worker available? + */ +var Features = { + + canvas: false, + canvasBitBltShift: null, + file: false, + fileSystem: false, + getUserMedia: true, + littleEndian: false, + localStorage: false, + pointerLock: false, + stableSort: false, + support32bit: false, + vibration: false, + webGL: false, + worker: false + +}; + +// Check Little or Big Endian system. +// @author Matt DesLauriers (@mattdesl) +function checkIsLittleEndian () +{ + var a = new ArrayBuffer(4); + var b = new Uint8Array(a); + var c = new Uint32Array(a); + + b[0] = 0xa1; + b[1] = 0xb2; + b[2] = 0xc3; + b[3] = 0xd4; + + if (c[0] === 0xd4c3b2a1) + { + return true; + } + + if (c[0] === 0xa1b2c3d4) + { + return false; + } + else + { + // Could not determine endianness + return null; + } +} + +function init () +{ + if (typeof importScripts === 'function') + { + return Features; + } + + Features.canvas = !!window['CanvasRenderingContext2D']; + + try + { + Features.localStorage = !!localStorage.getItem; + } + catch (error) + { + Features.localStorage = false; + } + + Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; + Features.fileSystem = !!window['requestFileSystem']; + + var isUint8 = false; + + var testWebGL = function () + { + if (window['WebGLRenderingContext']) + { + try + { + var canvas = CanvasPool.createWebGL(this); + + var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); + + var canvas2D = CanvasPool.create2D(this); + + var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true }); + + // Can't be done on a webgl context + var image = ctx2D.createImageData(1, 1); + + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) + isUint8 = image.data instanceof Uint8ClampedArray; + + CanvasPool.remove(canvas); + CanvasPool.remove(canvas2D); + + return !!ctx; + } + catch (e) + { + return false; + } + } + + return false; + }; + + Features.webGL = testWebGL(); + + Features.worker = !!window['Worker']; + + Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document; + + navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia; + + window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL; + + Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL; + + // Older versions of firefox (< 21) apparently claim support but user media does not actually work + if (Browser.firefox && Browser.firefoxVersion < 21) + { + Features.getUserMedia = false; + } + + // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it + // is safer to not try and use the fast copy-over method. + if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome)) + { + Features.canvasBitBltShift = true; + } + + // Known not to work + if (Browser.safari || Browser.mobileSafari) + { + Features.canvasBitBltShift = false; + } + + navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; + + if (navigator.vibrate) + { + Features.vibration = true; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined') + { + Features.littleEndian = checkIsLittleEndian(); + } + + Features.support32bit = ( + typeof ArrayBuffer !== 'undefined' && + typeof Uint8ClampedArray !== 'undefined' && + typeof Int32Array !== 'undefined' && + Features.littleEndian !== null && + isUint8 + ); + + return Features; +} + +module.exports = init(); + + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Global constants. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.60.0-beta.18', + + BlendModes: __webpack_require__(15), + + ScaleModes: __webpack_require__(304), + + /** + * This setting will auto-detect if the browser is capable of suppporting WebGL. + * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer. + * + * @name Phaser.AUTO + * @const + * @type {number} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports + * WebGL or not. + * + * @name Phaser.CANVAS + * @const + * @type {number} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is + * no fallback to Canvas with this setting, so you should trap it and display a suitable + * message to the user. + * + * @name Phaser.WEBGL + * @const + * @type {number} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still + * absolutely relies on the DOM being present and available. This mode is meant for unit testing, + * not for running Phaser on the server, which is something you really shouldn't do. + * + * @name Phaser.HEADLESS + * @const + * @type {number} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {number} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {number} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {number} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {number} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {number} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {number} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Scale Modes. + * + * @namespace Phaser.ScaleModes + * @since 3.0.0 + */ + +var ScaleModes = { + + /** + * Default Scale Mode (Linear). + * + * @name Phaser.ScaleModes.DEFAULT + * @type {number} + * @readonly + * @since 3.0.0 + */ + DEFAULT: 0, + + /** + * Linear Scale Mode. + * + * @name Phaser.ScaleModes.LINEAR + * @type {number} + * @readonly + * @since 3.0.0 + */ + LINEAR: 0, + + /** + * Nearest Scale Mode. + * + * @name Phaser.ScaleModes.NEAREST + * @type {number} + * @readonly + * @since 3.0.0 + */ + NEAREST: 1 + +}; + +module.exports = ScaleModes; + + +/***/ }), +/* 305 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Browser specific prefix, so not going to change between contexts, only between browsers +var prefix = ''; + +/** + * @namespace Phaser.Display.Canvas.Smoothing + * @since 3.0.0 + */ +var Smoothing = function () +{ + /** + * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set. + * + * @function Phaser.Display.Canvas.Smoothing.getPrefix + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check. + * + * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported. + */ + var getPrefix = function (context) + { + var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ]; + + for (var i = 0; i < vendors.length; i++) + { + var s = vendors[i] + 'mageSmoothingEnabled'; + + if (s in context) + { + return s; + } + } + + return null; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.enable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var enable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = true; + } + + return context; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.disable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var disable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = false; + } + + return context; + }; + + /** + * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`. + * Returns null if no smoothing prefix is available. + * + * @function Phaser.Display.Canvas.Smoothing.isEnabled + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check. + * + * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported. + */ + var isEnabled = function (context) + { + return (prefix !== null) ? context[prefix] : null; + }; + + return { + disable: disable, + enable: enable, + getPrefix: getPrefix, + isEnabled: isEnabled + }; + +}; + +module.exports = Smoothing(); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(18); + +/** + * Determines the input support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.input` from within any Scene. + * + * @typedef {object} Phaser.Device.Input + * @since 3.0.0 + * + * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll' + * @property {boolean} gamepads - Is navigator.getGamepads available? + * @property {boolean} mspointer - Is mspointer available? + * @property {boolean} touch - Is touch available? + */ +var Input = { + + gamepads: false, + mspointer: false, + touch: false, + wheelEvent: null + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Input; + } + + if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1)) + { + Input.touch = true; + } + + if (navigator.msPointerEnabled || navigator.pointerEnabled) + { + Input.mspointer = true; + } + + if (navigator.getGamepads) + { + Input.gamepads = true; + } + + // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel + if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window)) + { + // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+ + Input.wheelEvent = 'wheel'; + } + else if ('onmousewheel' in window) + { + // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7. + Input.wheelEvent = 'mousewheel'; + } + else if (Browser.firefox && 'MouseScrollEvent' in window) + { + // FF prior to 17. This should probably be scrubbed. + Input.wheelEvent = 'DOMMouseScroll'; + } + + return Input; +} + +module.exports = init(); + + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(18); + +/** + * Determines the audio playback capabilities of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.audio` from within any Scene. + * + * @typedef {object} Phaser.Device.Audio + * @since 3.0.0 + * + * @property {boolean} audioData - Can this device play HTML Audio tags? + * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files? + * @property {boolean} m4a - Can this device can play m4a files. + * @property {boolean} aac - Can this device can play aac files. + * @property {boolean} flac - Can this device can play flac files. + * @property {boolean} mp3 - Can this device play mp3 files? + * @property {boolean} ogg - Can this device play ogg files? + * @property {boolean} opus - Can this device play opus files? + * @property {boolean} wav - Can this device play wav files? + * @property {boolean} webAudio - Does this device have the Web Audio API? + * @property {boolean} webm - Can this device play webm files? + */ +var Audio = { + + flac: false, + aac: false, + audioData: false, + dolby: false, + m4a: false, + mp3: false, + ogg: false, + opus: false, + wav: false, + webAudio: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Audio; + } + + Audio.audioData = !!(window['Audio']); + + Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']); + + var audioElement = document.createElement('audio'); + var result = !!audioElement.canPlayType; + + try + { + if (result) + { + var CanPlay = function (type1, type2) + { + var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, ''); + + if (type2) + { + return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, '')); + } + else + { + return Boolean(canPlayType1); + } + }; + + // wav Mimetypes accepted: + // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + + Audio.ogg = CanPlay('ogg; codecs="vorbis"'); + Audio.opus = CanPlay('ogg; codecs="opus"', 'opus'); + Audio.mp3 = CanPlay('mpeg'); + Audio.wav = CanPlay('wav'); + Audio.m4a = CanPlay('x-m4a'); + Audio.aac = CanPlay('aac'); + Audio.flac = CanPlay('flac', 'x-flac'); + Audio.webm = CanPlay('webm; codecs="vorbis"'); + + if (audioElement.canPlayType('audio/mp4; codecs="ec-3"') !== '') + { + if (Browser.edge) + { + Audio.dolby = true; + } + else if (Browser.safari && Browser.safariVersion >= 9) + { + if ((/Mac OS X (\d+)_(\d+)/).test(navigator.userAgent)) + { + var major = parseInt(RegExp.$1, 10); + var minor = parseInt(RegExp.$2, 10); + + if ((major === 10 && minor >= 11) || major > 10) + { + Audio.dolby = true; + } + } + } + } + } + } + catch (e) + { + // Nothing to do here + } + + return Audio; +} + +module.exports = init(); + + +/***/ }), +/* 308 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the video support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.video` from within any Scene. + * + * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix. + * + * @typedef {object} Phaser.Device.Video + * @since 3.0.0 + * + * @property {boolean} h264 - Can this device play h264 mp4 video files? + * @property {boolean} hls - Can this device play hls video files? + * @property {boolean} mp4 - Can this device play h264 mp4 video files? + * @property {boolean} m4v - Can this device play m4v (typically mp4) video files? + * @property {boolean} ogg - Can this device play ogg video files? + * @property {boolean} vp9 - Can this device play vp9 video files? + * @property {boolean} webm - Can this device play webm video files? + */ +var Video = { + + h264: false, + hls: false, + mp4: false, + m4v: false, + ogg: false, + vp9: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Video; + } + + var videoElement = document.createElement('video'); + var result = !!videoElement.canPlayType; + var no = /^no$/; + + try + { + if (result) + { + if (videoElement.canPlayType('video/ogg; codecs="theora"').replace(no, '')) + { + Video.ogg = true; + } + + if (videoElement.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(no, '')) + { + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + Video.h264 = true; + Video.mp4 = true; + } + + if (videoElement.canPlayType('video/x-m4v').replace(no, '')) + { + Video.m4v = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp8, vorbis"').replace(no, '')) + { + Video.webm = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp9"').replace(no, '')) + { + Video.vp9 = true; + } + + if (videoElement.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(no, '')) + { + Video.hls = true; + } + } + } + catch (e) + { + // Nothing to do + } + + return Video; +} + +module.exports = init(); + + +/***/ }), +/* 309 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the full screen support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.fullscreen` from within any Scene. + * + * @typedef {object} Phaser.Device.Fullscreen + * @since 3.0.0 + * + * @property {boolean} available - Does the browser support the Full Screen API? + * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode? + * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it. + * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it. + */ +var Fullscreen = { + + available: false, + cancel: '', + keyboard: false, + request: '' + +}; + +/** +* Checks for support of the Full Screen API. +* +* @ignore +*/ +function init () +{ + if (typeof importScripts === 'function') + { + return Fullscreen; + } + + var i; + + var suffix1 = 'Fullscreen'; + var suffix2 = 'FullScreen'; + + var fs = [ + 'request' + suffix1, + 'request' + suffix2, + 'webkitRequest' + suffix1, + 'webkitRequest' + suffix2, + 'msRequest' + suffix1, + 'msRequest' + suffix2, + 'mozRequest' + suffix2, + 'mozRequest' + suffix1 + ]; + + for (i = 0; i < fs.length; i++) + { + if (document.documentElement[fs[i]]) + { + Fullscreen.available = true; + Fullscreen.request = fs[i]; + break; + } + } + + var cfs = [ + 'cancel' + suffix2, + 'exit' + suffix1, + 'webkitCancel' + suffix2, + 'webkitExit' + suffix1, + 'msCancel' + suffix2, + 'msExit' + suffix1, + 'mozCancel' + suffix2, + 'mozExit' + suffix1 + ]; + + if (Fullscreen.available) + { + for (i = 0; i < cfs.length; i++) + { + if (document[cfs[i]]) + { + Fullscreen.cancel = cfs[i]; + break; + } + } + } + + // Keyboard Input? + // Safari 5.1 says it supports fullscreen keyboard, but is lying. + if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\/5\.1(?:\.\d+)? Safari\//).test(navigator.userAgent)) + { + Fullscreen.keyboard = true; + } + + Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } }); + + return Fullscreen; +} + +module.exports = init(); + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(65); + +/** + * Determines the canvas features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.canvasFeatures` from within any Scene. + * + * @typedef {object} Phaser.Device.CanvasFeatures + * @since 3.0.0 + * + * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha. + * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes. + */ +var CanvasFeatures = { + + supportInverseAlpha: false, + supportNewBlendModes: false + +}; + +function checkBlendMode () +{ + var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/'; + var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=='; + + var magenta = new Image(); + + magenta.onload = function () + { + var yellow = new Image(); + + yellow.onload = function () + { + var canvas = CanvasPool.create2D(yellow, 6); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.globalCompositeOperation = 'multiply'; + + context.drawImage(magenta, 0, 0); + context.drawImage(yellow, 2, 0); + + if (!context.getImageData(2, 0, 1, 1)) + { + return false; + } + + var data = context.getImageData(2, 0, 1, 1).data; + + CanvasPool.remove(yellow); + + CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0); + }; + + yellow.src = pngHead + '/wCKxvRF' + pngEnd; + }; + + magenta.src = pngHead + 'AP804Oa6' + pngEnd; + + return false; +} + +function checkInverseAlpha () +{ + var canvas = CanvasPool.create2D(this, 2); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.fillStyle = 'rgba(10, 20, 30, 0.5)'; + + // Draw a single pixel + context.fillRect(0, 0, 1, 1); + + // Get the color values + var s1 = context.getImageData(0, 0, 1, 1); + + if (s1 === null) + { + return false; + } + + // Plot them to x2 + context.putImageData(s1, 1, 0); + + // Get those values + var s2 = context.getImageData(1, 0, 1, 1); + + var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]); + + CanvasPool.remove(this); + + // Compare and return + return result; +} + +function init () +{ + if (typeof importScripts !== 'function' && document !== undefined) + { + CanvasFeatures.supportNewBlendModes = checkBlendMode(); + CanvasFeatures.supportInverseAlpha = checkInverseAlpha(); + } + + return CanvasFeatures; +} + +module.exports = init(); + + +/***/ }), +/* 311 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 array; + } + + 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; + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(313), + AlphaSingle: __webpack_require__(314), + BlendMode: __webpack_require__(315), + ComputedSize: __webpack_require__(51), + Crop: __webpack_require__(316), + Depth: __webpack_require__(52), + Flip: __webpack_require__(53), + FX: __webpack_require__(317), + GetBounds: __webpack_require__(318), + Mask: __webpack_require__(327), + Origin: __webpack_require__(332), + PathFollower: __webpack_require__(333), + Pipeline: __webpack_require__(336), + ScrollFactor: __webpack_require__(54), + Size: __webpack_require__(338), + Texture: __webpack_require__(339), + TextureCrop: __webpack_require__(340), + Tint: __webpack_require__(341), + ToJSON: __webpack_require__(58), + Transform: __webpack_require__(55), + TransformMatrix: __webpack_require__(26), + Visible: __webpack_require__(56) + +}; + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(1); + +// 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; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(1); + +// 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; + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(15); + +/** + * 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 {number} + * @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: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string|number)} + * @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: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + +/***/ }), +/* 316 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 317 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the FX values of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.FX + * @webglOnly + * @since 3.60.0 + */ + +var FX = { + + /** + * The amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @name Phaser.GameObjects.Components.FX#fxPadding + * @type {number} + * @default 0 + * @since 3.60.0 + */ + fxPadding: 0, + + /** + * Sets the amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @method Phaser.GameObjects.Components.FX#setFXPadding + * @webglOnly + * @since 3.60.0 + * + * @param {number} [padding=0] - The amount of padding to add to the texture. + * + * @return {this} This Game Object instance. + */ + setFXPadding: function (padding) + { + if (padding === undefined) { padding = 0; } + + this.fxPadding = padding; + + return this; + }, + + /** + * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `copySprite` method. + * + * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFXCopy + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFXCopy: function () + { + }, + + /** + * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `drawSprite` method. + * + * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFX + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFX: function () + { + } + +}; + +module.exports = FX; + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(29); +var RotateAround = __webpack_require__(42); +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. + * + * @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; + + +/***/ }), +/* 319 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetPoint = __webpack_require__(66); +var Perimeter = __webpack_require__(67); + +/** + * 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.Line} line - The line. - * @param {number} 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. + * @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 {number} 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, or point-like objects, containing the coordinates of the points on the line. + * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle. */ -var GetPoints = function (line, quantity, stepRate, out) +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 = Length(line) / stepRate; + quantity = Perimeter(rectangle) / 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)); + out.push(GetPoint(rectangle, position)); } return out; @@ -26022,51 +44961,21 @@ module.exports = GetPoints; /***/ }), - -/***/ 4771: -/***/ ((module) => { +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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; - - -/***/ }), - -/***/ 284: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var GetPoint = __webpack_require__(8881); -var GetPoints = __webpack_require__(4479); -var GEOM_CONST = __webpack_require__(1643); -var Random = __webpack_require__(3915); -var Vector2 = __webpack_require__(2529); +var Class = __webpack_require__(0); +var GetPoint = __webpack_require__(322); +var GetPoints = __webpack_require__(323); +var GEOM_CONST = __webpack_require__(30); +var Random = __webpack_require__(325); +var Vector2 = __webpack_require__(3); /** * @classdesc @@ -26389,17 +45298,148 @@ module.exports = Line; /***/ }), - -/***/ 3915: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Point = __webpack_require__(7655); +var Point = __webpack_require__(14); + +/** + * 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; + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(324); +var Point = __webpack_require__(14); + +/** + * 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 {number} 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; + + +/***/ }), +/* 324 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(14); /** * Returns a random point on a given Line. @@ -26430,313 +45470,16 @@ module.exports = Random; /***/ }), - -/***/ 7655: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var GEOM_CONST = __webpack_require__(1643); - -/** - * @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 {number} - * @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; - - -/***/ }), - -/***/ 5956: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 716: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Perimeter = __webpack_require__(8073); -var Point = __webpack_require__(7655); - -/** - * 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; - - -/***/ }), - -/***/ 8151: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetPoint = __webpack_require__(716); -var Perimeter = __webpack_require__(8073); - -// 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 {number} 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; - - -/***/ }), - -/***/ 8073: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2161: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(7655); +var Point = __webpack_require__(14); /** * Returns a random point within a Rectangle. @@ -26765,16075 +45508,1809 @@ module.exports = Random; /***/ }), - -/***/ 2150: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var Contains = __webpack_require__(5956); -var GetPoint = __webpack_require__(716); -var GetPoints = __webpack_require__(8151); -var GEOM_CONST = __webpack_require__(1643); -var Line = __webpack_require__(284); -var Random = __webpack_require__(2161); +var BitmapMask = __webpack_require__(328); +var GeometryMask = __webpack_require__(331); /** - * @classdesc - * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + * Provides methods used for getting and setting the mask of a Game Object. * - * @class Rectangle - * @memberof Phaser.Geom - * @constructor + * @namespace Phaser.GameObjects.Components.Mask * @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 {number} - * @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; - }, +var Mask = { /** - * Checks if the given point is inside the Rectangle's bounds. + * The Mask this Game Object is using during render. * - * @method Phaser.Geom.Rectangle#contains + * @name Phaser.GameObjects.Components.Mask#mask + * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} * @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); - }, + mask: null, /** - * 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. + * Sets the mask that this Game Object will use to render with. * - * @method Phaser.Geom.Rectangle#getPoint - * @since 3.0.0 + * 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. * - * @generic {Phaser.Geom.Point} O - [output,$return] + * If a mask is already set on this Game Object it will be immediately replaced. * - * @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. + * 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. * - * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given. + * 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. */ - getPoint: function (position, output) + setMask: function (mask) { - 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 {number} 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; + this.mask = mask; return this; }, /** - * Resets the position, width, and height of the Rectangle to 0. + * Clears the mask that this Game Object was using. * - * @method Phaser.Geom.Rectangle#setEmpty - * @since 3.0.0 + * @method Phaser.GameObjects.Components.Mask#clearMask + * @since 3.6.2 * - * @return {this} This Rectangle object. + * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? + * + * @return {this} This Game Object instance. */ - setEmpty: function () + clearMask: function (destroyMask) { - return this.setTo(0, 0, 0, 0); - }, + if (destroyMask === undefined) { destroyMask = false; } - /** - * 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; } + if (destroyMask && this.mask) + { + this.mask.destroy(); + } - this.x = x; - this.y = y; + this.mask = null; return this; }, /** - * Sets the width and height of the Rectangle. + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one, or a Dynamic Texture. * - * @method Phaser.Geom.Rectangle#setSize - * @since 3.0.0 + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. * - * @param {number} width - The width to set the Rectangle to. - * @param {number} [height=width] - The height to set the Rectangle to. + * 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. * - * @return {this} This Rectangle object. + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable texture-based Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @generic {Phaser.GameObjects.GameObject} G + * @generic {Phaser.Textures.DynamicTexture} T + * @genericUse {(G|T|null)} [maskObject] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. */ - setSize: function (width, height) + createBitmapMask: function (maskObject, x, y, texture, frame) { - 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 () + if (maskObject === undefined && (this.texture || this.shader || this.geom)) { - return this.x; - }, - - set: function (value) - { - if (value >= this.right) - { - this.width = 0; - } - else - { - this.width = this.right - value; - } - - this.x = value; + // eslint-disable-next-line consistent-this + maskObject = this; } + return new BitmapMask(this.scene, maskObject, x, y, texture, frame); }, /** - * 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. + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. * - * @name Phaser.Geom.Rectangle#right - * @type {number} - * @since 3.0.0 + * 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 + * + * @generic {Phaser.GameObjects.Graphics} G + * @generic {Phaser.GameObjects.Shape} S + * @genericUse {(G|S)} [graphics] + * + * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask. + * + * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. */ - right: { - - get: function () + createGeometryMask: function (graphics) + { + if (graphics === undefined && (this.type === 'Graphics' || this.geom)) { - 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); + // eslint-disable-next-line consistent-this + graphics = this; } + return new GeometryMask(this.scene, graphics); } -}); - -module.exports = Rectangle; - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Rectangle = __webpack_require__(2150); - -/** - * 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; +module.exports = Mask; /***/ }), - -/***/ 1593: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var Events = __webpack_require__(1179); -var GetFastValue = __webpack_require__(4597); -var GetURL = __webpack_require__(5593); -var MergeXHRSettings = __webpack_require__(7410); -var XHRLoader = __webpack_require__(5874); -var XHRSettings = __webpack_require__(707); +var Class = __webpack_require__(0); +var GameObjectFactory = __webpack_require__(329); /** * @classdesc - * The base File class used by all File Types that the Loader can support. - * 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. + * 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. * - * @class File - * @memberof Phaser.Loader + * A Bitmap Mask can use any Game Object or Dynamic Texture 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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.Loader.LoaderPlugin} loader - The Loader that is going to load this File. - * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type. + * @param {Phaser.Scene} scene - The Scene to which this mask is being added. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. */ -var File = new Class({ +var BitmapMask = new Class({ initialize: - function File (loader, fileConfig) + function BitmapMask (scene, maskObject, x, y, texture, frame) { + if (!maskObject) + { + maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false }); + } + /** - * A reference to the Loader that is going to load this file. + * The Game Object that is used as the mask. Must use a texture, such as a Sprite. * - * @name Phaser.Loader.File#loader - * @type {Phaser.Loader.LoaderPlugin} + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} * @since 3.0.0 */ - this.loader = loader; + this.bitmapMask = maskObject; /** - * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. + * Whether to invert the masks alpha. * - * @name Phaser.Loader.File#cache - * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)} - * @since 3.7.0 - */ - this.cache = GetFastValue(fileConfig, 'cache', false); - - /** - * The file type string (image, json, etc) for sorting within the Loader. + * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. * - * @name Phaser.Loader.File#type - * @type {string} - * @since 3.0.0 - */ - this.type = GetFastValue(fileConfig, 'type', false); - - /** - * Unique cache key (unique within its file type) + * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible. * - * @name Phaser.Loader.File#key - * @type {string} - * @since 3.0.0 - */ - this.key = GetFastValue(fileConfig, 'key', false); - - var loadKey = this.key; - - if (loader.prefix && loader.prefix !== '') - { - this.key = loader.prefix + loadKey; - } - - if (!this.type || !this.key) - { - throw new Error('Invalid Loader.' + this.type + ' key'); - } - - var url = GetFastValue(fileConfig, 'url'); - - if (url === undefined) - { - url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); - } - else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) - { - url = loader.path + url; - } - - /** - * The URL of the file, not including baseURL. - * - * 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 {object|string} - * @since 3.0.0 - */ - this.url = url; - - /** - * The final URL this file will load from, including baseURL and path. - * Set automatically when the Loader calls 'load' on this file. - * - * @name Phaser.Loader.File#src - * @type {string} - * @since 3.0.0 - */ - this.src = ''; - - /** - * The merged XHRSettings for this file. - * - * @name Phaser.Loader.File#xhrSettings - * @type {Phaser.Types.Loader.XHRSettingsObject} - * @since 3.0.0 - */ - this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined)); - - if (GetFastValue(fileConfig, 'xhrSettings', false)) - { - this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {})); - } - - /** - * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. - * - * @name Phaser.Loader.File#xhrLoader - * @type {?XMLHttpRequest} - * @since 3.0.0 - */ - this.xhrLoader = null; - - /** - * The current state of the file. One of the FILE_CONST values. - * - * @name Phaser.Loader.File#state - * @type {number} - * @since 3.0.0 - */ - this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING; - - /** - * The total size of this file. - * Set by onProgress and only if loading via XHR. - * - * @name Phaser.Loader.File#bytesTotal - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.bytesTotal = 0; - - /** - * Updated as the file loads. - * Only set if loading via XHR. - * - * @name Phaser.Loader.File#bytesLoaded - * @type {number} - * @default -1 - * @since 3.0.0 - */ - this.bytesLoaded = -1; - - /** - * A percentage value between 0 and 1 indicating how much of this file has loaded. - * Only set if loading via XHR. - * - * @name Phaser.Loader.File#percentComplete - * @type {number} - * @default -1 - * @since 3.0.0 - */ - this.percentComplete = -1; - - /** - * For CORs based loading. - * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) - * - * @name Phaser.Loader.File#crossOrigin - * @type {(string|undefined)} - * @since 3.0.0 - */ - this.crossOrigin = undefined; - - /** - * The processed file data, stored here after the file has loaded. - * - * @name Phaser.Loader.File#data - * @type {*} - * @since 3.0.0 - */ - this.data = undefined; - - /** - * A config object that can be used by file types to store transitional data. - * - * @name Phaser.Loader.File#config - * @type {*} - * @since 3.0.0 - */ - this.config = GetFastValue(fileConfig, 'config', {}); - - /** - * If this is a multipart file, i.e. an atlas and its json together, then this is a reference - * to the parent MultiFile. Set and used internally by the Loader or specific file types. - * - * @name Phaser.Loader.File#multiFile - * @type {?Phaser.Loader.MultiFile} - * @since 3.7.0 - */ - this.multiFile; - - /** - * Does this file have an associated linked file? Such as an image and a normal map. - * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't - * actually bound by data, where-as a linkFile is. - * - * @name Phaser.Loader.File#linkFile - * @type {?Phaser.Loader.File} - * @since 3.7.0 - */ - this.linkFile; - }, - - /** - * Links this File with another, so they depend upon each other for loading and processing. - * - * @method Phaser.Loader.File#setLink - * @since 3.7.0 - * - * @param {Phaser.Loader.File} fileB - The file to link to this one. - */ - setLink: function (fileB) - { - this.linkFile = fileB; - - fileB.linkFile = this; - }, - - /** - * Resets the XHRLoader instance this file is using. - * - * @method Phaser.Loader.File#resetXHR - * @since 3.0.0 - */ - resetXHR: function () - { - if (this.xhrLoader) - { - this.xhrLoader.onload = undefined; - this.xhrLoader.onerror = undefined; - this.xhrLoader.onprogress = undefined; - } - }, - - /** - * Called by the Loader, starts the actual file downloading. - * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. - * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. - * - * @method Phaser.Loader.File#load - * @since 3.0.0 - */ - load: function () - { - if (this.state === CONST.FILE_POPULATED) - { - // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL - this.loader.nextFile(this, true); - } - else - { - this.state = CONST.FILE_LOADING; - - this.src = GetURL(this, this.loader.baseURL); - - if (this.src.indexOf('data:') === 0) - { - console.warn('Local data URIs are not supported: ' + this.key); - } - else - { - // 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 - - this.xhrLoader = XHRLoader(this, this.loader.xhr); - } - } - }, - - /** - * Called when the file finishes loading, is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onLoad - * @since 3.0.0 - * - * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. - * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load. - */ - onLoad: function (xhr, event) - { - // On iOS, Capacitor often runs on a capacitor:// protocol, meaning local files are served from capacitor:// rather than file:// - // See: https://github.com/photonstorm/phaser/issues/5685 - - var isLocalFile = xhr.responseURL && (xhr.responseURL.indexOf('file://') === 0 || xhr.responseURL.indexOf('capacitor://') === 0); - - var localFileOk = (isLocalFile && event.target.status === 0); - - var success = !(event.target && event.target.status !== 200) || localFileOk; - - // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called. - if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) - { - success = false; - } - - this.state = CONST.FILE_LOADED; - - this.resetXHR(); - - this.loader.nextFile(this, success); - }, - - /** - * Called if the file errors while loading, is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onError - * @since 3.0.0 - * - * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. - * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. - */ - onError: function () - { - this.resetXHR(); - - this.loader.nextFile(this, false); - }, - - /** - * Called during the file load progress. Is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onProgress - * @fires Phaser.Loader.Events#FILE_PROGRESS - * @since 3.0.0 - * - * @param {ProgressEvent} event - The DOM ProgressEvent. - */ - onProgress: function (event) - { - if (event.lengthComputable) - { - this.bytesLoaded = event.loaded; - this.bytesTotal = event.total; - - this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1); - - this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete); - } - }, - - /** - * Usually overridden by the FileTypes and is called by Loader.nextFile. - * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. - * - * @method Phaser.Loader.File#onProcess - * @since 3.0.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.onProcessComplete(); - }, - - /** - * Called when the File has completed processing. - * Checks on the state of its multifile, if set. - * - * @method Phaser.Loader.File#onProcessComplete - * @since 3.7.0 - */ - onProcessComplete: function () - { - this.state = CONST.FILE_COMPLETE; - - if (this.multiFile) - { - this.multiFile.onFileComplete(this); - } - - this.loader.fileProcessComplete(this); - }, - - /** - * Called when the File has completed processing but it generated an error. - * Checks on the state of its multifile, if set. - * - * @method Phaser.Loader.File#onProcessError - * @since 3.7.0 - */ - onProcessError: function () - { - // eslint-disable-next-line no-console - console.error('Failed to process file: %s "%s"', this.type, this.key); - - this.state = CONST.FILE_ERRORED; - - if (this.multiFile) - { - this.multiFile.onFileFailed(this); - } - - this.loader.fileProcessComplete(this); - }, - - /** - * Checks if a key matching the one used by this file exists in the target Cache or not. - * This is called automatically by the LoaderPlugin to decide if the file can be safely - * loaded or will conflict. - * - * @method Phaser.Loader.File#hasCacheConflict - * @since 3.7.0 - * - * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`. - */ - hasCacheConflict: function () - { - return (this.cache && this.cache.exists(this.key)); - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * This method is often overridden by specific file types. - * - * @method Phaser.Loader.File#addToCache - * @since 3.7.0 - */ - addToCache: function () - { - if (this.cache && this.data) - { - this.cache.add(this.key, this.data); - } - }, - - /** - * Called once the file has been added to its cache and is now ready for deletion from the Loader. - * It will emit a `filecomplete` event from the LoaderPlugin. - * - * @method Phaser.Loader.File#pendingDestroy - * @fires Phaser.Loader.Events#FILE_COMPLETE - * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.7.0 - */ - pendingDestroy: function (data) - { - if (this.state === CONST.FILE_PENDING_DESTROY) - { - return; - } - - if (data === undefined) { data = this.data; } - - var key = this.key; - var type = this.type; - - this.loader.emit(Events.FILE_COMPLETE, key, type, data); - this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); - - this.loader.flagForRemoval(this); - - this.state = CONST.FILE_PENDING_DESTROY; - }, - - /** - * Destroy this File and any references it holds. - * - * @method Phaser.Loader.File#destroy - * @since 3.7.0 - */ - destroy: function () - { - this.loader = null; - this.cache = null; - this.xhrSettings = null; - this.multiFile = null; - this.linkFile = null; - this.data = null; - } - -}); - -/** - * Static method for creating object URL using URL API and setting it as image 'src' attribute. - * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. - * - * @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. - */ -File.createObjectURL = function (image, blob, defaultType) -{ - if (typeof URL === 'function') - { - image.src = URL.createObjectURL(blob); - } - else - { - var reader = new FileReader(); - - reader.onload = function () - { - image.removeAttribute('crossOrigin'); - image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1]; - }; - - reader.onerror = image.onerror; - - reader.readAsDataURL(blob); - } -}; - -/** - * Static method for releasing an existing object URL which was previously created - * by calling {@link File#createObjectURL} method. - * - * @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) -{ - if (typeof URL === 'function') - { - URL.revokeObjectURL(image.src); - } -}; - -module.exports = File; - - -/***/ }), - -/***/ 9845: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var types = {}; - -/** - * @namespace Phaser.Loader.FileTypesManager - */ - -var FileTypesManager = { - - /** - * Static method called when a LoaderPlugin is created. - * - * Loops through the local types object and injects all of them as - * properties into the LoaderPlugin instance. - * - * @method Phaser.Loader.FileTypesManager.install - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. - */ - install: function (loader) - { - for (var key in types) - { - loader[key] = types[key]; - } - }, - - /** - * Static method called directly by the File Types. - * - * The key is a reference to the function used to load the files via the Loader, i.e. `image`. - * - * @method Phaser.Loader.FileTypesManager.register - * @since 3.0.0 - * - * @param {string} key - The key that will be used as the method name in the LoaderPlugin. - * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. - */ - register: function (key, factoryFunction) - { - types[key] = factoryFunction; - }, - - /** - * Removed all associated file types. - * - * @method Phaser.Loader.FileTypesManager.destroy - * @since 3.0.0 - */ - destroy: function () - { - types = {}; - } - -}; - -module.exports = FileTypesManager; - - -/***/ }), - -/***/ 5593: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Given a File and a baseURL value this returns the URL the File will use to download from. - * - * @function Phaser.Loader.GetURL - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - The File object. - * @param {string} baseURL - A default base URL. - * - * @return {string} The URL the File will use. - */ -var GetURL = function (file, baseURL) -{ - if (!file.url) - { - return false; - } - - if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) - { - return file.url; - } - else - { - return baseURL + file.url; - } -}; - -module.exports = GetURL; - - -/***/ }), - -/***/ 7410: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Extend = __webpack_require__(1030); -var XHRSettings = __webpack_require__(707); - -/** - * Takes two XHRSettings Objects and creates a new XHRSettings object from them. - * - * The new object is seeded by the values given in the global settings, but any setting in - * the local object overrides the global ones. - * - * @function Phaser.Loader.MergeXHRSettings - * @since 3.0.0 - * - * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object. - * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object. - * - * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object. - */ -var MergeXHRSettings = function (global, local) -{ - var output = (global === undefined) ? XHRSettings() : Extend({}, global); - - if (local) - { - for (var setting in local) - { - if (local[setting] !== undefined) - { - output[setting] = local[setting]; - } - } - } - - return output; -}; - -module.exports = MergeXHRSettings; - - -/***/ }), - -/***/ 3137: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var Events = __webpack_require__(1179); - -/** - * @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) - { - var finalFiles = []; - - // Clean out any potential 'null' or 'undefined' file entries - files.forEach(function (file) - { - if (file) - { - finalFiles.push(file); - } - }); - - /** - * 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 {number} - * @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 = finalFiles; - - /** - * The current state of the file. One of the FILE_CONST values. - * - * @name Phaser.Loader.MultiFile#state - * @type {number} - * @since 3.60.0 - */ - this.state = CONST.FILE_PENDING; - - /** - * The completion status of this MultiFile. - * - * @name Phaser.Loader.MultiFile#complete + * @name Phaser.Display.Masks.BitmapMask#invertAlpha * @type {boolean} - * @default false - * @since 3.7.0 + * @since 3.1.2 */ - this.complete = false; + this.invertAlpha = false; /** - * The number of files to load. + * Is this mask a stencil mask? This is false by default and should not be changed. * - * @name Phaser.Loader.MultiFile#pending - * @type {number} - * @since 3.7.0 + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 */ - - this.pending = finalFiles.length; - - /** - * The number of files that failed to load. - * - * @name Phaser.Loader.MultiFile#failed - * @type {number} - * @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 < finalFiles.length; i++) - { - finalFiles[i].multiFile = this; - } + this.isStencil = false; }, /** - * Checks if this MultiFile is ready to process its children or not. + * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use. * - * @method Phaser.Loader.MultiFile#isReadyToProcess + * If a Game Object it must have a texture, such as a Sprite. + * + * You can update the source of the mask as often as you like. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite. + */ + setBitmap: function (maskObject) + { + this.bitmapMask = maskObject; + }, + + /** + * 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.BITMAPMASK_PIPELINE.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. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget. + */ + postRenderWebGL: function (renderer, camera, renderTarget) + { + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget); + }, + + /** + * 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 - * - * @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++; - - // eslint-disable-next-line no-console - console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); - } - }, - - /** - * Called once all children of this multi file have been added to their caches and is now - * ready for deletion from the Loader. - * - * It will emit a `filecomplete` event from the LoaderPlugin. - * - * @method Phaser.Loader.MultiFile#pendingDestroy - * @fires Phaser.Loader.Events#FILE_COMPLETE - * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.60.0 - */ - pendingDestroy: function () - { - if (this.state === CONST.FILE_PENDING_DESTROY) - { - return; - } - - var key = this.key; - var type = this.type; - - this.loader.emit(Events.FILE_COMPLETE, key, type); - this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); - - this.loader.flagForRemoval(this); - - for (var i = 0; i < this.files.length; i++) - { - this.files[i].pendingDestroy(); - } - - this.state = CONST.FILE_PENDING_DESTROY; - }, - - /** - * Destroy this Multi File and any references it holds. - * - * @method Phaser.Loader.MultiFile#destroy - * @since 3.60.0 */ destroy: function () { - this.loader = null; - this.files = null; - this.config = null; - } - -}); - -module.exports = MultiFile; - - -/***/ }), - -/***/ 5874: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MergeXHRSettings = __webpack_require__(7410); - -/** - * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings - * and starts the download of it. It uses the Files own XHRSettings and merges them - * with the global XHRSettings object to set the xhr values before download. - * - * @function Phaser.Loader.XHRLoader - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - The File to download. - * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object. - * - * @return {XMLHttpRequest} The XHR object. - */ -var XHRLoader = function (file, globalXHRSettings) -{ - var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings); - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', file.src, config.async, config.user, config.password); - - 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); - } - - if (config.requestedWith) - { - xhr.setRequestHeader('X-Requested-With', config.requestedWith); - } - - if (config.overrideMimeType) - { - 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); - xhr.onerror = file.onError.bind(file, xhr); - xhr.onprogress = file.onProgress.bind(file); - - // This is the only standard method, the ones above are browser additions (maybe not universal?) - // xhr.onreadystatechange - - xhr.send(); - - return xhr; -}; - -module.exports = XHRLoader; - - -/***/ }), - -/***/ 707: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Creates an XHRSettings Object with default values. - * - * @function Phaser.Loader.XHRSettings - * @since 3.0.0 - * - * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'. - * @param {boolean} [async=true] - Should the XHR request use async or not? - * @param {string} [user=''] - Optional username for the XHR request. - * @param {string} [password=''] - Optional password for the XHR request. - * @param {number} [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, 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. - // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". - - return { - - // Ignored by the Loader, only used by File. - responseType: responseType, - - async: async, - - // credentials - user: user, - password: password, - - // timeout in ms (0 = no timeout) - timeout: timeout, - - // setRequestHeader - headers: undefined, - header: undefined, - headerValue: undefined, - requestedWith: false, - - // overrideMimeType - overrideMimeType: undefined, - - // withCredentials - withCredentials: withCredentials - - }; -}; - -module.exports = XHRSettings; - - -/***/ }), - -/***/ 4359: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var FILE_CONST = { - - /** - * The Loader is idle. - * - * @name Phaser.Loader.LOADER_IDLE - * @type {number} - * @since 3.0.0 - */ - LOADER_IDLE: 0, - - /** - * The Loader is actively loading. - * - * @name Phaser.Loader.LOADER_LOADING - * @type {number} - * @since 3.0.0 - */ - LOADER_LOADING: 1, - - /** - * The Loader is processing files is has loaded. - * - * @name Phaser.Loader.LOADER_PROCESSING - * @type {number} - * @since 3.0.0 - */ - LOADER_PROCESSING: 2, - - /** - * The Loader has completed loading and processing. - * - * @name Phaser.Loader.LOADER_COMPLETE - * @type {number} - * @since 3.0.0 - */ - LOADER_COMPLETE: 3, - - /** - * The Loader is shutting down. - * - * @name Phaser.Loader.LOADER_SHUTDOWN - * @type {number} - * @since 3.0.0 - */ - LOADER_SHUTDOWN: 4, - - /** - * The Loader has been destroyed. - * - * @name Phaser.Loader.LOADER_DESTROYED - * @type {number} - * @since 3.0.0 - */ - LOADER_DESTROYED: 5, - - /** - * File is in the load queue but not yet started. - * - * @name Phaser.Loader.FILE_PENDING - * @type {number} - * @since 3.0.0 - */ - FILE_PENDING: 10, - - /** - * File has been started to load by the loader (onLoad called) - * - * @name Phaser.Loader.FILE_LOADING - * @type {number} - * @since 3.0.0 - */ - FILE_LOADING: 11, - - /** - * File has loaded successfully, awaiting processing. - * - * @name Phaser.Loader.FILE_LOADED - * @type {number} - * @since 3.0.0 - */ - FILE_LOADED: 12, - - /** - * File failed to load. - * - * @name Phaser.Loader.FILE_FAILED - * @type {number} - * @since 3.0.0 - */ - FILE_FAILED: 13, - - /** - * File is being processed (onProcess callback) - * - * @name Phaser.Loader.FILE_PROCESSING - * @type {number} - * @since 3.0.0 - */ - FILE_PROCESSING: 14, - - /** - * The File has errored somehow during processing. - * - * @name Phaser.Loader.FILE_ERRORED - * @type {number} - * @since 3.0.0 - */ - FILE_ERRORED: 16, - - /** - * File has finished processing. - * - * @name Phaser.Loader.FILE_COMPLETE - * @type {number} - * @since 3.0.0 - */ - FILE_COMPLETE: 17, - - /** - * File has been destroyed. - * - * @name Phaser.Loader.FILE_DESTROYED - * @type {number} - * @since 3.0.0 - */ - FILE_DESTROYED: 18, - - /** - * File was populated from local data and doesn't need an HTTP request. - * - * @name Phaser.Loader.FILE_POPULATED - * @type {number} - * @since 3.0.0 - */ - FILE_POPULATED: 19, - - /** - * File is pending being destroyed. - * - * @name Phaser.Loader.FILE_PENDING_DESTROY - * @type {number} - * @since 3.60.0 - */ - FILE_PENDING_DESTROY: 20 - -}; - -module.exports = FILE_CONST; - - -/***/ }), - -/***/ 462: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Add File Event. - * - * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. - * - * Listen to it from a Scene using: `this.load.on('addfile', listener)`. - * - * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. - * - * @event Phaser.Loader.Events#ADD - * @since 3.0.0 - * - * @param {string} key - The unique key of the file that was added to the Loader. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader. - */ -module.exports = 'addfile'; - - -/***/ }), - -/***/ 7297: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Complete Event. - * - * This event is dispatched when the Loader has fully processed everything in the load queue. - * By this point every loaded file will now be in its associated cache and ready for use. - * - * Listen to it from a Scene using: `this.load.on('complete', listener)`. - * - * @event Phaser.Loader.Events#COMPLETE - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - * @param {number} totalComplete - The total number of files that successfully loaded. - * @param {number} totalFailed - The total number of files that failed to load. - */ -module.exports = 'complete'; - - -/***/ }), - -/***/ 8660: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. - * - * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. - * - * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. - * - * 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. - * - * @event Phaser.Loader.Events#FILE_COMPLETE - * @since 3.0.0 - * - * @param {string} key - The key of the file that just loaded and finished processing. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. - */ -module.exports = 'filecomplete'; - - -/***/ }), - -/***/ 6484: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * - * It uses a special dynamic event name constructed from the key and type of the file. - * - * For example, if you have loaded an `image` with a key of `monster`, you can listen for it - * using the following: - * - * ```javascript - * this.load.on('filecomplete-image-monster', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a texture `atlas` with a key of `Level1`: - * - * ```javascript - * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: - * - * ```javascript - * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. - * - * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. - * - * @event Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.0.0 - * - * @param {string} key - The key of the file that just loaded and finished processing. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. - */ -module.exports = 'filecomplete-'; - - -/***/ }), - -/***/ 7972: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Error Event. - * - * This event is dispatched by the Loader Plugin when a file fails to load. - * - * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. - * - * @event Phaser.Loader.Events#FILE_LOAD_ERROR - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which errored during load. - */ -module.exports = 'loaderror'; - - -/***/ }), - -/***/ 1906: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Event. - * - * This event is dispatched by the Loader Plugin when a file finishes loading, - * but _before_ it is processed and added to the internal Phaser caches. - * - * Listen to it from a Scene using: `this.load.on('load', listener)`. - * - * @event Phaser.Loader.Events#FILE_LOAD - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. - */ -module.exports = 'load'; - - -/***/ }), - -/***/ 1441: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Progress Event. - * - * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and - * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. - * - * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. - * - * @event Phaser.Loader.Events#FILE_PROGRESS - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which errored during load. - * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. - */ -module.exports = 'fileprogress'; - - -/***/ }), - -/***/ 1072: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Post Process Event. - * - * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. - * It is dispatched before the internal lists are cleared and each File is destroyed. - * - * Use this hook to perform any last minute processing of files that can only happen once the - * Loader has completed, but prior to it emitting the `complete` event. - * - * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. - * - * @event Phaser.Loader.Events#POST_PROCESS - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - */ -module.exports = 'postprocess'; - - -/***/ }), - -/***/ 1927: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Progress Event. - * - * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. - * - * Listen to it from a Scene using: `this.load.on('progress', listener)`. - * - * @event Phaser.Loader.Events#PROGRESS - * @since 3.0.0 - * - * @param {number} progress - The current progress of the load. A value between 0 and 1. - */ -module.exports = 'progress'; - - -/***/ }), - -/***/ 6597: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Start Event. - * - * This event is dispatched when the Loader starts running. At this point load progress is zero. - * - * This event is dispatched even if there aren't any files in the load queue. - * - * Listen to it from a Scene using: `this.load.on('start', listener)`. - * - * @event Phaser.Loader.Events#START - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - */ -module.exports = 'start'; - - -/***/ }), - -/***/ 1179: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Loader.Events - */ - -module.exports = { - - ADD: __webpack_require__(462), - COMPLETE: __webpack_require__(7297), - FILE_COMPLETE: __webpack_require__(8660), - FILE_KEY_COMPLETE: __webpack_require__(6484), - FILE_LOAD_ERROR: __webpack_require__(7972), - FILE_LOAD: __webpack_require__(1906), - FILE_PROGRESS: __webpack_require__(1441), - POST_PROCESS: __webpack_require__(1072), - PROGRESS: __webpack_require__(1927), - START: __webpack_require__(6597) - -}; - - -/***/ }), - -/***/ 6732: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var IsPlainObject = __webpack_require__(2482); -var GetURL = __webpack_require__(5593); - -/** - * @classdesc - * 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 - * @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.ImageFileConfig)} key - The key to use for this file, or a file configuration object. - * @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] - Extra XHR Settings specifically for this file. - * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets. - */ -var ImageFile = new Class({ - - Extends: File, - - initialize: - - function ImageFile (loader, key, url, xhrSettings, frameConfig) - { - var extension = 'png'; - var normalMapURL; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - normalMapURL = GetFastValue(config, 'normalMap'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - frameConfig = GetFastValue(config, 'frameConfig'); - } - - if (Array.isArray(url)) - { - normalMapURL = url[1]; - url = url[0]; - } - - var fileConfig = { - type: 'image', - cache: loader.textureManager, - extension: extension, - responseType: 'blob', - key: key, - url: url, - xhrSettings: xhrSettings, - config: frameConfig - }; - - File.call(this, loader, fileConfig); - - // Do we have a normal map to load as well? - if (normalMapURL) - { - var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig); - - normalMap.type = 'normalMap'; - - this.setLink(normalMap); - - loader.addFile(normalMap); - } - - this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; - - if (this.useImageElementLoad) - { - this.load = this.loadImage; - this.onProcess = this.onProcessImage; - } - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.ImageFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.data = new Image(); - - this.data.crossOrigin = this.crossOrigin; - - var _this = this; - - this.data.onload = function () - { - File.revokeObjectURL(_this.data); - - _this.onProcessComplete(); - }; - - this.data.onerror = function () - { - File.revokeObjectURL(_this.data); - - _this.onProcessError(); - }; - - File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); - }, - - /** - * Handles image load processing. - * - * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage - * @private - * @since 3.60.0 - */ - onProcessImage: function () - { - var result = this.state; - - this.state = CONST.FILE_PROCESSING; - - if (result === CONST.FILE_LOADED) - { - this.onProcessComplete(); - } - else - { - this.onProcessError(); - } - }, - - /** - * Loads the image using either XHR or an Image tag. - * - * @method Phaser.Loader.FileTypes.ImageFile#loadImage - * @private - * @since 3.60.0 - */ - loadImage: function () - { - this.state = CONST.FILE_LOADING; - - this.src = GetURL(this, this.loader.baseURL); - - if (this.src.indexOf('data:') === 0) - { - console.warn('Local data URIs are not supported: ' + this.key); - } - else - { - this.data = new Image(); - - this.data.crossOrigin = this.crossOrigin; - - var _this = this; - - this.data.onload = function () - { - _this.state = CONST.FILE_LOADED; - - _this.loader.nextFile(_this, true); - }; - - this.data.onerror = function () - { - _this.loader.nextFile(_this, false); - }; - - this.data.src = this.src; - } - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * - * @method Phaser.Loader.FileTypes.ImageFile#addToCache - * @since 3.7.0 - */ - addToCache: function () - { - var linkFile = this.linkFile; - - if (linkFile && linkFile.state === CONST.FILE_COMPLETE) - { - if (this.type === 'image') - { - this.cache.addImage(this.key, this.data, linkFile.data); - } - else - { - this.cache.addImage(linkFile.key, linkFile.data, this.data); - } - } - else if (!linkFile) - { - this.cache.addImage(this.key, this.data); - } + this.bitmapMask = null; } }); /** - * 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 () - * { - * this.load.image('logo', 'images/phaserLogo.png'); - * } - * ``` - * - * 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. - * - * 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. - * - * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. - * 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 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', - * url: 'images/AtariLogo.png' - * }); - * ``` - * - * 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 ... - * this.add.image(x, y, 'logo'); - * ``` - * - * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the image from the Texture Manager. - * - * 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 "alien" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * 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', - * url: 'images/AtariLogo.png', - * normalMap: 'images/AtariLogo-n.png' - * }); - * ``` - * - * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. - * Normal maps are a WebGL only feature. - * - * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. - * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images - * via the Image tag instead. - * - * Note: The ability to load this type of file will only be available if the Image 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#image - * @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 {this} The Loader instance. - */ -FileTypesManager.register('image', function (key, url, 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 ImageFile(this, key[i])); - } - } - else - { - this.addFile(new ImageFile(this, key, url, xhrSettings)); - } - - return this; -}); - -module.exports = ImageFile; - - -/***/ }), - -/***/ 704: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var GetValue = __webpack_require__(5851); -var IsPlainObject = __webpack_require__(2482); - -/** - * @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; - - try - { - var json = JSON.parse(this.xhrLoader.responseText); - } - catch (e) - { - this.onProcessError(); - - throw e; - } - - 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; - - -/***/ }), - -/***/ 1192: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var IsPlainObject = __webpack_require__(2482); - -/** - * @classdesc - * A single Text File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. - * - * @class TextFile - * @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.TextFileConfig)} 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 `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - */ -var TextFile = new Class({ - - Extends: File, - - initialize: - - function TextFile (loader, key, url, xhrSettings) - { - var type = 'text'; - var extension = 'txt'; - var cache = loader.cacheManager.text; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - type = GetFastValue(config, 'type', type); - cache = GetFastValue(config, 'cache', cache); - } - - var fileConfig = { - type: type, - cache: cache, - extension: extension, - responseType: 'text', - key: key, - url: url, - xhrSettings: xhrSettings - }; - - File.call(this, loader, fileConfig); - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.TextFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.data = this.xhrLoader.responseText; - - this.onProcessComplete(); - } - -}); - -/** - * Adds a Text file, or array of Text 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.text('story', 'files/IntroStory.txt'); - * } - * ``` - * - * 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 Text Cache upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Text 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 Text Cache first, before loading a new one. - * - * Instead of passing arguments you can pass a configuration object, such as: - * - * ```javascript - * this.load.text({ - * key: 'story', - * url: 'files/IntroStory.txt' - * }); - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details. - * - * Once the file has finished loading you can access it from its Cache using its key: - * - * ```javascript - * this.load.text('story', 'files/IntroStory.txt'); - * // and later in your game ... - * var data = this.cache.text.get('story'); - * ``` - * - * 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 `Story` the final key will be `LEVEL1.Story` and - * this is what you would use to retrieve the text from the Text 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 "story" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * Note: The ability to load this type of file will only be available if the Text 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#text - * @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 {this} The Loader instance. - */ -FileTypesManager.register('text', function (key, url, 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 TextFile(this, key[i])); - } - } - else - { - this.addFile(new TextFile(this, key, url, xhrSettings)); - } - - return this; -}); - -module.exports = TextFile; - - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 785: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Factorial = __webpack_require__(3916); - -/** - * 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; - - -/***/ }), - -/***/ 7025: -/***/ ((module) => { - -/** - * @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 {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The random integer. - */ -var Between = function (min, max) -{ - return Math.floor(Math.random() * (max - min + 1) + min); -}; - -module.exports = Between; - - -/***/ }), - -/***/ 48: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5035: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2915: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7149: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * Convert the given angle from degrees, to the equivalent angle in radians. - * - * @function Phaser.Math.DegToRad - * @since 3.0.0 - * - * @param {number} 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; - - -/***/ }), - -/***/ 2975: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2107: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); -var Class = __webpack_require__(7473); -var Matrix4 = __webpack_require__(9652); -var NOOP = __webpack_require__(1984); - -var tempMatrix = new Matrix4(); - -/** - * @classdesc - * - * @class Euler - * @memberof Phaser.Math - * @constructor - * @since 3.50.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - */ -var Euler = new Class({ - - initialize: - - function Euler (x, y, z, order) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (z === undefined) { z = 0; } - if (order === undefined) { order = Euler.DefaultOrder; } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this.onChangeCallback = NOOP; - }, - - x: { - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - - this.onChangeCallback(this); - } - }, - - y: { - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - - this.onChangeCallback(this); - } - }, - - z: { - get: function () - { - return this._z; - }, - - set: function (value) - { - this._z = value; - - this.onChangeCallback(this); - } - }, - - order: { - get: function () - { - return this._order; - }, - - set: function (value) - { - this._order = value; - - this.onChangeCallback(this); - } - }, - - set: function (x, y, z, order) - { - if (order === undefined) { order = this._order; } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this.onChangeCallback(this); - - return this; - }, - - copy: function (euler) - { - return this.set(euler.x, euler.y, euler.z, euler.order); - }, - - setFromQuaternion: function (quaternion, order, update) - { - if (order === undefined) { order = this._order; } - if (update === undefined) { update = false; } - - tempMatrix.fromQuat(quaternion); - - return this.setFromRotationMatrix(tempMatrix, order, update); - }, - - setFromRotationMatrix: function (matrix, order, update) - { - if (order === undefined) { order = this._order; } - if (update === undefined) { update = false; } - - var elements = matrix.val; - - // Upper 3x3 of matrix is un-scaled rotation matrix - var m11 = elements[0]; - var m12 = elements[4]; - var m13 = elements[8]; - var m21 = elements[1]; - var m22 = elements[5]; - var m23 = elements[9]; - var m31 = elements[2]; - var m32 = elements[6]; - var m33 = elements[10]; - - var x = 0; - var y = 0; - var z = 0; - var epsilon = 0.99999; - - switch (order) - { - case 'XYZ': - { - y = Math.asin(Clamp(m13, -1, 1)); - - if (Math.abs(m13) < epsilon) - { - x = Math.atan2(-m23, m33); - z = Math.atan2(-m12, m11); - } - else - { - x = Math.atan2(m32, m22); - } - - break; - } - - case 'YXZ': - { - x = Math.asin(-Clamp(m23, -1, 1)); - - if (Math.abs(m23) < epsilon) - { - y = Math.atan2(m13, m33); - z = Math.atan2(m21, m22); - } - else - { - y = Math.atan2(-m31, m11); - } - - break; - } - - case 'ZXY': - { - x = Math.asin(Clamp(m32, -1, 1)); - - if (Math.abs(m32) < epsilon) - { - y = Math.atan2(-m31, m33); - z = Math.atan2(-m12, m22); - } - else - { - z = Math.atan2(m21, m11); - } - - break; - } - - case 'ZYX': - { - y = Math.asin(-Clamp(m31, -1, 1)); - - if (Math.abs(m31) < epsilon) - { - x = Math.atan2(m32, m33); - z = Math.atan2(m21, m11); - } - else - { - z = Math.atan2(-m12, m22); - } - - break; - } - - case 'YZX': - { - z = Math.asin(Clamp(m21, -1, 1)); - - if (Math.abs(m21) < epsilon) - { - x = Math.atan2(-m23, m22); - y = Math.atan2(-m31, m11); - } - else - { - y = Math.atan2(m13, m33); - } - - break; - } - - case 'XZY': - { - z = Math.asin(-Clamp(m12, -1, 1)); - - if (Math.abs(m12) < epsilon) - { - x = Math.atan2(m32, m22); - y = Math.atan2(m13, m11); - } - else - { - x = Math.atan2(-m23, m33); - } - - break; - } - } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - if (update) - { - this.onChangeCallback(this); - } - - return this; - } - -}); - -Euler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ]; - -Euler.DefaultOrder = 'XYZ'; - -module.exports = Euler; - - -/***/ }), - -/***/ 3916: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 104: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4941: -/***/ ((module) => { - -/** - * @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 {number} [place=0] - The place to round to. - * @param {number} [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; - - -/***/ }), - -/***/ 1555: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -/** - * 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 + min; -}; - -module.exports = FromPercent; - - -/***/ }), - -/***/ 5005: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 3702: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8820: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1743: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3416: -/***/ ((module) => { - -/** - * @author Greg McLean - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Interpolates two given Vectors and returns a new Vector between them. - * - * Does not modify either of the passed Vectors. - * - * @function Phaser.Math.LinearXY + * 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, or Dynamic Texture, 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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. + * + * @method Phaser.GameObjects.GameObjectFactory#bitmapMask * @since 3.60.0 * - * @param {Phaser.Math.Vector2} vector1 - Starting vector - * @param {Phaser.Math.Vector2} vector2 - Ending vector - * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. * - * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created. */ -var LinearXY = function (vector1, vector2, t) +GameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame) { - if (t === undefined) { t = 0; } - - return vector1.clone().lerp(vector2, t); -}; - -module.exports = LinearXY; - - -/***/ }), - -/***/ 2149: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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; - } - + return new BitmapMask(this.scene, maskObject, x, y, key, frame); }); -module.exports = Matrix3; +module.exports = BitmapMask; /***/ }), - -/***/ 9652: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var Vector3 = __webpack_require__(5689); - -/** - * @ignore - */ -var EPSILON = 0.000001; +var Class = __webpack_require__(0); +var PluginCache = __webpack_require__(330); +var SceneEvents = __webpack_require__(23); /** * @classdesc - * A four-dimensional matrix. + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. * - * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji - * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. * - * @class Matrix4 - * @memberof Phaser.Math + * @class GameObjectFactory + * @memberof Phaser.GameObjects * @constructor * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from. + * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. */ -var Matrix4 = new Class({ +var GameObjectFactory = new Class({ initialize: - function Matrix4 (m) + function GameObjectFactory (scene) { /** - * The matrix values. + * The Scene to which this Game Object Factory belongs. * - * @name Phaser.Math.Matrix4#val - * @type {Float32Array} - * @since 3.0.0 - */ - this.val = new Float32Array(16); - - if (m) - { - // Assume Matrix4 with val: - this.copy(m); - } - else - { - // Default to identity - this.identity(); - } - }, - - /** - * Make a clone of this Matrix4. - * - * @method Phaser.Math.Matrix4#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix4} A clone of this Matrix4. - */ - clone: function () - { - return new Matrix4(this); - }, - - /** - * This method is an alias for `Matrix4.copy`. - * - * @method Phaser.Math.Matrix4#set - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from. - * - * @return {this} This Matrix4. - */ - set: function (src) - { - return this.copy(src); - }, - - /** - * Sets all values of this Matrix4. - * - * @method Phaser.Math.Matrix4#setValues - * @since 3.50.0 - * - * @param {number} m00 - The m00 value. - * @param {number} m01 - The m01 value. - * @param {number} m02 - The m02 value. - * @param {number} m03 - The m03 value. - * @param {number} m10 - The m10 value. - * @param {number} m11 - The m11 value. - * @param {number} m12 - The m12 value. - * @param {number} m13 - The m13 value. - * @param {number} m20 - The m20 value. - * @param {number} m21 - The m21 value. - * @param {number} m22 - The m22 value. - * @param {number} m23 - The m23 value. - * @param {number} m30 - The m30 value. - * @param {number} m31 - The m31 value. - * @param {number} m32 - The m32 value. - * @param {number} m33 - The m33 value. - * - * @return {this} This Matrix4 instance. - */ - setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) - { - var out = this.val; - - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - - return this; - }, - - /** - * Copy the values of a given Matrix into this Matrix. - * - * @method Phaser.Math.Matrix4#copy - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from. - * - * @return {this} This Matrix4. - */ - copy: function (src) - { - var a = src.val; - - return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - }, - - /** - * Set the values of this Matrix from the given array. - * - * @method Phaser.Math.Matrix4#fromArray - * @since 3.0.0 - * - * @param {number[]} a - The array to copy the values from. Must have at least 16 elements. - * - * @return {this} This Matrix4. - */ - fromArray: function (a) - { - return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - }, - - /** - * Reset this Matrix. - * - * Sets all values to `0`. - * - * @method Phaser.Math.Matrix4#zero - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix4} This Matrix4. - */ - zero: function () - { - return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - }, - - /** - * Generates a transform matrix based on the given position, scale and rotation. - * - * @method Phaser.Math.Matrix4#transform - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} position - The position vector. - * @param {Phaser.Math.Vector3} scale - The scale vector. - * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion. - * - * @return {this} This Matrix4. - */ - transform: function (position, scale, rotation) - { - var rotMatrix = _tempMat1.fromQuat(rotation); - - var rm = rotMatrix.val; - - var sx = scale.x; - var sy = scale.y; - var sz = scale.z; - - return this.setValues( - rm[0] * sx, - rm[1] * sx, - rm[2] * sx, - 0, - - rm[4] * sy, - rm[5] * sy, - rm[6] * sy, - 0, - - rm[8] * sz, - rm[9] * sz, - rm[10] * sz, - 0, - - position.x, - position.y, - position.z, - 1 - ); - }, - - /** - * Set the `x`, `y` and `z` values of this Matrix. - * - * @method Phaser.Math.Matrix4#xyz - * @since 3.0.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {number} z - The z value. - * - * @return {this} This Matrix4. - */ - xyz: function (x, y, z) - { - this.identity(); - - var out = this.val; - - out[12] = x; - out[13] = y; - out[14] = z; - - return this; - }, - - /** - * Set the scaling values of this Matrix. - * - * @method Phaser.Math.Matrix4#scaling - * @since 3.0.0 - * - * @param {number} x - The x scaling value. - * @param {number} y - The y scaling value. - * @param {number} z - The z scaling value. - * - * @return {this} This Matrix4. - */ - scaling: function (x, y, z) - { - this.zero(); - - var out = this.val; - - out[0] = x; - out[5] = y; - out[10] = z; - out[15] = 1; - - return this; - }, - - /** - * Reset this Matrix to an identity (default) matrix. - * - * @method Phaser.Math.Matrix4#identity - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - identity: function () - { - return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - }, - - /** - * Transpose this Matrix. - * - * @method Phaser.Math.Matrix4#transpose - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - transpose: function () - { - var a = this.val; - - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a12 = a[6]; - var a13 = a[7]; - var a23 = a[11]; - - a[1] = a[4]; - a[2] = a[8]; - a[3] = a[12]; - a[4] = a01; - a[6] = a[9]; - a[7] = a[13]; - a[8] = a02; - a[9] = a12; - a[11] = a[14]; - a[12] = a03; - a[13] = a13; - a[14] = a23; - - return this; - }, - - /** - * Copies the given Matrix4 into this Matrix and then inverses it. - * - * @method Phaser.Math.Matrix4#getInverse - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4. - * - * @return {this} This Matrix4. - */ - getInverse: function (m) - { - this.copy(m); - - return this.invert(); - }, - - /** - * Invert this Matrix. - * - * @method Phaser.Math.Matrix4#invert - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - invert: function () - { - var a = 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 this; - } - - det = 1 / det; - - return this.setValues( - (a11 * b11 - a12 * b10 + a13 * b09) * det, - (a02 * b10 - a01 * b11 - a03 * b09) * det, - (a31 * b05 - a32 * b04 + a33 * b03) * det, - (a22 * b04 - a21 * b05 - a23 * b03) * det, - (a12 * b08 - a10 * b11 - a13 * b07) * det, - (a00 * b11 - a02 * b08 + a03 * b07) * det, - (a32 * b02 - a30 * b05 - a33 * b01) * det, - (a20 * b05 - a22 * b02 + a23 * b01) * det, - (a10 * b10 - a11 * b08 + a13 * b06) * det, - (a01 * b08 - a00 * b10 - a03 * b06) * det, - (a30 * b04 - a31 * b02 + a33 * b00) * det, - (a21 * b02 - a20 * b04 - a23 * b00) * det, - (a11 * b07 - a10 * b09 - a12 * b06) * det, - (a00 * b09 - a01 * b07 + a02 * b06) * det, - (a31 * b01 - a30 * b03 - a32 * b00) * det, - (a20 * b03 - a21 * b01 + a22 * b00) * det - ); - }, - - /** - * Calculate the adjoint, or adjugate, of this Matrix. - * - * @method Phaser.Math.Matrix4#adjoint - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - adjoint: function () - { - var a = 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]; - - return this.setValues( - (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)), - -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)), - (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)), - -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)), - -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)), - (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)), - -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)), - (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)), - (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)), - -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)), - (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)), - -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)), - -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)), - (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)), - -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)), - (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)) - ); - }, - - /** - * Calculate the determinant of this Matrix. - * - * @method Phaser.Math.Matrix4#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 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 - return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * @method Phaser.Math.Matrix4#multiply - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by. - * - * @return {this} This Matrix4. - */ - multiply: function (src) - { - var a = 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 b = src.val; - - // Cache only the current line of the second matrix - var b0 = b[0]; - var b1 = b[1]; - var b2 = b[2]; - var b3 = b[3]; - - a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[4]; - b1 = b[5]; - b2 = b[6]; - b3 = b[7]; - - a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[8]; - b1 = b[9]; - b2 = b[10]; - b3 = b[11]; - - a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[12]; - b1 = b[13]; - b2 = b[14]; - b3 = b[15]; - - a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - return this; - }, - - /** - * 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 - The source Matrix4 that this Matrix4 is multiplied by. - * - * @return {this} This Matrix4. - */ - multiplyLocal: function (src) - { - var a = this.val; - var b = src.val; - - return this.setValues( - a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12], - a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13], - a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14], - a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15], - - a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12], - a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13], - a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14], - a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15], - - a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12], - a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13], - a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14], - a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15], - - a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12], - a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13], - a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14], - a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15] - ); - }, - - /** - * Multiplies the given Matrix4 object with this Matrix. - * - * This is the same as calling `multiplyMatrices(m, this)`. - * - * @method Phaser.Math.Matrix4#premultiply - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one. - * - * @return {this} This Matrix4. - */ - premultiply: function (m) - { - return this.multiplyMatrices(m, this); - }, - - /** - * Multiplies the two given Matrix4 objects and stores the results in this Matrix. - * - * @method Phaser.Math.Matrix4#multiplyMatrices - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply. - * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply. - * - * @return {this} This Matrix4. - */ - multiplyMatrices: function (a, b) - { - var am = a.val; - var bm = b.val; - - var a11 = am[0]; - var a12 = am[4]; - var a13 = am[8]; - var a14 = am[12]; - var a21 = am[1]; - var a22 = am[5]; - var a23 = am[9]; - var a24 = am[13]; - var a31 = am[2]; - var a32 = am[6]; - var a33 = am[10]; - var a34 = am[14]; - var a41 = am[3]; - var a42 = am[7]; - var a43 = am[11]; - var a44 = am[15]; - - var b11 = bm[0]; - var b12 = bm[4]; - var b13 = bm[8]; - var b14 = bm[12]; - var b21 = bm[1]; - var b22 = bm[5]; - var b23 = bm[9]; - var b24 = bm[13]; - var b31 = bm[2]; - var b32 = bm[6]; - var b33 = bm[10]; - var b34 = bm[14]; - var b41 = bm[3]; - var b42 = bm[7]; - var b43 = bm[11]; - var b44 = bm[15]; - - return this.setValues( - a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41, - a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41, - a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41, - a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41, - a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42, - a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42, - a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42, - a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42, - a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43, - a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43, - a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43, - a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43, - a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44, - a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44, - a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44, - a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44 - ); - }, - - /** - * Translate this Matrix using the given Vector. - * - * @method Phaser.Math.Matrix4#translate - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. - * - * @return {this} This Matrix4. - */ - translate: function (v) - { - return this.translateXYZ(v.x, v.y, v.z); - }, - - /** - * 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 {this} 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. - * - * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. - * - * @method Phaser.Math.Matrix4#scale - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. - * - * @return {this} This Matrix4. - */ - scale: function (v) - { - return this.scaleXYZ(v.x, v.y, v.z); - }, - - /** - * 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 {this} 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. - * - * @method Phaser.Math.Matrix4#makeRotationAxis - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis. - * @param {number} angle - The rotation angle in radians. - * - * @return {this} This Matrix4. - */ - makeRotationAxis: function (axis, angle) - { - // Based on http://www.gamedev.net/reference/articles/article1199.asp - - var c = Math.cos(angle); - var s = Math.sin(angle); - var t = 1 - c; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var tx = t * x; - var ty = t * y; - - return this.setValues( - tx * x + c, tx * y - s * z, tx * z + s * y, 0, - tx * y + s * z, ty * y + c, ty * z - s * x, 0, - tx * z - s * y, ty * z + s * x, t * z * z + c, 0, - 0, 0, 0, 1 - ); - }, - - /** - * Apply a rotation transformation to this Matrix. - * - * @method Phaser.Math.Matrix4#rotate - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * @param {Phaser.Math.Vector3} axis - The axis to rotate upon. - * - * @return {this} This Matrix4. - */ - rotate: function (rad, axis) - { - var a = this.val; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var len = Math.sqrt(x * x + y * y + z * z); - - if (Math.abs(len) < EPSILON) - { - return this; - } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - - var s = Math.sin(rad); - var c = Math.cos(rad); - var t = 1 - c; - - 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]; - - // Construct the elements of the rotation matrix - var b00 = x * x * t + c; - var b01 = y * x * t + z * s; - var b02 = z * x * t - y * s; - - var b10 = x * y * t - z * s; - var b11 = y * y * t + c; - var b12 = z * y * t + x * s; - - var b20 = x * z * t + y * s; - var b21 = y * z * t - x * s; - var b22 = z * z * t + c; - - // Perform rotation-specific matrix multiplication - return this.setValues( - a00 * b00 + a10 * b01 + a20 * b02, - a01 * b00 + a11 * b01 + a21 * b02, - a02 * b00 + a12 * b01 + a22 * b02, - a03 * b00 + a13 * b01 + a23 * b02, - a00 * b10 + a10 * b11 + a20 * b12, - a01 * b10 + a11 * b11 + a21 * b12, - a02 * b10 + a12 * b11 + a22 * b12, - a03 * b10 + a13 * b11 + a23 * b12, - a00 * b20 + a10 * b21 + a20 * b22, - a01 * b20 + a11 * b21 + a21 * b22, - a02 * b20 + a12 * b21 + a22 * b22, - a03 * b20 + a13 * b21 + a23 * b22, - a30, a31, a32, a33 - ); - }, - - /** - * Rotate this matrix on its X axis. - * - * @method Phaser.Math.Matrix4#rotateX - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * - * @return {this} This Matrix4. - */ - rotateX: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - 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]; - - // Perform axis-specific matrix multiplication - a[4] = a10 * c + a20 * s; - a[5] = a11 * c + a21 * s; - a[6] = a12 * c + a22 * s; - a[7] = a13 * c + a23 * s; - a[8] = a20 * c - a10 * s; - a[9] = a21 * c - a11 * s; - a[10] = a22 * c - a12 * s; - a[11] = a23 * c - a13 * s; - - return this; - }, - - /** - * Rotate this matrix on its Y axis. - * - * @method Phaser.Math.Matrix4#rotateY - * @since 3.0.0 - * - * @param {number} rad - The angle to rotate by, in radians. - * - * @return {this} This Matrix4. - */ - rotateY: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - // Perform axis-specific matrix multiplication - a[0] = a00 * c - a20 * s; - a[1] = a01 * c - a21 * s; - a[2] = a02 * c - a22 * s; - a[3] = a03 * c - a23 * s; - a[8] = a00 * s + a20 * c; - a[9] = a01 * s + a21 * c; - a[10] = a02 * s + a22 * c; - a[11] = a03 * s + a23 * c; - - return this; - }, - - /** - * Rotate this matrix on its Z axis. - * - * @method Phaser.Math.Matrix4#rotateZ - * @since 3.0.0 - * - * @param {number} rad - The angle to rotate by, in radians. - * - * @return {this} This Matrix4. - */ - rotateZ: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - 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]; - - // Perform axis-specific matrix multiplication - a[0] = a00 * c + a10 * s; - a[1] = a01 * c + a11 * s; - a[2] = a02 * c + a12 * s; - a[3] = a03 * c + a13 * s; - a[4] = a10 * c - a00 * s; - a[5] = a11 * c - a01 * s; - a[6] = a12 * c - a02 * s; - a[7] = a13 * c - a03 * s; - - return this; - }, - - /** - * Set the values of this Matrix from the given rotation Quaternion and translation Vector. - * - * @method Phaser.Math.Matrix4#fromRotationTranslation - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from. - * @param {Phaser.Math.Vector3} v - The Vector to set translation from. - * - * @return {this} This Matrix4. - */ - fromRotationTranslation: function (q, v) - { - // Quaternion math - 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; - - return this.setValues( - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - v.x, - v.y, - v.z, - 1 - ); - }, - - /** - * Set the values of this Matrix from the given Quaternion. - * - * @method Phaser.Math.Matrix4#fromQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. - * - * @return {this} This Matrix4. - */ - 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; - - return this.setValues( - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - 0, - 0, - 0, - 1 - ); - }, - - /** - * Generate a frustum matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#frustum - * @since 3.0.0 - * - * @param {number} left - The left bound of the frustum. - * @param {number} right - The right bound of the frustum. - * @param {number} bottom - The bottom bound of the frustum. - * @param {number} top - The top bound of the frustum. - * @param {number} near - The near bound of the frustum. - * @param {number} far - The far bound of the frustum. - * - * @return {this} This Matrix4. - */ - frustum: function (left, right, bottom, top, near, far) - { - var rl = 1 / (right - left); - var tb = 1 / (top - bottom); - var nf = 1 / (near - far); - - return this.setValues( - (near * 2) * rl, - 0, - 0, - 0, - - 0, - (near * 2) * tb, - 0, - 0, - - (right + left) * rl, - (top + bottom) * tb, - (far + near) * nf, - -1, - - 0, - 0, - (far * near * 2) * nf, - 0 - ); - }, - - /** - * Generate a perspective projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#perspective - * @since 3.0.0 - * - * @param {number} fovy - Vertical field of view in radians - * @param {number} aspect - Aspect ratio. Typically viewport width /height. - * @param {number} near - Near bound of the frustum. - * @param {number} far - Far bound of the frustum. - * - * @return {this} This Matrix4. - */ - perspective: function (fovy, aspect, near, far) - { - var f = 1.0 / Math.tan(fovy / 2); - var nf = 1 / (near - far); - - return this.setValues( - f / aspect, - 0, - 0, - 0, - - 0, - f, - 0, - 0, - - 0, - 0, - (far + near) * nf, - -1, - - 0, - 0, - (2 * far * near) * nf, - 0 - ); - }, - - /** - * Generate a perspective projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#perspectiveLH - * @since 3.0.0 - * - * @param {number} width - The width of the frustum. - * @param {number} height - The height of the frustum. - * @param {number} near - Near bound of the frustum. - * @param {number} far - Far bound of the frustum. - * - * @return {this} This Matrix4. - */ - perspectiveLH: function (width, height, near, far) - { - return this.setValues( - (2 * near) / width, - 0, - 0, - 0, - - 0, - (2 * near) / height, - 0, - 0, - - 0, - 0, - -far / (near - far), - 1, - - 0, - 0, - (near * far) / (near - far), - 0 - ); - }, - - /** - * Generate an orthogonal projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#ortho - * @since 3.0.0 - * - * @param {number} left - The left bound of the frustum. - * @param {number} right - The right bound of the frustum. - * @param {number} bottom - The bottom bound of the frustum. - * @param {number} top - The top bound of the frustum. - * @param {number} near - The near bound of the frustum. - * @param {number} far - The far bound of the frustum. - * - * @return {this} This Matrix4. - */ - ortho: function (left, right, bottom, top, near, far) - { - var lr = left - right; - var bt = bottom - top; - var nf = near - far; - - // Avoid division by zero - lr = (lr === 0) ? lr : 1 / lr; - bt = (bt === 0) ? bt : 1 / bt; - nf = (nf === 0) ? nf : 1 / nf; - - return this.setValues( - -2 * lr, - 0, - 0, - 0, - - 0, - -2 * bt, - 0, - 0, - - 0, - 0, - 2 * nf, - 0, - - (left + right) * lr, - (top + bottom) * bt, - (far + near) * nf, - 1 - ); - }, - - /** - * Generate a right-handed look-at matrix with the given eye position, target and up axis. - * - * @method Phaser.Math.Matrix4#lookAtRH - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} eye - Position of the viewer. - * @param {Phaser.Math.Vector3} target - Point the viewer is looking at. - * @param {Phaser.Math.Vector3} up - vec3 pointing up. - * - * @return {this} This Matrix4. - */ - lookAtRH: function (eye, target, up) - { - var m = this.val; - - _z.subVectors(eye, target); - - if (_z.getLengthSquared() === 0) - { - // eye and target are in the same position - _z.z = 1; - } - - _z.normalize(); - _x.crossVectors(up, _z); - - if (_x.getLengthSquared() === 0) - { - // up and z are parallel - - if (Math.abs(up.z) === 1) - { - _z.x += 0.0001; - } - else - { - _z.z += 0.0001; - } - - _z.normalize(); - _x.crossVectors(up, _z); - } - - _x.normalize(); - _y.crossVectors(_z, _x); - - m[0] = _x.x; - m[1] = _x.y; - m[2] = _x.z; - m[4] = _y.x; - m[5] = _y.y; - m[6] = _y.z; - m[8] = _z.x; - m[9] = _z.y; - m[10] = _z.z; - - return this; - }, - - /** - * Generate a look-at matrix with the given eye position, focal point, and up axis. - * - * @method Phaser.Math.Matrix4#lookAt - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} eye - Position of the viewer - * @param {Phaser.Math.Vector3} center - Point the viewer is looking at - * @param {Phaser.Math.Vector3} up - vec3 pointing up. - * - * @return {this} This Matrix4. - */ - lookAt: function (eye, center, up) - { - var eyex = eye.x; - var eyey = eye.y; - var eyez = eye.z; - - var upx = up.x; - var upy = up.y; - var upz = up.z; - - var centerx = center.x; - var centery = center.y; - var centerz = center.z; - - if (Math.abs(eyex - centerx) < EPSILON && - Math.abs(eyey - centery) < EPSILON && - Math.abs(eyez - centerz) < EPSILON) - { - return this.identity(); - } - - var z0 = eyex - centerx; - var z1 = eyey - centery; - var z2 = eyez - centerz; - - var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); - - z0 *= len; - z1 *= len; - z2 *= len; - - var x0 = upy * z2 - upz * z1; - var x1 = upz * z0 - upx * z2; - var x2 = upx * z1 - upy * z0; - - len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); - - if (!len) - { - x0 = 0; - x1 = 0; - x2 = 0; - } - else - { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; - } - - var y0 = z1 * x2 - z2 * x1; - var y1 = z2 * x0 - z0 * x2; - var y2 = z0 * x1 - z1 * x0; - - len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); - - if (!len) - { - y0 = 0; - y1 = 0; - y2 = 0; - } - else - { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; - } - - return this.setValues( - x0, - y0, - z0, - 0, - - x1, - y1, - z1, - 0, - - x2, - y2, - z2, - 0, - - -(x0 * eyex + x1 * eyey + x2 * eyez), - -(y0 * eyex + y1 * eyey + y2 * eyez), - -(z0 * eyex + z1 * eyey + z2 * eyez), - 1 - ); - }, - - /** - * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. - * - * @method Phaser.Math.Matrix4#yawPitchRoll - * @since 3.0.0 - * - * @param {number} yaw - The yaw value. - * @param {number} pitch - The pitch value. - * @param {number} roll - The roll value. - * - * @return {this} This Matrix4. - */ - yawPitchRoll: function (yaw, pitch, roll) - { - this.zero(); - _tempMat1.zero(); - _tempMat2.zero(); - - var m0 = this.val; - var m1 = _tempMat1.val; - var m2 = _tempMat2.val; - - // Rotate Z - var s = Math.sin(roll); - var c = Math.cos(roll); - - m0[10] = 1; - m0[15] = 1; - m0[0] = c; - m0[1] = s; - m0[4] = -s; - m0[5] = c; - - // Rotate X - s = Math.sin(pitch); - c = Math.cos(pitch); - - m1[0] = 1; - m1[15] = 1; - m1[5] = c; - m1[10] = c; - m1[9] = -s; - m1[6] = s; - - // Rotate Y - s = Math.sin(yaw); - c = Math.cos(yaw); - - m2[5] = 1; - m2[15] = 1; - m2[0] = c; - m2[2] = -s; - m2[8] = s; - m2[10] = c; - - this.multiplyLocal(_tempMat1); - this.multiplyLocal(_tempMat2); - - return this; - }, - - /** - * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. - * - * @method Phaser.Math.Matrix4#setWorldMatrix - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix. - * @param {Phaser.Math.Vector3} position - The position of the world matrix. - * @param {Phaser.Math.Vector3} scale - The scale of the world matrix. - * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix. - * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix. - * - * @return {this} This Matrix4. - */ - setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix) - { - this.yawPitchRoll(rotation.y, rotation.x, rotation.z); - - _tempMat1.scaling(scale.x, scale.y, scale.z); - _tempMat2.xyz(position.x, position.y, position.z); - - this.multiplyLocal(_tempMat1); - this.multiplyLocal(_tempMat2); - - if (viewMatrix) - { - this.multiplyLocal(viewMatrix); - } - - if (projectionMatrix) - { - this.multiplyLocal(projectionMatrix); - } - - return this; - }, - - /** - * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4. - * - * @method Phaser.Math.Matrix4#multiplyToMat4 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one. - * @param {Phaser.Math.Matrix4} out - The receiving Matrix. - * - * @return {Phaser.Math.Matrix4} This `out` Matrix4. - */ - multiplyToMat4: function (src, out) - { - var a = this.val; - var b = src.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 = b[0]; - var b01 = b[1]; - var b02 = b[2]; - var b03 = b[3]; - var b10 = b[4]; - var b11 = b[5]; - var b12 = b[6]; - var b13 = b[7]; - var b20 = b[8]; - var b21 = b[9]; - var b22 = b[10]; - var b23 = b[11]; - var b30 = b[12]; - var b31 = b[13]; - var b32 = b[14]; - var b33 = b[15]; - - return out.setValues( - b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, - b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31, - b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32, - b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33, - - b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, - b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, - b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, - b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, - - b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, - b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, - b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, - b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, - - b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, - b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, - b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, - b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 - ); - }, - - /** - * Takes the rotation and position vectors and builds this Matrix4 from them. - * - * @method Phaser.Math.Matrix4#fromRotationXYTranslation - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} rotation - The rotation vector. - * @param {Phaser.Math.Vector3} position - The position vector. - * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`) - * - * @return {this} This Matrix4. - */ - fromRotationXYTranslation: function (rotation, position, translateFirst) - { - var x = position.x; - var y = position.y; - var z = position.z; - - var sx = Math.sin(rotation.x); - var cx = Math.cos(rotation.x); - - var sy = Math.sin(rotation.y); - var cy = Math.cos(rotation.y); - - var a30 = x; - var a31 = y; - var a32 = z; - - // Rotate X - - var b21 = -sx; - - // Rotate Y - - var c01 = 0 - b21 * sy; - - var c02 = 0 - cx * sy; - - var c21 = b21 * cy; - - var c22 = cx * cy; - - // Translate - if (!translateFirst) - { - // a30 = cy * x + 0 * y + sy * z; - a30 = cy * x + sy * z; - a31 = c01 * x + cx * y + c21 * z; - a32 = c02 * x + sx * y + c22 * z; - } - - return this.setValues( - cy, - c01, - c02, - 0, - 0, - cx, - sx, - 0, - sy, - c21, - c22, - 0, - a30, - a31, - a32, - 1 - ); - }, - - /** - * Returns the maximum axis scale from this Matrix4. - * - * @method Phaser.Math.Matrix4#getMaxScaleOnAxis - * @since 3.50.0 - * - * @return {number} The maximum axis scale. - */ - getMaxScaleOnAxis: function () - { - var m = this.val; - - var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2]; - var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6]; - var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10]; - - return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); - } - -}); - -/** - * @ignore - */ -var _tempMat1 = new Matrix4(); - -/** - * @ignore - */ -var _tempMat2 = new Matrix4(); - -/** - * @ignore - */ -var _x = new Vector3(); - -/** - * @ignore - */ -var _y = new Vector3(); - -/** - * @ignore - */ -var _z = new Vector3(); - -module.exports = Matrix4; - - -/***/ }), - -/***/ 3733: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 44: -/***/ ((module) => { - -/** - * @author Vladislav Forsh - * @copyright 2021 RoboWhale - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate the median of the given values. The values are sorted and the middle value is returned. - * In case of an even number of values, the average of the two middle values is returned. - * - * @function Phaser.Math.Median - * @since 3.54.0 - * - * @param {number[]} values - The values to average. - * - * @return {number} The median value. - */ -var Median = function (values) -{ - var valuesNum = values.length; - if (valuesNum === 0) - { - return 0; - } - - values.sort(function (a, b) { return a - b; }); - - var halfIndex = Math.floor(valuesNum / 2); - - return valuesNum % 2 === 0 - ? (values[halfIndex] + values[halfIndex - 1]) / 2 - : values[halfIndex]; -}; - -module.exports = Median; - - -/***/ }), - -/***/ 5385: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8585: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 372: -/***/ ((module, __unused_webpack_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__(7473); -var Matrix3 = __webpack_require__(2149); -var NOOP = __webpack_require__(1984); -var Vector3 = __webpack_require__(5689); - -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=0] - The x component. - * @param {number} [y=0] - The y component. - * @param {number} [z=0] - The z component. - * @param {number} [w=1] - 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 - * @private - * @since 3.50.0 - */ - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_y - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_z - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_w - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * This callback is invoked, if set, each time a value in this quaternion is changed. - * The callback is passed one argument, a reference to this quaternion. - * - * @name Phaser.Math.Quaternion#onChangeCallback - * @type {function} - * @since 3.50.0 - */ - this.onChangeCallback = NOOP; - - this.set(x, y, z, w); - }, - - /** - * The x component of this Quaternion. - * - * @name Phaser.Math.Quaternion#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - x: { - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - - this.onChangeCallback(this); - } - }, - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - y: { - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - - this.onChangeCallback(this); - } - }, - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - z: { - get: function () - { - return this._z; - }, - - set: function (value) - { - this._z = value; - - this.onChangeCallback(this); - } - }, - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - w: { - get: function () - { - return this._w; - }, - - set: function (value) - { - this._w = value; - - this.onChangeCallback(this); - } - }, - - /** - * 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) - { - return this.set(src); - }, - - /** - * Set the components of this Quaternion and optionally call the `onChangeCallback`. - * - * @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. - * @param {boolean} [update=true] - Call the `onChangeCallback`? - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - set: function (x, y, z, w, update) - { - if (update === undefined) { update = true; } - - 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; - } - - if (update) - { - this.onChangeCallback(this); - } - - 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; - - this.onChangeCallback(this); - - 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; - - this.onChangeCallback(this); - - 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; - - this.onChangeCallback(this); - - 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; - } - - this.onChangeCallback(this); - - 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; - - return this.set( - ax + t * (v.x - ax), - ay + t * (v.y - ay), - az + t * (v.z - az), - aw + t * (v.w - aw) - ); - }, - - /** - * 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) - { - return this.set(0, 0, 0, 1); - } - 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 () - { - return this.set(0, 0, 0, 1); - }, - - /** - * 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); - - return this.set( - s * axis.x, - s * axis.y, - s * axis.z, - Math.cos(rad) - ); - }, - - /** - * 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; - - return this.set( - ax * bw + aw * bx + ay * bz - az * by, - ay * bw + aw * by + az * bx - ax * bz, - az * bw + aw * bz + ax * by - ay * bx, - aw * bw - ax * bx - ay * by - az * bz - ); - }, - - /** - * 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 - return this.set( - scale0 * ax + scale1 * bx, - scale0 * ay + scale1 * by, - scale0 * az + scale1 * bz, - scale0 * aw + scale1 * bw - ); - }, - - /** - * 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; - - return this.set( - -a0 * invDot, - -a1 * invDot, - -a2 * invDot, - a3 * invDot - ); - }, - - /** - * 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; - - this.onChangeCallback(this); - - 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); - - return this.set( - ax * bw + aw * bx, - ay * bw + az * bx, - az * bw - ay * bx, - aw * bw - ax * bx - ); - }, - - /** - * 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); - - return this.set( - ax * bw - az * by, - ay * bw + aw * by, - az * bw + ax * by, - aw * bw - ay * by - ); - }, - - /** - * 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); - - return this.set( - ax * bw + ay * bz, - ay * bw - ax * bz, - az * bw + aw * bz, - aw * bw - az * bz - ); - }, - - /** - * 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; - }, - - /** - * Set this Quaternion from the given Euler, based on Euler order. - * - * @method Phaser.Math.Quaternion#setFromEuler - * @since 3.50.0 - * - * @param {Phaser.Math.Euler} euler - The Euler to convert from. - * @param {boolean} [update=true] - Run the `onChangeCallback`? - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setFromEuler: function (euler, update) - { - var x = euler.x / 2; - var y = euler.y / 2; - var z = euler.z / 2; - - var c1 = Math.cos(x); - var c2 = Math.cos(y); - var c3 = Math.cos(z); - - var s1 = Math.sin(x); - var s2 = Math.sin(y); - var s3 = Math.sin(z); - - switch (euler.order) - { - case 'XYZ': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'YXZ': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - - case 'ZXY': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'ZYX': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - - case 'YZX': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'XZY': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - } - - return this; - }, - - /** - * Sets the rotation of this Quaternion from the given Matrix4. - * - * @method Phaser.Math.Quaternion#setFromRotationMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setFromRotationMatrix: function (mat4) - { - var m = mat4.val; - - var m11 = m[0]; - var m12 = m[4]; - var m13 = m[8]; - var m21 = m[1]; - var m22 = m[5]; - var m23 = m[9]; - var m31 = m[2]; - var m32 = m[6]; - var m33 = m[10]; - - var trace = m11 + m22 + m33; - var s; - - if (trace > 0) - { - s = 0.5 / Math.sqrt(trace + 1.0); - - this.set( - (m32 - m23) * s, - (m13 - m31) * s, - (m21 - m12) * s, - 0.25 / s - ); - } - else if (m11 > m22 && m11 > m33) - { - s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); - - this.set( - 0.25 * s, - (m12 + m21) / s, - (m13 + m31) / s, - (m32 - m23) / s - ); - } - else if (m22 > m33) - { - s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); - - this.set( - (m12 + m21) / s, - 0.25 * s, - (m23 + m32) / s, - (m13 - m31) / s - ); - } - else - { - s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); - - this.set( - (m13 + m31) / s, - (m23 + m32) / s, - 0.25 * s, - (m21 - m12) / s - ); - } - - 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; - } - - this.onChangeCallback(this); - - return this; - } - -}); - -module.exports = Quaternion; - - -/***/ }), - -/***/ 4208: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * 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 {number} The given angle converted to degrees. - */ -var RadToDeg = function (radians) -{ - return radians * CONST.RAD_TO_DEG; -}; - -module.exports = RadToDeg; - - -/***/ }), - -/***/ 1705: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6650: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2037: -/***/ ((module) => { - -/** - * @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; } - - 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; - - -/***/ }), - -/***/ 6283: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9876: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8348: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4497: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9640: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector3 = __webpack_require__(5689); -var Matrix4 = __webpack_require__(9652); -var Quaternion = __webpack_require__(372); - -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; - - -/***/ }), - -/***/ 4078: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 855: -/***/ ((module) => { - -/** - * @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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. - * @param {number} [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; - - -/***/ }), - -/***/ 4936: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2733: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 278: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 163: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(2529); - -/** - * 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 {number} index - The position within the grid to get the x/y value for. - * @param {number} width - The width of the grid. - * @param {number} 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; - } - } - - return out.set(x, y); -}; - -module.exports = ToXY; - - -/***/ }), - -/***/ 7556: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(2529); - -/** - * 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; - - -/***/ }), - -/***/ 2529: -/***/ ((module, __unused_webpack_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__(7473); -var FuzzyEqual = __webpack_require__(12); - -/** - * @classdesc - * A representation of a vector in 2D space. - * - * A two-component vector. - * - * @class Vector2 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. - * @param {number} [y=x] - The y component. - */ -var Vector2 = new Class({ - - initialize: - - function Vector2 (x, y) - { - /** - * The x component of this Vector. - * - * @name Phaser.Math.Vector2#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = 0; - - /** - * The y component of this Vector. - * - * @name Phaser.Math.Vector2#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; - } - }, - - /** - * Make a clone of this Vector2. - * - * @method Phaser.Math.Vector2#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Vector2} A clone of this Vector2. - */ - 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.Types.Math.Vector2Like} 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 (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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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); - } - -}); - -/** - * 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; - - -/***/ }), - -/***/ 5689: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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; - }, - - /** - * Sets the components of this Vector to be the `Math.min` result from the given vector. - * - * @method Phaser.Math.Vector3#min - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - min: function (v) - { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - - return this; - }, - - /** - * Sets the components of this Vector to be the `Math.max` result from the given vector. - * - * @method Phaser.Math.Vector3#max - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - max: function (v) - { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - - 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); - }, - - /** - * Adds the two given Vector3s and sets the results into this Vector3. - * - * @method Phaser.Math.Vector3#addVectors - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} a - The first Vector to add. - * @param {Phaser.Math.Vector3} b - The second Vector to add. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addVectors: function (a, b) - { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - - return this; - }, - - /** - * 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; - }, - - /** - * Sets the components of this Vector3 from the position of the given Matrix4. - * - * @method Phaser.Math.Vector3#setFromMatrixPosition - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - setFromMatrixPosition: function (m) - { - return this.fromArray(m.val, 12); - }, - - /** - * Sets the components of this Vector3 from the Matrix4 column specified. - * - * @method Phaser.Math.Vector3#setFromMatrixColumn - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from. - * @param {number} index - The column index. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - setFromMatrixColumn: function (mat4, index) - { - return this.fromArray(mat4.val, index * 4); - }, - - /** - * Sets the components of this Vector3 from the given array, based on the offset. - * - * Vector3.x = array[offset] - * Vector3.y = array[offset + 1] - * Vector3.z = array[offset + 2] - * - * @method Phaser.Math.Vector3#fromArray - * @since 3.50.0 - * - * @param {number[]} array - The array of values to get this Vector from. - * @param {number} [offset=0] - The offset index into the array. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - fromArray: function (array, offset) - { - if (offset === undefined) { offset = 0; } - - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - - 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; - }, - - /** - * Add the given value to each component of this Vector. - * - * @method Phaser.Math.Vector3#addScalar - * @since 3.50.0 - * - * @param {number} s - The amount to add to this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addScalar: function (s) - { - this.x += s; - this.y += s; - this.z += s; - - return this; - }, - - /** - * Add and scale a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector3#addScale - * @since 3.50.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. - * @param {number} scale - The amount to scale `v` by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addScale: function (v, scale) - { - this.x += v.x * scale; - this.y += v.y * scale; - this.z += v.z * scale || 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; - }, - - /** - * Takes a Matrix3 and applies it to this Vector3. - * - * @method Phaser.Math.Vector3#applyMatrix3 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - applyMatrix3: function (mat3) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat3.val; - - this.x = m[0] * x + m[3] * y + m[6] * z; - this.y = m[1] * x + m[4] * y + m[7] * z; - this.z = m[2] * x + m[5] * y + m[8] * z; - - return this; - }, - - /** - * Takes a Matrix4 and applies it to this Vector3. - * - * @method Phaser.Math.Vector3#applyMatrix4 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - applyMatrix4: function (mat4) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat4.val; - - var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]); - - 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; - - 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 Matrix4. - * - * @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; - }, - - /** - * Multiplies this Vector3 by the given view and projection matrices. - * - * @method Phaser.Math.Vector3#projectViewMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix. - * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - projectViewMatrix: function (viewMatrix, projectionMatrix) - { - return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix); - }, - - /** - * Multiplies this Vector3 by the given inversed projection matrix and world matrix. - * - * @method Phaser.Math.Vector3#unprojectViewMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix. - * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - unprojectViewMatrix: function (projectionMatrix, worldMatrix) - { - return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix); - }, - - /** - * 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; - - -/***/ }), - -/***/ 9279: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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) - { - 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; - } - -}); - -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; - - -/***/ }), - -/***/ 4119: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8445: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6412: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 760: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6909: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6947: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3426: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * 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; - - -/***/ }), - -/***/ 6906: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3270: -/***/ ((module, __unused_webpack_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__(104); - -/** - * 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; - - -/***/ }), - -/***/ 2748: -/***/ ((module, __unused_webpack_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__(104); - -/** - * 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; - - -/***/ }), - -/***/ 936: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Normalize = __webpack_require__(6906); - -/** - * 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; - - -/***/ }), - -/***/ 1935: -/***/ ((module, __unused_webpack_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__(7425); - -/** - * 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; - - -/***/ }), - -/***/ 5393: -/***/ ((module) => { - -/** - * @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. - * - * @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; - - -/***/ }), - -/***/ 3692: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MathWrap = __webpack_require__(8445); - -/** - * 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; - - -/***/ }), - -/***/ 2820: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Wrap = __webpack_require__(8445); - -/** - * 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; - - -/***/ }), - -/***/ 1833: -/***/ ((module, __unused_webpack_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__(6412), - BetweenPoints: __webpack_require__(760), - BetweenPointsY: __webpack_require__(6909), - BetweenY: __webpack_require__(6947), - CounterClockwise: __webpack_require__(3426), - Normalize: __webpack_require__(6906), - Random: __webpack_require__(3270), - RandomDegrees: __webpack_require__(2748), - Reverse: __webpack_require__(936), - RotateTo: __webpack_require__(1935), - ShortestBetween: __webpack_require__(5393), - Wrap: __webpack_require__(3692), - WrapDegrees: __webpack_require__(2820) - -}; - - -/***/ }), - -/***/ 7425: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1518: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5372: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4430: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4361: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7798: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8290: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3788: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6338: -/***/ ((module, __unused_webpack_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__(1518), - BetweenPoints: __webpack_require__(5372), - BetweenPointsSquared: __webpack_require__(4430), - Chebyshev: __webpack_require__(4361), - Power: __webpack_require__(7798), - Snake: __webpack_require__(8290), - Squared: __webpack_require__(3788) - -}; - - -/***/ }), - -/***/ 5751: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6203: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9103: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4938: -/***/ ((module, __unused_webpack_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__(5751), - Out: __webpack_require__(9103), - InOut: __webpack_require__(6203) - -}; - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4649: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 504: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8872: -/***/ ((module, __unused_webpack_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__(8677), - Out: __webpack_require__(504), - InOut: __webpack_require__(4649) - -}; - - -/***/ }), - -/***/ 3170: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2627: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1349: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5006: -/***/ ((module, __unused_webpack_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__(3170), - Out: __webpack_require__(1349), - InOut: __webpack_require__(2627) - -}; - - -/***/ }), - -/***/ 6046: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9531: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4836: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 875: -/***/ ((module, __unused_webpack_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__(6046), - Out: __webpack_require__(4836), - InOut: __webpack_require__(9531) - -}; - - -/***/ }), - -/***/ 7619: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7437: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8119: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2884: -/***/ ((module, __unused_webpack_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__(7619), - Out: __webpack_require__(8119), - InOut: __webpack_require__(7437) - -}; - - -/***/ }), - -/***/ 5456: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3461: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2711: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6287: -/***/ ((module, __unused_webpack_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__(5456), - Out: __webpack_require__(2711), - InOut: __webpack_require__(3461) - -}; - - -/***/ }), - -/***/ 8613: -/***/ ((module, __unused_webpack_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__(4938), - Bounce: __webpack_require__(8872), - Circular: __webpack_require__(5006), - Cubic: __webpack_require__(875), - Elastic: __webpack_require__(2884), - Expo: __webpack_require__(6287), - Linear: __webpack_require__(4233), - Quadratic: __webpack_require__(6341), - Quartic: __webpack_require__(762), - Quintic: __webpack_require__(345), - Sine: __webpack_require__(8698), - Stepped: __webpack_require__(7051) - -}; - - -/***/ }), - -/***/ 744: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4233: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -module.exports = __webpack_require__(744); - - -/***/ }), - -/***/ 9810: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8163: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6123: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6341: -/***/ ((module, __unused_webpack_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__(9810), - Out: __webpack_require__(6123), - InOut: __webpack_require__(8163) - -}; - - -/***/ }), - -/***/ 7337: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4878: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9012: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 762: -/***/ ((module, __unused_webpack_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__(7337), - Out: __webpack_require__(9012), - InOut: __webpack_require__(4878) - -}; - - -/***/ }), - -/***/ 303: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 553: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1632: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 345: -/***/ ((module, __unused_webpack_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__(303), - Out: __webpack_require__(1632), - InOut: __webpack_require__(553) - -}; - - -/***/ }), - -/***/ 8455: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1844: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 990: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8698: -/***/ ((module, __unused_webpack_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__(8455), - Out: __webpack_require__(990), - InOut: __webpack_require__(1844) - -}; - - -/***/ }), - -/***/ 6745: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7051: -/***/ ((module, __unused_webpack_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__(6745); - - -/***/ }), - -/***/ 3158: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 12: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1326: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7373: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2622: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7927: -/***/ ((module, __unused_webpack_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__(3158), - Equal: __webpack_require__(12), - Floor: __webpack_require__(1326), - GreaterThan: __webpack_require__(7373), - LessThan: __webpack_require__(2622) - -}; - - -/***/ }), - -/***/ 4675: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); -var Extend = __webpack_require__(1030); - -/** - * @namespace Phaser.Math - */ - -var PhaserMath = { - - // Collections of functions - Angle: __webpack_require__(1833), - Distance: __webpack_require__(6338), - Easing: __webpack_require__(8613), - Fuzzy: __webpack_require__(7927), - Interpolation: __webpack_require__(2140), - Pow2: __webpack_require__(7897), - Snap: __webpack_require__(3943), - - // Expose the RNG Class - RandomDataGenerator: __webpack_require__(6957), - - // Single functions - Average: __webpack_require__(3136), - Bernstein: __webpack_require__(785), - Between: __webpack_require__(7025), - CatmullRom: __webpack_require__(48), - CeilTo: __webpack_require__(5035), - Clamp: __webpack_require__(2915), - DegToRad: __webpack_require__(7149), - Difference: __webpack_require__(2975), - Euler: __webpack_require__(2107), - Factorial: __webpack_require__(3916), - FloatBetween: __webpack_require__(104), - FloorTo: __webpack_require__(4941), - FromPercent: __webpack_require__(1555), - GetSpeed: __webpack_require__(5005), - IsEven: __webpack_require__(3702), - IsEvenStrict: __webpack_require__(8820), - Linear: __webpack_require__(1743), - LinearXY: __webpack_require__(3416), - MaxAdd: __webpack_require__(3733), - Median: __webpack_require__(44), - MinSub: __webpack_require__(5385), - Percent: __webpack_require__(8585), - RadToDeg: __webpack_require__(4208), - RandomXY: __webpack_require__(1705), - RandomXYZ: __webpack_require__(6650), - RandomXYZW: __webpack_require__(2037), - Rotate: __webpack_require__(6283), - RotateAround: __webpack_require__(9876), - RotateAroundDistance: __webpack_require__(8348), - RotateTo: __webpack_require__(4497), - RoundAwayFromZero: __webpack_require__(4078), - RoundTo: __webpack_require__(855), - SinCosTableGenerator: __webpack_require__(4936), - SmootherStep: __webpack_require__(278), - SmoothStep: __webpack_require__(2733), - ToXY: __webpack_require__(163), - TransformXY: __webpack_require__(7556), - Within: __webpack_require__(4119), - Wrap: __webpack_require__(8445), - - // Vector classes - Vector2: __webpack_require__(2529), - Vector3: __webpack_require__(5689), - Vector4: __webpack_require__(9279), - Matrix3: __webpack_require__(2149), - Matrix4: __webpack_require__(9652), - Quaternion: __webpack_require__(372), - RotateVec3: __webpack_require__(9640) - -}; - -// Merge in the consts - -PhaserMath = Extend(false, PhaserMath, CONST); - -// Export it - -module.exports = PhaserMath; - - -/***/ }), - -/***/ 1640: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bernstein = __webpack_require__(785); - -/** - * 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; - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CatmullRom = __webpack_require__(48); - -/** - * 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; - - -/***/ }), - -/***/ 4002: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6765: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Linear = __webpack_require__(1743); - -/** - * 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; - - -/***/ }), - -/***/ 6388: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SmoothStep = __webpack_require__(2733); - -/** - * 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; - - -/***/ }), - -/***/ 8705: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SmootherStep = __webpack_require__(278); - -/** - * 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; - - -/***/ }), - -/***/ 2140: -/***/ ((module, __unused_webpack_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__(1640), - CatmullRom: __webpack_require__(6105), - CubicBezier: __webpack_require__(4002), - Linear: __webpack_require__(6765), - QuadraticBezier: __webpack_require__(6388), - SmoothStep: __webpack_require__(5735), - SmootherStep: __webpack_require__(8705) - -}; - - -/***/ }), - -/***/ 5443: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 725: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 167: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7897: -/***/ ((module, __unused_webpack_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__(5443), - IsSize: __webpack_require__(725), - IsValue: __webpack_require__(167) - -}; - - -/***/ }), - -/***/ 6957: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); - -/** - * @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; - - -/***/ }), - -/***/ 5659: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5461: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5131: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3943: -/***/ ((module, __unused_webpack_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__(5659), - Floor: __webpack_require__(5461), - To: __webpack_require__(5131) - -}; - - -/***/ }), - -/***/ 8666: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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} + * @name Phaser.GameObjects.GameObjectFactory#scene + * @type {Phaser.Scene} * @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; - - -/***/ }), - -/***/ 5722: -/***/ ((module, __unused_webpack_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__(8666); -var Class = __webpack_require__(7473); -var SceneEvents = __webpack_require__(204); - -/** - * @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. - * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. - */ -var ScenePlugin = new Class({ - - Extends: BasePlugin, - - initialize: - - function ScenePlugin (scene, pluginManager, pluginKey) - { - 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 + * @since 3.0.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. + * A reference to the Scene.Systems. * - * @name Phaser.Plugins.ScenePlugin#systems - * @type {?Phaser.Scenes.Systems} + * @name Phaser.GameObjects.GameObjectFactory#systems + * @type {Phaser.Scenes.Systems} * @protected - * @since 3.8.0 + * @since 3.0.0 */ this.systems = scene.sys; /** - * The key under which this plugin was installed into the Scene Systems. + * A reference to the Scene Event Emitter. * - * 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#pluginKey - * @type {string} - * @readonly - * @since 3.54.0 + * @name Phaser.GameObjects.GameObjectFactory#events + * @type {Phaser.Events.EventEmitter} + * @protected + * @since 3.50.0 */ - this.pluginKey = pluginKey; + this.events = scene.sys.events; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.GameObjectFactory#displayList + * @type {Phaser.GameObjects.DisplayList} + * @protected + * @since 3.0.0 + */ + this.displayList; + + /** + * A reference to the Scene Update List. + * + * @name Phaser.GameObjects.GameObjectFactory#updateList + * @type {Phaser.GameObjects.UpdateList} + * @protected + * @since 3.0.0 + */ + this.updateList; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** - * This method is called when the Scene boots. It is only ever called once. + * This method is called automatically, only once, when the Scene is first created. + * Do not invoke it directly. * - * 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 + * @method Phaser.GameObjects.GameObjectFactory#boot + * @private + * @since 3.5.1 */ boot: function () { + this.displayList = this.systems.displayList; + this.updateList = this.systems.updateList; + + this.events.once(SceneEvents.DESTROY, this.destroy, this); }, /** - * Game instance has been destroyed. + * This method is called automatically by the Scene when it is starting up. + * It is responsible for creating local systems, properties and listening for Scene events. + * Do not invoke it directly. * - * You must release everything in here, all references, all objects, free it all up. + * @method Phaser.GameObjects.GameObjectFactory#start + * @private + * @since 3.5.0 + */ + start: function () + { + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * Adds an existing Game Object to this Scene. * - * @method Phaser.Plugins.ScenePlugin#destroy - * @since 3.8.0 + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * + * @method Phaser.GameObjects.GameObjectFactory#existing + * @since 3.0.0 + * + * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was added. + */ + existing: function (child) + { + if (child.renderCanvas || child.renderWebGL) + { + this.displayList.add(child); + } + + // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event: + // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway. + if (child.preUpdate) + { + this.updateList.add(child); + } + + return child; + }, + + /** + * 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.GameObjectFactory#shutdown + * @private + * @since 3.0.0 + */ + shutdown: function () + { + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + * + * @method Phaser.GameObjects.GameObjectFactory#destroy + * @private + * @since 3.0.0 */ destroy: function () { - this.pluginManager = null; - this.game = null; + this.shutdown(); + + this.events.off(SceneEvents.START, this.start, this); + this.scene = null; this.systems = null; + this.events = null; + + this.displayList = null; + this.updateList = null; } }); -module.exports = ScenePlugin; +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ +GameObjectFactory.register = function (factoryType, factoryFunction) +{ + if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + GameObjectFactory.prototype[factoryType] = factoryFunction; + } +}; + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ +GameObjectFactory.remove = function (factoryType) +{ + if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + delete GameObjectFactory.prototype[factoryType]; + } +}; + +PluginCache.register('GameObjectFactory', GameObjectFactory, 'add'); + +module.exports = GameObjectFactory; /***/ }), - -/***/ 8351: -/***/ ((module) => { +/* 330 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Contains the plugins that Phaser uses globally and locally. +// These are the source objects, not instantiated. +var corePlugins = {}; + +// Contains the plugins that the dev has loaded into their game +// These are the source objects, not instantiated. +var customPlugins = {}; + +var PluginCache = {}; + +/** + * @namespace Phaser.Plugins.PluginCache + */ + +/** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * + * @method Phaser.Plugins.PluginCache.register + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin? + */ +PluginCache.register = function (key, plugin, mapping, custom) +{ + if (custom === undefined) { custom = false; } + + corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom }; +}; + +/** + * Stores a custom plugin in the global plugin cache. + * The key must be unique, within the scope of the cache. + * + * @method Phaser.Plugins.PluginCache.registerCustom + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {?any} data - A value to be passed to the plugin's `init` method. + */ +PluginCache.registerCustom = function (key, plugin, mapping, data) +{ + customPlugins[key] = { plugin: plugin, mapping: mapping, data: data }; +}; + +/** + * Checks if the given key is already being used in the core plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCore + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`. + */ +PluginCache.hasCore = function (key) +{ + return corePlugins.hasOwnProperty(key); +}; + +/** + * Checks if the given key is already being used in the custom plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCustom + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`. + */ +PluginCache.hasCustom = function (key) +{ + return customPlugins.hasOwnProperty(key); +}; + +/** + * Returns the core plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCore + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to get. + * + * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object. + */ +PluginCache.getCore = function (key) +{ + return corePlugins[key]; +}; + +/** + * Returns the custom plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object. + */ +PluginCache.getCustom = function (key) +{ + return customPlugins[key]; +}; + +/** + * Returns an object from the custom cache based on the given key that can be instantiated. + * + * @method Phaser.Plugins.PluginCache.getCustomClass + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {function} The custom plugin object. + */ +PluginCache.getCustomClass = function (key) +{ + return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null; +}; + +/** + * Removes a core plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.remove + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to remove. + */ +PluginCache.remove = function (key) +{ + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } +}; + +/** + * Removes a custom plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.removeCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to remove. + */ +PluginCache.removeCustom = function (key) +{ + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } +}; + +/** + * Removes all Core Plugins. + * + * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. + * So be sure you only call this if you do not wish to run Phaser again. + * + * @method Phaser.Plugins.PluginCache.destroyCorePlugins + * @since 3.12.0 + */ +PluginCache.destroyCorePlugins = function () +{ + for (var key in corePlugins) + { + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } + } +}; + +/** + * Removes all Custom Plugins. + * + * @method Phaser.Plugins.PluginCache.destroyCustomPlugins + * @since 3.12.0 + */ +PluginCache.destroyCustomPlugins = function () +{ + for (var key in customPlugins) + { + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } + } +}; + +module.exports = PluginCache; + + +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(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. + * + * This is a WebGL only feature. + * + * @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. + * + * This is a WebGL only feature. + * + * @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, 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--; + + // Force flush before disabling stencil test + renderer.flush(); + + var current = renderer.currentMask; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + current.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + current.mask = prev.mask; + current.camera = prev.camera; + } + else + { + current.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, 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; + + +/***/ }), +/* 332 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Phaser Blend Modes. - * - * @namespace Phaser.BlendModes + * 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 */ -module.exports = { +var Origin = { /** - * Skips the Blend Mode check in the renderer. - * - * @name Phaser.BlendModes.SKIP_CHECK - * @type {number} - * @const - * @since 3.0.0 + * 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 */ - SKIP_CHECK: -1, + _originComponent: true, /** - * 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 + * 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} - * @const + * @default 0.5 * @since 3.0.0 */ - NORMAL: 0, + originX: 0.5, /** - * Add blend mode. For Canvas and WebGL. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.ADD + * 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} - * @const + * @default 0.5 * @since 3.0.0 */ - ADD: 1, + originY: 0.5, + + // private + read only + _displayOriginX: 0, + _displayOriginY: 0, /** - * 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 + * 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} - * @const * @since 3.0.0 */ - MULTIPLY: 2, + displayOriginX: { + + get: function () + { + return this._displayOriginX; + }, + + set: function (value) + { + this._displayOriginX = value; + this.originX = value / this.width; + } + + }, /** - * 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 + * 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} - * @const * @since 3.0.0 */ - SCREEN: 3, + displayOriginY: { + + get: function () + { + return this._displayOriginY; + }, + + set: function (value) + { + this._displayOriginY = value; + this.originY = value / this.height; + } + + }, /** - * 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 {number} - * @const + * 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. */ - OVERLAY: 4, + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this.updateDisplayOrigin(); + }, /** - * Darken blend mode. For Canvas only. - * Retains the darkest pixels of both layers. - * - * @name Phaser.BlendModes.DARKEN - * @type {number} - * @const + * 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. */ - DARKEN: 5, + 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(); + }, /** - * Lighten blend mode. For Canvas only. - * Retains the lightest pixels of both layers. - * - * @name Phaser.BlendModes.LIGHTEN - * @type {number} - * @const + * 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. */ - LIGHTEN: 6, + setDisplayOrigin: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.displayOriginX = x; + this.displayOriginY = y; + + return this; + }, /** - * Color Dodge blend mode. For Canvas only. - * Divides the bottom layer by the inverted top layer. - * - * @name Phaser.BlendModes.COLOR_DODGE - * @type {number} - * @const + * 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. */ - COLOR_DODGE: 7, + updateDisplayOrigin: function () + { + this._displayOriginX = this.originX * this.width; + this._displayOriginY = this.originY * this.height; - /** - * 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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - DIFFERENCE: 11, - - /** - * Exclusion blend mode. For Canvas only. - * Like difference, but with lower contrast. - * - * @name Phaser.BlendModes.EXCLUSION - * @type {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - LUMINOSITY: 16, - - /** - * Alpha erase blend mode. For Canvas and WebGL. - * - * @name Phaser.BlendModes.ERASE - * @type {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - LIGHTER: 25, - - /** - * Copy blend mode. For Canvas only. - * Only the new shape is shown. - * - * @name Phaser.BlendModes.COPY - * @type {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - XOR: 27 + return this; + } }; - -/***/ }), - -/***/ 387: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Post-Render Event. - * - * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes, - * has completed, but before any pending snap shots have been taken. - * - * @event Phaser.Renderer.Events#POST_RENDER - * @since 3.50.0 - */ -module.exports = 'postrender'; +module.exports = Origin; /***/ }), - -/***/ 7970: -/***/ ((module) => { +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -/** - * The Pre-Render Event. - * - * This event is dispatched by the Phaser Renderer. This happens right at the start of the render - * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been - * reset ready for the render. - * - * @event Phaser.Renderer.Events#PRE_RENDER - * @since 3.50.0 - */ -module.exports = 'prerender'; - - -/***/ }), - -/***/ 674: -/***/ ((module) => { +var DegToRad = __webpack_require__(21); +var GetBoolean = __webpack_require__(334); +var GetValue = __webpack_require__(10); +var TWEEN_CONST = __webpack_require__(335); +var Vector2 = __webpack_require__(3); /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Render Event. + * Provides methods used for managing a Game Object following a Path. + * Should be applied as a mixin and not used directly. * - * This event is dispatched by the Phaser Renderer for every camera in every Scene. - * - * It is dispatched before any of the children in the Scene have been rendered. - * - * @event Phaser.Renderer.Events#RENDER - * @since 3.50.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered. - */ -module.exports = 'render'; - - -/***/ }), - -/***/ 9418: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Renderer Resize Event. - * - * This event is dispatched by the Phaser Renderer when it is resized, usually as a result - * of the Scale Manager resizing. - * - * @event Phaser.Renderer.Events#RESIZE - * @since 3.50.0 - * - * @param {number} width - The new width of the renderer. - * @param {number} height - The new height of the renderer. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ 8604: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Renderer.Events - */ - -module.exports = { - - POST_RENDER: __webpack_require__(387), - PRE_RENDER: __webpack_require__(7970), - RENDER: __webpack_require__(674), - RESIZE: __webpack_require__(9418) - -}; - - -/***/ }), - -/***/ 5412: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var PIPELINE_CONST = { - - /** - * The Bitmap Mask Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', - - /** - * The Light 2D Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - LIGHT_PIPELINE: 'Light2D', - - /** - * The Point Light Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POINTLIGHT_PIPELINE: 'PointLightPipeline', - - /** - * The Single Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - SINGLE_PIPELINE: 'SinglePipeline', - - /** - * The Multi Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - MULTI_PIPELINE: 'MultiPipeline', - - /** - * The Rope Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - ROPE_PIPELINE: 'RopePipeline', - - /** - * The Graphics and Shapes Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - GRAPHICS_PIPELINE: 'GraphicsPipeline', - - /** - * The Post FX Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POSTFX_PIPELINE: 'PostFXPipeline', - - /** - * The Utility Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - UTILITY_PIPELINE: 'UtilityPipeline' - -}; - -module.exports = PIPELINE_CONST; - - -/***/ }), - -/***/ 3527: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Scale Manager Resize Event. - * - * This event is dispatched whenever the Scale Manager detects a resize event from the browser. - * It sends three parameters to the callback, each of them being Size components. You can read - * the `width`, `height`, `aspectRatio` and other properties of these components to help with - * scaling your own game content. - * - * @event Phaser.Scale.Events#RESIZE - * @since 3.16.1 - * - * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. - * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. - * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. - * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. - * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ 8618: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 4328: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6099: -/***/ ((module) => { - -/** - * @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.events.on('create', listener)`. - * - * @event Phaser.Scenes.Events#CREATE + * @namespace Phaser.GameObjects.Components.PathFollower * @since 3.17.0 - * - * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. - */ -module.exports = 'create'; - - -/***/ }), - -/***/ 7645: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 2710: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 2547: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 8577: -/***/ ((module) => { - -/** - * @author samme - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to this event from a Scene using `this.events.on('prerender', listener)`. - * - * A Scene will only render if it is visible. - * - * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. - * - * @event Phaser.Scenes.Events#PRE_RENDER - * @since 3.53.0 - * - * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. - */ -module.exports = 'prerender'; - - -/***/ }), - -/***/ 8197: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 8997: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7604: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 8999: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.events.on('render', listener)`. - * - * A Scene will only render if it is visible. - * - * 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'; - - -/***/ }), - -/***/ 9742: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3667: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3468: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7840: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 9896: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 5103: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3162: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7841: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6454: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6536: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 3875: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 204: -/***/ ((module, __unused_webpack_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__(8618), - BOOT: __webpack_require__(4328), - CREATE: __webpack_require__(6099), - DESTROY: __webpack_require__(7645), - PAUSE: __webpack_require__(2710), - POST_UPDATE: __webpack_require__(2547), - PRE_RENDER: __webpack_require__(8577), - PRE_UPDATE: __webpack_require__(8197), - READY: __webpack_require__(8997), - REMOVED_FROM_SCENE: __webpack_require__(7604), - RENDER: __webpack_require__(8999), - RESUME: __webpack_require__(9742), - SHUTDOWN: __webpack_require__(3667), - SLEEP: __webpack_require__(3468), - START: __webpack_require__(7840), - TRANSITION_COMPLETE: __webpack_require__(9896), - TRANSITION_INIT: __webpack_require__(5103), - TRANSITION_OUT: __webpack_require__(3162), - TRANSITION_START: __webpack_require__(7841), - TRANSITION_WAKE: __webpack_require__(6454), - UPDATE: __webpack_require__(6536), - WAKE: __webpack_require__(3875) +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 {number} + * @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.setTargetValue(); + }; + } + + 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(); + + config.persist = true; + + 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(tweenData.end, 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; + /***/ }), - -/***/ 1864: -/***/ ((module) => { +/* 334 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -42845,9 +47322,9 @@ module.exports = { * * @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. + * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. * - * @return {*} The retrieved value. + * @return {boolean} The retrieved value. */ var GetBoolean = function (source, key, defaultValue) { @@ -42869,104 +47346,113 @@ module.exports = GetBoolean; /***/ }), - -/***/ 3747: -/***/ ((module) => { +/* 335 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +/** + * Phaser Tween States. + * + * @namespace Phaser.Tweens.States + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + +/** + * Phaser Tween state constants. + * + * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + var TWEEN_CONST = { /** * TweenData state. - * - * @name Phaser.Tweens.CREATED + * + * @name Phaser.Tweens.States.CREATED * @type {number} + * @const * @since 3.0.0 */ CREATED: 0, - /** - * TweenData state. - * - * @name Phaser.Tweens.INIT - * @type {number} - * @since 3.0.0 - */ - INIT: 1, + // 1 used to be INIT prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.DELAY + * + * @name Phaser.Tweens.States.DELAY * @type {number} + * @const * @since 3.0.0 */ DELAY: 2, - /** - * TweenData state. - * - * @name Phaser.Tweens.OFFSET_DELAY - * @type {number} - * @since 3.0.0 - */ - OFFSET_DELAY: 3, + // 3 used to be OFFSET_DELAY prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.PENDING_RENDER + * + * @name Phaser.Tweens.States.PENDING_RENDER * @type {number} + * @const * @since 3.0.0 */ PENDING_RENDER: 4, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_FORWARD + * + * @name Phaser.Tweens.States.PLAYING_FORWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_FORWARD: 5, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_BACKWARD + * + * @name Phaser.Tweens.States.PLAYING_BACKWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_BACKWARD: 6, /** * TweenData state. - * - * @name Phaser.Tweens.HOLD_DELAY + * + * @name Phaser.Tweens.States.HOLD_DELAY * @type {number} + * @const * @since 3.0.0 */ HOLD_DELAY: 7, /** * TweenData state. - * - * @name Phaser.Tweens.REPEAT_DELAY + * + * @name Phaser.Tweens.States.REPEAT_DELAY * @type {number} + * @const * @since 3.0.0 */ REPEAT_DELAY: 8, /** * TweenData state. - * - * @name Phaser.Tweens.COMPLETE + * + * @name Phaser.Tweens.States.COMPLETE * @type {number} + * @const * @since 3.0.0 */ COMPLETE: 9, @@ -42974,67 +47460,110 @@ var TWEEN_CONST = { // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_ADD + * Tween state. The Tween has been created but has not yet been added to the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING * @type {number} + * @const * @since 3.0.0 */ - PENDING_ADD: 20, + PENDING: 20, /** - * Tween state. - * - * @name Phaser.Tweens.PAUSED + * Tween state. The Tween is active within the Tween Manager. This means it is either playing, + * or was playing and is currently paused, but in both cases it's still being processed by + * the Tween Manager, so is considered 'active'. + * + * @name Phaser.Tweens.States.ACTIVE * @type {number} + * @const * @since 3.0.0 */ - PAUSED: 21, + ACTIVE: 21, /** - * Tween state. - * - * @name Phaser.Tweens.LOOP_DELAY + * Tween state. The Tween is waiting for a loop countdown to elapse. + * + * @name Phaser.Tweens.States.LOOP_DELAY * @type {number} + * @const * @since 3.0.0 */ LOOP_DELAY: 22, /** - * Tween state. - * - * @name Phaser.Tweens.ACTIVE + * Tween state. The Tween is waiting for a complete delay to elapse. + * + * @name Phaser.Tweens.States.COMPLETE_DELAY * @type {number} + * @const * @since 3.0.0 */ - ACTIVE: 23, + COMPLETE_DELAY: 23, /** - * Tween state. - * - * @name Phaser.Tweens.COMPLETE_DELAY + * Tween state. The Tween is waiting for a starting delay to elapse. + * + * @name Phaser.Tweens.States.START_DELAY * @type {number} + * @const * @since 3.0.0 */ - COMPLETE_DELAY: 24, + START_DELAY: 24, /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_REMOVE + * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING_REMOVE * @type {number} + * @const * @since 3.0.0 */ PENDING_REMOVE: 25, /** - * Tween state. - * - * @name Phaser.Tweens.REMOVED + * Tween state. The Tween has been removed from the Tween Manager. + * + * @name Phaser.Tweens.States.REMOVED * @type {number} + * @const * @since 3.0.0 */ - REMOVED: 26 + REMOVED: 26, + + /** + * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation, + * so will not be automatically removed by the Tween Manager. + * + * @name Phaser.Tweens.States.FINISHED + * @type {number} + * @const + * @since 3.60.0 + */ + FINISHED: 27, + + /** + * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager. + * + * @name Phaser.Tweens.States.DESTROYED + * @type {number} + * @const + * @since 3.60.0 + */ + DESTROYED: 28, + + /** + * A large integer value used for 'infinite' style countdowns. + * + * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not + * supported on IE. + * + * @name Phaser.Tweens.States.MAX + * @type {number} + * @const + * @since 3.60.0 + */ + MAX: 999999999999 }; @@ -43042,3276 +47571,439 @@ module.exports = TWEEN_CONST; /***/ }), - -/***/ 7473: -/***/ ((module) => { +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Taken from klasse by mattdesl https://github.com/mattdesl/klasse - -function hasGetterOrSetter (def) -{ - return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); -} - -function getProperty (definition, k, isClassDescriptor) -{ - // This may be a lightweight object, OR it might be a property that was defined previously. - - // For simple class descriptors we can just assume its NOT previously defined. - var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); - - if (!isClassDescriptor && def.value && typeof def.value === 'object') - { - def = def.value; - } - - // This might be a regular property, or it may be a getter/setter the user defined in a class. - if (def && hasGetterOrSetter(def)) - { - if (typeof def.enumerable === 'undefined') - { - def.enumerable = true; - } - - if (typeof def.configurable === 'undefined') - { - def.configurable = true; - } - - return def; - } - else - { - return false; - } -} - -function hasNonConfigurable (obj, k) -{ - var prop = Object.getOwnPropertyDescriptor(obj, k); - - if (!prop) - { - return false; - } - - if (prop.value && typeof prop.value === 'object') - { - prop = prop.value; - } - - if (prop.configurable === false) - { - return true; - } - - return false; -} +var DeepCopy = __webpack_require__(337); +var SpliceOne = __webpack_require__(13); /** - * Extends the given `myClass` object's prototype with the properties of `definition`. + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. * - * @function extend - * @ignore - * @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) - { - if (!definition.hasOwnProperty(k)) - { - continue; - } - - var def = getProperty(definition, k, isClassDescriptor); - - if (def !== false) - { - // If Extends is used, we will check its prototype to see if the final variable exists. - - var parent = extend || ctor; - - if (hasNonConfigurable(parent.prototype, k)) - { - // Just skip the final property - if (Class.ignoreFinals) - { - continue; - } - - // We cannot re-define a property that is configurable=false. - // So we will consider them final and throw an error. This is by - // default so it is clear to the developer what is happening. - // You can set ignoreFinals to true if you need to extend a class - // which has configurable=false; it will simply not re-define final properties. - throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); - } - - Object.defineProperty(ctor.prototype, k, def); - } - else - { - ctor.prototype[k] = definition[k]; - } - } -} - -/** - * Applies the given `mixins` to the prototype of `myClass`. - * - * @function mixin - * @ignore - * @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) - { - return; - } - - if (!Array.isArray(mixins)) - { - mixins = [ mixins ]; - } - - for (var i = 0; i < mixins.length; i++) - { - extend(myClass, mixins[i].prototype || mixins[i]); - } -} - -/** - * Creates a new class with the given descriptor. - * The constructor, defined by the name `initialize`, - * is an optional function. If unspecified, an anonymous - * function will be used which calls the parent class (if - * one exists). - * - * You can also use `Extends` and `Mixins` to provide subclassing - * and inheritance. - * - * @class Phaser.Class - * @constructor - * @param {Object} definition a dictionary of functions for the class - * @example - * - * var MyClass = new Phaser.Class({ - * - * initialize: function() { - * this.foo = 2.0; - * }, - * - * bar: function() { - * return this.foo + 5; - * } - * }); - */ -function Class (definition) -{ - if (!definition) - { - definition = {}; - } - - // The variable name here dictates what we see in Chrome debugger - var initialize; - var Extends; - - if (definition.initialize) - { - if (typeof definition.initialize !== 'function') - { - throw new Error('initialize must be a function'); - } - - initialize = definition.initialize; - - // Usually we should avoid 'delete' in V8 at all costs. - // However, its unlikely to make any performance difference - // here since we only call this on class creation (i.e. not object creation). - delete definition.initialize; - } - else if (definition.Extends) - { - var base = definition.Extends; - - initialize = function () - { - base.apply(this, arguments); - }; - } - else - { - initialize = function () {}; - } - - if (definition.Extends) - { - initialize.prototype = Object.create(definition.Extends.prototype); - initialize.prototype.constructor = initialize; - - // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) - - Extends = definition.Extends; - - delete definition.Extends; - } - else - { - initialize.prototype.constructor = initialize; - } - - // Grab the mixins, if they are specified... - var mixins = null; - - if (definition.Mixins) - { - mixins = definition.Mixins; - delete definition.Mixins; - } - - // First, mixin if we can. - mixin(initialize, mixins); - - // Now we grab the actual definition which defines the overrides. - extend(initialize, definition, true, Extends); - - return initialize; -} - -Class.extend = extend; -Class.mixin = mixin; -Class.ignoreFinals = false; - -module.exports = Class; - - -/***/ }), - -/***/ 1984: -/***/ ((module) => { - -/** - * @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 + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly * @since 3.0.0 */ -var NOOP = function () -{ - // NOOP -}; -module.exports = NOOP; - - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2280: -/***/ ((module) => { - -/** - * @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 {number} [index=0] - The index in the array where the item will be inserted. - * @param {number} [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; - - -/***/ }), - -/***/ 2513: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1771: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [endIndex] - An optional end index to search to. - * - * @return {number} 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; - - -/***/ }), - -/***/ 7883: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5856: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} startIndex - The start index to search from. - * @param {number} 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; - - -/***/ }), - -/***/ 3957: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6245: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 1647: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 5301: -/***/ ((module) => { - -/** - * @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 {number} [startIndex=0] - An optional start index. - * @param {number} [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; - - -/***/ }), - -/***/ 8683: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Moves the given array element above another one in the array. - * The array is modified in-place. - * - * @function Phaser.Utils.Array.MoveAbove - * @since 3.55.0 - * - * @param {array} array - The input array. - * @param {*} item1 - The element to move above base element. - * @param {*} item2 - The base element. - * - * - * @return {array} The input array. - */ -var MoveAbove = function (array, item1, item2) -{ - if (item1 === item2) - { - return array; - } - - var currentIndex = array.indexOf(item1); - var baseIndex = array.indexOf(item2); - - if (currentIndex < 0 || baseIndex < 0) - { - throw new Error('Supplied items must be elements of the same array'); - } - - if (currentIndex > baseIndex) - { - // item1 is already above item2 - return array; - } - - // Remove - array.splice(currentIndex, 1); - - // Add in new location - if (baseIndex === array.length - 1) - { - array.push(item1); - } - else - { - array.splice(baseIndex, 0, item1); - } - - return array; -}; - -module.exports = MoveAbove; - - -/***/ }), - -/***/ 546: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Moves the given array element below another one in the array. - * The array is modified in-place. - * - * @function Phaser.Utils.Array.MoveBelow - * @since 3.55.0 - * - * @param {array} array - The input array. - * @param {*} item1 - The element to move below base element. - * @param {*} item2 - The base element. - * - * - * @return {array} The input array. - */ -var MoveBelow = function (array, item1, item2) -{ - if (item1 === item2) - { - return array; - } - - var currentIndex = array.indexOf(item1); - var baseIndex = array.indexOf(item2); - - if (currentIndex < 0 || baseIndex < 0) - { - throw new Error('Supplied items must be elements of the same array'); - } - - if (currentIndex < baseIndex) - { - // item1 is already below item2 - return array; - } - - // Remove - array.splice(currentIndex, 1); - - // Add in new location - if (baseIndex === 0) - { - array.unshift(item1); - } - else - { - array.splice(baseIndex, 0, item1); - } - - return array; -}; - -module.exports = MoveBelow; - - -/***/ }), - -/***/ 1842: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1419: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 6512: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4130: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1316: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RoundAwayFromZero = __webpack_require__(4078); - -/** - * 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; - - -/***/ }), - -/***/ 9465: -/***/ ((module) => { - -/** - * @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 {number} k - The k-th element index. - * @param {number} [left=0] - The index of the left part of the range. - * @param {number} [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; - - -/***/ }), - -/***/ 9703: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetValue = __webpack_require__(5851); -var Shuffle = __webpack_require__(4912); - -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; - - -/***/ }), - -/***/ 7161: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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; - var removed = []; - - while (itemLength >= 0) - { - var entry = item[itemLength]; - - index = array.indexOf(entry); - - if (index !== -1) - { - SpliceOne(array, index); - - removed.push(entry); - - if (callback) - { - callback.call(context, entry); - } - } - - itemLength--; - } - - return removed; -}; - -module.exports = Remove; - - -/***/ }), - -/***/ 4725: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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 {number} 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; - - -/***/ }), - -/***/ 8780: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} startIndex - The start index to remove from. - * @param {number} 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; - - -/***/ }), - -/***/ 5744: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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 {number} [start=0] - The array index to start the search from. - * @param {number} [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; - - -/***/ }), - -/***/ 6960: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1021: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 4027: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2497: -/***/ ((module) => { - -/** - * @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 {number} startIndex - The start index. - * @param {number} 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; - - -/***/ }), - -/***/ 5361: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3718: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 4912: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2071: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8935: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 9992: -/***/ ((module) => { - -/** - * @author Richard Davey - * @author Angry Bytes (and contributors) - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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); -} - -/** - * 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 = 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) - { - RunPass(array, compare, chk, buffer); - - var tmp = array; - - array = buffer; - - buffer = tmp; - } - - return array; -} - -/** - * 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) - { - 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++]; - } - } - else if (li < r) - { - // Nothing to compare, just flush what's left. - result[i++] = arr[li++]; - } - else if (ri < e) - { - result[i++] = arr[ri++]; - } - 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; -}; - -module.exports = StableSort; - - -/***/ }), - -/***/ 2372: -/***/ ((module) => { - -/** - * @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 array; - } - - 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; - - -/***/ }), - -/***/ 1953: -/***/ ((module, __unused_webpack_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__(1237), - - Add: __webpack_require__(1792), - AddAt: __webpack_require__(2280), - BringToTop: __webpack_require__(2513), - CountAllMatching: __webpack_require__(1771), - Each: __webpack_require__(7883), - EachInRange: __webpack_require__(5856), - FindClosestInSorted: __webpack_require__(3957), - GetAll: __webpack_require__(6245), - GetFirst: __webpack_require__(1647), - GetRandom: __webpack_require__(5301), - MoveDown: __webpack_require__(1842), - MoveTo: __webpack_require__(1419), - MoveUp: __webpack_require__(6512), - MoveAbove: __webpack_require__(8683), - MoveBelow: __webpack_require__(546), - NumberArray: __webpack_require__(4130), - NumberArrayStep: __webpack_require__(1316), - QuickSelect: __webpack_require__(9465), - Range: __webpack_require__(9703), - Remove: __webpack_require__(7161), - RemoveAt: __webpack_require__(4725), - RemoveBetween: __webpack_require__(8780), - RemoveRandomElement: __webpack_require__(5744), - Replace: __webpack_require__(6960), - RotateLeft: __webpack_require__(1021), - RotateRight: __webpack_require__(4027), - SafeRange: __webpack_require__(2497), - SendToBack: __webpack_require__(5361), - SetAll: __webpack_require__(3718), - Shuffle: __webpack_require__(4912), - SortByDigits: __webpack_require__(2071), - SpliceOne: __webpack_require__(8935), - StableSort: __webpack_require__(9992), - Swap: __webpack_require__(2372) - -}; - - -/***/ }), - -/***/ 1816: -/***/ ((module) => { - -/** - * @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. This is an example matrix: - * - * ``` - * [ - * [ 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) || !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) +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default. + * + * @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, + + /** + * Does this Game Object have any Post Pipelines set? + * + * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline + * @type {boolean} + * @webglOnly + * @since 3.50.0 + */ + hasPostPipeline: false, + + /** + * The WebGL Post FX Pipelines this Game Object uses for post-render effects. + * + * The pipelines are processed in the order in which they appear in this array. + * + * If you modify this array directly, be sure to set the + * `hasPostPipeline` property accordingly. + * + * @name Phaser.GameObjects.Components.Pipeline#postPipelines + * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} + * @webglOnly + * @since 3.50.0 + */ + postPipelines: null, + + /** + * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses. + * + * @name Phaser.GameObjects.Components.Pipeline#pipelineData + * @type {object} + * @webglOnly + * @since 3.50.0 + */ + pipelineData: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipeline) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) { return false; } - } - return true; -}; + var pipelines = renderer.pipelines; -module.exports = CheckMatrix; + this.postPipelines = []; + this.pipelineData = {}; - -/***/ }), - -/***/ 6655: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Pad = __webpack_require__(7222); -var CheckMatrix = __webpack_require__(1816); - -/** - * Generates a string (which you can pass to console.log) from the given Array 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + if (pipelines) { - var cell = matrix[r][c].toString(); - - if (cell !== 'undefined') + if (pipeline === undefined) { - str += Pad(cell, 2); - } - else - { - str += '?'; + pipeline = pipelines.default; } - if (c < matrix[r].length - 1) + var instance = pipelines.get(pipeline); + + if (instance) { - str += ' |'; + this.defaultPipeline = instance; + this.pipeline = instance; + + return true; } } - if (r < matrix.length - 1) + return false; + }, + + /** + * Sets the main WebGL Pipeline of this Game Object. + * + * Also sets the `pipelineData` property, if the parameter is given. + * + * Both the pipeline and post pipelines share the same pipeline data object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. + * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. + * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipeline, pipelineData, copyData) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) { - str += '\n'; + return this; + } - for (var i = 0; i < matrix[r].length; i++) + var pipelines = renderer.pipelines; + + if (pipelines) + { + var instance = pipelines.get(pipeline); + + if (instance) { - str += '---'; + this.pipeline = instance; + } - if (i < matrix[r].length - 1) + if (pipelineData) + { + this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; + } + } + + return this; + }, + + /** + * Sets one, or more, Post Pipelines on this Game Object. + * + * Post Pipelines are invoked after this Game Object has rendered to its target and + * are commonly used for post-fx. + * + * The post pipelines are appended to the `postPipelines` array belonging to this + * Game Object. When the renderer processes this Game Object, it iterates through the post + * pipelines in the order in which they appear in the array. If you are stacking together + * multiple effects, be aware that the order is important. + * + * If you call this method multiple times, the new pipelines will be appended to any existing + * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. + * + * You can optionally also set the `pipelineData` property, if the parameter is given. + * + * Both the pipeline and post pipelines share the pipeline data object together. + * + * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them. + * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. + * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. + * + * @return {this} This Game Object instance. + */ + setPostPipeline: function (pipelines, pipelineData, copyData) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) + { + return this; + } + + var pipelineManager = renderer.pipelines; + + if (pipelineManager) + { + if (!Array.isArray(pipelines)) + { + pipelines = [ pipelines ]; + } + + for (var i = 0; i < pipelines.length; i++) + { + var instance = pipelineManager.getPostPipeline(pipelines[i], this); + + if (instance) { - str += '+'; + this.postPipelines.push(instance); } } - str += '\n'; + if (pipelineData) + { + this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; + } } - } + this.hasPostPipeline = (this.postPipelines.length > 0); - return str; -}; + return this; + }, -module.exports = MatrixToString; - - -/***/ }), - -/***/ 582: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 6063: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + /** + * Adds an entry to the `pipelineData` object belonging to this Game Object. + * + * If the 'key' already exists, its value is updated. If it doesn't exist, it is created. + * + * If `value` is undefined, and `key` exists, `key` is removed from the data object. + * + * Both the pipeline and post pipelines share the pipeline data object together. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipelineData + * @webglOnly + * @since 3.50.0 + * + * @param {string} key - The key of the pipeline data to set, update, or delete. + * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object. + * + * @return {this} This Game Object instance. + */ + setPipelineData: function (key, value) { - matrix[i].reverse(); - } + var data = this.pipelineData; - return matrix; -}; - -module.exports = ReverseRows; - - -/***/ }), - -/***/ 8321: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix 180 degrees. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 2597: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix to the left (or 90 degrees) - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 7116: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CheckMatrix = __webpack_require__(1816); -var TransposeMatrix = __webpack_require__(4780); - -/** - * 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/}. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + if (value === undefined) { - matrix[i].reverse(); - } - - matrix.reverse(); - } - - return matrix; -}; - -module.exports = RotateMatrix; - - -/***/ }), - -/***/ 6285: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix to the left (or -90 degrees) - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 7711: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateLeft = __webpack_require__(1021); -var RotateRight = __webpack_require__(4027); - -/** - * Translates the given Array Matrix by shifting each column and row the - * amount specified. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.Translate - * @since 3.50.0 - * - * @generic T - * @genericUse {T[][]} - [matrix,$return] - * - * @param {T[][]} [matrix] - The array matrix to translate. - * @param {number} [x=0] - The amount to horizontally translate the matrix by. - * @param {number} [y=0] - The amount to vertically translate the matrix by. - * - * @return {T[][]} The translated matrix. - */ -var TranslateMatrix = function (matrix, x, y) -{ - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - - // Vertical translation - - if (y !== 0) - { - if (y < 0) - { - // Shift Up - RotateLeft(matrix, Math.abs(y)); + delete data[key]; } else { - // Shift Down - RotateRight(matrix, y); + data[key] = value; } - } - // Horizontal translation + return this; + }, - if (x !== 0) + /** + * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it. + * + * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class. + * + * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array. + */ + getPostPipeline: function (pipeline) { - for (var i = 0; i < matrix.length; i++) - { - var row = matrix[i]; + var isString = (typeof pipeline === 'string'); - if (x < 0) + var pipelines = this.postPipelines; + + var results = []; + + for (var i = 0; i < pipelines.length; i++) + { + var instance = pipelines[i]; + + if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline)) { - RotateLeft(row, Math.abs(x)); - } - else - { - RotateRight(row, x); + results.push(instance); } } - } - return matrix; -}; + return (results.length === 1) ? results[0] : results; + }, -module.exports = TranslateMatrix; - - -/***/ }), - -/***/ 4780: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + /** + * 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 + * + * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines? + * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? + * + * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`. + */ + resetPipeline: function (resetPostPipelines, resetData) { - result[i] = new Array(sourceRowCount); + if (resetPostPipelines === undefined) { resetPostPipelines = false; } + if (resetData === undefined) { resetData = false; } - for (var j = sourceRowCount - 1; j > -1; j--) + this.pipeline = this.defaultPipeline; + + if (resetPostPipelines) { - result[i][j] = array[j][i]; + this.postPipelines = []; + this.hasPostPipeline = false; } + + if (resetData) + { + this.pipelineData = {}; + } + + return (this.pipeline !== null); + }, + + /** + * Resets the WebGL Post Pipelines of this Game Object. It does this by calling + * the `destroy` method on each post pipeline and then clearing the local array. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? + */ + resetPostPipeline: function (resetData) + { + if (resetData === undefined) { resetData = false; } + + var pipelines = this.postPipelines; + + for (var i = 0; i < pipelines.length; i++) + { + pipelines[i].destroy(); + } + + this.postPipelines = []; + this.hasPostPipeline = false; + + if (resetData) + { + this.pipelineData = {}; + } + }, + + /** + * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them. + * + * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead. + * + * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class. + * + * @return {this} This Game Object. + */ + removePostPipeline: function (pipeline) + { + var pipelines = this.postPipelines; + + for (var i = pipelines.length - 1; i >= 0; i--) + { + var instance = pipelines[i]; + + if ( + (typeof pipeline === 'string' && instance.name === pipeline) || + (typeof pipeline !== 'string' && instance instanceof pipeline)) + { + instance.destroy(); + + SpliceOne(pipelines, i); + } + } + + this.hasPostPipeline = (this.postPipelines.length > 0); + + return this; + }, + + /** + * 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 result; }; -module.exports = TransposeMatrix; +module.exports = Pipeline; /***/ }), - -/***/ 1237: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 337 */ +/***/ (function(module, exports) { /** * @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__(1816), - MatrixToString: __webpack_require__(6655), - ReverseColumns: __webpack_require__(582), - ReverseRows: __webpack_require__(6063), - Rotate180: __webpack_require__(8321), - RotateLeft: __webpack_require__(2597), - RotateMatrix: __webpack_require__(7116), - RotateRight: __webpack_require__(6285), - Translate: __webpack_require__(7711), - TransposeMatrix: __webpack_require__(4780) - -}; - - -/***/ }), - -/***/ 3911: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46355,512 +48047,1399 @@ module.exports = DeepCopy; /***/ }), - -/***/ 1030: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 338 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsPlainObject = __webpack_require__(2482); - -// @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/ + * Provides methods used for getting and setting the size of a Game Object. * - * @function Phaser.Utils.Objects.Extend + * @namespace Phaser.GameObjects.Components.Size * @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] || {}; +var Size = { - // skip the boolean and the target - i = 2; - } + /** + * 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, - // extend Phaser if only one argument is passed - if (length === i) - { - target = this; - --i; - } + /** + * 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, - for (; i < length; i++) - { - // Only deal with non-null/undefined values - if ((options = arguments[i]) != null) + /** + * 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 () { - // Extend the base object - for (name in options) - { - src = target[name]; - copy = options[name]; + return Math.abs(this.scaleX * this.frame.realWidth); + }, - // 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; - } - } + 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; + + var input = this.input; + + if (input && !input.customHitArea) + { + input.hitArea.width = this.width; + input.hitArea.height = this.height; + } + + 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; } - // Return the modified object - return target; }; -module.exports = Extend; +module.exports = Size; /***/ }), - -/***/ 8361: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(4675); -var GetValue = __webpack_require__(5851); +var Frame = __webpack_require__(68); + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 /** - * Retrieves a value from an object. Allows for more advanced selection options, including: + * Provides methods used for getting and setting the texture of a Game Object. * - * 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 + * @namespace Phaser.GameObjects.Components.Texture * @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 GetAdvancedValue = function (source, key, defaultValue) -{ - var value = GetValue(source, key, null); - if (value === null) +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|number)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) { - return defaultValue; - } - else if (Array.isArray(value)) + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. + * @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) { - return MATH.RND.pick(value); - } - else if (typeof value === 'object') - { - if (value.hasOwnProperty('randInt')) + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + if (frame instanceof Frame) { - return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]); + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; } - else if (value.hasOwnProperty('randFloat')) + else { - return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]); + this.frame = this.texture.get(frame); } - } - else if (typeof value === 'function') - { - return value(key); - } - return value; -}; - -module.exports = GetAdvancedValue; - - -/***/ }), - -/***/ 4597: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5851: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. - * - * The key is a string, which can be split based on the use of the period character. - * - * For example: - * - * ```javascript - * const source = { - * lives: 3, - * render: { - * screen: { - * width: 1024 - * } - * } - * } - * - * const lives = GetValue(source, 'lives', 1); - * const width = GetValue(source, 'render.screen.width', 800); - * const height = GetValue(source, 'render.screen.height', 600); - * ``` - * - * In the code above, `lives` will be 3 because it's defined at the top level of `source`. - * The `width` value will be 1024 because it can be found inside the `render.screen` object. - * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. - * - * @function Phaser.Utils.Objects.GetValue - * @since 3.0.0 - * - * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. - * @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. - * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. - * - * @return {*} The value of the requested key. - */ -var GetValue = function (source, key, defaultValue, altSource) -{ - if ((!source && !altSource) || typeof source === 'number') - { - return defaultValue; - } - else if (source && source.hasOwnProperty(key)) - { - return source[key]; - } - else if (altSource && altSource.hasOwnProperty(key)) - { - return altSource[key]; - } - else if (key.indexOf('.') !== -1) - { - var keys = key.split('.'); - var parentA = source; - var parentB = altSource; - var value = defaultValue; - - // Use for loop here so we can break early - for (var i = 0; i < keys.length; i++) + if (!this.frame.cutWidth || !this.frame.cutHeight) { - if (parentA && parentA.hasOwnProperty(keys[i])) - { - // Yes parentA has a key property, let's carry on down - value = parentA[keys[i]]; + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } - parentA = parentA[keys[i]]; - } - else if (parentB && parentB.hasOwnProperty(keys[i])) - { - // Yes parentB has a key property, let's carry on down - value = parentB[keys[i]]; + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } - parentB = parentB[keys[i]]; + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); } else { - // Can't go any further, so reset to default - value = defaultValue; - break; + this.updateDisplayOrigin(); } } - return value; + return this; + } + +}; + +module.exports = Texture; + + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Frame = __webpack_require__(68); + +// 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|number)} [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. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. + * @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; } + + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + 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; + + +/***/ }), +/* 341 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * 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 = { + + /** + * The tint value being applied to the top-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintTopLeft: 0xffffff, + + /** + * The tint value being applied to the top-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintTopRight: 0xffffff, + + /** + * The tint value being applied to the bottom-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintBottomLeft: 0xffffff, + + /** + * The tint value being applied to the bottom-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintBottomRight: 0xffffff, + + /** + * The tint fill mode. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * + * @name Phaser.GameObjects.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); + + 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {number} [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.tintTopLeft = topLeft; + this.tintTopRight = topRight; + this.tintBottomLeft = bottomLeft; + this.tintBottomRight = bottomRight; + + 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {number} [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 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 {number} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied? + * + * It checks to see if the 4 tint properties are set to the value 0xffffff + * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + var white = 0xffffff; + + return ( + this.tintFill || + this.tintTopLeft !== white || + this.tintTopRight !== white || + this.tintBottomLeft !== white || + this.tintBottomRight !== white + ); + } + + } + +}; + +module.exports = Tint; + + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var NOOP = __webpack_require__(2); +var renderWebGL = NOOP; +var renderCanvas = NOOP; + +if (true) +{ + renderWebGL = __webpack_require__(343); +} + +if (true) +{ + renderCanvas = __webpack_require__(344); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 343 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 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 {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, camera, parentMatrix) +{ + camera.addToRenderList(container); + + var children = container.list; + var childCount = children.length; + + if (childCount === 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 { - return defaultValue; + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); } + + renderer.pipelines.preBatch(container); + + 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; + + 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) ? (children[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, camera, transformMatrix, container); + + // Restore original values + + child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); + + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + + if (mask) + { + mask.postRenderWebGL(renderer, camera); + } + + renderer.newType = false; + } + + renderer.pipelines.postBatch(container); }; -module.exports = GetValue; +module.exports = ContainerWebGLRenderer; /***/ }), - -/***/ 2482: -/***/ ((module) => { +/* 344 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 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]. + * 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. * - * @function Phaser.Utils.Objects.IsPlainObject - * @since 3.0.0 + * @method Phaser.GameObjects.Container#renderCanvas + * @since 3.4.0 + * @private * - * @param {object} obj - The object to inspect. - * - * @return {boolean} `true` if the object is plain, otherwise `false`. + * @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 {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 IsPlainObject = function (obj) +var ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix) { - // 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) + camera.addToRenderList(container); + + var children = container.list; + + if (children.length === 0) { - return false; + return; } - // 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 + var transformMatrix = container.localTransform; + + if (parentMatrix) { - if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) + 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)) { - return false; + continue; } - } - catch (e) - { - return false; + + 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, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); } - // 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; + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } }; -module.exports = IsPlainObject; +module.exports = ContainerCanvasRenderer; /***/ }), - -/***/ 7222: -/***/ ((module) => { +/* 345 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(29); + +/** + * 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; + + +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(2); +var renderCanvas = __webpack_require__(2); + +if (true) +{ + renderWebGL = __webpack_require__(347); +} + +if (true) +{ + renderCanvas = __webpack_require__(348); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 347 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 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: + * 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. * - * `pad('bob', 6, '-', 2)` + * @method SpineContainerWebGLRenderer#renderWebGL + * @since 3.50.0 + * @private * - * 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 {number} [len=0] - The number of characters to be added. - * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). - * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). - * - * @return {string} The padded string. + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineContainer} container - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var Pad = function (str, len, pad, dir) +var SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix) { - if (len === undefined) { len = 0; } - if (pad === undefined) { pad = ' '; } - if (dir === undefined) { dir = 3; } + var plugin = container.plugin; + var sceneRenderer = plugin.sceneRenderer; + var children = container.list; - str = str.toString(); - - var padlen = 0; - - if (len + 1 >= str.length) + if (children.length === 0) { - switch (dir) + if (sceneRenderer.batcher.isDrawing && renderer.finalType) { - case 1: - str = new Array(len + 1 - str.length).join(pad) + str; - break; + sceneRenderer.end(); - 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; + renderer.pipelines.rebind(); + } - default: - str = str + new Array(len + 1 - str.length).join(pad); - break; + return; + } + + camera.addToRenderList(container); + + 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); + } + + if (renderer.newType) + { + // flush + clear if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + var rendererNextType = renderer.nextTypeMatch; + + // Force these to avoid batch flushing during SpineGameObject.renderWebGL + renderer.nextTypeMatch = true; + renderer.newType = false; + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (child.willRender(camera, container)) + { + var mask = child.mask; + + if (mask) + { + sceneRenderer.end(); + + renderer.pipelines.rebind(); + + mask.preRenderWebGL(renderer, child, camera); + + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + child.renderWebGL(renderer, child, camera, transformMatrix, container); + + if (mask) + { + sceneRenderer.end(); + + renderer.pipelines.rebind(); + + mask.postRenderWebGL(renderer, camera); + + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } } } - return str; + renderer.nextTypeMatch = rendererNextType; + + if (!rendererNextType) + { + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch + sceneRenderer.end(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); + } }; -module.exports = Pad; +module.exports = SpineContainerWebGLRenderer; + + +/***/ }), +/* 348 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 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 {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, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + camera.addToRenderList(container); + + 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, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } +}; + +module.exports = SpineContainerCanvasRenderer; /***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __webpack_require__(4513); -/******/ window.SpinePlugin = __webpack_exports__; -/******/ -/******/ })() -; \ No newline at end of file +/******/ ]); \ No newline at end of file diff --git a/plugins/spine/dist/SpinePlugin.min.js b/plugins/spine/dist/SpinePlugin.min.js index 54f2133f9..e533f1315 100644 --- a/plugins/spine/dist/SpinePlugin.min.js +++ b/plugins/spine/dist/SpinePlugin.min.js @@ -1 +1,1272 @@ -(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(t,e,n,s,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var o=new r(n,s||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,a=new Array(s);r{(function(){var e,i,n,r=this&&this.__extends||(e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},e(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});!function(t){var e,i,n,s=function(){function t(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;n0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},t.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},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"}(i=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"}(n=t.TimelineType||(t.TimelineType={}));var a=function(){function e(i){if(i<=0)throw new Error("frameCount must be > 0: "+i);this.curves=t.Utils.newFloatArray((i-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 i=t*e.BEZIER_SIZE;if(i==this.curves.length)return e.LINEAR;var n=this.curves[i];return n==e.LINEAR?e.LINEAR:n==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,i,n,r,s){var a=.03*(2*-i+r),o=.03*(2*-n+s),h=.006*(3*(i-r)+1),l=.006*(3*(n-s)+1),u=2*a+h,c=2*o+l,f=.3*i+a+.16666667*h,d=.3*n+o+.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=n){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)*(n-u)/(o-u)}var f=r[s-1];return f+(1-f)*(n-o)/(1-o)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=a;var o=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e<<1),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=i},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,a.ENTRIES),v=u[p+a.PREV_ROTATION],g=u[p],m=this.getCurvePercent((p>>1)-1,1-(n-g)/(u[p+a.PREV_TIME]-g)),M=u[p+a.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)))*o;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)))*o}}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_ROTATION=-1,a.ROTATION=1,a}(a);t.RotateTimeline=o;var h=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=i,this.frames[t+a.Y]=n},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,a.ENTRIES);f=u[p+a.PREV_X],d=u[p+a.PREV_Y];var v=u[p],g=this.getCurvePercent(p/a.ENTRIES-1,1-(n-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.X]-f)*g,d+=(u[p+a.Y]-d)*g}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(n.scale<<24)+this.boneIndex},o.prototype.apply=function(n,r,a,h,l,u,c){var f=this.frames,d=n.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 g=s.binarySearch(f,a,o.ENTRIES);p=f[g+o.PREV_X],v=f[g+o.PREV_Y];var m=f[g],M=this.getCurvePercent(g/o.ENTRIES-1,1-(a-m)/(f[g+o.PREV_TIME]-m));p=(p+(f[g+o.X]-p)*M)*d.data.scaleX,v=(v+(f[g+o.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==i.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}}}},o}(h);t.ScaleTimeline=l;var u=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,r,a,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_X],d=u[u.length+i.PREV_Y];else{var p=s.binarySearch(u,r,i.ENTRIES);f=u[p+i.PREV_X],d=u[p+i.PREV_Y];var v=u[p],g=this.getCurvePercent(p/i.ENTRIES-1,1-(r-v)/(u[p+i.PREV_TIME]-v));f+=(u[p+i.X]-f)*g,d+=(u[p+i.Y]-d)*g}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}}},i}(h);t.ShearTimeline=u;var c=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,this.frames[t+a.B]=r,this.frames[t+a.A]=s},a.prototype.apply=function(t,i,n,r,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=c[c.length-a.ENTRIES]){var M=c.length;p=c[M+a.PREV_R],v=c[M+a.PREV_G],g=c[M+a.PREV_B],m=c[M+a.PREV_A]}else{var x=s.binarySearch(c,n,a.ENTRIES);p=c[x+a.PREV_R],v=c[x+a.PREV_G],g=c[x+a.PREV_B],m=c[x+a.PREV_A];var y=c[x],w=this.getCurvePercent(x/a.ENTRIES-1,1-(n-y)/(c[x+a.PREV_TIME]-y));p+=(c[x+a.R]-p)*w,v+=(c[x+a.G]-v)*w,g+=(c[x+a.B]-g)*w,m+=(c[x+a.A]-m)*w}if(1==o)u.color.set(p,v,g,m);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*o,(v-f.g)*o,(g-f.b)*o,(m-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(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s,o,h,l){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,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,i,n,r,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=c[c.length-a.ENTRIES]){var T=c.length;g=c[T+a.PREV_R],m=c[T+a.PREV_G],M=c[T+a.PREV_B],x=c[T+a.PREV_A],y=c[T+a.PREV_R2],w=c[T+a.PREV_G2],E=c[T+a.PREV_B2]}else{var b=s.binarySearch(c,n,a.ENTRIES);g=c[b+a.PREV_R],m=c[b+a.PREV_G],M=c[b+a.PREV_B],x=c[b+a.PREV_A],y=c[b+a.PREV_R2],w=c[b+a.PREV_G2],E=c[b+a.PREV_B2];var R=c[b],A=this.getCurvePercent(b/a.ENTRIES-1,1-(n-R)/(c[b+a.PREV_TIME]-R));g+=(c[b+a.R]-g)*A,m+=(c[b+a.G]-m)*A,M+=(c[b+a.B]-M)*A,x+=(c[b+a.A]-x)*A,y+=(c[b+a.R2]-y)*A,w+=(c[b+a.G2]-w)*A,E+=(c[b+a.B2]-E)*A}if(1==o)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)*o,(m-f.g)*o,(M-f.b)*o,(x-f.a)*o),d.add((y-d.r)*o,(w-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(n.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},r.prototype.apply=function(t,n,r,a,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=i.mixOut){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else h==e.setup&&this.setAttachment(t,u,u.data.attachmentName)},r.prototype.setAttachment=function(t,e,i){e.attachment=null==i?null:t.getAttachment(this.slotIndex,i)},r}();t.AttachmentTimeline=d;var p=null,v=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e),n.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},a.prototype.apply=function(i,n,r,a,o,h,l){var u=i.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==o)if(h==e.add)if(null==(g=c).bones){M=g.vertices;for(var E=0;Ei)this.apply(t,e,Number.MAX_VALUE,n,r,a,o),e=-1;else if(e>=h[l-1])return;if(!(i0&&h[u-1]==c;)u--;for(;u=h[u];u++)n.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 n.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},r.prototype.apply=function(n,r,a,o,h,l,u){var c=n.drawOrder,f=n.slots;if(u!=i.mixOut){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 g=0,m=v.length;g=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==i.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==i.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],g=c[d],m=this.getCurvePercent(d/o.ENTRIES-1,1-(r-g)/(c[d+o.PREV_TIME]-g));l==e.setup?(f.mix=f.data.mix+(p+(c[d+o.MIX]-p)*m-f.data.mix)*h,f.softness=f.data.softness+(v+(c[d+o.SOFTNESS]-v)*m-f.data.softness)*h,u==i.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)*m-f.mix)*h,f.softness+=(v+(c[d+o.SOFTNESS]-v)*m-f.softness)*h,u==i.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=M;var x=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n,this.frames[t+a.SCALE]=r,this.frames[t+a.SHEAR]=s},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(n=u[u.length-a.ENTRIES]){var m=u.length;d=u[m+a.PREV_ROTATE],p=u[m+a.PREV_TRANSLATE],v=u[m+a.PREV_SCALE],g=u[m+a.PREV_SHEAR]}else{var M=s.binarySearch(u,n,a.ENTRIES);d=u[M+a.PREV_ROTATE],p=u[M+a.PREV_TRANSLATE],v=u[M+a.PREV_SCALE],g=u[M+a.PREV_SHEAR];var x=u[M],y=this.getCurvePercent(M/a.ENTRIES-1,1-(n-x)/(u[M+a.PREV_TIME]-x));d+=(u[M+a.ROTATE]-d)*y,p+=(u[M+a.TRANSLATE]-p)*y,v+=(u[M+a.SCALE]-v)*y,g+=(u[M+a.SHEAR]-g)*y}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+(g-f.shearMix)*o}else c.rotateMix+=(d-c.rotateMix)*o,c.translateMix+=(p-c.translateMix)*o,c.scaleMix+=(v-c.scaleMix)*o,c.shearMix+=(g-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 y=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=i},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_VALUE];else{var d=s.binarySearch(u,n,a.ENTRIES);f=u[d+a.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/a.ENTRIES-1,1-(n-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=y;var w=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,r,a,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_VALUE];else{var d=s.binarySearch(u,r,i.ENTRIES);f=u[d+i.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(u[d+i.PREV_TIME]-p));f+=(u[d+i.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o}},i}(y);t.PathConstraintSpacingTimeline=w;var E=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=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,n,a.ENTRIES);f=u[p+a.PREV_ROTATE],d=u[p+a.PREV_TRANSLATE];var v=u[p],g=this.getCurvePercent(p/a.ENTRIES-1,1-(n-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.ROTATE]-f)*g,d+=(u[p+a.TRANSLATE]-d)*g}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}(n||(n={})),function(t){var e=function(){function e(e){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 t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool((function(){return new i})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i0){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(i,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=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,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 i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=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)},e.prototype.apply=function(i){if(null==i)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=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,i,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.applyAttachmentTimeline=function(i,n,r,s,a){var o=n.slots[i.slotIndex];if(o.bone.active){var h,l=i.frames;if(r=l[l.length-1]?l.length-1:t.Animation.binarySearch(l,r)-1,this.setAttachment(n,o,i.attachmentNames[h],a);o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+e.SETUP)}},e.prototype.setAttachment=function(t,i,n,r){i.attachment=null==n?null:t.getAttachment(i.data.index,n),r&&(i.attachmentState=this.unkeyedState+e.CURRENT)},e.prototype.applyRotateTimeline=function(e,i,n,r,s,a,o,h){if(h&&(a[o]=0),1!=r){var l=e,u=l.frames,c=i.bones[l.boneIndex];if(c.active){var f=0,d=0;if(n=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,n,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],g=u[p],m=l.getCurvePercent((p>>1)-1,1-(n-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=a[o];else{var y=0,w=0;h?(y=0,w=x):(y=a[o],w=a[o+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)),a[o]=M}a[o+1]=x,f+=M*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(i,0,n,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,a=this.events,o=0,h=a.length;on||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=n&&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()}}},e.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,n.mixingTo=e,e.mixTime=0,null!=n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},e.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!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,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},e.prototype.addAnimationWith=function(t,e,i,n){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,i,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,n<=0){var a=r.animationEnd-r.animationStart;0!=a?(r.loop?n+=a*(1+(r.trackTime/a|0)):n+=Math.max(a,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime}return s.delay=n,s},e.prototype.setEmptyAnimation=function(t,i){var n=this.setAnimationWith(t,e.emptyAnimation,!1);return n.mixDuration=i,n.trackEnd=i,n},e.prototype.addEmptyAnimation=function(t,i,n){n<=0&&(n-=i);var r=this.addAnimationWith(t,e.emptyAnimation,!1,n);return r.mixDuration=i,r.trackEnd=i,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i0){a[l]=e.HOLD_MIX,o[l]=f;continue t}break}a[l]=e.HOLD_FIRST}else a[l]=e.SUBSEQUENT}},e.prototype.getCurrent=function(t){return t>=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_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,e}();t.AnimationState=e;var i=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=i;var n,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(n.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(n.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(n.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(n.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,i=0;i=0?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,(function(a){var o={count:0},h=new Array;try{new t.TextureAtlas(a,(function(e){h.push(""==s?e:s+"/"+e);var i=document.createElement("img");return i.width=16,i.height=16,new t.FakeTexture(i)}))}catch(t){var l=t;return r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(l.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(l.message)),r.toLoad--,void r.loaded++}for(var u=function(l){var u=!1;r.loadTexture(l,(function(l,c){if(o.count++,o.count==h.length)if(u)r.errors[e]="Couldn't load texture atlas page ".concat(l,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(l," of atlas ").concat(e)),r.toLoad--,r.loaded++;else try{var f=new t.TextureAtlas(a,(function(t){return r.get(""==s?t:s+"/"+t)}));r.assets[e]=f,i&&i(e,f),r.toLoad--,r.loaded++}catch(t){var d=t;r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(d.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(d.message)),r.toLoad--,r.loaded++}}),(function(t,i){u=!0,o.count++,o.count==h.length&&(r.errors[e]="Couldn't load texture atlas page ".concat(t,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(t," of atlas ").concat(e)),r.toLoad--,r.loaded++)}))},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(n||(n={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (region attachment: "+i+")");r.renderObject=r;var s=new t.RegionAttachment(i);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+i+")");r.renderObject=r;var s=new t.MeshAttachment(i);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,i){return new t.BoundingBoxAttachment(i)},e.prototype.newPathAttachment=function(e,i){return new t.PathAttachment(i)},e.prototype.newPointAttachment=function(e,i){return new t.PointAttachment(i)},e.prototype.newClippingAttachment=function(e,i){return new t.ClippingAttachment(i)},e}();t.AtlasAttachmentLoader=e}(n||(n={})),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={}))}(n||(n={})),function(t){var e=function(){function e(t,e,i){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=i,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,i,n,r,s,a,o){this.ax=e,this.ay=i,this.arotation=n,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=n+90+o,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(n+a)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(n+a)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=i*f+l.y)}var d=h.a,p=h.b,v=h.c,g=h.d;switch(this.worldX=d*e+p*i+h.worldX,this.worldY=v*e+g*i+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=n+90+o;var m=t.MathUtils.cosDeg(n+a)*r,M=t.MathUtils.cosDeg(u)*s,x=t.MathUtils.sinDeg(n+a)*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=n+90+o;this.a=t.MathUtils.cosDeg(n+a)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(n+a)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var w=0;(b=d*d+v*v)>1e-4?(b=Math.abs(d*g-p*v)/b,d/=this.skeleton.scaleX,p=(v/=this.skeleton.scaleY)*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=n+a-w,T=n+o-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,R=t.MathUtils.cosDeg(n),A=t.MathUtils.sinDeg(n),S=(d*R+p*A)/this.skeleton.scaleX,C=(v*R+g*A)/this.skeleton.scaleY;(b=Math.sqrt(S*S+C*C))>1e-5&&(b=1/b),S*=b,C*=b,b=Math.sqrt(S*S+C*C),this.data.transformMode==t.TransformMode.NoScale&&d*g-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(b=-b);var I=Math.PI/2+Math.atan2(C,S),P=Math.cos(I)*b,L=Math.sin(I)*b;m=t.MathUtils.cosDeg(a)*r,M=t.MathUtils.cosDeg(90+o)*s,x=t.MathUtils.sinDeg(a)*r,y=t.MathUtils.sinDeg(90+o)*s;this.a=S*m+P*x,this.b=S*M+P*y,this.c=C*m+L*x,this.d=C*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 i=e.a,n=e.b,r=e.c,s=e.d,a=1/(i*s-n*r),o=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=o*s*a-h*n*a,this.ay=h*i*a-o*r*a;var l=a*s,u=a*i,c=a*n,f=a*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,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*i*s,t.y=o*e*s-a*n*s,t},e.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(this.a*i-this.c*n,this.d*n-this.b*i)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(n*this.c+i*this.d,n*this.a+i*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var i=this.a,n=this.b,r=this.c,s=this.d,a=t.MathUtils.cosDeg(e),o=t.MathUtils.sinDeg(e);this.a=a*i-o*r,this.b=a*n-o*s,this.c=o*i+a*r,this.d=o*n+a*s,this.appliedValid=!1},e}();t.Bone=e}(n||(n={})),function(t){var e,i=function(i,n,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,i<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=i,this.name=n,this.parent=r};t.BoneData=i,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={}))}(n||(n={})),function(t){var e=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i};t.ConstraintData=e}(n||(n={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(n||(n={})),function(t){var e=function(t){this.name=t};t.EventData=e}(n||(n={})),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 i=0;i180?d-=360:d<-180&&(d+=360);var E=e.ascaleX,T=e.ascaleY;if(r||s){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=i-e.worldX,v=n-e.worldY}var b=e.data.length*E,R=Math.sqrt(p*p+v*v);if(r&&Rb&&b>1e-4)E*=g=(R/b-1)*o+1,a&&(T*=g)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*o,E,T,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,i,n,r,s,a,o,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),i.appliedValid||i.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=i.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=i.ax,x=0,y=0,w=0,E=e.a,T=e.b,b=e.c,R=e.d,A=Math.abs(c-d)<=1e-4;A?(y=E*M+T*(x=i.ay)+e.worldX,w=b*M+R*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 C,I,P=1/(E*(R=S.d)-T*b),L=y-S.worldX,_=w-S.worldY,k=(L*R-_*T)*P-l,F=(_*E-L*b)*P-u,O=Math.sqrt(k*k+F*F),D=i.data.length*p;if(O<1e-4)return this.apply1(e,n,r,!1,a,!1,h),void i.updateWorldTransformWith(M,x,0,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY);var V=((L=n-S.worldX)*R-(_=r-S.worldY)*T)*P-l,N=(_*E-L*b)*P-u,X=V*V+N*N;if(0!=o){o*=c*(p+1)/2;var Y=Math.sqrt(X),B=Y-O-D*c+o;if(B>0){var U=Math.min(1,B/(2*o))-1;X=(V-=(U=(B-o*(1-U*U))/Y)*V)*V+(N-=U*N)*N}}t:if(A){var z=(X-O*O-(D*=c)*D)/(2*O*D);z<-1?z=-1:z>1&&(z=1,a&&(f*=(Math.sqrt(X)/(O+D)-1)*h+1)),I=Math.acos(z)*s,E=O+D*z,T=D*Math.sin(I),C=Math.atan2(N*E-V*T,V*E+N*T)}else{var W=(E=c*D)*E,G=(T=d*D)*T,H=Math.atan2(N,V),q=-2*G*O,j=G-W;if((R=q*q-4*j*(b=G*O*O+W*X-W*G))>=0){var Z=Math.sqrt(R);q<0&&(Z=-Z);var K=(Z=-(q+Z)/2)/j,Q=b/Z,J=Math.abs(K)=-1&&b<=1&&(b=Math.acos(b),(R=(L=E*Math.cos(b)+O)*L+(_=T*Math.sin(b))*_)st&&(nt=b,st=R,rt=L,at=_)),X<=(et+st)/2?(C=H-Math.atan2(it*s,tt),I=$*s):(C=H-Math.atan2(at*s,rt),I=nt*s)}var ot=Math.atan2(x,M)*m,ht=e.arotation;(C=(C-ot)*t.MathUtils.radDeg+v-ht)>180?C-=360:C<-180&&(C+=360),e.updateWorldTransformWith(l,u,ht+C*h,f,e.ascaleY,0,0),ht=i.arotation,(I=((I+ot)*t.MathUtils.radDeg-i.ashearX)*m+g-ht)>180?I-=360:I<-180&&(I+=360),i.updateWorldTransformWith(M,x,ht+I*h,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY)}else i.updateWorldTransform()},e}();t.IkConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.bendDirection=1,i.compress=!1,i.stretch=!1,i.uniform=!1,i.mix=1,i.softness=0,i}return r(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(n||(n={})),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 i=0,n=t.bones.length;i0;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,g=this.spacing;if(u||!o){u&&(v=t.Utils.setArraySize(this.lengths,c));for(var m=a.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?Y-=t.MathUtils.PI2:Y<-t.MathUtils.PI&&(Y+=t.MathUtils.PI2),Y*=n,B=Math.cos(Y),U=Math.sin(Y),L.a=B*D-U*N,L.b=B*V-U*X,L.c=U*D+B*N,L.d=U*V+B*X}L.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(i,n,r,s,a){var o=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*n+2),c=null,f=i.closed,d=i.worldVerticesLength,p=d/6,v=e.NONE;if(!i.constantSpeed){var g=i.lengths,m=g[p-=f?1:2];if(s&&(h*=m),a)for(var M=1;Mm){v!=e.AFTER&&(v=e.AFTER,i.computeWorldVertices(o,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?(i.computeWorldVertices(o,d-4,4,c,0,2),i.computeWorldVertices(o,0,4,c,4,2)):i.computeWorldVertices(o,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==G)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(o,2,d-4,c,0,2),i.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),i.computeWorldVertices(o,2,d,c,0,2));for(var T=t.Utils.setArraySize(this.curves,p),b=0,R=c[0],A=c[1],S=0,C=0,I=0,P=0,L=0,_=0,k=0,F=0,O=0,D=0,V=0,N=0,X=0,Y=0,B=(M=0,2);Mb){this.addAfterPosition(w-b,c,d-4,u,x);continue}}for(;;y++){var H=T[y];if(!(w>H)){if(0==y)w/=H;else w=(w-(Z=T[y-1]))/(H-Z);break}}if(y!=v){v=y;var q=6*y;for(R=c[q],A=c[q+1],S=c[q+2],C=c[q+3],I=c[q+4],P=c[q+5],V=2*(k=.03*(R-2*S+I))+(O=.006*(3*(S-I)-R+(L=c[q+6]))),N=2*(F=.03*(A-2*C+P))+(D=.006*(3*(C-P)-A+(_=c[q+7]))),X=.3*(S-R)+k+.16666667*O,Y=.3*(C-A)+F+.16666667*D,z=Math.sqrt(X*X+Y*Y),U[0]=z,q=1;q<8;q++)X+=V,Y+=N,V+=O,N+=D,z+=Math.sqrt(X*X+Y*Y),U[q]=z;X+=V,Y+=N,z+=Math.sqrt(X*X+Y*Y),U[8]=z,X+=V+O,Y+=N+D,z+=Math.sqrt(X*X+Y*Y),U[9]=z,W=0}for(w*=z;;W++){var j=U[W];if(!(w>j)){var Z;if(0==W)w/=j;else w=W+(w-(Z=U[W-1]))/(j-Z);break}}this.addCurvePosition(.1*w,R,A,S,C,I,P,L,_,u,x,r||M>0&&0==G)}return u},e.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],a=e[i+1],o=e[i+2]-s,h=e[i+3]-a,l=Math.atan2(h,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},e.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],a=e[i+3],o=s-e[i],h=a-e[i+1],l=Math.atan2(h,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},e.prototype.addCurvePosition=function(t,e,i,n,r,s,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,n-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+n*x+s*y+o*d,E=i*g+r*x+a*y+h*d;l[u]=w,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(E-(i*v+r*m*2+a*f),w-(e*v+n*m*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i}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={}))}(n||(n={})),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}(),i=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,i,n){var r=this.clientAssets[t];return null==r&&(r=new e(t),this.clientAssets[t]=r),null!==i&&(r.textureLoader=i),r.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},t.prototype.loadText=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadJson=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadTexture=function(t,e,i){var n=this;if(i=this.pathPrefix+i,this.queueAsset(t,e,i))if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(i,{mode:"cors"}).then((function(t){return t.ok||(n.errors[i]="Couldn't load image "+i),t.blob()})).then((function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(t){n.rawAssets[i]=t}))}else{var r=new Image;r.crossOrigin="anonymous",r.onload=function(t){n.rawAssets[i]=r},r.onerror=function(t){n.errors[i]="Couldn't load image ".concat(i)},r.src=i}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts,i=0;i0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=i}(n||(n={})),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 i=0;i1){var s=n[n.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),n[n.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 i=e.target,n=i.data.index,r=i.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var s=0,a=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){y=new t.DrawOrderTimeline(D);var V=r.slots.length;for(u=0;u=0;d--)X[d]=-1;var Y=t.Utils.newArray(V-N,0),B=0,U=0;for(d=0;d=0;d--)-1==X[d]&&(X[d]=Y[--U]);y.setFrame(u,M,X)}s.push(y),o=Math.max(o,y.frames[D-1])}var z=i.readInt(!0);if(z>0){for(y=new t.EventTimeline(z),u=0;u>>1^-(1&i)},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="",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},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}(),n=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},r=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(n||(n={})),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,i){if(null==e)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,s=this.polygonPool,a=e.slots,o=a.length;n.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,i,n){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||t>=a&&i>=a||e>=o&&n>=o)return!1;var h=(n-e)/(i-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 i=this.polygons,n=0,r=i.length;n=i||l=i){var u=n[o];u+(i-h)/(l-h)*(n[s]-u)=u&&x<=d||x>=d&&x<=u)&&(x>=e&&x<=n||x>=n&&x<=e)){var y=(l*m-h*v)/M;if((y>=c&&y<=p||y>=p&&y<=c)&&(y>=i&&y<=r||y>=r&&y<=i))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}(n||(n={})),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(i,n){if(null!=this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(i,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,X=this.clipOutput,Y=t.Utils.setArraySize(u,L+N*p),B=0;B<_;B+=2){var U=X[B],z=X[B+1];Y[L]=U,Y[L+1]=z,Y[L+2]=a.r,Y[L+3]=a.g,Y[L+4]=a.b,Y[L+5]=a.a;var W=U-A,G=z-S,H=(k*W+F*G)*V,q=(D*W+O*G)*V,j=1-H-q;Y[L+6]=y*H+b*q+C*j,Y[L+7]=w*H+R*q+I*j,h&&(Y[L+8]=o.r,Y[L+9]=o.g,Y[L+10]=o.b,Y[L+11]=o.a),L+=p}L=c.length;var Z=t.Utils.setArraySize(c,L+3*(N-2));N--;for(B=1;B=2?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(i),u.push(n),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],g=c[d+2],m=c[d+3],M=p-g,x=v-m,y=u,w=u.length-2,E=o.length,T=0;T0;if(M*(R-m)-x*(b-g)>0){if(C){o.push(A),o.push(S);continue}var I=(L=S-R)*(g-p)-(_=A-b)*(m-v);if(Math.abs(I)>1e-6){var P=(_*(v-R)-L*(p-b))/I;o.push(p+(g-p)*P),o.push(v+(m-v)*P)}else o.push(p),o.push(v)}else if(C){var L,_;I=(L=S-R)*(g-p)-(_=A-b)*(m-v);if(Math.abs(I)>1e-6){P=(_*(v-R)-L*(p-b))/I;o.push(p+(g-p)*P),o.push(v+(m-v)*P)}else o.push(p),o.push(v);o.push(A),o.push(S)}l=!0}if(E==o.length)return h.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var k=o;(o=u).length=0,u=k}if(h!=o){h.length=0;d=0;for(var F=o.length-2;d>1;o=0;f--)-1==G[f]&&(G[f]=q[--Z])}y.setFrame(c++,this.getValue(W,"time",0),G)}s.push(y),a=Math.max(a,y.frames[y.getFrameCount()-1])}if(e.events){for(y=new t.EventTimeline(e.events.length),c=0,f=0;f=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},i.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==i)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=e,this.name=i,this.boneData=n};t.SlotData=e}(n||(n={})),function(t){var e,i,n=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 ".concat(t))}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap ".concat(t))}},t}();t.Texture=n,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"}(i=t.TextureWrap||(t.TextureWrap={}));var s=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}(n);t.FakeTexture=a}(n||(n={})),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 i(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 n).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 g=a.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(),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},t}(),n=function(){};t.TextureAtlasPage=n;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(n||(n={})),function(t){var e=function(){function e(e,i){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==i)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 n=0;n0?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!=i){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=(b.x-g.worldX)*i,g.worldY+=(b.y-g.worldY)*i,m=!0}if(n>0){var R=Math.sqrt(g.a*g.a+g.c*g.c),A=Math.sqrt(a*a+h*h);R>1e-5&&(R=(R+(A-R+this.data.offsetScaleX)*n)/R),g.a*=R,g.c*=R,R=Math.sqrt(g.b*g.b+g.d*g.d),A=Math.sqrt(o*o+l*l),R>1e-5&&(R=(R+(A-R+this.data.offsetScaleY)*n)/R),g.b*=R,g.d*=R,m=!0}if(r>0){x=g.b,w=g.d;var S,C=Math.atan2(w,x);(S=Math.atan2(l,o)-Math.atan2(h,a)-(C-Math.atan2(g.c,g.a)))>t.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2),S=C+(S+f)*r;R=Math.sqrt(x*x+w*w);g.b=Math.cos(S)*R,g.d=Math.sin(S)*R,m=!0}m&&(g.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,i=this.translateMix,n=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?A-=t.MathUtils.PI2:A<-t.MathUtils.PI&&(A+=t.MathUtils.PI2),A*=e;var E=Math.cos(A),T=Math.sin(A);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!=i){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=b.x*i,g.worldY+=b.y*i,m=!0}if(n>0){var R=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleX)*n+1;g.a*=R,g.c*=R,R=(Math.sqrt(o*o+l*l)-1+this.data.offsetScaleY)*n+1,g.b*=R,g.d*=R,m=!0}if(r>0){var A;(A=Math.atan2(l,o)-Math.atan2(h,a))>t.MathUtils.PI?A-=t.MathUtils.PI2:A<-t.MathUtils.PI&&(A+=t.MathUtils.PI2);x=g.b,w=g.d;A=Math.atan2(w,x)+(A-t.MathUtils.PI/2+f)*r;R=Math.sqrt(x*x+w*w);g.b=Math.cos(A)*R,g.d=Math.sin(A)*R,m=!0}m&&(g.appliedValid=!1)}},e.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;a1e-5&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*i)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*i)/p));var v=h.ashearY;if(0!=n){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*n}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=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;a1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var p=h.ashearY;0!=n&&(p+=(r.ashearY+this.data.offsetShearY)*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.rotateMix=0,i.translateMix=0,i.scaleMix=0,i.shearMix=0,i.offsetRotation=0,i.offsetX=0,i.offsetY=0,i.offsetScaleX=0,i.offsetScaleY=0,i.offsetShearY=0,i.relative=!1,i.local=!1,i}return r(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(n||(n={})),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 i=t,n=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=n-1,u=(s=0,1);;){t:if(!a[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=i[c],v=i[c+1],g=i[f],m=i[f+1],M=i[d],x=i[d+1],y=(u+1)%n;y!=l;y=(y+1)%n)if(a[y]){var w=r[y]<<1,E=i[w],T=i[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(!a[s])break;s--}while(s>0);break}l=s,s=u,u=(u+1)%n}h.push(r[(n+s-1)%n]),h.push(r[s]),h.push(r[(s+1)%n]),r.splice(s,1),a.splice(s,1);var b=(--n+s-1)%n,R=s==n?0:s;a[b]=e.isConcave(b,n,i,r),a[R]=e.isConcave(R,n,i,r)}return 3==n&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,i){var n=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=i.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(g),o.push(m),o.push(M),o.push(x),o.push(y),(a=this.polygonIndicesPool.obtain()).length=0,a.push(f),a.push(d),a.push(p),l=e.winding(v,g,m,M,x,y),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,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,a=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[s],i[s+1],i[a],i[a+1])},e.positiveArea=function(t,e,i,n,r,s){return t*(s-n)+i*(e-s)+r*(n-e)>=0},e.winding=function(t,e,i,n,r,s){var a=i-t,o=n-e;return r*o-s*a+a*e-t*o>=0?1:-1},e}();t.Triangulator=e}(n||(n={})),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 null!=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 i=function(){function t(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}return t.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,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,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,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=i;var n=function(){function t(){}return t.clamp=function(t,e,i){return ti?i: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,i){return t.randomTriangularWith(e,i,.5*(e+i))},t.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},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=n;var s=function(){function t(){}return t.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},t}();t.Interpolation=s;var a=function(t){function e(e){var i=t.call(this)||this;return i.power=2,i.power=e,i}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,i,n,r){for(var s=e,a=n;s=i?e:t.setArraySize(e,i,n)},t.newArray=function(t,e){for(var i=new Array(t),n=0;n0?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 y,w=(y=t.bone).worldX,E=y.worldY,T=y.a,b=y.b,R=y.c,A=y.d,S=e,C=r;Cthis.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,i,n){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,n,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,n),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var i=0,n=0;n0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,i=0;i0&&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 i=function(t,e,i){this.name=t,this.type=e,this.numElements=i};t.VertexAttribute=i;var n=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,2)||this}return r(i,e),i}(i);t.Position2Attribute=n;var s=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,3)||this}return r(i,e),i}(i);t.Position3Attribute=s;var a=function(e){function i(i){return void 0===i&&(i=0),e.call(this,t.Shader.TEXCOORDS+(0==i?"":i),h.Float,2)||this}return r(i,e),i}(i);t.TexCoordAttribute=a;var o=function(e){function i(){return e.call(this,t.Shader.COLOR,h.Float,4)||this}return r(i,e),i}(i);t.ColorAttribute=o;var h,l=function(e){function i(){return e.call(this,t.Shader.COLOR2,h.Float,4)||this}return r(i,e),i}(i);t.Color2Attribute=l,function(t){t[t.Float=0]="Float"}(h=t.VertexAttributeType||(t.VertexAttributeType={}))}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(t){var e=function(){function e(e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,n>10920)throw new Error("Can't have more than 10920 triangles per batch: "+n);this.context=e instanceof t.ManagedWebGLRenderingContext?e:new t.ManagedWebGLRenderingContext(e);var r=i?[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,n,3*n),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 i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},e.prototype.draw=function(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.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;a0||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={}))}(n||(n={})),function(t){!function(e){var i,n=function(){function n(i,n,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=i,this.context=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.twoColorTint=r,this.camera=new e.OrthoCamera(i.width,i.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 n.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},n.prototype.drawSkeleton=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=-1),void 0===n&&(n=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,i,n)},n.prototype.drawSkeletonDebug=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,i)},n.prototype.drawTexture=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var a=this.QUAD,o=0;a[o++]=e,a[o++]=i,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=0,a[o++]=1,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e+n,a[o++]=i,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=1,a[o++]=1,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e+n,a[o++]=i+r,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=1,a[o++]=0,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e,a[o++]=i+r,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=0,a[o++]=0,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),this.batcher.draw(t,a,this.QUAD_TRIANGLES)},n.prototype.drawTextureUV=function(t,e,i,n,r,s,a,o,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++]=i,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=a,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+n,u[c++]=i,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=o,u[c++]=a,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+n,u[c++]=i+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=o,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e,u[c++]=i+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)},n.prototype.drawTextureRotated=function(e,i,n,r,s,a,o,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=i+a,d=n+o,p=-a,v=-o,g=r-a,m=s-o,M=p,x=v,y=p,w=m,E=g,T=m,b=g,R=v,A=0,S=0,C=0,I=0,P=0,L=0,_=0,k=0;if(0!=h){var F=t.MathUtils.cosDeg(h),O=t.MathUtils.sinDeg(h);C=(P=F*E-O*T)+((A=F*M-O*x)-(_=F*y-O*w)),I=(L=O*E+F*T)+((S=O*M+F*x)-(k=O*y+F*w))}else A=M,S=x,_=y,k=w,P=E,L=T,C=b,I=R;A+=f,S+=d,C+=f,I+=d,P+=f,L+=d,_+=f,k+=d;var D=0;c[D++]=A,c[D++]=S,c[D++]=l.r,c[D++]=l.g,c[D++]=l.b,c[D++]=l.a,c[D++]=0,c[D++]=1,this.twoColorTint&&(c[D++]=0,c[D++]=0,c[D++]=0,c[D++]=0),c[D++]=C,c[D++]=I,c[D++]=l.r,c[D++]=l.g,c[D++]=l.b,c[D++]=l.a,c[D++]=1,c[D++]=1,this.twoColorTint&&(c[D++]=0,c[D++]=0,c[D++]=0,c[D++]=0),c[D++]=P,c[D++]=L,c[D++]=l.r,c[D++]=l.g,c[D++]=l.b,c[D++]=l.a,c[D++]=1,c[D++]=0,this.twoColorTint&&(c[D++]=0,c[D++]=0,c[D++]=0,c[D++]=0),c[D++]=_,c[D++]=k,c[D++]=l.r,c[D++]=l.g,c[D++]=l.b,c[D++]=l.a,c[D++]=0,c[D++]=0,this.twoColorTint&&(c[D++]=0,c[D++]=0,c[D++]=0,c[D++]=0),this.batcher.draw(e,c,this.QUAD_TRIANGLES)},n.prototype.drawRegion=function(t,e,i,n,r,s,a){void 0===s&&(s=null),void 0===a&&(a=!1),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var o=this.QUAD,h=0;o[h++]=e,o[h++]=i,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u,o[h++]=t.v2,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e+n,o[h++]=i,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u2,o[h++]=t.v2,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e+n,o[h++]=i+r,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u2,o[h++]=t.v,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e,o[h++]=i+r,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u,o[h++]=t.v,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),this.batcher.draw(t.texture,o,this.QUAD_TRIANGLES)},n.prototype.line=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,i,n,r)},n.prototype.triangle=function(t,e,i,n,r,s,a,o,h,l){void 0===o&&(o=null),void 0===h&&(h=null),void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.triangle(t,e,i,n,r,s,a,o,h,l)},n.prototype.quad=function(t,e,i,n,r,s,a,o,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,i,n,r,s,a,o,h,l,u,c,f)},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,i,n,r,s)},n.prototype.rectLine=function(t,e,i,n,r,s,a){void 0===a&&(a=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,i,n,r,s,a)},n.prototype.polygon=function(t,e,i,n){void 0===n&&(n=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,i,n)},n.prototype.circle=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,i,n,r,s)},n.prototype.curve=function(t,e,i,n,r,s,a,o,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,i,n,r,s,a,o,h,l)},n.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},n.prototype.resize=function(t){var e=this.canvas,n=e.clientWidth,r=e.clientHeight;if(e.width==n&&e.height==r||(e.width=n,e.height=r),this.context.gl.viewport(0,0,e.width,e.height),t===i.Stretch);else if(t===i.Expand)this.camera.setViewport(n,r);else if(t===i.Fit){var s=e.width,a=e.height,o=this.camera.viewportWidth,h=this.camera.viewportHeight,l=h/o10920)throw new Error("Can't have more than 10920 triangles per batch: "+r);this.context=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.mesh=new e.Mesh(n,[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 n.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)},n.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},n.prototype.setColor=function(t){this.color.setFromColor(t)},n.prototype.setColorWith=function(t,e,i,n){this.color.set(t,e,i,n)},n.prototype.point=function(t,e,n){void 0===n&&(n=null),this.check(i.Point,1),null===n&&(n=this.color),this.vertex(t,e,n)},n.prototype.line=function(t,e,n,r,s){void 0===s&&(s=null),this.check(i.Line,2);this.mesh.getVertices(),this.vertexIndex;null===s&&(s=this.color),this.vertex(t,e,s),this.vertex(n,r,s)},n.prototype.triangle=function(t,e,n,r,s,a,o,h,l,u){void 0===h&&(h=null),void 0===l&&(l=null),void 0===u&&(u=null),this.check(t?i.Filled:i.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,n,h),this.vertex(r,s,l),this.vertex(a,o,u)):(this.vertex(e,n,h),this.vertex(r,s,l),this.vertex(r,s,h),this.vertex(a,o,l),this.vertex(a,o,h),this.vertex(e,n,l))},n.prototype.quad=function(t,e,n,r,s,a,o,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?i.Filled:i.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,n,u),this.vertex(r,s,c),this.vertex(a,o,f),this.vertex(a,o,f),this.vertex(h,l,d),this.vertex(e,n,u)):(this.vertex(e,n,u),this.vertex(r,s,c),this.vertex(r,s,c),this.vertex(a,o,f),this.vertex(a,o,f),this.vertex(h,l,d),this.vertex(h,l,d),this.vertex(e,n,u))},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.quad(t,e,i,e+n,i,e+n,i+r,e,i+r,s,s,s,s)},n.prototype.rectLine=function(t,e,n,r,s,a,o){void 0===o&&(o=null),this.check(t?i.Filled:i.Line,8),null===o&&(o=this.color);var h=this.tmp.set(s-n,e-r);h.normalize(),a*=.5;var l=h.x*a,u=h.y*a;t?(this.vertex(e+l,n+u,o),this.vertex(e-l,n-u,o),this.vertex(r+l,s+u,o),this.vertex(r-l,s-u,o),this.vertex(r+l,s+u,o),this.vertex(e-l,n-u,o)):(this.vertex(e+l,n+u,o),this.vertex(e-l,n-u,o),this.vertex(r+l,s+u,o),this.vertex(r-l,s-u,o),this.vertex(r+l,s+u,o),this.vertex(e+l,n+u,o),this.vertex(r-l,s-u,o),this.vertex(e-l,n-u,o))},n.prototype.x=function(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)},n.prototype.polygon=function(t,e,n,r){if(void 0===r&&(r=null),n<3)throw new Error("Polygon must contain at least 3 vertices");this.check(i.Line,2*n),null===r&&(r=this.color);this.mesh.getVertices(),this.vertexIndex;n<<=1;for(var s=t[e<<=1],a=t[e+1],o=e+n,h=e,l=e+n-2;h=o?(f=s,d=a):(f=t[h+2],d=t[h+3]),this.vertex(u,c,r),this.vertex(f,d,r)}},n.prototype.circle=function(e,n,r,s,a,o){if(void 0===a&&(a=null),void 0===o&&(o=0),0===o&&(o=Math.max(1,6*t.MathUtils.cbrt(s)|0)),o<=0)throw new Error("segments must be > 0.");null===a&&(a=this.color);var h=2*t.MathUtils.PI/o,l=Math.cos(h),u=Math.sin(h),c=s,f=0;if(e){this.check(i.Filled,3*o+3),o--;for(p=0;p0;)this.vertex(E,T,u),E+=b,T+=R,b+=A,R+=S,A+=C,S+=I,this.vertex(E,T,u);this.vertex(E,T,u),this.vertex(o,h,u)},n.prototype.vertex=function(t,e,i){var n=this.vertexIndex,r=this.mesh.getVertices();r[n++]=t,r[n++]=e,r[n++]=i.r,r[n++]=i.g,r[n++]=i.b,r[n++]=i.a,this.vertexIndex=n},n.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},n.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},n.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=a+f.data.length*f.c+f.worldY;e.rectLine(!0,s+f.worldX,a+f.worldY,d,p,this.boneWidth*this.scale)}}this.drawSkeletonXY&&e.x(s,a,4*this.scale)}if(this.drawRegionAttachments){e.setColor(this.attachmentLineColor);for(u=0,c=(U=n.slots).length;u0){e.setColor(this.attachmentLineColor);var R=g[(x=2*(x>>1))-2],A=g[x-1];for(y=0,w=x;y-1||e.circle(!0,s+f.worldX,a+f.worldY,3*this.scale,i.GREEN,8)}}if(this.drawClipping){var U=n.slots;e.setColor(this.clipColor);for(u=0,c=U.length;u=0&&s==A.data.index&&(E=!0),E){a>=0&&a==A.data.index&&(E=!1);var S=A.getAttachment(),C=null;if(S instanceof t.RegionAttachment){var I=S;v.vertices=this.vertices,v.numVertices=4,v.numFloats=R<<2,I.computeWorldVertices(A.bone,v.vertices,0,R),m=n.QUAD_TRIANGLES,g=I.uvs,C=I.region.renderObject.texture,x=I.color}else{if(!(S instanceof t.MeshAttachment)){if(S instanceof t.ClippingAttachment){var P=S;o.clipStart(A,P);continue}o.clipEndWithSlot(A);continue}var L=S;v.vertices=this.vertices,v.numVertices=L.worldVerticesLength>>1,v.numFloats=v.numVertices*R,v.numFloats>v.vertices.length&&(v.vertices=this.vertices=t.Utils.newFloatArray(v.numFloats)),L.computeWorldVertices(A,0,L.worldVerticesLength,v.vertices,0,R),m=L.triangles,C=L.region.renderObject.texture,g=L.uvs,x=L.color}if(null!=C){var _=A.color,k=this.tempColor;k.r=y.r*_.r*x.r,k.g=y.g*_.g*x.g,k.b=y.b*_.b*x.b,k.a=y.a*_.a*x.a,h&&(k.r*=k.a,k.g*=k.a,k.b*=k.a);var F=this.tempColor2;null==A.darkColor?F.set(0,0,0,1):(h?(F.r=A.darkColor.r*k.a,F.g=A.darkColor.g*k.a,F.b=A.darkColor.b*k.a):F.setFromColor(A.darkColor),F.a=h?1:0);var O=A.data.blendMode;if(O!=u&&(u=O,i.setBlendMode(e.WebGLBlendModeConverter.getSourceGLBlendMode(u,h),e.WebGLBlendModeConverter.getDestGLBlendMode(u))),o.isClipping()){o.clipTriangles(v.vertices,v.numFloats,m,m.length,g,k,F,l);var D=new Float32Array(o.clippedVertices),V=o.clippedTriangles;if(null!=this.vertexEffect){var N=this.vertexEffect,X=D;if(l){B=0;for(var Y=D.length;B-1&&this.restorables.splice(e,1)},t}();e.ManagedWebGLRenderingContext=i;var n=function(){function e(){}return e.getDestGLBlendMode=function(i){switch(i){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: "+i)}},e.getSourceGLBlendMode=function(i,n){switch(void 0===n&&(n=!1),i){case t.BlendMode.Normal:case t.BlendMode.Additive:return n?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: "+i)}},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=n}(t.webgl||(t.webgl={}))}(n||(n={})),t.exports=n}).call(window)},3524:(t,e,i)=>{var n=i(7473),r=i(4597),s=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),u=new n({Extends:h,initialize:function(t,e,i,n,s,u,c){var f,d,p,v=[],g=t.cacheManager.custom.spine;if(a(e)){var m=e;for(e=r(m,"key"),d=new o(t,{key:e,url:r(m,"jsonURL"),extension:r(m,"jsonExtension","json"),xhrSettings:r(m,"jsonXhrSettings")}),n=r(m,"atlasURL"),s=r(m,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),f=0;f{var n=i(2494),r=i(7473),s=i(5851),a=i(3527),o=i(5722),h=i(1847),l=i(3524),u=i(8332),c=i(5782),f=i(1984),d=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.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=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:f,postRender:f,render:f,destroy:f});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,n,r,s){var a=this.scene.sys[i],o=new u(this.scene,a,t,e,n,r,s);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=s(t,"key",null),a=s(t,"animationName",null),o=s(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),n(this.scene,l,t);var c=s(t,"skinName",!1);c&&l.setSkinByName(c);var f=s(t,"slotName",!1),d=s(t,"attachmentName",null);return f&&l.setAttachment(f,d),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,n){var r=this.scene.sys[i],s=new c(this.scene,r,t,e,n);return this.displayList.add(s),s}),(function(t,e){void 0===t&&(t={});var r=s(t,"x",0),a=s(t,"y",0),o=s(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))}},e=this.renderer.spineSceneRenderer;e||((e=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,e.shapes.setBlendMode=t,this.renderer.spineSceneRenderer=e),this.sceneRenderer=e,this.skeletonRenderer=e.skeletonRenderer,this.skeletonDebugRenderer=e.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 i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures;i=new h.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new h.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(s,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,r,s){var a;if(Array.isArray(t))for(var o=0;o{var n=i(7473),r=i(7361),s=i(2437),a=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s){r.call(this,t,i,n,s),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},8064:t=>{t.exports=function(t,e,i,n){var r=e.list;if(0!==r.length){i.addToRenderList(e);var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var n=i(1984),r=i(1984);n=i(434),r=i(8064),t.exports={renderWebGL:n,renderCanvas:r}},434:t=>{t.exports=function(t,e,i,n){var r=e.plugin.sceneRenderer,s=e.list;if(0!==s.length){i.addToRenderList(e);var a=e.localTransform;n?(a.loadIdentity(),a.multiply(n),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var o=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var n=i(6412),r=i(2915),s=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),u=i(3212),c=i(8414),f=i(3426),d=i(7149),p=i(2273),v=i(4208),g=i(5146),m=i(2762),M=new s({Extends:p,Mixins:[a,o,h,l,u,c,m],initialize:function(t,e,i,n,r,s,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),r&&this.setSkeleton(r,s,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var n=this.plugin,r=n.sceneRenderer;n.gl&&r.batcher.isDrawing&&(r.end(),n.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,n=(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=i,a.color.g=n,a.color.b=r,null!==s&&(a.color.a=s),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=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,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{var n=i(3426),r=i(4208),s=i(8445);t.exports=function(t,e,i,a){var o=t.currentContext,h=e.plugin,l=e.skeleton,u=h.skeletonRenderer,c=t._tempMatrix1,f=t._tempMatrix2,d=t._tempMatrix3;i.addToRenderList(e),f.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),c.copyFrom(i.matrix),a?(c.multiplyWithOffset(a,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),f.e=e.x,f.f=e.y,c.multiply(f,d)):(f.e-=i.scrollX*e.scrollFactorX,f.f-=i.scrollY*e.scrollFactorY,c.multiply(f,d)),l.x=d.tx,l.y=d.ty,l.scaleX=d.scaleX,l.scaleY=-1*d.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=r(d.rotationNormalized)):e.root.rotation=s(r(n(d.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*r(d.rotationNormalized):e.root.rotation+=2*r(d.rotationNormalized)),i.renderToTexture&&(l.y=d.ty,l.scaleY*=-1),l.updateWorldTransform(),u.ctx=o,u.debugRendering=h.drawDebug||e.drawDebug,o.save(),u.draw(l),o.restore()}},2762:(t,e,i)=>{var n=i(1984),r=i(1984),s=i(1984);n=i(4290),s=i(780),r=i(2753),t.exports={renderWebGL:n,renderCanvas:r,renderDirect:s}},780:(t,e,i)=>{var n=i(2915),r=i(3426),s=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var u=e.plugin,c=e.skeleton,f=u.sceneRenderer;t.pipelines.clear(),f.begin();var d=e.scrollFactorX,p=e.scrollFactorY,v=c.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,c.color.a=n(v*l.alpha,0,1)),i.addToRenderList(e);var g=s(e,i,h).calc,m=t.height;if(c.x=g.tx,c.y=m-g.ty,c.scaleX=g.scaleX,c.scaleY=g.scaleY,e.scaleX<0?(c.scaleX*=-1,e.root.rotation=o(a(g.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(c.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(g.rotationNormalized):e.root.rotation+=2*a(g.rotationNormalized)),c.updateWorldTransform(),f.drawSkeleton(c,e.preMultipliedAlpha),l&&(e.scrollFactorX=d,e.scrollFactorY=p,c.color.a=v),u.drawDebug||e.drawDebug){var M=c.x,x=c.y;c.x=0,c.y=0,f.drawSkeletonDebug(c,e.preMultipliedAlpha),c.x=M,c.y=x}f.end(),t.pipelines.rebind()}},4290:(t,e,i)=>{var n=i(2915),r=i(3426),s=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var u=e.plugin,c=e.skeleton,f=u.sceneRenderer;t.newType&&(t.pipelines.clear(),f.begin());var d=e.scrollFactorX,p=e.scrollFactorY,v=c.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,c.color.a=n(v*l.alpha,0,1)),i.addToRenderList(e);var g=s(e,i,h).calc,m=t.height;if(c.x=g.tx,c.y=m-g.ty,c.scaleX=g.scaleX,c.scaleY=g.scaleY,e.scaleX<0?(c.scaleX*=-1,e.root.rotation=o(a(g.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(c.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(g.rotationNormalized):e.root.rotation+=2*a(g.rotationNormalized)),c.updateWorldTransform(),f.drawSkeleton(c,e.preMultipliedAlpha),l&&(e.scrollFactorX=d,e.scrollFactorY=p,c.color.a=v),u.drawDebug||e.drawDebug){var M=c.x,x=c.y;c.x=0,c.y=0,f.drawSkeletonDebug(c,e.preMultipliedAlpha),c.x=M,c.y=x}t.nextTypeMatch||(f.end(),t.pipelines.rebind())}},8599:t=>{t.exports="blur"},3570:t=>{t.exports="boot"},7950:t=>{t.exports="contextlost"},5389:t=>{t.exports="contextrestored"},4679:t=>{t.exports="destroy"},6903:t=>{t.exports="focus"},9638:t=>{t.exports="hidden"},2505:t=>{t.exports="pause"},8616:t=>{t.exports="postrender"},1868:t=>{t.exports="poststep"},2075:t=>{t.exports="prerender"},918:t=>{t.exports="prestep"},8136:t=>{t.exports="ready"},5113:t=>{t.exports="resume"},2029:t=>{t.exports="step"},527:t=>{t.exports="visible"},5215:(t,e,i)=>{t.exports={BLUR:i(8599),BOOT:i(3570),CONTEXT_LOST:i(7950),CONTEXT_RESTORED:i(5389),DESTROY:i(4679),FOCUS:i(6903),HIDDEN:i(9638),PAUSE:i(2505),POST_RENDER:i(8616),POST_STEP:i(1868),PRE_RENDER:i(2075),PRE_STEP:i(918),READY:i(8136),RESUME:i(5113),STEP:i(2029),VISIBLE:i(527)}},1081:(t,e,i)=>{var n=i(7473),r=i(6748),s=new n({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(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},7499:(t,e,i)=>{var n=i(7473),r=i(5215),s=i(8604),a=new n({initialize:function(t,e){var i=t.sys.renderer;this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.scene=t,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this),i&&i.on(s.RESIZE,this.createMask,this)},createMask:function(){var t=this.renderer;if(t&&t.gl){this.mainTexture&&this.clearMask();var e=t.width,i=t.height,n=0==(e&e-1)&&0==(i&i-1),r=t.gl,s=n?r.REPEAT:r.CLAMP_TO_EDGE,a=r.LINEAR;this.mainTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,i),this.mainFramebuffer=t.createFramebuffer(e,i,this.mainTexture,!0),this.maskFramebuffer=t.createFramebuffer(e,i,this.maskTexture,!0)}},clearMask:function(){var t=this.renderer;t&&t.gl&&this.mainTexture&&(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)},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.scene.sys.game.events.off(r.CONTEXT_RESTORED,this.createMask,this),this.renderer&&this.renderer.off(s.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=a},6726:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var n=t.maskStack[t.maskStack.length-1];n.mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},2494:(t,e,i)=>{var n=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var s=r(i,"scale",null);"number"==typeof s?e.setScale(s):null!==s&&(e.scaleX=r(s,"x",1),e.scaleY=r(s,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",n.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var n=i(7473),r=i(6125),s=i(1081),a=i(4399),o=i(3389),h=i(204),l=new n({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},2208:(t,e,i)=>{var n=i(4227),r=new n,s=new n,a=new n,o={camera:r,sprite:s,calc:a};t.exports=function(t,e,i){var n=r,h=s,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),n.multiply(h,l),o}},4344:(t,e,i)=>{var n=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var n=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var n=i(8351),r={_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=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.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},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},9660:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var n=i(2150),r=i(9876),s=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new 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,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,s,a,o,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,s=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,s=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,s,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,s,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var n=i(7499),r=i(6726),s={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||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&(this instanceof Phaser.GameObjects.Graphics||this instanceof Phaser.GameObjects.Shape)&&(t=this),new r(this.scene,t)}};t.exports=s},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var n=i(7149),r=i(1864),s=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=s(t,"from",0),t.to=s(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=s(t,"rotationOffset",0);var l=s(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var s=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-s,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var n=i(3911),r=i(5412),s=i(8935),a={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){void 0===t&&(t=r.MULTI_PIPELINE);var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){var n=i.get(t);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){var a=s.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?n(e):e)}return this},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),s(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},4759:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:t=>{var e={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=e},9243:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var n=i(7425),r=i(4227),s=i(7556),a=i(3692),o=i(2820),h=i(2529),l={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(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},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,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 h),n||(n=this.scene.sys.cameras.main);var r=n.scrollX,a=n.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):s(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var n=i(7473),r=i(7425),s=i(2529),a=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],s=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||s?r.TAU-(s>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3];return n[0]=r*i+a*e,n[1]=s*i+o*e,n[2]=r*-e+a*i,n[3]=s*-e+o*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],g=void 0===e?this:e;return g.a=u*r+c*a,g.b=u*s+c*o,g.c=f*r+d*a,g.d=f*s+d*o,g.e=p*r+v*a+h,g.f=p*s+v*o+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],a=n[1],o=n[2],h=n[3],l=e*s+i*o+n[4],u=e*a+i*h+n[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],g=r[5];return n[0]=c*s+f*o,n[1]=c*a+f*h,n[2]=d*s+p*o,n[3]=d*a+p*h,n[4]=v*s+g*o+l,n[5]=v*a+g*h+u,this},transform:function(t,e,i,n,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]=i*o+n*l,a[3]=i*h+n*u,a[4]=r*o+s*l+c,a[5]=r*h+s*u+f,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5];return i.x=t*r+e*a+h,i.y=t*s+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=e*r-i*n;return t[0]=r/o,t[1]=-i/o,t[2]=-n/o,t[3]=e/o,t[4]=(n*a-r*s)/o,t[5]=-(e*a-i*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,i,n,r,s){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=r,a[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],a=i*s-n*r;if(t.translateX=e[4],t.translateY=e[5],i||n){var o=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/o):-Math.acos(i/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,i,n,r){var s=this.matrix,a=Math.sin(i),o=Math.cos(i);return s[4]=t,s[5]=e,s[0]=o*n,s[1]=a*n,s[2]=-a*r,s[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],a=n[1],o=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=r*c*e+-a*c*t+(-u*r+l*a)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},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},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),ScrollFactor:i(4627),Size:i(4759),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var n=i(1953),r=i(8351),s=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(2150),u=i(3232),c=i(9422),f=i(2529),d=new s({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Pipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,n=[null],r=this.list.slice(),s=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=d},2840:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list;if(0!==r.length){var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var n=i(1984),r=i(1984);n=i(4343),r=i(2840),t.exports={renderWebGL:n,renderCanvas:r}},4343:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list,s=r.length;if(0!==s){var a=e.localTransform;n?(a.loadIdentity(),a.multiply(n),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},5241:t=>{t.exports="loop"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},8118:t=>{t.exports="stop"},5529:t=>{t.exports="timeout"},4287:t=>{t.exports="unlocked"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STOP:i(8118),VIDEO_TIMEOUT:i(5529),VIDEO_UNLOCKED:i(4287)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var n=i(7655);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}},4479:(t,e,i)=>{var n=i(4771),r=i(7655);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=n(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var n=i(7473),r=i(8881),s=i(4479),a=i(1643),o=i(3915),h=i(2529),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.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return o(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},3915:(t,e,i)=>{var n=i(7655);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var n=i(7473),r=i(1643),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},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var n=i(8073),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var s=n(t)*e;return e>.5?(s-=t.width+t.height)<=t.width?(i.x=t.right-s,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(s-t.width)):s<=t.width?(i.x=t.x+s,i.y=t.y):(i.x=t.right,i.y=t.y+(s-t.width)),i}},8151:(t,e,i)=>{var n=i(716),r=i(8073);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var n=i(7655);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},2150:(t,e,i)=>{var n=i(7473),r=i(5956),s=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),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.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},9422:(t,e,i)=>{var n=i(2150);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=Math.min(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-s;return i.setTo(r,s,a,o)}},1593:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),u=i(707),c=new n({initialize:function(t,e){this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var n=a(e,"url");void 0===n?n=t.path+i+"."+a(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&(0===t.responseURL.indexOf("file://")||0===t.responseURL.indexOf("capacitor://"))&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},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(){console.error('Failed to process file: %s "%s"',this.type,this.key),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.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var n=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);return i}},3137:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1179),a=new n({initialize:function(t,e,i,n){var s=[];n.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.state=r.FILE_PENDING,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a{var n=i(7410);t.exports=function(t,e){var i=n(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var s in i.headers)r.setRequestHeader(s,i.headers[s]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{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}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),u=new n({Extends:s,initialize:function t(e,i,n,r,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),n=o(c,"url"),l=o(c,"normalMap"),r=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var f={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:r,config:a};if(s.call(this,e,f),l){var d=new t(e,this.key,l,r,a);d.type="normalMap",this.setLink(d),e.addFile(d)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){s.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(t.data),t.onProcessError()},s.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t&&t.state===r.FILE_COMPLETE?"image"===this.type?this.cache.addImage(this.key,this.data,t.data):this.cache.addImage(t.key,t.data,this.data):t||this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),u=new n({Extends:s,initialize:function(t,e,i,n,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),n=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var f={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:a};s.call(this,t,f),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new n({Extends:s,initialize:function(t,e,i,n){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),n=o(u,"xhrSettings"),a=o(u,"extension",a),r=o(u,"type",r),l=o(u,"cache",l)}var c={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n{t.exports=function(t){for(var e=0,i=0;i{var n=i(3916);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,n,r){var s=.5*(n-e),a=.5*(r-i),o=t*t;return(2*i-2*n+s+a)*(t*o)+(-3*i+3*n-2*s-a)*o+s*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t*n.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var n=i(2915),r=i(7473),s=i(9652),a=i(1984),o=new s,h=new r({initialize:function t(e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,s=r[0],a=r[4],o=r[8],h=r[1],l=r[5],u=r[9],c=r[2],f=r[6],d=r[10],p=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(n(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},1555:(t,e,i)=>{var n=i(2915);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var n=new(i(7473))({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 e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=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+i*c+n*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*i+n*h)*d,t[2]=(a*i-n*s)*d,t[3]=c*d,t[4]=(l*e-n*o)*d,t[5]=(-a*e+n*r)*d,t[6]=f*d,t[7]=(-h*e+i*o)*d,t[8]=(s*e-i*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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]=n*h-i*l,t[2]=i*a-n*s,t[3]=a*o-r*l,t[4]=e*l-n*o,t[5]=n*r-e*a,t[6]=r*h-s*o,t[7]=i*o-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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)+i*(-l*r+a*o)+n*(h*r-s*o)},multiply:function(t){var e=this.val,i=e[0],n=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],g=c[4],m=c[5],M=c[6],x=c[7],y=c[8];return e[0]=f*i+d*s+p*h,e[1]=f*n+d*a+p*l,e[2]=f*r+d*o+p*u,e[3]=v*i+g*s+m*h,e[4]=v*n+g*a+m*l,e[5]=v*r+g*o+m*u,e[6]=M*i+x*s+y*h,e[7]=M*n+x*a+y*l,e[8]=M*r+x*o+y*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=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*i+h*s,e[1]=l*n+h*a,e[2]=l*r+h*o,e[3]=l*s-h*i,e[4]=l*a-h*n,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,a=i+i,o=n+n,h=e*s,l=e*a,u=e*o,c=i*a,f=i*o,d=n*o,p=r*s,v=r*a,g=r*o,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,i=this.val,n=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],g=e[13],m=e[14],M=e[15],x=n*h-r*o,y=n*l-s*o,w=n*u-a*o,E=r*l-s*h,T=r*u-a*h,b=s*u-a*l,R=c*g-f*v,A=c*m-d*v,S=c*M-p*v,C=f*m-d*g,I=f*M-p*g,P=d*M-p*m,L=x*P-y*I+w*C+E*S-T*A+b*R;return L?(L=1/L,i[0]=(h*P-l*I+u*C)*L,i[1]=(l*S-o*P-u*A)*L,i[2]=(o*I-h*S+u*R)*L,i[3]=(s*I-r*P-a*C)*L,i[4]=(n*P-s*S+a*A)*L,i[5]=(r*S-n*I-a*R)*L,i[6]=(g*b-m*T+M*E)*L,i[7]=(m*w-v*b-M*y)*L,i[8]=(v*T-g*w+M*x)*L,this):null}});t.exports=n},9652:(t,e,i)=>{var n=i(7473),r=i(5689),s=1e-6,a=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,r,s,a,o,h,l,u,c,f,d,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=r,g[5]=s,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=f,g[13]=d,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=o.fromQuat(i).val,r=e.x,s=e.y,a=e.z;return this.setValues(n[0]*r,n[1]*r,n[2]*r,0,n[4]*s,n[5]*s,n[6]*s,0,n[8]*a,n[9]*a,n[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=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]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15],m=e*a-i*s,M=e*o-n*s,x=e*h-r*s,y=i*o-n*a,w=i*h-r*a,E=n*h-r*o,T=l*p-u*d,b=l*v-c*d,R=l*g-f*d,A=u*v-c*p,S=u*g-f*p,C=c*g-f*v,I=m*C-M*S+x*A+y*R-w*b+E*T;return I?(I=1/I,this.setValues((a*C-o*S+h*A)*I,(n*S-i*C-r*A)*I,(p*E-v*w+g*y)*I,(c*w-u*E-f*y)*I,(o*R-s*C-h*b)*I,(e*C-n*R+r*b)*I,(v*x-d*E-g*M)*I,(l*E-c*x+f*M)*I,(s*S-a*R+h*T)*I,(i*R-e*S-r*T)*I,(d*w-p*x+g*m)*I,(u*x-l*w-f*m)*I,(a*b-s*A-o*T)*I,(e*A-i*b+n*T)*I,(p*M-d*y-v*m)*I,(l*y-u*M+c*m)*I)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15];return this.setValues(a*(c*g-f*v)-u*(o*g-h*v)+p*(o*f-h*c),-(i*(c*g-f*v)-u*(n*g-r*v)+p*(n*f-r*c)),i*(o*g-h*v)-a*(n*g-r*v)+p*(n*h-r*o),-(i*(o*f-h*c)-a*(n*f-r*c)+u*(n*h-r*o)),-(s*(c*g-f*v)-l*(o*g-h*v)+d*(o*f-h*c)),e*(c*g-f*v)-l*(n*g-r*v)+d*(n*f-r*c),-(e*(o*g-h*v)-s*(n*g-r*v)+d*(n*h-r*o)),e*(o*f-h*c)-s*(n*f-r*c)+l*(n*h-r*o),s*(u*g-f*p)-l*(a*g-h*p)+d*(a*f-h*u),-(e*(u*g-f*p)-l*(i*g-r*p)+d*(i*f-r*u)),e*(a*g-h*p)-s*(i*g-r*p)+d*(i*h-r*a),-(e*(a*f-h*u)-s*(i*f-r*u)+l*(i*h-r*a)),-(s*(u*v-c*p)-l*(a*v-o*p)+d*(a*c-o*u)),e*(u*v-c*p)-l*(i*v-n*p)+d*(i*c-n*u),-(e*(a*v-o*p)-s*(i*v-n*p)+d*(i*o-n*a)),e*(a*c-o*u)-s*(i*c-n*u)+l*(i*o-n*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15];return(e*a-i*s)*(c*g-f*v)-(e*o-n*s)*(u*g-f*p)+(e*h-r*s)*(u*v-c*p)+(i*o-n*a)*(l*g-f*d)-(i*h-r*a)*(l*v-c*d)+(n*h-r*o)*(l*p-u*d)},multiply:function(t){var e=this.val,i=e[0],n=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],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*i+y*a+w*u+E*p,e[1]=x*n+y*o+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*i+y*a+w*u+E*p,e[5]=x*n+y*o+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*i+y*a+w*u+E*p,e[9]=x*n+y*o+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*i+y*a+w*u+E*p,e[13]=x*n+y*o+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=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,r=i[0],s=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],f=i[2],d=i[6],p=i[10],v=i[14],g=i[3],m=i[7],M=i[11],x=i[15],y=n[0],w=n[4],E=n[8],T=n[12],b=n[1],R=n[5],A=n[9],S=n[13],C=n[2],I=n[6],P=n[10],L=n[14],_=n[3],k=n[7],F=n[11],O=n[15];return this.setValues(r*y+s*b+a*C+o*_,h*y+l*b+u*C+c*_,f*y+d*b+p*C+v*_,g*y+m*b+M*C+x*_,r*w+s*R+a*I+o*k,h*w+l*R+u*I+c*k,f*w+d*R+p*I+v*k,g*w+m*R+M*I+x*k,r*E+s*A+a*P+o*F,h*E+l*A+u*P+c*F,f*E+d*A+p*P+v*F,g*E+m*A+M*P+x*F,r*T+s*S+a*L+o*O,h*T+l*S+u*L+c*O,f*T+d*S+p*L+v*O,g*T+m*S+M*L+x*O)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,a=t.y,o=t.z,h=r*s,l=r*a;return this.setValues(h*s+i,h*a-n*o,h*o+n*a,0,h*a+n*o,l*a+i,l*o-n*s,0,h*o-n*a,l*o+n*s,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,a=e.z,o=Math.sqrt(n*n+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var n=i(7473),r=i(2149),s=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new a(1,0,0),c=new a(0,1,0),f=new a,d=new r,p=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(f.copy(u).cross(t).length().999999?this.set(0,0,0,1):(f.copy(t).cross(e),this._x=f.x,this._y=f.y,this._z=f.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=d.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(d).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*s+i*o-n*a,i*h+r*a+n*s-e*o,n*h+r*o+e*a-i*s,r*h-e*s-i*a-n*o)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,a=t.x,h=t.y,l=t.z,u=t.w,c=i*a+n*h+r*l+s*u;c<0&&(c=-c,a=-a,h=-h,l=-l,u=-u);var f=1-e,d=e;if(1-c>o){var p=Math.acos(c),v=Math.sin(p);f=Math.sin((1-e)*p)/v,d=Math.sin(e*p)/v}return this.set(f*i+d*a,f*n+d*h,f*r+d*l,f*s+d*u)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.set(-t*s,-e*s,-i*s,n*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*s,i*a+n*s,n*a-i*s,r*a-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a-n*s,i*a+r*s,n*a+e*s,r*a-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*s,i*a-e*s,n*a+r*s,r*a-n*s)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,r=t.z/2,s=Math.cos(i),a=Math.cos(n),o=Math.cos(r),h=Math.sin(i),l=Math.sin(n),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],r=i[4],s=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],f=n+o+c;return f>0?(e=.5/Math.sqrt(f+1),this.set((u-h)*e,(s-l)*e,(a-r)*e,.25/e)):n>o&&n>c?(e=2*Math.sqrt(1+n-o-c),this.set(.25*e,(r+a)/e,(s+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-n-c),this.set((r+a)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-n-o),this.set((s+l)/e,(h+u)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var s=h[r],a=h[s];e=Math.sqrt(i[3*r+r]-i[3*s+s]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[s]=(i[3*s+r]+i[3*r+s])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+s]-i[3*s+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t*n.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),a=t.x-e,o=t.y-i;return t.x=a*r-o*s+e,t.y=a*s+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},4497:t=>{t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},9640:(t,e,i)=>{var n=i(5689),r=i(9652),s=i(372),a=new r,o=new s,h=new n;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},4936:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var n=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new n);var s=0,a=0;return t>0&&t<=e*i&&(s=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(s,a)}},7556:(t,e,i)=>{var n=i(2529);t.exports=function(t,e,i,r,s,a,o,h){void 0===h&&(h=new n);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-i*p)*v,h.y=c*v*e+-f*v*t+(-r*c+i*f)*v,h}},2529:(t,e,i)=>{var n=i(7473),r=i(12),s=new n({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 s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},5689:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=n*o-r*a,this.y=r*s-i*o,this.z=i*a-n*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,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,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 n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z;return this.x=i*a-n*s,this.y=n*r-e*a,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],a=e*r[1]+i*r[5]+n*r[9]+r[13],o=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*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,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*n-a*i,l=o*i+a*e-r*n,u=o*n+r*i-s*e,c=-r*e-s*i-a*n;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,i=this.y,n=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],g=r[11],m=r[12],M=r[13],x=r[14],y=1/(e*h+i*f+n*g+r[15]);return this.x=(e*s+i*l+n*d+m)*y,this.y=(e*a+i*u+n*p+M)*y,this.z=(e*o+i*c+n*v+x)*y,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,a=this.x-i,o=s-this.y-1-n,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}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},9279:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e,i,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=e||0,this.z=i||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,e,i,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=e||0,this.z=i||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,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*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 i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),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,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+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,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*n-a*i,l=o*i+a*e-r*n,u=o*n+r*i-s*e,c=-r*e-s*i-a*n;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}});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},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},6412:t=>{t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},3426:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var n=i(104);t.exports=function(){return n(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var n=i(104);t.exports=function(){return n(-180,180)}},936:(t,e,i)=>{var n=i(6906);t.exports=function(t){return n(t+Math.PI)}},1935:(t,e,i)=>{var n=i(7425);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&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var n=i(8445);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var n=i(8445);t.exports=function(t){return n(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},4361:t=>{t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},7798:t=>{t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},8290:t=>{t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},3788:t=>{t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var n=i(7425),r=i(1030),s={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};s=r(!1,s,n),t.exports=s},1640:(t,e,i)=>{var n=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,s=0;s<=r;s++)i+=Math.pow(1-e,r-s)*Math.pow(e,s)*t[s]*n(r,s);return i}},6105:(t,e,i)=>{var n=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return t[0]===t[i]?(e<0&&(s=Math.floor(r=i*(1+e))),n(r-s,t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i])):e<0?t[0]-(n(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(r-s,t[s?s-1:0],t[s],t[i{t.exports=function(t,e,i,n,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var n=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return e<0?n(t[0],t[1],r):e>1?n(t[i],t[i-1],i-r):n(t[s],t[s+1>i?i:s+1],r-s)}},6388:t=>{t.exports=function(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},5735:(t,e,i)=>{var n=i(2733);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},8705:(t,e,i)=>{var n=i(278);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var n=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},5659:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var n=new(i(7473))({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=n},5722:(t,e,i)=>{var n=i(8666),r=i(7473),s=i(204),a=new r({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,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},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},387:t=>{t.exports="postrender"},7970:t=>{t.exports="prerender"},674:t=>{t.exports="render"},9418:t=>{t.exports="resize"},8604:(t,e,i)=>{t.exports={POST_RENDER:i(387),PRE_RENDER:i(7970),RENDER:i(674),RESIZE:i(9418)}},5412:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline"}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},7473:t=>{function e(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&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 i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function n(t,n,r,a){for(var o in n)if(n.hasOwnProperty(o)){var h=e(n,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(s.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]=n[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),i>0){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>s&&(e.splice(s),a=s);for(var o=0;o{t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),n>0){var a=n-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;n>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var n=i(2497);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var a=0;if(n(t,r,s))for(var o=r;o{t.exports=function(t,e,i){var n,r=[null];for(n=3;n{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(te.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)}},6245:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var a=[];if(n(t,r,s))for(var o=r;o{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n>r||(t.splice(n,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var n=t[i-1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,n){var r,s=[],a=!1;if((i||n)&&(a=!0,i||(i=""),n||(n="")),e=e;r--)a?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)a?s.push(i+r.toString()+n):s.push(r);return s}},1316:(t,e,i)=>{var n=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],s=Math.max(n((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t,r,s,a,o){for(void 0===s&&(s=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>s;){if(a-s>600){var h=a-s+1,l=r-s+1,u=Math.log(h),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),d=Math.max(s,Math.floor(r-l*c/h+f)),p=Math.min(a,Math.floor(r+(h-l)*c/h+f));n(t,r,d,p,o)}var v=t[r],g=s,m=a;for(e(t,s,r),o(t[a],v)>0&&e(t,s,a);g0;)m--}0===o(t[s],v)?e(t,s,m):e(t,++m,a),m<=r&&(s=m+1),r<=m&&(a=m-1)}};t.exports=n},9703:(t,e,i)=>{var n=i(5851),r=i(4912),s=function(t,e,i){for(var n=[],r=0;r{var n=i(8935);t.exports=function(t,e,i,r){var s;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(n(t,s),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(s=t.indexOf(h))&&(n(t,s),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var n=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var s=n(t,e);return i&&i.call(r,s),s}},8780:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),n(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var n=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return n(t,r)}},6960:t=>{t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n{t.exports=function(t,e,i,n){var r=t.length;if(e<0||e>r||e>=i||i>r||e+i>r){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r{function e(t,e){return String(t).localeCompare(e)}function i(t,e,i,n){var r,s,a,o,h,l=t.length,u=0,c=2*i;for(r=0;rl&&(s=l),a>l&&(a=l),o=r,h=s;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var n=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var n=i(7116);t.exports=function(t){return n(t,180)}},2597:(t,e,i)=>{var n=i(7116);t.exports=function(t){return n(t,90)}},7116:(t,e,i)=>{var n=i(1816),r=i(4780);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{var n=i(7116);t.exports=function(t){return n(t,-90)}},7711:(t,e,i)=>{var n=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):r(t,i)),0!==e)for(var s=0;s{t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r-1;s--)n[r][s]=t[s][r]}return n}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,n,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)n=t[r],i[r]=e(n);return i};t.exports=e},1030:(t,e,i)=>{var n=i(2482),r=function(){var t,e,i,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{var n=i(4675),r=i(5851);t.exports=function(t,e,i){var s=r(t,e,null);if(null===s)return i;if(Array.isArray(s))return n.RND.pick(s);if("object"==typeof s){if(s.hasOwnProperty("randInt"))return n.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return n.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if("function"==typeof s)return s(e);return s}},4597:t=>{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}},5851:t=>{t.exports=function(t,e,i,n){if(!t&&!n||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(n&&n.hasOwnProperty(e))return n[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),s=t,a=n,o=i,h=0;h{t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var r=0;if(e+1>=(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(r-s+1).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file +window.SpinePlugin=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=69)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||! +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function r(t,e,r,s){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,r);if(!1!==h){if(n((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 i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(35),s=new n({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 s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e){t.exports=function(t,e,i,n){var r=t.length;if(e<0||e>r||e>=i||i>r){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e){t.exports=function(t,e,i,n){if(!t&&!n||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(n&&n.hasOwnProperty(e))return n[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),s=t,o=n,a=i,h=i,l=!0,u=!0,c=0;c=t.length)){for(var i=t.length-1,n=t[e],r=e;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(30),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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=n*a-r*o,this.y=r*s-i*a,this.z=i*o-n*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,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,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 n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z;return this.x=i*o-n*s,this.y=n*r-e*o,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],o=e*r[1]+i*r[5]+n*r[9]+r[13],a=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*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,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,l=a*i+o*e-r*n,u=a*n+r*i-s*e,c=-r*e-s*i-o*n;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,i=this.y,n=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],y=r[14],x=1/(e*h+i*f+n*g+r[15]);return this.x=(e*s+i*l+n*d+m)*x,this.y=(e*o+i*u+n*p+M)*x,this.z=(e*a+i*c+n*v+y)*x,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=this.x-i,a=s-this.y-1-n,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}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(27),r=i(61);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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n,r=i(28),s={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(n=navigator.userAgent,/Edg\/\d+/.test(n)?(s.edge=!0,s.es2019=!0):/OPR/.test(n)?(s.opera=!0,s.es2019=!0):/Chrome\/(\d+)/.test(n)&&!r.windowsPhone?(s.chrome=!0,s.chromeVersion=parseInt(RegExp.$1,10),s.es2019=s.chromeVersion>69):/Firefox\D+(\d+)/.test(n)?(s.firefox=!0,s.firefoxVersion=parseInt(RegExp.$1,10),s.es2019=s.firefoxVersion>10):/AppleWebKit/.test(n)&&r.iOS?s.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(s.ie=!0,s.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(n)&&!r.windowsPhone?(s.safari=!0,s.safariVersion=parseInt(RegExp.$1,10),s.es2019=s.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(s.ie=!0,s.trident=!0,s.tridentVersion=parseInt(RegExp.$1,10),s.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(s.silk=!0),s)},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(7),r=function(){var t,e,i,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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(16),s=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,r,s,o,a,h,l,u,c,f,d,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=r,g[5]=s,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=f,g[13]=d,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=o.fromQuat(i).val,r=e.x,s=e.y,a=e.z;return this.setValues(n[0]*r,n[1]*r,n[2]*r,0,n[4]*s,n[5]*s,n[6]*s,0,n[8]*a,n[9]*a,n[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=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]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=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-i*s,M=e*a-n*s,y=e*h-r*s,x=i*a-n*o,w=i*h-r*o,E=n*h-r*a,b=l*p-u*d,T=l*v-c*d,A=l*g-f*d,R=u*v-c*p,S=u*g-f*p,C=c*g-f*v,I=m*C-M*S+y*R+x*A-w*T+E*b;return I?(I=1/I,this.setValues((o*C-a*S+h*R)*I,(n*S-i*C-r*R)*I,(p*E-v*w+g*x)*I,(c*w-u*E-f*x)*I,(a*A-s*C-h*T)*I,(e*C-n*A+r*T)*I,(v*y-d*E-g*M)*I,(l*E-c*y+f*M)*I,(s*S-o*A+h*b)*I,(i*A-e*S-r*b)*I,(d*w-p*y+g*m)*I,(u*y-l*w-f*m)*I,(o*T-s*R-a*b)*I,(e*R-i*T+n*b)*I,(p*M-d*x-v*m)*I,(l*x-u*M+c*m)*I)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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 this.setValues(o*(c*g-f*v)-u*(a*g-h*v)+p*(a*f-h*c),-(i*(c*g-f*v)-u*(n*g-r*v)+p*(n*f-r*c)),i*(a*g-h*v)-o*(n*g-r*v)+p*(n*h-r*a),-(i*(a*f-h*c)-o*(n*f-r*c)+u*(n*h-r*a)),-(s*(c*g-f*v)-l*(a*g-h*v)+d*(a*f-h*c)),e*(c*g-f*v)-l*(n*g-r*v)+d*(n*f-r*c),-(e*(a*g-h*v)-s*(n*g-r*v)+d*(n*h-r*a)),e*(a*f-h*c)-s*(n*f-r*c)+l*(n*h-r*a),s*(u*g-f*p)-l*(o*g-h*p)+d*(o*f-h*u),-(e*(u*g-f*p)-l*(i*g-r*p)+d*(i*f-r*u)),e*(o*g-h*p)-s*(i*g-r*p)+d*(i*h-r*o),-(e*(o*f-h*u)-s*(i*f-r*u)+l*(i*h-r*o)),-(s*(u*v-c*p)-l*(o*v-a*p)+d*(o*c-a*u)),e*(u*v-c*p)-l*(i*v-n*p)+d*(i*c-n*u),-(e*(o*v-a*p)-s*(i*v-n*p)+d*(i*a-n*o)),e*(o*c-a*u)-s*(i*c-n*u)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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-i*s)*(c*g-f*v)-(e*a-n*s)*(u*g-f*p)+(e*h-r*s)*(u*v-c*p)+(i*a-n*o)*(l*g-f*d)-(i*h-r*o)*(l*v-c*d)+(n*h-r*a)*(l*p-u*d)},multiply:function(t){var e=this.val,i=e[0],n=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,y=M[0],x=M[1],w=M[2],E=M[3];return e[0]=y*i+x*o+w*u+E*p,e[1]=y*n+x*a+w*c+E*v,e[2]=y*r+x*h+w*f+E*g,e[3]=y*s+x*l+w*d+E*m,y=M[4],x=M[5],w=M[6],E=M[7],e[4]=y*i+x*o+w*u+E*p,e[5]=y*n+x*a+w*c+E*v,e[6]=y*r+x*h+w*f+E*g,e[7]=y*s+x*l+w*d+E*m,y=M[8],x=M[9],w=M[10],E=M[11],e[8]=y*i+x*o+w*u+E*p,e[9]=y*n+x*a+w*c+E*v,e[10]=y*r+x*h+w*f+E*g,e[11]=y*s+x*l+w*d+E*m,y=M[12],x=M[13],w=M[14],E=M[15],e[12]=y*i+x*o+w*u+E*p,e[13]=y*n+x*a+w*c+E*v,e[14]=y*r+x*h+w*f+E*g,e[15]=y*s+x*l+w*d+E*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,r=i[0],s=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],f=i[2],d=i[6],p=i[10],v=i[14],g=i[3],m=i[7],M=i[11],y=i[15],x=n[0],w=n[4],E=n[8],b=n[12],T=n[1],A=n[5],R=n[9],S=n[13],C=n[2],I=n[6],P=n[10],L=n[14],_=n[3],O=n[7],k=n[11],F=n[15];return this.setValues(r*x+s*T+o*C+a*_,h*x+l*T+u*C+c*_,f*x+d*T+p*C+v*_,g*x+m*T+M*C+y*_,r*w+s*A+o*I+a*O,h*w+l*A+u*I+c*O,f*w+d*A+p*I+v*O,g*w+m*A+M*I+y*O,r*E+s*R+o*P+a*k,h*E+l*R+u*P+c*k,f*E+d*R+p*P+v*k,g*E+m*R+M*P+y*k,r*b+s*S+o*L+a*F,h*b+l*S+u*L+c*F,f*b+d*S+p*L+v*F,g*b+m*S+M*L+y*F)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,o=t.y,a=t.z,h=r*s,l=r*o;return this.setValues(h*s+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*s,0,h*a-n*o,l*a+n*s,r*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,s=e.z,o=Math.sqrt(n*n+r*r+s*s);if(Math.abs(o)<1e-6)return this;n*=o=1/o,r*=o,s*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],v=i[5],g=i[6],m=i[7],M=i[8],y=i[9],x=i[10],w=i[11],E=i[12],b=i[13],T=i[14],A=i[15],R=n*n*l+h,S=r*n*l+s*a,C=s*n*l-r*a,I=n*r*l-s*a,P=r*r*l+h,L=s*r*l+n*a,_=n*s*l+r*a,O=r*s*l-n*a,k=s*s*l+h;return this.setValues(u*R+p*S+M*C,c*R+v*S+y*C,f*R+g*S+x*C,d*R+m*S+w*C,u*I+p*P+M*L,c*I+v*P+y*L,f*I+g*P+x*L,d*I+m*P+w*L,u*_+p*O+M*k,c*_+v*O+y*k,f*_+g*O+x*k,d*_+m*O+w*k,E,b,T,A)},rotateX:function(t){var e=this.val,i=Math.sin(t),n=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*n+h*i,e[5]=s*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-r*i,e[9]=l*n-s*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=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*n-h*i,e[1]=s*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=r*i+h*n,e[9]=s*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=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*n+h*i,e[1]=s*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-r*i,e[5]=l*n-s*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=i+i,a=n+n,h=r+r,l=i*o,u=i*a,c=i*h,f=n*a,d=n*h,p=r*h,v=s*o,g=s*a,m=s*h;return this.setValues(1-(f+p),u+m,c-g,0,u-m,1-(l+p),d+v,0,c+g,d-v,1-(l+f),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,l=e*o,u=e*a,c=i*o,f=i*a,d=n*a,p=r*s,v=r*o,g=r*a;return this.setValues(1-(c+d),l+g,u-v,0,l-g,1-(h+d),f+p,0,u+v,f-p,1-(h+c),0,0,0,0,1)},frustum:function(t,e,i,n,r,s){var o=1/(e-t),a=1/(n-i),h=1/(r-s);return this.setValues(2*r*o,0,0,0,0,2*r*a,0,0,(e+t)*o,(n+i)*a,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,i,n){var r=1/Math.tan(t/2),s=1/(i-n);return this.setValues(r/e,0,0,0,0,r,0,0,0,0,(n+i)*s,-1,0,0,2*n*i*s,0)},perspectiveLH:function(t,e,i,n){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-n/(i-n),1,0,0,i*n/(i-n),0)},ortho:function(t,e,i,n,r,s){var o=t-e,a=i-n,h=r-s;return o=0===o?o:1/o,a=0===a?a:1/a,h=0===h?h:1/h,this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(s+r)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return u.subVectors(t,e),0===u.getLengthSquared()&&(u.z=1),u.normalize(),h.crossVectors(i,u),0===h.getLengthSquared()&&(1===Math.abs(i.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),h.crossVectors(i,u)),h.normalize(),l.crossVectors(u,h),n[0]=h.x,n[1]=h.y,n[2]=h.z,n[4]=l.x,n[5]=l.y,n[6]=l.z,n[8]=u.x,n[9]=u.y,n[10]=u.z,this},lookAt:function(t,e,i){var n=t.x,r=t.y,s=t.z,o=i.x,a=i.y,h=i.z,l=e.x,u=e.y,c=e.z;if(Math.abs(n-l)<1e-6&&Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6)return this.identity();var f=n-l,d=r-u,p=s-c,v=1/Math.sqrt(f*f+d*d+p*p),g=a*(p*=v)-h*(d*=v),m=h*(f*=v)-o*p,M=o*d-a*f;(v=Math.sqrt(g*g+m*m+M*M))?(g*=v=1/v,m*=v,M*=v):(g=0,m=0,M=0);var y=d*M-p*m,x=p*g-f*M,w=f*m-d*g;return(v=Math.sqrt(y*y+x*x+w*w))?(y*=v=1/v,x*=v,w*=v):(y=0,x=0,w=0),this.setValues(g,y,f,0,m,x,d,0,M,w,p,0,-(g*n+m*r+M*s),-(y*n+x*r+w*s),-(f*n+d*r+p*s),1)},yawPitchRoll:function(t,e,i){this.zero(),o.zero(),a.zero();var n=this.val,r=o.val,s=a.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),r[0]=1,r[15]=1,r[5]=l,r[10]=l,r[9]=-h,r[6]=h,h=Math.sin(t),l=Math.cos(t),s[5]=1,s[15]=1,s[0]=l,s[2]=-h,s[8]=h,s[10]=l,this.multiplyLocal(o),this.multiplyLocal(a),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),o.scaling(i.x,i.y,i.z),a.xyz(e.x,e.y,e.z),this.multiplyLocal(o),this.multiplyLocal(a),n&&this.multiplyLocal(n),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,n=t.val,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=i[6],c=i[7],f=i[8],d=i[9],p=i[10],v=i[11],g=i[12],m=i[13],M=i[14],y=i[15],x=n[0],w=n[1],E=n[2],b=n[3],T=n[4],A=n[5],R=n[6],S=n[7],C=n[8],I=n[9],P=n[10],L=n[11],_=n[12],O=n[13],k=n[14],F=n[15];return e.setValues(x*r+w*h+E*f+b*g,w*s+w*l+E*d+b*m,E*o+w*u+E*p+b*M,b*a+w*c+E*v+b*y,T*r+A*h+R*f+S*g,T*s+A*l+R*d+S*m,T*o+A*u+R*p+S*M,T*a+A*c+R*v+S*y,C*r+I*h+P*f+L*g,C*s+I*l+P*d+L*m,C*o+I*u+P*p+L*M,C*a+I*c+P*v+L*y,_*r+O*h+k*f+F*g,_*s+O*l+k*d+F*m,_*o+O*u+k*p+F*M,_*a+O*c+k*v+F*y)},fromRotationXYTranslation:function(t,e,i){var n=e.x,r=e.y,s=e.z,o=Math.sin(t.x),a=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=n,c=r,f=s,d=-o,p=0-d*h,v=0-a*h,g=d*l,m=a*l;return i||(u=l*n+h*s,c=p*n+a*r+g*s,f=v*n+o*r+m*s),this.setValues(l,p,v,0,0,a,o,0,h,g,m,0,u,c,f,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}}),o=new s,a=new s,h=new r,l=new r,u=new r;t.exports=s},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADDED_TO_SCENE:i(187),BOOT:i(188),CREATE:i(189),DESTROY:i(190),PAUSE:i(191),POST_UPDATE:i(192),PRE_RENDER:i(193),PRE_UPDATE:i(194),READY:i(195),REMOVED_FROM_SCENE:i(196),RENDER:i(197),RESUME:i(198),SHUTDOWN:i(199),SLEEP:i(200),START:i(201),TRANSITION_COMPLETE:i(202),TRANSITION_INIT:i(203),TRANSITION_OUT:i(204),TRANSITION_START:i(205),TRANSITION_WAKE:i(206),UPDATE:i(207),WAKE:i(208)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(12),s=i(47),o=i(11),a=i(48),h=i(49),l=i(222),u=i(50),c=new n({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},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(){console.error('Failed to process file: %s "%s"',this.type,this.key),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.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(4),s=i(3),o=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},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||s?r.TAU-(s>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3];return n[0]=r*i+o*e,n[1]=s*i+a*e,n[2]=r*-e+o*i,n[3]=s*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],g=void 0===e?i:e.matrix;return g[0]=u*r+c*o,g[1]=u*s+c*a,g[2]=f*r+d*o,g[3]=f*s+d*a,g[4]=p*r+v*o+h,g[5]=p*s+v*a+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=e*s+i*a+n[4],u=e*o+i*h+n[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],g=r[5];return n[0]=c*s+f*a,n[1]=c*o+f*h,n[2]=d*s+p*a,n[3]=d*o+p*h,n[4]=v*s+g*a+l,n[5]=v*o+g*h+u,this},transform:function(t,e,i,n,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]=i*a+n*l,o[3]=i*h+n*u,o[4]=r*a+s*l+c,o[5]=r*h+s*u+f,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*r+e*o+h,i.y=t*s+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=e*r-i*n;return t[0]=r/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-r*s)/a,t[5]=-(e*o-i*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,i,n,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/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,i,n,r){var s=this.matrix,o=Math.sin(i),a=Math.cos(i);return s[4]=t,s[5]=e,s[0]=a*n,s[1]=o*n,s[2]=-o*r,s[3]=a*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=r*c*e+-o*c*t+(-u*r+l*o)*c,i},setQuad:function(t,e,i,n,r,s){void 0===s&&(s=this.quad);var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],f=o[5];return s[0]=t*a+e*l+c,s[1]=t*h+e*u+f,s[2]=t*a+n*l+c,s[3]=t*h+n*u+f,s[4]=i*a+n*l+c,s[5]=i*h+n*u+f,s[6]=i*a+e*l+c,s[7]=i*h+e*u+f,r&&s.forEach((function(t,e){s[e]=Math.round(t)})),s},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=o},function(t,e){t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return i;var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(i.iOS=!0,i.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(i.cordova=!0),void 0!==window.ejecta&&(i.ejecta=!0)),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(301))},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(319),s=i(66),o=i(320),a=i(30),h=i(321),l=i(326),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.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},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,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(6);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(6);t.exports=function(t){return n(t,-180,180)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(37);t.exports=function(t,e){return n(t)/n(e)/n(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,i,n,r){var s=.5*(n-e),o=.5*(r-i),a=t*t;return(2*i-2*n+s+o)*(t*a)+(-3*i+3*n-2*s-o)*a+s*t+i}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x-e,a=t.y-i;return t.x=o*r-a*s+e,t.y=o*s+a*r+i,t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(3);t.exports=function(t,e,i,r,s,o,a,h){void 0===h&&(h=new n);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-i*p)*v,h.y=c*v*e+-f*v*t+(-r*c+i*f)*v,h}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=new(i(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 e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=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+i*c+n*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*i+n*h)*d,t[2]=(o*i-n*s)*d,t[3]=c*d,t[4]=(l*e-n*a)*d,t[5]=(-o*e+n*r)*d,t[6]=f*d,t[7]=(-h*e+i*a)*d,t[8]=(s*e-i*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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]=n*h-i*l,t[2]=i*o-n*s,t[3]=o*a-r*l,t[4]=e*l-n*a,t[5]=n*r-e*o,t[6]=r*h-s*a,t[7]=i*a-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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)+i*(-l*r+o*a)+n*(h*r-s*a)},multiply:function(t){var e=this.val,i=e[0],n=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],y=c[7],x=c[8];return e[0]=f*i+d*s+p*h,e[1]=f*n+d*o+p*l,e[2]=f*r+d*a+p*u,e[3]=v*i+g*s+m*h,e[4]=v*n+g*o+m*l,e[5]=v*r+g*a+m*u,e[6]=M*i+y*s+x*h,e[7]=M*n+y*o+x*l,e[8]=M*r+y*a+x*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=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*i+h*s,e[1]=l*n+h*o,e[2]=l*r+h*a,e[3]=l*s-h*i,e[4]=l*o-h*n,e[5]=l*a-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,l=e*o,u=e*a,c=i*o,f=i*a,d=n*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,i=this.val,n=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],y=n*h-r*a,x=n*l-s*a,w=n*u-o*a,E=r*l-s*h,b=r*u-o*h,T=s*u-o*l,A=c*g-f*v,R=c*m-d*v,S=c*M-p*v,C=f*m-d*g,I=f*M-p*g,P=d*M-p*m,L=y*P-x*I+w*C+E*S-b*R+T*A;return L?(L=1/L,i[0]=(h*P-l*I+u*C)*L,i[1]=(l*S-a*P-u*R)*L,i[2]=(a*I-h*S+u*A)*L,i[3]=(s*I-r*P-o*C)*L,i[4]=(n*P-s*S+o*R)*L,i[5]=(r*S-n*I-o*A)*L,i[6]=(g*T-m*b+M*E)*L,i[7]=(m*w-v*T-M*x)*L,i[8]=(v*b-g*w+M*y)*L,this):null}});t.exports=n},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(45),s=i(2),o=i(16),a=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),l=new o(1,0,0),u=new o(0,1,0),c=new o,f=new r,d=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(c.copy(l).cross(t).length()<1e-6&&c.copy(u).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):i>.999999?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=f.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+r*s+i*a-n*o,i*h+r*o+n*s-e*a,n*h+r*a+e*o-i*s,r*h-e*s-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*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.set(c*i+f*o,c*n+f*a,c*r+f*h,c*s+f*l)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.set(-t*s,-e*s,-i*s,n*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+r*s,i*o+n*s,n*o-i*s,r*o-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o-n*s,i*o+r*s,n*o+e*s,r*o-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*s,i*o-e*s,n*o+r*s,r*o-n*s)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,r=t.z/2,s=Math.cos(i),o=Math.cos(n),a=Math.cos(r),h=Math.sin(i),l=Math.sin(n),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*o*a+s*l*u,s*l*a-h*o*u,s*o*u+h*l*a,s*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+s*l*u,s*l*a-h*o*u,s*o*u-h*l*a,s*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-s*l*u,s*l*a+h*o*u,s*o*u+h*l*a,s*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-s*l*u,s*l*a+h*o*u,s*o*u-h*l*a,s*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+s*l*u,s*l*a+h*o*u,s*o*u-h*l*a,s*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-s*l*u,s*l*a-h*o*u,s*o*u+h*l*a,s*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],r=i[4],s=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],f=n+a+c;return f>0?(e=.5/Math.sqrt(f+1),this.set((u-h)*e,(s-l)*e,(o-r)*e,.25/e)):n>a&&n>c?(e=2*Math.sqrt(1+n-a-c),this.set(.25*e,(r+o)/e,(s+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-n-c),this.set((r+o)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-n-a),this.set((s+l)/e,(h+u)/e,.25*e,(o-r)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var s=a[r],o=a[s];e=Math.sqrt(i[3*r+r]-i[3*s+s]-i[3*o+o]+1),h[r]=.5*e,e=.5/e,h[s]=(i[3*s+r]+i[3*r+s])*e,h[o]=(i[3*o+r]+i[3*r+o])*e,this._x=h[0],this._y=h[1],this._z=h[2],this._w=(i[3*o+s]-i[3*s+o])*e}return this.onChangeCallback(this),this}});t.exports=d},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADD:i(212),COMPLETE:i(213),FILE_COMPLETE:i(214),FILE_KEY_COMPLETE:i(215),FILE_LOAD_ERROR:i(216),FILE_LOAD:i(217),FILE_PROGRESS:i(218),POST_PROCESS:i(219),PROGRESS:i(220),START:i(221)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(19),r=i(50);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4),r=i(26),s=i(44),o=i(33),a=i(34),h=i(3),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*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=o(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},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,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 h),n||(n=this.scene.sys.cameras.main);var r=n.scrollX,o=n.scrollY,a=t+r*this.scrollFactorX-r,l=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,l,i):s(a,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={_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=i},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(58),s=i(227),o=i(234),a=i(59),h=i(23),l=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},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,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADDED_TO_SCENE:i(235),DESTROY:i(236),REMOVED_FROM_SCENE:i(237),VIDEO_COMPLETE:i(238),VIDEO_CREATED:i(239),VIDEO_ERROR:i(240),VIDEO_LOOP:i(241),VIDEO_PLAY:i(242),VIDEO_SEEKED:i(243),VIDEO_SEEKING:i(244),VIDEO_STOP:i(245),VIDEO_TIMEOUT:i(246),VIDEO_UNLOCKED:i(247)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(26),r=new n,s=new n,o=new n,a={camera:r,sprite:s,calc:o};t.exports=function(t,e,i){var n=r,h=s,l=o;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),n.multiply(h,l),a}},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r-1;s--)n[r][s]=t[s][r]}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n,r,s,o=i(303),a=i(305),h=[],l=!1;t.exports=(s=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,s){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===s&&(s=!1);var c=r(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),s&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(67),r=i(14);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var s=n(t)*e;return e>.5?(s-=t.width+t.height)<=t.width?(i.x=t.right-s,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(s-t.width)):s<=t.width?(i.x=t.x+s,i.y=t.y):(i.x=t.right,i.y=t.y+(s-t.width)),i}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(1),s=i(19),o=new n({initialize:function(t,e,i,n,r,s,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(s,o,n,r)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,s=r.cut;s.x=i,s.y=n,s.w=t,s.h=e,s.r=i+t,s.b=n+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var o=r.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,r,s){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=r,a.h=s,a.r=i+r,a.b=n+s,this.x=i,this.y=n,this.width=r,this.height=s,this.halfWidth=.5*r,this.halfHeight=.5*s,this.centerX=Math.floor(r/2),this.centerY=Math.floor(s/2),this.updateUVs()},setCropUVs:function(t,e,i,n,s,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,f=this.realWidth,d=this.realHeight,p=h+(e=r(e,0,f)),v=l+(i=r(i,0,d)),g=n=r(n,0,f-e),m=s=r(s,0,d-i),M=this.data;if(M.trim){var y=M.spriteSourceSize,x=e+(n=r(n,0,u-e)),w=i+(s=r(s,0,c-i));if(!(y.rx||y.y>w)){var E=Math.max(y.x,e),b=Math.max(y.y,i),T=Math.min(y.r,x)-E,A=Math.min(y.b,w)-b;g=T,m=A,p=o?h+(u-(E-y.x)-T):h+(E-y.x),v=a?l+(c-(b-y.y)-A):l+(b-y.y),e=E,i=b,n=T,s=A}else p=0,v=0,g=0,m=0}else o&&(p=h+(u-e-n)),a&&(v=l+(c-i-s));var R=this.source.width,S=this.source.height;return t.u0=Math.max(0,p/R),t.v0=Math.max(0,v/S),t.u1=Math.min(1,(p+g)/R),t.v1=Math.min(1,(v+m)/S),t.x=e,t.y=i,t.cx=p,t.cy=v,t.cw=g,t.ch=m,t.width=n,t.height=s,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,r,s){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=r,this.v1=s,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=n;var s=this.source.width,o=this.source.height;return this.u0=t/s,this.v0=e/o,this.u1=(t+i)/s,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 o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=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=o},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(70),r=i(0),s=i(10),o=i(184),a=i(185),h=i(209),l=i(210),u=i(226),c=i(259),f=i(2),d=new r({Extends:a,initialize:function(t,e,i){a.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.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=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:f,postRender:f,render:f,destroy:f});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,n,r,s){var o=this.scene.sys[i],a=new u(this.scene,o,t,e,n,r,s);return this.displayList.add(a),this.updateList.add(a),a}),(function(t,e){void 0===t&&(t={});var r=s(t,"key",null),o=s(t,"animationName",null),a=s(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,r,o,a);void 0!==e&&(t.add=e),n(this.scene,l,t);var c=s(t,"skinName",!1);c&&l.setSkinByName(c);var f=s(t,"slotName",!1),d=s(t,"attachmentName",null);return f&&l.setAttachment(f,d),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,n){var r=this.scene.sys[i],s=new c(this.scene,r,t,e,n);return this.displayList.add(s),s}),(function(t,e){void 0===t&&(t={});var r=s(t,"x",0),o=s(t,"y",0),a=s(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,r,o,a);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))}},e=this.renderer.spineSceneRenderer;e||((e=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,e.shapes.setBlendMode=t,this.renderer.spineSceneRenderer=e),this.sceneRenderer=e,this.skeletonRenderer=e.skeletonRenderer,this.skeletonDebugRenderer=e.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 i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures;i=new h.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new h.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(s,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,r,s,o){var a;if(o=o||{},Array.isArray(t))for(var h=0;h + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(15),r=i(71);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var s=r(i,"scale",null);"number"==typeof s?e.setScale(s):null!==s&&(e.scaleX=r(s,"x",1),e.scaleY=r(s,"y",1));var o=r(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=r(o,"x",1),e.scrollFactorY=r(o,"y",1)),e.rotation=r(i,"rotation",0);var a=r(i,"angle",null);null!==a&&(e.angle=a),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",n.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(72),r=i(10);t.exports=function(t,e,i){var s=r(t,e,null);if(null===s)return i;if(Array.isArray(s))return n.RND.pick(s);if("object"==typeof s){if(s.hasOwnProperty("randInt"))return n.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return n.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if("function"==typeof s)return s(e);return s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4),r=i(19),s={Angle:i(73),Distance:i(82),Easing:i(90),Fuzzy:i(135),Interpolation:i(140),Pow2:i(148),Snap:i(152),RandomDataGenerator:i(156),Average:i(157),Bernstein:i(36),Between:i(158),CatmullRom:i(38),CeilTo:i(159),Clamp:i(1),DegToRad:i(21),Difference:i(160),Euler:i(161),Factorial:i(37),FloatBetween:i(20),FloorTo:i(162),FromPercent:i(163),GetSpeed:i(164),IsEven:i(165),IsEvenStrict:i(166),Linear:i(39),LinearXY:i(167),MaxAdd:i(168),Median:i(169),MinSub:i(170),Percent:i(171),RadToDeg:i(9),RandomXY:i(172),RandomXYZ:i(173),RandomXYZW:i(174),Rotate:i(175),RotateAround:i(42),RotateAroundDistance:i(176),RotateTo:i(177),RoundAwayFromZero:i(43),RoundTo:i(178),SinCosTableGenerator:i(179),SmootherStep:i(41),SmoothStep:i(40),ToXY:i(180),TransformXY:i(44),Within:i(181),Wrap:i(6),Vector2:i(3),Vector3:i(16),Vector4:i(182),Matrix3:i(45),Matrix4:i(22),Quaternion:i(46),RotateVec3:i(183)};s=r(!1,s,n),t.exports=s},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Between:i(31),BetweenPoints:i(74),BetweenPointsY:i(75),BetweenY:i(76),CounterClockwise:i(8),Normalize:i(32),Random:i(77),RandomDegrees:i(78),Reverse:i(79),RotateTo:i(80),ShortestBetween:i(81),Wrap:i(33),WrapDegrees:i(34)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){ +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(20);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){ +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(20);t.exports=function(){return n(-180,180)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(32);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4);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&&(et?t+=i:e + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Between:i(83),BetweenPoints:i(84),BetweenPointsSquared:i(85),Chebyshev:i(86),Power:i(87),Snake:i(88),Squared:i(89)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},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){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Back:i(91),Bounce:i(95),Circular:i(99),Cubic:i(103),Elastic:i(107),Expo:i(111),Linear:i(115),Quadratic:i(117),Quartic:i(121),Quintic:i(125),Sine:i(129),Stepped:i(133)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(92),Out:i(93),InOut:i(94)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(96),Out:i(97),InOut:i(98)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(100),Out:i(101),InOut:i(102)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(104),Out:i(105),InOut:i(106)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(108),Out:i(109),InOut:i(110)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(112),Out:i(113),InOut:i(114)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports=i(116)},function(t,e){t.exports=function(t){return t}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(118),Out:i(119),InOut:i(120)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(122),Out:i(123),InOut:i(124)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(126),Out:i(127),InOut:i(128)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(130),Out:i(131),InOut:i(132)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports=i(134)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Ceil:i(136),Equal:i(35),Floor:i(137),GreaterThan:i(138),LessThan:i(139)}},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){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Bezier:i(141),CatmullRom:i(142),CubicBezier:i(143),Linear:i(144),QuadraticBezier:i(145),SmoothStep:i(146),SmootherStep:i(147)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(36);t.exports=function(t,e){for(var i=0,r=t.length-1,s=0;s<=r;s++)i+=Math.pow(1-e,r-s)*Math.pow(e,s)*t[s]*n(r,s);return i}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(38);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return t[0]===t[i]?(e<0&&(s=Math.floor(r=i*(1+e))),n(r-s,t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i])):e<0?t[0]-(n(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(r-s,t[s?s-1:0],t[s],t[i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(39);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return e<0?n(t[0],t[1],r):e>1?n(t[i],t[i-1],i-r):n(t[s],t[s+1>i?i:s+1],r-s)}},function(t,e){t.exports=function(t,e,i,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(40);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(41);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={GetNext:i(149),IsSize:i(150),IsValue:i(151)}},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,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Ceil:i(153),Floor:i(154),To:i(155)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=new(i(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,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(1),r=i(0),s=i(22),o=i(2),a=new s,h=new r({initialize:function t(e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,s=r[0],o=r[4],a=r[8],h=r[1],l=r[5],u=r[9],c=r[2],f=r[6],d=r[10],p=0,v=0,g=0;switch(e){case"XYZ":v=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(p=Math.atan2(-u,d),g=Math.atan2(-o,s)):p=Math.atan2(f,l);break;case"YXZ":p=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(v=Math.atan2(a,d),g=Math.atan2(h,l)):v=Math.atan2(-c,s);break;case"ZXY":p=Math.asin(n(f,-1,1)),Math.abs(f)<.99999?(v=Math.atan2(-c,d),g=Math.atan2(-o,l)):g=Math.atan2(h,s);break;case"ZYX":v=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(p=Math.atan2(f,d),g=Math.atan2(h,s)):g=Math.atan2(-o,l);break;case"YZX":g=Math.asin(n(h,-1,1)),Math.abs(h)<.99999?(p=Math.atan2(-u,l),v=Math.atan2(-c,s)):v=Math.atan2(a,d);break;case"XZY":g=Math.asin(-n(o,-1,1)),Math.abs(o)<.99999?(p=Math.atan2(f,l),v=Math.atan2(a,s)):p=Math.atan2(-u,d)}return this._x=p,this._y=v,this._z=g,this._order=e,i&&this.onChangeCallback(this),this}});h.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],h.DefaultOrder="XYZ",t.exports=h},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(1);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*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 i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},function(t,e){t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],o=0;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(3);t.exports=function(t,e,i,r){void 0===r&&(r=new n);var s=0,o=0;return t>0&&t<=e*i&&(s=t>e-1?t-(o=Math.floor(t/e))*e:t),r.set(s,o)}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=new(i(0))({initialize:function(t,e,i,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=e||0,this.z=i||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,e,i,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=e||0,this.z=i||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,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*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 i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),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,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+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,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,l=a*i+o*e-r*n,u=a*n+r*i-s*e,c=-r*e-s*i-o*n;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}});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,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(16),r=i(22),s=i(46),o=new r,a=new s,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="resize"},function(t,e,i){ +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ +var n=i(186),r=i(0),s=i(23),o=new r({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,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,i){ +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ +var n=new(i(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=n},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addedtoscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="boot"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="create"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="pause"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="postupdate"},function(t,e){ +/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="prerender"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="preupdate"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="ready"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedfromscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="render"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="resume"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="shutdown"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="sleep"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitioncomplete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitioninit"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionout"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionstart"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionwake"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="update"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="wake"},function(t,e){(function(){var e,i,n,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});!function(t){var e,i,n,s=function(){function t(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;n0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},t.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},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"}(i=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"}(n=t.TimelineType||(t.TimelineType={}));var o=function(){function e(i){if(i<=0)throw new Error("frameCount must be > 0: "+i);this.curves=t.Utils.newFloatArray((i-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 i=t*e.BEZIER_SIZE;if(i==this.curves.length)return e.LINEAR;var n=this.curves[i];return n==e.LINEAR?e.LINEAR:n==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,i,n,r,s){var o=.03*(2*-i+r),a=.03*(2*-n+s),h=.006*(3*(i-r)+1),l=.006*(3*(n-s)+1),u=2*o+h,c=2*a+l,f=.3*i+o+.16666667*h,d=.3*n+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=n){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)*(n-u)/(a-u)}var f=r[s-1];return f+(1-f)*(n-a)/(1-a)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=o;var a=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e<<1),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+o.ROTATION]=i},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,o.ENTRIES),v=u[p+o.PREV_ROTATION],g=u[p],m=this.getCurvePercent((p>>1)-1,1-(n-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(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,i,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.X]=i,this.frames[t+o.Y]=n},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,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-(n-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(n.scale<<24)+this.boneIndex},a.prototype.apply=function(n,r,o,h,l,u,c){var f=this.frames,d=n.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 y=0,x=0;if(c==i.mixOut)switch(u){case e.setup:y=d.data.scaleX,x=d.data.scaleY,d.scaleX=y+(Math.abs(p)*t.MathUtils.signum(y)-y)*l,d.scaleY=x+(Math.abs(v)*t.MathUtils.signum(x)-x)*l;break;case e.first:case e.replace:y=d.scaleX,x=d.scaleY,d.scaleX=y+(Math.abs(p)*t.MathUtils.signum(y)-y)*l,d.scaleY=x+(Math.abs(v)*t.MathUtils.signum(x)-x)*l;break;case e.add:y=d.scaleX,x=d.scaleY,d.scaleX=y+(Math.abs(p)*t.MathUtils.signum(y)-d.data.scaleX)*l,d.scaleY=x+(Math.abs(v)*t.MathUtils.signum(x)-d.data.scaleY)*l}else switch(u){case e.setup:y=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),x=Math.abs(d.data.scaleY)*t.MathUtils.signum(v),d.scaleX=y+(p-y)*l,d.scaleY=x+(v-x)*l;break;case e.first:case e.replace:y=Math.abs(d.scaleX)*t.MathUtils.signum(p),x=Math.abs(d.scaleY)*t.MathUtils.signum(v),d.scaleX=y+(p-y)*l,d.scaleY=x+(v-x)*l;break;case e.add:y=t.MathUtils.signum(p),x=t.MathUtils.signum(v),d.scaleX=Math.abs(d.scaleX)*y+(p-Math.abs(d.data.scaleX)*y)*l,d.scaleY=Math.abs(d.scaleY)*x+(v-Math.abs(d.data.scaleY)*x)*l}}}},a}(h);t.ScaleTimeline=l;var u=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,r,o,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_X],d=u[u.length+i.PREV_Y];else{var p=s.binarySearch(u,r,i.ENTRIES);f=u[p+i.PREV_X],d=u[p+i.PREV_Y];var v=u[p],g=this.getCurvePercent(p/i.ENTRIES-1,1-(r-v)/(u[p+i.PREV_TIME]-v));f+=(u[p+i.X]-f)*g,d+=(u[p+i.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}}},i}(h);t.ShearTimeline=u;var c=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,i,n,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=i,this.frames[t+o.G]=n,this.frames[t+o.B]=r,this.frames[t+o.A]=s},o.prototype.apply=function(t,i,n,r,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=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 y=s.binarySearch(c,n,o.ENTRIES);p=c[y+o.PREV_R],v=c[y+o.PREV_G],g=c[y+o.PREV_B],m=c[y+o.PREV_A];var x=c[y],w=this.getCurvePercent(y/o.ENTRIES-1,1-(n-x)/(c[y+o.PREV_TIME]-x));p+=(c[y+o.R]-p)*w,v+=(c[y+o.G]-v)*w,g+=(c[y+o.B]-g)*w,m+=(c[y+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(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,i,n,r,s,a,h,l){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=i,this.frames[t+o.G]=n,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,i,n,r,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=c[c.length-o.ENTRIES]){var b=c.length;g=c[b+o.PREV_R],m=c[b+o.PREV_G],M=c[b+o.PREV_B],y=c[b+o.PREV_A],x=c[b+o.PREV_R2],w=c[b+o.PREV_G2],E=c[b+o.PREV_B2]}else{var T=s.binarySearch(c,n,o.ENTRIES);g=c[T+o.PREV_R],m=c[T+o.PREV_G],M=c[T+o.PREV_B],y=c[T+o.PREV_A],x=c[T+o.PREV_R2],w=c[T+o.PREV_G2],E=c[T+o.PREV_B2];var A=c[T],R=this.getCurvePercent(T/o.ENTRIES-1,1-(n-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,y+=(c[T+o.A]-y)*R,x+=(c[T+o.R2]-x)*R,w+=(c[T+o.G2]-w)*R,E+=(c[T+o.B2]-E)*R}if(1==a)u.color.set(g,m,M,y),u.darkColor.set(x,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,(y-f.a)*a),d.add((x-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(n.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},r.prototype.apply=function(t,n,r,o,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=i.mixOut){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else h==e.setup&&this.setAttachment(t,u,u.data.attachmentName)},r.prototype.setAttachment=function(t,e,i){e.setAttachment(null==i?null:t.getAttachment(this.slotIndex,i))},r}();t.AttachmentTimeline=d;var p=null,v=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e),n.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},o.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},o.prototype.apply=function(i,n,r,o,a,h,l){var u=i.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;Ei)this.apply(t,e,Number.MAX_VALUE,n,r,o,a),e=-1;else if(e>=h[l-1])return;if(!(i0&&h[u-1]==c;)u--;for(;u=h[u];u++)n.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 n.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},r.prototype.apply=function(n,r,o,a,h,l,u){var c=n.drawOrder,f=n.slots;if(u!=i.mixOut){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==i.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==i.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==i.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==i.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 y=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},o.prototype.setFrame=function(t,e,i,n,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=i,this.frames[t+o.TRANSLATE]=n,this.frames[t+o.SCALE]=r,this.frames[t+o.SHEAR]=s},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(n=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,n,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 y=u[M],x=this.getCurvePercent(M/o.ENTRIES-1,1-(n-y)/(u[M+o.PREV_TIME]-y));d+=(u[M+o.ROTATE]-d)*x,p+=(u[M+o.TRANSLATE]-p)*x,v+=(u[M+o.SCALE]-v)*x,g+=(u[M+o.SHEAR]-g)*x}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=y;var x=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,i){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.VALUE]=i},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_VALUE];else{var d=s.binarySearch(u,n,o.ENTRIES);f=u[d+o.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/o.ENTRIES-1,1-(n-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=x;var w=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,r,o,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_VALUE];else{var d=s.binarySearch(u,r,i.ENTRIES);f=u[d+i.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(u[d+i.PREV_TIME]-p));f+=(u[d+i.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*a:c.spacing+=(f-c.spacing)*a}},i}(x);t.PathConstraintSpacingTimeline=w;var E=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,i,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=i,this.frames[t+o.TRANSLATE]=n},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=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,n,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-(n-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}(n||(n={})),function(t){var e=function(){function e(e){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 t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool((function(){return new i})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i0){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(i,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(r.trackLast>=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,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 i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=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)},e.prototype.apply=function(i){if(null==i)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=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,i,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.applyAttachmentTimeline=function(i,n,r,s,o){var a=n.slots[i.slotIndex];if(a.bone.active){var h,l=i.frames;if(r=l[l.length-1]?l.length-1:t.Animation.binarySearch(l,r)-1,this.setAttachment(n,a,i.attachmentNames[h],o);a.attachmentState<=this.unkeyedState&&(a.attachmentState=this.unkeyedState+e.SETUP)}},e.prototype.setAttachment=function(t,i,n,r){i.setAttachment(null==n?null:t.getAttachment(i.data.index,n)),r&&(i.attachmentState=this.unkeyedState+e.CURRENT)},e.prototype.applyRotateTimeline=function(e,i,n,r,s,o,a,h){if(h&&(o[a]=0),1!=r){var l=e,u=l.frames,c=i.bones[l.boneIndex];if(c.active){var f=0,d=0;if(n=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,n,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],g=u[p],m=l.getCurvePercent((p>>1)-1,1-(n-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,y=d-f;if(0==(y-=360*(16384-(16384.499999999996-y/360|0))))M=o[a];else{var x=0,w=0;h?(x=0,w=y):(x=o[a],w=o[a+1]);var E=y>0,b=x>=0;t.MathUtils.signum(w)!=t.MathUtils.signum(y)&&Math.abs(w)<=90&&(Math.abs(x)>180&&(x+=360*t.MathUtils.signum(x)),b=E),M=y+x-x%360,b!=E&&(M+=360*t.MathUtils.signum(x)),o[a]=M}o[a+1]=y,f+=M*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(i,0,n,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,o=this.events,a=0,h=o.length;an||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=n&&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()}}},e.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,n.mixingTo=e,e.mixTime=0,null!=n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},e.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!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,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},e.prototype.addAnimationWith=function(t,e,i,n){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,i,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,n<=0){var o=r.animationEnd-r.animationStart;0!=o?(r.loop?n+=o*(1+(r.trackTime/o|0)):n+=Math.max(o,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime}return s.delay=n,s},e.prototype.setEmptyAnimation=function(t,i){var n=this.setAnimationWith(t,e.emptyAnimation,!1);return n.mixDuration=i,n.trackEnd=i,n},e.prototype.addEmptyAnimation=function(t,i,n){n<=0&&(n-=i);var r=this.addAnimationWith(t,e.emptyAnimation,!1,n);return r.mixDuration=i,r.trackEnd=i,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i0){o[l]=e.HOLD_MIX,a[l]=f;continue t}break}o[l]=e.HOLD_FIRST}else o[l]=e.SUBSEQUENT}},e.prototype.getCurrent=function(t){return t>=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_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,e}();t.AnimationState=e;var i=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=i;var n,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(n.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(n.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(n.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(n.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,i=0;i=0?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,(function(o){var a={count:0},h=new Array;try{new t.TextureAtlas(o,(function(e){h.push(""==s?e:s+"/"+e);var i=document.createElement("img");return i.width=16,i.height=16,new t.FakeTexture(i)}))}catch(t){var l=t;return r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(l.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(l.message)),r.toLoad--,void r.loaded++}for(var u=function(l){var u=!1;r.loadTexture(l,(function(l,c){if(a.count++,a.count==h.length)if(u)r.errors[e]="Couldn't load texture atlas page ".concat(l,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(l," of atlas ").concat(e)),r.toLoad--,r.loaded++;else try{var f=new t.TextureAtlas(o,(function(t){return r.get(""==s?t:s+"/"+t)}));r.assets[e]=f,i&&i(e,f),r.toLoad--,r.loaded++}catch(t){var d=t;r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(d.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(d.message)),r.toLoad--,r.loaded++}}),(function(t,i){u=!0,a.count++,a.count==h.length&&(r.errors[e]="Couldn't load texture atlas page ".concat(t,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(t," of atlas ").concat(e)),r.toLoad--,r.loaded++)}))},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(n||(n={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (region attachment: "+i+")");r.renderObject=r;var s=new t.RegionAttachment(i);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+i+")");r.renderObject=r;var s=new t.MeshAttachment(i);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,i){return new t.BoundingBoxAttachment(i)},e.prototype.newPathAttachment=function(e,i){return new t.PathAttachment(i)},e.prototype.newPointAttachment=function(e,i){return new t.PointAttachment(i)},e.prototype.newClippingAttachment=function(e,i){return new t.ClippingAttachment(i)},e}();t.AtlasAttachmentLoader=e}(n||(n={})),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={}))}(n||(n={})),function(t){var e=function(){function e(t,e,i){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=i,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,i,n,r,s,o,a){this.ax=e,this.ay=i,this.arotation=n,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=n+90+a,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(n+o)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(n+o)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=i*f+l.y)}var d=h.a,p=h.b,v=h.c,g=h.d;switch(this.worldX=d*e+p*i+h.worldX,this.worldY=v*e+g*i+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=n+90+a;var m=t.MathUtils.cosDeg(n+o)*r,M=t.MathUtils.cosDeg(u)*s,y=t.MathUtils.sinDeg(n+o)*r,x=t.MathUtils.sinDeg(u)*s;return this.a=d*m+p*y,this.b=d*M+p*x,this.c=v*m+g*y,void(this.d=v*M+g*x);case t.TransformMode.OnlyTranslation:u=n+90+a;this.a=t.MathUtils.cosDeg(n+o)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(n+o)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var w=0;(T=d*d+v*v)>1e-4?(T=Math.abs(d*g-p*v)/T,d/=this.skeleton.scaleX,p=(v/=this.skeleton.scaleY)*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 E=n+o-w,b=n+a-w+90;m=t.MathUtils.cosDeg(E)*r,M=t.MathUtils.cosDeg(b)*s,y=t.MathUtils.sinDeg(E)*r,x=t.MathUtils.sinDeg(b)*s;this.a=d*m-p*y,this.b=d*M-p*x,this.c=v*m+g*y,this.d=v*M+g*x;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var T,A=t.MathUtils.cosDeg(n),R=t.MathUtils.sinDeg(n),S=(d*A+p*R)/this.skeleton.scaleX,C=(v*A+g*R)/this.skeleton.scaleY;(T=Math.sqrt(S*S+C*C))>1e-5&&(T=1/T),S*=T,C*=T,T=Math.sqrt(S*S+C*C),this.data.transformMode==t.TransformMode.NoScale&&d*g-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(T=-T);var I=Math.PI/2+Math.atan2(C,S),P=Math.cos(I)*T,L=Math.sin(I)*T;m=t.MathUtils.cosDeg(o)*r,M=t.MathUtils.cosDeg(90+a)*s,y=t.MathUtils.sinDeg(o)*r,x=t.MathUtils.sinDeg(90+a)*s;this.a=S*m+P*y,this.b=S*M+P*x,this.c=C*m+L*y,this.d=C*M+L*x}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 i=e.a,n=e.b,r=e.c,s=e.d,o=1/(i*s-n*r),a=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=a*s*o-h*n*o,this.ay=h*i*o-a*r*o;var l=o*s,u=o*i,c=o*n,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,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),o=t.x-this.worldX,a=t.y-this.worldY;return t.x=o*r*s-a*i*s,t.y=a*e*s-o*n*s,t},e.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(this.a*i-this.c*n,this.d*n-this.b*i)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(n*this.c+i*this.d,n*this.a+i*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var i=this.a,n=this.b,r=this.c,s=this.d,o=t.MathUtils.cosDeg(e),a=t.MathUtils.sinDeg(e);this.a=o*i-a*r,this.b=o*n-a*s,this.c=a*i+o*r,this.d=a*n+o*s,this.appliedValid=!1},e}();t.Bone=e}(n||(n={})),function(t){var e,i=function(i,n,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,i<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=i,this.name=n,this.parent=r};t.BoneData=i,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={}))}(n||(n={})),function(t){var e=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i};t.ConstraintData=e}(n||(n={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(n||(n={})),function(t){var e=function(t){this.name=t};t.EventData=e}(n||(n={})),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 i=0;i180?d-=360:d<-180&&(d+=360);var E=e.ascaleX,b=e.ascaleY;if(r||s){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=i-e.worldX,v=n-e.worldY}var T=e.data.length*E,A=Math.sqrt(p*p+v*v);if(r&&AT&&T>1e-4)E*=g=(A/T-1)*a+1,o&&(b*=g)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*a,E,b,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,i,n,r,s,o,a,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),i.appliedValid||i.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=i.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=i.ax,y=0,x=0,w=0,E=e.a,b=e.b,T=e.c,A=e.d,R=Math.abs(c-d)<=1e-4;R?(x=E*M+b*(y=i.ay)+e.worldX,w=T*M+A*y+e.worldY):(y=0,x=E*M+e.worldX,w=T*M+e.worldY);var S=e.parent;E=S.a,b=S.b,T=S.c;var C,I,P=1/(E*(A=S.d)-b*T),L=x-S.worldX,_=w-S.worldY,O=(L*A-_*b)*P-l,k=(_*E-L*T)*P-u,F=Math.sqrt(O*O+k*k),V=i.data.length*p;if(F<1e-4)return this.apply1(e,n,r,!1,o,!1,h),void i.updateWorldTransformWith(M,y,0,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY);var D=((L=n-S.worldX)*A-(_=r-S.worldY)*b)*P-l,N=(_*E-L*T)*P-u,Y=D*D+N*N;if(0!=a){a*=c*(p+1)/2;var X=Math.sqrt(Y),B=X-F-V*c+a;if(B>0){var U=Math.min(1,B/(2*a))-1;Y=(D-=(U=(B-a*(1-U*U))/X)*D)*D+(N-=U*N)*N}}t:if(R){var z=(Y-F*F-(V*=c)*V)/(2*F*V);z<-1?z=-1:z>1&&(z=1,o&&(f*=(Math.sqrt(Y)/(F+V)-1)*h+1)),I=Math.acos(z)*s,E=F+V*z,b=V*Math.sin(I),C=Math.atan2(N*E-D*b,D*E+N*b)}else{var W=(E=c*V)*E,G=(b=d*V)*b,q=Math.atan2(N,D),H=-2*G*F,j=G-W;if((A=H*H-4*j*(T=G*F*F+W*Y-W*G))>=0){var Z=Math.sqrt(A);H<0&&(Z=-Z);var K=(Z=-(H+Z)/2)/j,Q=T/Z,$=Math.abs(K)=-1&&T<=1&&(T=Math.acos(T),(A=(L=E*Math.cos(T)+F)*L+(_=b*Math.sin(T))*_)st&&(nt=T,st=A,rt=L,ot=_)),Y<=(et+st)/2?(C=q-Math.atan2(it*s,tt),I=J*s):(C=q-Math.atan2(ot*s,rt),I=nt*s)}var at=Math.atan2(y,M)*m,ht=e.arotation;(C=(C-at)*t.MathUtils.radDeg+v-ht)>180?C-=360:C<-180&&(C+=360),e.updateWorldTransformWith(l,u,ht+C*h,f,e.ascaleY,0,0),ht=i.arotation,(I=((I+at)*t.MathUtils.radDeg-i.ashearX)*m+g-ht)>180?I-=360:I<-180&&(I+=360),i.updateWorldTransformWith(M,y,ht+I*h,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY)}else i.updateWorldTransform()},e}();t.IkConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.bendDirection=1,i.compress=!1,i.stretch=!1,i.uniform=!1,i.mix=1,i.softness=0,i}return r(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(n||(n={})),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 i=0,n=t.bones.length;i0;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,y=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*=n,B=Math.cos(X),U=Math.sin(X),L.a=B*V-U*N,L.b=B*D-U*Y,L.c=U*V+B*N,L.d=U*D+B*Y}L.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(i,n,r,s,o){var a=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*n+2),c=null,f=i.closed,d=i.worldVerticesLength,p=d/6,v=e.NONE;if(!i.constantSpeed){var g=i.lengths,m=g[p-=f?1:2];if(s&&(h*=m),o)for(var M=1;Mm){v!=e.AFTER&&(v=e.AFTER,i.computeWorldVertices(a,d-6,4,c,0,2)),this.addAfterPosition(w-m,c,0,u,y);continue}}for(;;x++){var E=g[x];if(!(w>E)){if(0==x)w/=E;else w=(w-(Z=g[x-1]))/(E-Z);break}}x!=v&&(v=x,f&&x==p?(i.computeWorldVertices(a,d-4,4,c,0,2),i.computeWorldVertices(a,0,4,c,4,2)):i.computeWorldVertices(a,6*x+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,y,r||M>0&&0==G)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(a,2,d-4,c,0,2),i.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),i.computeWorldVertices(a,2,d,c,0,2));for(var b=t.Utils.setArraySize(this.curves,p),T=0,A=c[0],R=c[1],S=0,C=0,I=0,P=0,L=0,_=0,O=0,k=0,F=0,V=0,D=0,N=0,Y=0,X=0,B=(M=0,2);MT){this.addAfterPosition(w-T,c,d-4,u,y);continue}}for(;;x++){var q=b[x];if(!(w>q)){if(0==x)w/=q;else w=(w-(Z=b[x-1]))/(q-Z);break}}if(x!=v){v=x;var H=6*x;for(A=c[H],R=c[H+1],S=c[H+2],C=c[H+3],I=c[H+4],P=c[H+5],D=2*(O=.03*(A-2*S+I))+(F=.006*(3*(S-I)-A+(L=c[H+6]))),N=2*(k=.03*(R-2*C+P))+(V=.006*(3*(C-P)-R+(_=c[H+7]))),Y=.3*(S-A)+O+.16666667*F,X=.3*(C-R)+k+.16666667*V,z=Math.sqrt(Y*Y+X*X),U[0]=z,H=1;H<8;H++)Y+=D,X+=N,D+=F,N+=V,z+=Math.sqrt(Y*Y+X*X),U[H]=z;Y+=D,X+=N,z+=Math.sqrt(Y*Y+X*X),U[8]=z,Y+=D+F,X+=N+V,z+=Math.sqrt(Y*Y+X*X),U[9]=z,W=0}for(w*=z;;W++){var j=U[W];if(!(w>j)){var Z;if(0==W)w/=j;else w=W+(w-(Z=U[W-1]))/(j-Z);break}}this.addCurvePosition(.1*w,A,R,S,C,I,P,L,_,u,y,r||M>0&&0==G)}return u},e.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],o=e[i+1],a=e[i+2]-s,h=e[i+3]-o,l=Math.atan2(h,a);n[r]=s+t*Math.cos(l),n[r+1]=o+t*Math.sin(l),n[r+2]=l},e.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],o=e[i+3],a=s-e[i],h=o-e[i+1],l=Math.atan2(h,a);n[r]=s+t*Math.cos(l),n[r+1]=o+t*Math.sin(l),n[r+2]=l},e.prototype.addCurvePosition=function(t,e,i,n,r,s,o,a,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,n-e));var f=t*t,d=f*t,p=1-t,v=p*p,g=v*p,m=p*t,M=3*m,y=p*M,x=M*t,w=e*g+n*y+s*x+a*d,E=i*g+r*y+o*x+h*d;l[u]=w,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(E-(i*v+r*m*2+o*f),w-(e*v+n*m*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i}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={}))}(n||(n={})),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}(),i=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,i,n){var r=this.clientAssets[t];return null==r&&(r=new e(t),this.clientAssets[t]=r),null!==i&&(r.textureLoader=i),r.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},t.prototype.loadText=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadJson=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadTexture=function(t,e,i){var n=this;if(i=this.pathPrefix+i,this.queueAsset(t,e,i))if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(i,{mode:"cors"}).then((function(t){return t.ok||(n.errors[i]="Couldn't load image "+i),t.blob()})).then((function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(t){n.rawAssets[i]=t}))}else{var r=new Image;r.crossOrigin="anonymous",r.onload=function(t){n.rawAssets[i]=r},r.onerror=function(t){n.errors[i]="Couldn't load image ".concat(i)},r.src=i}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts,i=0;i0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=i}(n||(n={})),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 i=0;i1){var s=n[n.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),n[n.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 i=e.target,n=i.data.index,r=i.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var s=0,o=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){x=new t.DrawOrderTimeline(V);var D=r.slots.length;for(u=0;u=0;d--)Y[d]=-1;var X=t.Utils.newArray(D-N,0),B=0,U=0;for(d=0;d=0;d--)-1==Y[d]&&(Y[d]=X[--U]);x.setFrame(u,M,Y)}s.push(x),a=Math.max(a,x.frames[V-1])}var z=i.readInt(!0);if(z>0){for(x=new t.EventTimeline(z),u=0;u>>1^-(1&i)},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="",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},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}(),n=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},r=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(n||(n={})),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,i){if(null==e)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,s=this.polygonPool,o=e.slots,a=o.length;n.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,i,n){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||t>=o&&i>=o||e>=a&&n>=a)return!1;var h=(n-e)/(i-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 i=this.polygons,n=0,r=i.length;n=i||l=i){var u=n[a];u+(i-h)/(l-h)*(n[s]-u)=u&&y<=d||y>=d&&y<=u)&&(y>=e&&y<=n||y>=n&&y<=e)){var x=(l*m-h*v)/M;if((x>=c&&x<=p||x>=p&&x<=c)&&(x>=i&&x<=r||x>=r&&x<=i))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}(n||(n={})),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(i,n){if(null!=this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(i,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,Y=this.clipOutput,X=t.Utils.setArraySize(u,L+N*p),B=0;B<_;B+=2){var U=Y[B],z=Y[B+1];X[L]=U,X[L+1]=z,X[L+2]=o.r,X[L+3]=o.g,X[L+4]=o.b,X[L+5]=o.a;var W=U-R,G=z-S,q=(O*W+k*G)*D,H=(V*W+F*G)*D,j=1-q-H;X[L+6]=x*q+T*H+C*j,X[L+7]=w*q+A*H+I*j,h&&(X[L+8]=a.r,X[L+9]=a.g,X[L+10]=a.b,X[L+11]=a.a),L+=p}L=c.length;var Z=t.Utils.setArraySize(c,L+3*(N-2));N--;for(B=1;B=2?(u=a,a=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(i),u.push(n),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,y=v-m,x=u,w=u.length-2,E=a.length,b=0;b0;if(M*(A-m)-y*(T-g)>0){if(C){a.push(R),a.push(S);continue}var I=(L=S-A)*(g-p)-(_=R-T)*(m-v);if(Math.abs(I)>1e-6){var P=(_*(v-A)-L*(p-T))/I;a.push(p+(g-p)*P),a.push(v+(m-v)*P)}else a.push(p),a.push(v)}else if(C){var L,_;I=(L=S-A)*(g-p)-(_=R-T)*(m-v);if(Math.abs(I)>1e-6){P=(_*(v-A)-L*(p-T))/I;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 O=a;(a=u).length=0,u=O}if(h!=a){h.length=0;d=0;for(var k=a.length-2;d>1;a=0;f--)-1==G[f]&&(G[f]=H[--Z])}x.setFrame(c++,this.getValue(W,"time",0),G)}s.push(x),o=Math.max(o,x.frames[x.getFrameCount()-1])}if(e.events){for(x=new t.EventTimeline(e.events.length),c=0,f=0;f=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},i.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==i)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=e,this.name=i,this.boneData=n};t.SlotData=e}(n||(n={})),function(t){var e,i,n=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 ".concat(t))}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap ".concat(t))}},t}();t.Texture=n,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"}(i=t.TextureWrap||(t.TextureWrap={}));var s=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}(n);t.FakeTexture=o}(n||(n={})),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 i(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 n).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(),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},t}(),n=function(){};t.TextureAtlasPage=n;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(n||(n={})),function(t){var e=function(){function e(e,i){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==i)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 n=0;n0?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),b=Math.sin(S);g.a=E*M-b*x,g.b=E*y-b*w,g.c=b*M+E*x,g.d=b*y+E*w,m=!0}if(0!=i){var T=this.temp;s.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),g.worldX+=(T.x-g.worldX)*i,g.worldY+=(T.y-g.worldY)*i,m=!0}if(n>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)*n)/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)*n)/A),g.b*=A,g.d*=A,m=!0}if(r>0){y=g.b,w=g.d;var S,C=Math.atan2(w,y);(S=Math.atan2(l,a)-Math.atan2(h,o)-(C-Math.atan2(g.c,g.a)))>t.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2),S=C+(S+f)*r;A=Math.sqrt(y*y+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,i=this.translateMix,n=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),b=Math.sin(R);g.a=E*M-b*x,g.b=E*y-b*w,g.c=b*M+E*x,g.d=b*y+E*w,m=!0}if(0!=i){var T=this.temp;s.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),g.worldX+=T.x*i,g.worldY+=T.y*i,m=!0}if(n>0){var A=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleX)*n+1;g.a*=A,g.c*=A,A=(Math.sqrt(a*a+l*l)-1+this.data.offsetScaleY)*n+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);y=g.b,w=g.d;R=Math.atan2(w,y)+(R-t.MathUtils.PI/2+f)*r;A=Math.sqrt(y*y+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,i=this.scaleMix,n=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)*i)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*i)/p));var v=h.ashearY;if(0!=n){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*n}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=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,o=0,a=s.length;o1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var p=h.ashearY;0!=n&&(p+=(r.ashearY+this.data.offsetShearY)*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.rotateMix=0,i.translateMix=0,i.scaleMix=0,i.shearMix=0,i.offsetRotation=0,i.offsetX=0,i.offsetY=0,i.offsetScaleX=0,i.offsetScaleY=0,i.offsetShearY=0,i.relative=!1,i.local=!1,i}return r(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(n||(n={})),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 i=t,n=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=n-1,u=(s=0,1);;){t:if(!o[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=i[c],v=i[c+1],g=i[f],m=i[f+1],M=i[d],y=i[d+1],x=(u+1)%n;x!=l;x=(x+1)%n)if(o[x]){var w=r[x]<<1,E=i[w],b=i[w+1];if(e.positiveArea(M,y,p,v,E,b)&&e.positiveArea(p,v,g,m,E,b)&&e.positiveArea(g,m,M,y,E,b))break t}break}if(0==u){do{if(!o[s])break;s--}while(s>0);break}l=s,s=u,u=(u+1)%n}h.push(r[(n+s-1)%n]),h.push(r[s]),h.push(r[(s+1)%n]),r.splice(s,1),o.splice(s,1);var T=(--n+s-1)%n,A=s==n?0:s;o[T]=e.isConcave(T,n,i,r),o[A]=e.isConcave(A,n,i,r)}return 3==n&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,i){var n=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=i.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(y),a.push(x),(o=this.polygonIndicesPool.obtain()).length=0,o.push(f),o.push(d),o.push(p),l=e.winding(v,g,m,M,y,x),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,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,o=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[s],i[s+1],i[o],i[o+1])},e.positiveArea=function(t,e,i,n,r,s){return t*(s-n)+i*(e-s)+r*(n-e)>=0},e.winding=function(t,e,i,n,r,s){var o=i-t,a=n-e;return r*a-s*o+o*e-t*a>=0?1:-1},e}();t.Triangulator=e}(n||(n={})),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 null!=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 i=function(){function t(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}return t.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,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,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,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=i;var n=function(){function t(){}return t.clamp=function(t,e,i){return ti?i: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,i){return t.randomTriangularWith(e,i,.5*(e+i))},t.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},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=n;var s=function(){function t(){}return t.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},t}();t.Interpolation=s;var o=function(t){function e(e){var i=t.call(this)||this;return i.power=2,i.power=e,i}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,i,n,r){for(var s=e,o=n;s=i?e:t.setArraySize(e,i,n)},t.newArray=function(t,e){for(var i=new Array(t),n=0;n0?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 x,w=(x=t.bone).worldX,E=x.worldY,b=x.a,T=x.b,A=x.c,R=x.d,S=e,C=r;Cthis.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,i,n){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,n,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,n),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var i=0,n=0;n0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,i=0;i0&&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 i=function(t,e,i){this.name=t,this.type=e,this.numElements=i};t.VertexAttribute=i;var n=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,2)||this}return r(i,e),i}(i);t.Position2Attribute=n;var s=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,3)||this}return r(i,e),i}(i);t.Position3Attribute=s;var o=function(e){function i(i){return void 0===i&&(i=0),e.call(this,t.Shader.TEXCOORDS+(0==i?"":i),h.Float,2)||this}return r(i,e),i}(i);t.TexCoordAttribute=o;var a=function(e){function i(){return e.call(this,t.Shader.COLOR,h.Float,4)||this}return r(i,e),i}(i);t.ColorAttribute=a;var h,l=function(e){function i(){return e.call(this,t.Shader.COLOR2,h.Float,4)||this}return r(i,e),i}(i);t.Color2Attribute=l,function(t){t[t.Float=0]="Float"}(h=t.VertexAttributeType||(t.VertexAttributeType={}))}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(t){var e=function(){function e(e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,n>10920)throw new Error("Can't have more than 10920 triangles per batch: "+n);this.context=e instanceof t.ManagedWebGLRenderingContext?e:new t.ManagedWebGLRenderingContext(e);var r=i?[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,n,3*n),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 i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},e.prototype.draw=function(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.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,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={}))}(n||(n={})),function(t){!function(e){var i,n=function(){function n(i,n,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=i,this.context=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.twoColorTint=r,this.camera=new e.OrthoCamera(i.width,i.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 n.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},n.prototype.drawSkeleton=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=-1),void 0===n&&(n=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,i,n)},n.prototype.drawSkeletonDebug=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,i)},n.prototype.drawTexture=function(t,e,i,n,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++]=i,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+n,o[a++]=i,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+n,o[a++]=i+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++]=i+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)},n.prototype.drawTextureUV=function(t,e,i,n,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++]=i,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+n,u[c++]=i,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+n,u[c++]=i+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++]=i+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)},n.prototype.drawTextureRotated=function(e,i,n,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=i+o,d=n+a,p=-o,v=-a,g=r-o,m=s-a,M=p,y=v,x=p,w=m,E=g,b=m,T=g,A=v,R=0,S=0,C=0,I=0,P=0,L=0,_=0,O=0;if(0!=h){var k=t.MathUtils.cosDeg(h),F=t.MathUtils.sinDeg(h);C=(P=k*E-F*b)+((R=k*M-F*y)-(_=k*x-F*w)),I=(L=F*E+k*b)+((S=F*M+k*y)-(O=F*x+k*w))}else R=M,S=y,_=x,O=w,P=E,L=b,C=T,I=A;R+=f,S+=d,C+=f,I+=d,P+=f,L+=d,_+=f,O+=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++]=C,c[V++]=I,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++]=_,c[V++]=O,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)},n.prototype.drawRegion=function(t,e,i,n,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++]=i,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+n,a[h++]=i,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+n,a[h++]=i+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++]=i+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)},n.prototype.line=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,i,n,r)},n.prototype.triangle=function(t,e,i,n,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,i,n,r,s,o,a,h,l)},n.prototype.quad=function(t,e,i,n,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,i,n,r,s,o,a,h,l,u,c,f)},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,i,n,r,s)},n.prototype.rectLine=function(t,e,i,n,r,s,o){void 0===o&&(o=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,i,n,r,s,o)},n.prototype.polygon=function(t,e,i,n){void 0===n&&(n=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,i,n)},n.prototype.circle=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,i,n,r,s)},n.prototype.curve=function(t,e,i,n,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,i,n,r,s,o,a,h,l)},n.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},n.prototype.resize=function(t){var e=this.canvas,n=e.clientWidth,r=e.clientHeight;if(e.width==n&&e.height==r||(e.width=n,e.height=r),this.context.gl.viewport(0,0,e.width,e.height),t===i.Stretch);else if(t===i.Expand)this.camera.setViewport(n,r);else if(t===i.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=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.mesh=new e.Mesh(n,[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 n.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)},n.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},n.prototype.setColor=function(t){this.color.setFromColor(t)},n.prototype.setColorWith=function(t,e,i,n){this.color.set(t,e,i,n)},n.prototype.point=function(t,e,n){void 0===n&&(n=null),this.check(i.Point,1),null===n&&(n=this.color),this.vertex(t,e,n)},n.prototype.line=function(t,e,n,r,s){void 0===s&&(s=null),this.check(i.Line,2);this.mesh.getVertices(),this.vertexIndex;null===s&&(s=this.color),this.vertex(t,e,s),this.vertex(n,r,s)},n.prototype.triangle=function(t,e,n,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?i.Filled:i.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,n,h),this.vertex(r,s,l),this.vertex(o,a,u)):(this.vertex(e,n,h),this.vertex(r,s,l),this.vertex(r,s,h),this.vertex(o,a,l),this.vertex(o,a,h),this.vertex(e,n,l))},n.prototype.quad=function(t,e,n,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?i.Filled:i.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,n,u),this.vertex(r,s,c),this.vertex(o,a,f),this.vertex(o,a,f),this.vertex(h,l,d),this.vertex(e,n,u)):(this.vertex(e,n,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,n,u))},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.quad(t,e,i,e+n,i,e+n,i+r,e,i+r,s,s,s,s)},n.prototype.rectLine=function(t,e,n,r,s,o,a){void 0===a&&(a=null),this.check(t?i.Filled:i.Line,8),null===a&&(a=this.color);var h=this.tmp.set(s-n,e-r);h.normalize(),o*=.5;var l=h.x*o,u=h.y*o;t?(this.vertex(e+l,n+u,a),this.vertex(e-l,n-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,n-u,a)):(this.vertex(e+l,n+u,a),this.vertex(e-l,n-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,n+u,a),this.vertex(r-l,s-u,a),this.vertex(e-l,n-u,a))},n.prototype.x=function(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)},n.prototype.polygon=function(t,e,n,r){if(void 0===r&&(r=null),n<3)throw new Error("Polygon must contain at least 3 vertices");this.check(i.Line,2*n),null===r&&(r=this.color);this.mesh.getVertices(),this.vertexIndex;n<<=1;for(var s=t[e<<=1],o=t[e+1],a=e+n,h=e,l=e+n-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)}},n.prototype.circle=function(e,n,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(i.Filled,3*a+3),a--;for(p=0;p0;)this.vertex(E,b,u),E+=T,b+=A,T+=R,A+=S,R+=C,S+=I,this.vertex(E,b,u);this.vertex(E,b,u),this.vertex(a,h,u)},n.prototype.vertex=function(t,e,i){var n=this.vertexIndex,r=this.mesh.getVertices();r[n++]=t,r[n++]=e,r[n++]=i.r,r[n++]=i.g,r[n++]=i.b,r[n++]=i.a,this.vertexIndex=n},n.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},n.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},n.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=(U=n.slots).length;u0){e.setColor(this.attachmentLineColor);var A=g[(y=2*(y>>1))-2],R=g[y-1];for(x=0,w=y;x-1||e.circle(!0,s+f.worldX,o+f.worldY,3*this.scale,i.GREEN,8)}}if(this.drawClipping){var U=n.slots;e.setColor(this.clipColor);for(u=0,c=U.length;u=0&&s==R.data.index&&(E=!0),E){o>=0&&o==R.data.index&&(E=!1);var S=R.getAttachment(),C=null;if(S instanceof t.RegionAttachment){var I=S;v.vertices=this.vertices,v.numVertices=4,v.numFloats=A<<2,I.computeWorldVertices(R.bone,v.vertices,0,A),m=n.QUAD_TRIANGLES,g=I.uvs,C=I.region.renderObject.texture,y=I.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,C=L.region.renderObject.texture,g=L.uvs,y=L.color}if(null!=C){var _=R.color,O=this.tempColor;O.r=x.r*_.r*y.r,O.g=x.g*_.g*y.g,O.b=x.b*_.b*y.b,O.a=x.a*_.a*y.a,h&&(O.r*=O.a,O.g*=O.a,O.b*=O.a);var k=this.tempColor2;null==R.darkColor?k.set(0,0,0,1):(h?(k.r=R.darkColor.r*O.a,k.g=R.darkColor.g*O.a,k.b=R.darkColor.b*O.a):k.setFromColor(R.darkColor),k.a=h?1:0);var F=R.data.blendMode;if(F!=u&&(u=F,i.setBlendMode(e.WebGLBlendModeConverter.getSourceGLBlendMode(u,h),e.WebGLBlendModeConverter.getDestGLBlendMode(u))),a.isClipping()){a.clipTriangles(v.vertices,v.numFloats,m,m.length,g,O,k,l);var V=new Float32Array(a.clippedVertices),D=a.clippedTriangles;if(null!=this.vertexEffect){var N=this.vertexEffect,Y=V;if(l){B=0;for(var X=V.length;B-1&&this.restorables.splice(e,1)},t}();e.ManagedWebGLRenderingContext=i;var n=function(){function e(){}return e.getDestGLBlendMode=function(i){switch(i){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: "+i)}},e.getSourceGLBlendMode=function(i,n){switch(void 0===n&&(n=!1),i){case t.BlendMode.Normal:case t.BlendMode.Additive:return n?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: "+i)}},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=n}(t.webgl||(t.webgl={}))}(n||(n={})),t.exports=n}).call(window)},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(0),r=i(11),s=i(211),o=i(7),a=i(223),h=i(224),l=i(225),u=new n({Extends:h,initialize:function(t,e,i,n,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")}),n=r(m,"atlasURL"),s=r(m,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),f=0;f + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(12),s=i(24),o=i(25),a=i(11),h=i(7),l=i(48),u=new n({Extends:s,initialize:function t(e,i,n,r,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),r=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var f={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:r,config:o};if(s.call(this,e,f),l){var d=new t(e,this.key,l,r,o);d.type="normalMap",this.setLink(d),e.addFile(d)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){s.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(t.data),t.onProcessError()},s.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addfile"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="filecomplete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="filecomplete-"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="loaderror"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="load"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="fileprogress"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="postprocess"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="progress"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(49);t.exports=function(t,e){var i=n(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var s in i.headers)r.setRequestHeader(s,i.headers[s]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(12),s=i(24),o=i(25),a=i(11),h=i(10),l=i(7),u=new n({Extends:s,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var f={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};s.call(this,t,f),l(i)&&(this.data=o?h(i,o):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(12),s=i(47),o=new n({initialize:function(t,e,i,n){var s=[];n.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.state=r.FILE_PENDING,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(12),s=i(24),o=i(25),a=i(11),h=i(7),l=new n({Extends:s,initialize:function(t,e,i,n){var r="text",o="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),n=a(u,"xhrSettings"),o=a(u,"extension",o),r=a(u,"type",r),l=a(u,"cache",l)}var c={type:r,cache:l,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(31),r=i(1),s=i(0),o=i(51),a=i(52),h=i(53),l=i(54),u=i(55),c=i(56),f=i(8),d=i(21),p=i(57),v=i(9),g=i(248),m=i(255),M=new s({Extends:p,Mixins:[o,a,h,l,u,c,m],initialize:function(t,e,i,n,r,s,o){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),r&&this.setSkeleton(r,s,o)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var n=this.plugin,r=n.sceneRenderer;n.gl&&r.batcher.isDrawing&&(r.end(),n.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,n=(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=i,o.color.g=n,o.color.b=r,null!==s&&(o.color.a=s),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=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,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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(228),s=new n({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(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={CHANGE_DATA:i(229),CHANGE_DATA_KEY:i(230),DESTROY:i(231),REMOVE_DATA:i(232),SET_DATA:i(233)}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="changedata"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="changedata-"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedata"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="setdata"},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function s(){}function o(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function a(t,e,i,n,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new o(i,n||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function l(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(r=!1)),l.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},l.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,o=new Array(s);n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addedtoscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedfromscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="created"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="error"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="loop"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="play"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="seeked"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="seeking"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="stop"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="timeout"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="unlocked"},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={COMPLETE:i(249),DISPOSE:i(250),END:i(251),EVENT:i(252),INTERRUPTED:i(253),START:i(254)}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="dispose"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="end"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="event"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="interrupted"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(2),r=i(2),s=i(2);n=i(256),s=i(257),r=i(258),t.exports={renderWebGL:n,renderCanvas:r,renderDirect:s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(1),r=i(8),s=i(60),o=i(9),a=i(6);t.exports=function(t,e,i,h,l){var u=e.plugin,c=e.skeleton,f=u.sceneRenderer;t.newType&&(t.pipelines.clear(),f.begin());var d=e.scrollFactorX,p=e.scrollFactorY,v=c.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,c.color.a=n(v*l.alpha,0,1)),i.addToRenderList(e);var g=s(e,i,h).calc,m=t.height;if(c.x=g.tx,c.y=m-g.ty,c.scaleX=g.scaleX,c.scaleY=g.scaleY,e.scaleX<0?(c.scaleX*=-1,e.root.rotation=a(o(g.rotationNormalized)-180,0,360)):e.root.rotation=a(o(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(c.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*o(g.rotationNormalized):e.root.rotation+=2*o(g.rotationNormalized)),c.updateWorldTransform(),f.drawSkeleton(c,e.preMultipliedAlpha),l&&(e.scrollFactorX=d,e.scrollFactorY=p,c.color.a=v),u.drawDebug||e.drawDebug){var M=c.x,y=c.y;c.x=0,c.y=0,f.drawSkeletonDebug(c,e.preMultipliedAlpha),c.x=M,c.y=y}t.nextTypeMatch||(f.end(),t.pipelines.rebind())}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(1),r=i(8),s=i(60),o=i(9),a=i(6);t.exports=function(t,e,i,h,l){var u=e.plugin,c=e.skeleton,f=u.sceneRenderer;t.pipelines.clear(),f.begin();var d=e.scrollFactorX,p=e.scrollFactorY,v=c.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,c.color.a=n(v*l.alpha,0,1)),i.addToRenderList(e);var g=s(e,i,h).calc,m=t.height;if(c.x=g.tx,c.y=m-g.ty,c.scaleX=g.scaleX,c.scaleY=g.scaleY,e.scaleX<0?(c.scaleX*=-1,e.root.rotation=a(o(g.rotationNormalized)-180,0,360)):e.root.rotation=a(o(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(c.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*o(g.rotationNormalized):e.root.rotation+=2*o(g.rotationNormalized)),c.updateWorldTransform(),f.drawSkeleton(c,e.preMultipliedAlpha),l&&(e.scrollFactorX=d,e.scrollFactorY=p,c.color.a=v),u.drawDebug||e.drawDebug){var M=c.x,y=c.y;c.x=0,c.y=0,f.drawSkeletonDebug(c,e.preMultipliedAlpha),c.x=M,c.y=y}f.end(),t.pipelines.rebind()}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(8),r=i(9),s=i(6);t.exports=function(t,e,i,o){var a=t.currentContext,h=e.plugin,l=e.skeleton,u=h.skeletonRenderer,c=t._tempMatrix1,f=t._tempMatrix2,d=t._tempMatrix3;i.addToRenderList(e),f.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),c.copyFrom(i.matrix),o?(c.multiplyWithOffset(o,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),f.e=e.x,f.f=e.y,c.multiply(f,d)):(f.e-=i.scrollX*e.scrollFactorX,f.f-=i.scrollY*e.scrollFactorY,c.multiply(f,d)),l.x=d.tx,l.y=d.ty,l.scaleX=d.scaleX,l.scaleY=-1*d.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=r(d.rotationNormalized)):e.root.rotation=s(r(n(d.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*r(d.rotationNormalized):e.root.rotation+=2*r(d.rotationNormalized)),i.renderToTexture&&(l.y=d.ty,l.scaleY*=-1),l.updateWorldTransform(),u.ctx=a,u.debugRendering=h.drawDebug||e.drawDebug,a.save(),u.draw(l),a.restore()}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(0),r=i(260),s=i(346),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s){r.call(this,t,i,n,s),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=o},function(t,e,i){ +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(261),r=i(15),s=i(0),o=i(312),a=i(59),h=i(57),l=i(29),u=i(342),c=i(345),f=i(3),d=new s({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,n=[null],r=this.list.slice(),s=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=d},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Matrix:i(262),Add:i(271),AddAt:i(272),BringToTop:i(273),CountAllMatching:i(274),Each:i(275),EachInRange:i(276),FindClosestInSorted:i(277),Flatten:i(278),GetAll:i(279),GetFirst:i(280),GetRandom:i(281),MoveDown:i(282),MoveTo:i(283),MoveUp:i(284),MoveAbove:i(285),MoveBelow:i(286),NumberArray:i(287),NumberArrayStep:i(288),QuickSelect:i(289),Range:i(290),Remove:i(291),RemoveAt:i(292),RemoveBetween:i(293),RemoveRandomElement:i(294),Replace:i(295),RotateLeft:i(62),RotateRight:i(63),SafeRange:i(5),SendToBack:i(296),SetAll:i(297),Shuffle:i(64),SortByDigits:i(298),SpliceOne:i(13),StableSort:i(299),Swap:i(311)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={CheckMatrix:i(27),MatrixToString:i(263),ReverseColumns:i(265),ReverseRows:i(266),Rotate180:i(267),RotateLeft:i(268),RotateMatrix:i(17),RotateRight:i(269),Translate:i(270),TransposeMatrix:i(61)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(264),r=i(27);t.exports=function(t){var e="";if(!r(t))return 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(r-s+1).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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(17);t.exports=function(t){return n(t,180)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(17);t.exports=function(t){return n(t,90)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(17);t.exports=function(t){return n(t,-90)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(62),r=i(63);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):r(t,i)),0!==e)for(var s=0;s0){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>s&&(e.splice(s),o=s);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var o=0;if(n(t,r,s))for(var a=r;a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s)){var o,a=[null];for(o=5;oe.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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=function(t,e){void 0===e&&(e=[]);for(var n=0;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var o=[];if(n(t,r,s))for(var a=r;a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var o=r;o0){var n=t[i-1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=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=t.indexOf(e);if(-1!==i&&ir||(t.splice(n,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},function(t,e){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n=e;r--)o?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)o?s.push(i+r.toString()+n):s.push(r);return s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(43);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],s=Math.max(n((e-t)/(i||1)),0),o=0;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var r=function(t,e,s,o,a){for(void 0===s&&(s=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>s;){if(o-s>600){var h=o-s+1,l=e-s+1,u=Math.log(h),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),d=Math.max(s,Math.floor(e-l*c/h+f)),p=Math.min(o,Math.floor(e+(h-l)*c/h+f));r(t,e,d,p,a)}var v=t[e],g=s,m=o;for(i(t,s,e),a(t[o],v)>0&&i(t,s,o);g0;)m--}0===a(t[s],v)?i(t,s,m):i(t,++m,o),m<=e&&(s=m+1),e<=m&&(o=m-1)}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(10),r=i(64),s=function(t,e,i){for(var n=[],r=0;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(13);t.exports=function(t,e,i,r){var s;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(n(t,s),i&&i.call(r,e),e):null;for(var o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(s=t.indexOf(h))&&(n(t,s),a.push(h),i&&i.call(r,h)),o--}return a}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(13);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var s=n(t,e);return i&&i.call(r,s),s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(r)for(var h=0;h + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(13);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return n(t,r)}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var o=r;o + * @author Angry Bytes (and contributors) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(300);function r(t,e){return String(t).localeCompare(e)}function s(t,e,i,n){var r,s,o,a,h,l=t.length,u=0,c=2*i;for(r=0;rl&&(s=l),o>l&&(o=l),a=r,h=s;;)if(a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={os:i(28),browser:i(18),features:i(302),input:i(306),audio:i(307),video:i(308),fullscreen:i(309),canvasFeatures:i(310)}},function(t,e){var i,n,r=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h,l=[],u=!1,c=-1;function f(){u&&h&&(u=!1,h.length?l=h.concat(l):c=-1,l.length&&d())}function d(){if(!u){var t=a(f);u=!0;for(var e=l.length;e;){for(h=l,l=[];++c1)for(var i=1;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(28),r=i(18),s=i(65),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=s.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=s.create2D(this),n=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,s.remove(t),s.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(r.ie||r.firefox||r.chrome)&&(o.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={VERSION:"3.60.0-beta.18",BlendModes:i(15),ScaleModes:i(304),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(18),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(18),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var n=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(n||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(n)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(n.edge)r.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(10===s&&o>=11||s>10)&&(r.dolby=!0)}}}catch(t){}return r}()},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return i;var t=document.createElement("video"),e=!!t.canPlayType,n=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(n,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(n,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType("video/x-m4v").replace(n,"")&&(i.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(n,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(n,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(n,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return i;var t,e="Fullscreen",n="FullScreen",r=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;t + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n,r,s,o=i(65),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(s=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(s,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+r},s.src=n+"AP804Oa6"+r,!1),a.supportInverseAlpha=function(){var t=o.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),n=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return o.remove(this),n}()),a)},function(t,e){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Alpha:i(313),AlphaSingle:i(314),BlendMode:i(315),ComputedSize:i(51),Crop:i(316),Depth:i(52),Flip:i(53),FX:i(317),GetBounds:i(318),Mask:i(327),Origin:i(332),PathFollower:i(333),Pipeline:i(336),ScrollFactor:i(54),Size:i(338),Texture:i(339),TextureCrop:i(340),Tint:i(341),ToJSON:i(58),Transform:i(55),TransformMatrix:i(26),Visible:i(56)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(1),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(1),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(15),r={_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=r},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.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=i},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=i},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(29),r=i(42),s=i(3),o={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new 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,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,s,o,a,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,s=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,s=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,o,h),t.y=Math.min(i,s,a,l),t.width=Math.max(e,r,o,h)-t.x,t.height=Math.max(i,s,a,l)-t.y,t}};t.exports=o},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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(66),r=i(67);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=r(t)/i);for(var o=0;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(322),s=i(323),o=i(30),a=i(325),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 r(this,t,e)},getPoints:function(t,e,i){return s(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,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(14);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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(324),r=i(14);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(14);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(14);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(328),r=i(331),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,s){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new n(this.scene,t,e,i,r,s)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=s},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(329),s=new n({initialize:function(t,e,i,n,r,s){e||(e=t.sys.make.image({x:i,y:n,key:r,frame:s,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,n,r){return new s(this.scene,t,e,i,n,r)})),t.exports=s},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(330),s=i(23),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},r.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={},n={},r={register:function(t,e,n,r){void 0===r&&(r=!1),i[t]={plugin:e,mapping:n,custom:r}},registerCustom:function(t,e,i,r){n[t]={plugin:e,mapping:i,data:r}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var n=t.maskStack[t.maskStack.length-1];n.mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=i},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(21),r=i(334),s=i(10),o=i(335),a=i(3),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=s(t,"from",0),t.to=s(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=s(t,"rotationOffset",0);var l=s(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===o.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var s=this.x,a=this.y;this.setPosition(r.x,r.y);var h=this.x-s,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}};t.exports=h},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(337),r=i(13),s={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var n=i.get(t);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){var o=s.get(t);o&&(this.pipeline=o),e&&(this.pipelineData=i?n(e):e)}return this},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){Array.isArray(t)||(t=[t]);for(var o=0;o0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,n=[],r=0;r=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),r(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=s},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=function(t){var e,n,r;if("object"!=typeof t||null===t)return t;for(r in e=Array.isArray(t)?[]:{},t)n=t[r],e[r]=i(n);return e};t.exports=i},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(68),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(68),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this.tintFill||16777215!==this.tintTopLeft||16777215!==this.tintTopRight||16777215!==this.tintBottomLeft||16777215!==this.tintBottomRight}}};t.exports=i},function(t,e,i){ +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(2),r=n,s=n;r=i(343),s=i(344),t.exports={renderWebGL:r,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list,s=r.length;if(0!==s){var o=e.localTransform;n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(29);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=Math.min(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-r,a=Math.max(t.bottom,e.bottom)-s;return i.setTo(r,s,o,a)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(2),r=i(2);n=i(347),r=i(348),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){var r=e.plugin.sceneRenderer,s=e.list;if(0!==s.length){i.addToRenderList(e);var o=e.localTransform;n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var a=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h { // webpackBootstrap -/******/ var __webpack_modules__ = ({ +window["SpinePlugin"] = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ 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 ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./SpinePlugin.js"); +/******/ }) +/************************************************************************/ +/******/ ({ /***/ "../../../node_modules/eventemitter3/index.js": -/*!****************************************************!*\ - !*** ../../../node_modules/eventemitter3/index.js ***! - \****************************************************/ -/***/ ((module) => { +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -346,13 +433,39937 @@ if (true) { } +/***/ }), + +/***/ "../../../node_modules/process/browser.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), + +/***/ "../../../src/const.js": +/*!*************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/const.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Global constants. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.60.0-beta.18', + + BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ "../../../src/renderer/BlendModes.js"), + + ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ "../../../src/renderer/ScaleModes.js"), + + /** + * This setting will auto-detect if the browser is capable of suppporting WebGL. + * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer. + * + * @name Phaser.AUTO + * @const + * @type {number} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports + * WebGL or not. + * + * @name Phaser.CANVAS + * @const + * @type {number} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is + * no fallback to Canvas with this setting, so you should trap it and display a suitable + * message to the user. + * + * @name Phaser.WEBGL + * @const + * @type {number} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still + * absolutely relies on the DOM being present and available. This mode is meant for unit testing, + * not for running Phaser on the server, which is something you really shouldn't do. + * + * @name Phaser.HEADLESS + * @const + * @type {number} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {number} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {number} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {number} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {number} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {number} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {number} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + +/***/ }), + +/***/ "../../../src/data/DataManager.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var Events = __webpack_require__(/*! ./events */ "../../../src/data/events/index.js"); + +/** + * @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(Events.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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 {number} + * @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; + + +/***/ }), + +/***/ "../../../src/data/events/CHANGE_DATA_EVENT.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js": +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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.on('changedata-gold')`. + * + * @event Phaser.Data.Events#CHANGE_DATA_KEY + * @type {string} + * @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-'; + + +/***/ }), + +/***/ "../../../src/data/events/DESTROY_EVENT.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Data Manager Destroy Event. + * + * The Data Manager will listen for the destroy event from its parent, and then close itself down. + * + * @event Phaser.Data.Events#DESTROY + * @type {string} + * @since 3.50.0 + */ +module.exports = 'destroy'; + + +/***/ }), + +/***/ "../../../src/data/events/REMOVE_DATA_EVENT.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.on('removedata', listener)`. + * + * @event Phaser.Data.Events#REMOVE_DATA + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/data/events/SET_DATA_EVENT.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.on('setdata', listener)`. + * + * @event Phaser.Data.Events#SET_DATA + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/data/events/index.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Data.Events + */ + +module.exports = { + + CHANGE_DATA: __webpack_require__(/*! ./CHANGE_DATA_EVENT */ "../../../src/data/events/CHANGE_DATA_EVENT.js"), + CHANGE_DATA_KEY: __webpack_require__(/*! ./CHANGE_DATA_KEY_EVENT */ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js"), + DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "../../../src/data/events/DESTROY_EVENT.js"), + REMOVE_DATA: __webpack_require__(/*! ./REMOVE_DATA_EVENT */ "../../../src/data/events/REMOVE_DATA_EVENT.js"), + SET_DATA: __webpack_require__(/*! ./SET_DATA_EVENT */ "../../../src/data/events/SET_DATA_EVENT.js") + +}; + + +/***/ }), + +/***/ "../../../src/device/Audio.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); + +/** + * Determines the audio playback capabilities of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.audio` from within any Scene. + * + * @typedef {object} Phaser.Device.Audio + * @since 3.0.0 + * + * @property {boolean} audioData - Can this device play HTML Audio tags? + * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files? + * @property {boolean} m4a - Can this device can play m4a files. + * @property {boolean} aac - Can this device can play aac files. + * @property {boolean} flac - Can this device can play flac files. + * @property {boolean} mp3 - Can this device play mp3 files? + * @property {boolean} ogg - Can this device play ogg files? + * @property {boolean} opus - Can this device play opus files? + * @property {boolean} wav - Can this device play wav files? + * @property {boolean} webAudio - Does this device have the Web Audio API? + * @property {boolean} webm - Can this device play webm files? + */ +var Audio = { + + flac: false, + aac: false, + audioData: false, + dolby: false, + m4a: false, + mp3: false, + ogg: false, + opus: false, + wav: false, + webAudio: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Audio; + } + + Audio.audioData = !!(window['Audio']); + + Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']); + + var audioElement = document.createElement('audio'); + var result = !!audioElement.canPlayType; + + try + { + if (result) + { + var CanPlay = function (type1, type2) + { + var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, ''); + + if (type2) + { + return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, '')); + } + else + { + return Boolean(canPlayType1); + } + }; + + // wav Mimetypes accepted: + // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + + Audio.ogg = CanPlay('ogg; codecs="vorbis"'); + Audio.opus = CanPlay('ogg; codecs="opus"', 'opus'); + Audio.mp3 = CanPlay('mpeg'); + Audio.wav = CanPlay('wav'); + Audio.m4a = CanPlay('x-m4a'); + Audio.aac = CanPlay('aac'); + Audio.flac = CanPlay('flac', 'x-flac'); + Audio.webm = CanPlay('webm; codecs="vorbis"'); + + if (audioElement.canPlayType('audio/mp4; codecs="ec-3"') !== '') + { + if (Browser.edge) + { + Audio.dolby = true; + } + else if (Browser.safari && Browser.safariVersion >= 9) + { + if ((/Mac OS X (\d+)_(\d+)/).test(navigator.userAgent)) + { + var major = parseInt(RegExp.$1, 10); + var minor = parseInt(RegExp.$2, 10); + + if ((major === 10 && minor >= 11) || major > 10) + { + Audio.dolby = true; + } + } + } + } + } + } + catch (e) + { + // Nothing to do here + } + + return Audio; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Browser.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"); + +/** + * Determines the browser type and version running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.browser` from within any Scene. + * + * @typedef {object} Phaser.Device.Browser + * @since 3.0.0 + * + * @property {boolean} chrome - Set to true if running in Chrome. + * @property {boolean} edge - Set to true if running in Microsoft Edge browser. + * @property {boolean} firefox - Set to true if running in Firefox. + * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge). + * @property {boolean} mobileSafari - Set to true if running in Mobile Safari. + * @property {boolean} opera - Set to true if running in Opera. + * @property {boolean} safari - Set to true if running in Safari. + * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle) + * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+) + * @property {number} chromeVersion - If running in Chrome this will contain the major version number. + * @property {number} firefoxVersion - If running in Firefox this will contain the major version number. + * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion. + * @property {number} safariVersion - If running in Safari this will contain the major version number. + * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx} + */ +var Browser = { + + chrome: false, + chromeVersion: 0, + edge: false, + firefox: false, + firefoxVersion: 0, + ie: false, + ieVersion: 0, + mobileSafari: false, + opera: false, + safari: false, + safariVersion: 0, + silk: false, + trident: false, + tridentVersion: 0, + es2019: false + +}; + +function init () +{ + var ua = navigator.userAgent; + + if ((/Edg\/\d+/).test(ua)) + { + Browser.edge = true; + Browser.es2019 = true; + } + else if ((/OPR/).test(ua)) { + Browser.opera = true; + Browser.es2019 = true; + } + else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) + { + Browser.chrome = true; + Browser.chromeVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.chromeVersion > 69); + } + else if ((/Firefox\D+(\d+)/).test(ua)) + { + Browser.firefox = true; + Browser.firefoxVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.firefoxVersion > 10); + } + else if ((/AppleWebKit/).test(ua) && OS.iOS) + { + Browser.mobileSafari = true; + } + else if ((/MSIE (\d+\.\d+);/).test(ua)) + { + Browser.ie = true; + Browser.ieVersion = parseInt(RegExp.$1, 10); + } + else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) + { + Browser.safari = true; + Browser.safariVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.safariVersion > 10); + } + else if ((/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/).test(ua)) + { + Browser.ie = true; + Browser.trident = true; + Browser.tridentVersion = parseInt(RegExp.$1, 10); + Browser.ieVersion = parseInt(RegExp.$3, 10); + } + + // Silk gets its own if clause because its ua also contains 'Safari' + if ((/Silk/).test(ua)) + { + Browser.silk = true; + } + + return Browser; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/CanvasFeatures.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "../../../src/display/canvas/CanvasPool.js"); + +/** + * Determines the canvas features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.canvasFeatures` from within any Scene. + * + * @typedef {object} Phaser.Device.CanvasFeatures + * @since 3.0.0 + * + * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha. + * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes. + */ +var CanvasFeatures = { + + supportInverseAlpha: false, + supportNewBlendModes: false + +}; + +function checkBlendMode () +{ + var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/'; + var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=='; + + var magenta = new Image(); + + magenta.onload = function () + { + var yellow = new Image(); + + yellow.onload = function () + { + var canvas = CanvasPool.create2D(yellow, 6); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.globalCompositeOperation = 'multiply'; + + context.drawImage(magenta, 0, 0); + context.drawImage(yellow, 2, 0); + + if (!context.getImageData(2, 0, 1, 1)) + { + return false; + } + + var data = context.getImageData(2, 0, 1, 1).data; + + CanvasPool.remove(yellow); + + CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0); + }; + + yellow.src = pngHead + '/wCKxvRF' + pngEnd; + }; + + magenta.src = pngHead + 'AP804Oa6' + pngEnd; + + return false; +} + +function checkInverseAlpha () +{ + var canvas = CanvasPool.create2D(this, 2); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.fillStyle = 'rgba(10, 20, 30, 0.5)'; + + // Draw a single pixel + context.fillRect(0, 0, 1, 1); + + // Get the color values + var s1 = context.getImageData(0, 0, 1, 1); + + if (s1 === null) + { + return false; + } + + // Plot them to x2 + context.putImageData(s1, 1, 0); + + // Get those values + var s2 = context.getImageData(1, 0, 1, 1); + + var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]); + + CanvasPool.remove(this); + + // Compare and return + return result; +} + +function init () +{ + if (typeof importScripts !== 'function' && document !== undefined) + { + CanvasFeatures.supportNewBlendModes = checkBlendMode(); + CanvasFeatures.supportInverseAlpha = checkInverseAlpha(); + } + + return CanvasFeatures; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Features.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Features.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"); +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); +var CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "../../../src/display/canvas/CanvasPool.js"); + +/** + * Determines the features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.features` from within any Scene. + * + * @typedef {object} Phaser.Device.Features + * @since 3.0.0 + * + * @property {boolean} canvas - Is canvas available? + * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap. + * @property {boolean} file - Is file available? + * @property {boolean} fileSystem - Is fileSystem available? + * @property {boolean} getUserMedia - Does the device support the getUserMedia API? + * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays) + * @property {boolean} localStorage - Is localStorage available? + * @property {boolean} pointerLock - Is Pointer Lock available? + * @property {boolean} stableSort - Is Array.sort stable? + * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views? + * @property {boolean} vibration - Does the device support the Vibration API? + * @property {boolean} webGL - Is webGL available? + * @property {boolean} worker - Is worker available? + */ +var Features = { + + canvas: false, + canvasBitBltShift: null, + file: false, + fileSystem: false, + getUserMedia: true, + littleEndian: false, + localStorage: false, + pointerLock: false, + stableSort: false, + support32bit: false, + vibration: false, + webGL: false, + worker: false + +}; + +// Check Little or Big Endian system. +// @author Matt DesLauriers (@mattdesl) +function checkIsLittleEndian () +{ + var a = new ArrayBuffer(4); + var b = new Uint8Array(a); + var c = new Uint32Array(a); + + b[0] = 0xa1; + b[1] = 0xb2; + b[2] = 0xc3; + b[3] = 0xd4; + + if (c[0] === 0xd4c3b2a1) + { + return true; + } + + if (c[0] === 0xa1b2c3d4) + { + return false; + } + else + { + // Could not determine endianness + return null; + } +} + +function init () +{ + if (typeof importScripts === 'function') + { + return Features; + } + + Features.canvas = !!window['CanvasRenderingContext2D']; + + try + { + Features.localStorage = !!localStorage.getItem; + } + catch (error) + { + Features.localStorage = false; + } + + Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; + Features.fileSystem = !!window['requestFileSystem']; + + var isUint8 = false; + + var testWebGL = function () + { + if (window['WebGLRenderingContext']) + { + try + { + var canvas = CanvasPool.createWebGL(this); + + var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); + + var canvas2D = CanvasPool.create2D(this); + + var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true }); + + // Can't be done on a webgl context + var image = ctx2D.createImageData(1, 1); + + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) + isUint8 = image.data instanceof Uint8ClampedArray; + + CanvasPool.remove(canvas); + CanvasPool.remove(canvas2D); + + return !!ctx; + } + catch (e) + { + return false; + } + } + + return false; + }; + + Features.webGL = testWebGL(); + + Features.worker = !!window['Worker']; + + Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document; + + navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia; + + window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL; + + Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL; + + // Older versions of firefox (< 21) apparently claim support but user media does not actually work + if (Browser.firefox && Browser.firefoxVersion < 21) + { + Features.getUserMedia = false; + } + + // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it + // is safer to not try and use the fast copy-over method. + if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome)) + { + Features.canvasBitBltShift = true; + } + + // Known not to work + if (Browser.safari || Browser.mobileSafari) + { + Features.canvasBitBltShift = false; + } + + navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; + + if (navigator.vibrate) + { + Features.vibration = true; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined') + { + Features.littleEndian = checkIsLittleEndian(); + } + + Features.support32bit = ( + typeof ArrayBuffer !== 'undefined' && + typeof Uint8ClampedArray !== 'undefined' && + typeof Int32Array !== 'undefined' && + Features.littleEndian !== null && + isUint8 + ); + + return Features; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Fullscreen.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the full screen support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.fullscreen` from within any Scene. + * + * @typedef {object} Phaser.Device.Fullscreen + * @since 3.0.0 + * + * @property {boolean} available - Does the browser support the Full Screen API? + * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode? + * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it. + * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it. + */ +var Fullscreen = { + + available: false, + cancel: '', + keyboard: false, + request: '' + +}; + +/** +* Checks for support of the Full Screen API. +* +* @ignore +*/ +function init () +{ + if (typeof importScripts === 'function') + { + return Fullscreen; + } + + var i; + + var suffix1 = 'Fullscreen'; + var suffix2 = 'FullScreen'; + + var fs = [ + 'request' + suffix1, + 'request' + suffix2, + 'webkitRequest' + suffix1, + 'webkitRequest' + suffix2, + 'msRequest' + suffix1, + 'msRequest' + suffix2, + 'mozRequest' + suffix2, + 'mozRequest' + suffix1 + ]; + + for (i = 0; i < fs.length; i++) + { + if (document.documentElement[fs[i]]) + { + Fullscreen.available = true; + Fullscreen.request = fs[i]; + break; + } + } + + var cfs = [ + 'cancel' + suffix2, + 'exit' + suffix1, + 'webkitCancel' + suffix2, + 'webkitExit' + suffix1, + 'msCancel' + suffix2, + 'msExit' + suffix1, + 'mozCancel' + suffix2, + 'mozExit' + suffix1 + ]; + + if (Fullscreen.available) + { + for (i = 0; i < cfs.length; i++) + { + if (document[cfs[i]]) + { + Fullscreen.cancel = cfs[i]; + break; + } + } + } + + // Keyboard Input? + // Safari 5.1 says it supports fullscreen keyboard, but is lying. + if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\/5\.1(?:\.\d+)? Safari\//).test(navigator.userAgent)) + { + Fullscreen.keyboard = true; + } + + Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } }); + + return Fullscreen; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Input.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Input.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); + +/** + * Determines the input support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.input` from within any Scene. + * + * @typedef {object} Phaser.Device.Input + * @since 3.0.0 + * + * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll' + * @property {boolean} gamepads - Is navigator.getGamepads available? + * @property {boolean} mspointer - Is mspointer available? + * @property {boolean} touch - Is touch available? + */ +var Input = { + + gamepads: false, + mspointer: false, + touch: false, + wheelEvent: null + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Input; + } + + if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1)) + { + Input.touch = true; + } + + if (navigator.msPointerEnabled || navigator.pointerEnabled) + { + Input.mspointer = true; + } + + if (navigator.getGamepads) + { + Input.gamepads = true; + } + + // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel + if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window)) + { + // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+ + Input.wheelEvent = 'wheel'; + } + else if ('onmousewheel' in window) + { + // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7. + Input.wheelEvent = 'mousewheel'; + } + else if (Browser.firefox && 'MouseScrollEvent' in window) + { + // FF prior to 17. This should probably be scrubbed. + Input.wheelEvent = 'DOMMouseScroll'; + } + + return Input; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/OS.js": +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/OS.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the operating system of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.os` from within any Scene. + * + * @typedef {object} Phaser.Device.OS + * @since 3.0.0 + * + * @property {boolean} android - Is running on android? + * @property {boolean} chromeOS - Is running on chromeOS? + * @property {boolean} cordova - Is the game running under Apache Cordova? + * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK? + * @property {boolean} desktop - Is running on a desktop? + * @property {boolean} ejecta - Is the game running under Ejecta? + * @property {boolean} electron - Is the game running under GitHub Electron? + * @property {boolean} iOS - Is running on iOS? + * @property {boolean} iPad - Is running on iPad? + * @property {boolean} iPhone - Is running on iPhone? + * @property {boolean} kindle - Is running on an Amazon Kindle? + * @property {boolean} linux - Is running on linux? + * @property {boolean} macOS - Is running on macOS? + * @property {boolean} node - Is the game running under Node.js? + * @property {boolean} nodeWebkit - Is the game running under Node-Webkit? + * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView + * @property {boolean} windows - Is running on windows? + * @property {boolean} windowsPhone - Is running on a Windows Phone? + * @property {number} iOSVersion - If running in iOS this will contain the major version number. + * @property {number} pixelRatio - PixelRatio of the host device? + */ +var OS = { + + android: false, + chromeOS: false, + cordova: false, + crosswalk: false, + desktop: false, + ejecta: false, + electron: false, + iOS: false, + iOSVersion: 0, + iPad: false, + iPhone: false, + kindle: false, + linux: false, + macOS: false, + node: false, + nodeWebkit: false, + pixelRatio: 1, + webApp: false, + windows: false, + windowsPhone: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return OS; + } + + var ua = navigator.userAgent; + + if ((/Windows/).test(ua)) + { + OS.windows = true; + } + else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua))) + { + // Because iOS 13 identifies as Mac OS: + if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2) + { + OS.iOS = true; + OS.iPad = true; + + (navigator.appVersion).match(/Version\/(\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + } + else + { + OS.macOS = true; + } + } + else if ((/Android/).test(ua)) + { + OS.android = true; + } + else if ((/Linux/).test(ua)) + { + OS.linux = true; + } + else if ((/iP[ao]d|iPhone/i).test(ua)) + { + OS.iOS = true; + + (navigator.appVersion).match(/OS (\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + + OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1; + OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1; + } + else if ((/Kindle/).test(ua) || (/\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua)) + { + OS.kindle = true; + + // This will NOT detect early generations of Kindle Fire, I think there is no reliable way... + // E.g. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true" + } + else if ((/CrOS/).test(ua)) + { + OS.chromeOS = true; + } + + if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua)) + { + OS.android = false; + OS.iOS = false; + OS.macOS = false; + OS.windows = true; + OS.windowsPhone = true; + } + + var silk = (/Silk/).test(ua); + + if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS) + { + OS.desktop = true; + } + + // Windows Phone / Table reset + if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua)))) + { + OS.desktop = false; + } + + // WebApp mode in iOS + if (navigator.standalone) + { + OS.webApp = true; + } + + if (typeof importScripts !== 'function') + { + if (window.cordova !== undefined) + { + OS.cordova = true; + } + + if (window.ejecta !== undefined) + { + OS.ejecta = true; + } + } + + if (typeof process !== 'undefined' && process.versions && process.versions.node) + { + OS.node = true; + } + + if (OS.node && typeof process.versions === 'object') + { + OS.nodeWebkit = !!process.versions['node-webkit']; + + OS.electron = !!process.versions.electron; + } + + if ((/Crosswalk/).test(ua)) + { + OS.crosswalk = true; + } + + OS.pixelRatio = window['devicePixelRatio'] || 1; + + return OS; +} + +module.exports = init(); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/process/browser.js */ "../../../node_modules/process/browser.js"))) + +/***/ }), + +/***/ "../../../src/device/Video.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Video.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the video support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.video` from within any Scene. + * + * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix. + * + * @typedef {object} Phaser.Device.Video + * @since 3.0.0 + * + * @property {boolean} h264 - Can this device play h264 mp4 video files? + * @property {boolean} hls - Can this device play hls video files? + * @property {boolean} mp4 - Can this device play h264 mp4 video files? + * @property {boolean} m4v - Can this device play m4v (typically mp4) video files? + * @property {boolean} ogg - Can this device play ogg video files? + * @property {boolean} vp9 - Can this device play vp9 video files? + * @property {boolean} webm - Can this device play webm video files? + */ +var Video = { + + h264: false, + hls: false, + mp4: false, + m4v: false, + ogg: false, + vp9: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Video; + } + + var videoElement = document.createElement('video'); + var result = !!videoElement.canPlayType; + var no = /^no$/; + + try + { + if (result) + { + if (videoElement.canPlayType('video/ogg; codecs="theora"').replace(no, '')) + { + Video.ogg = true; + } + + if (videoElement.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(no, '')) + { + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + Video.h264 = true; + Video.mp4 = true; + } + + if (videoElement.canPlayType('video/x-m4v').replace(no, '')) + { + Video.m4v = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp8, vorbis"').replace(no, '')) + { + Video.webm = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp9"').replace(no, '')) + { + Video.vp9 = true; + } + + if (videoElement.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(no, '')) + { + Video.hls = true; + } + } + } + catch (e) + { + // Nothing to do + } + + return Video; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/index.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/index.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// This singleton is instantiated as soon as Phaser loads, +// before a Phaser.Game instance has even been created. +// Which means all instances of Phaser Games can share it, +// without having to re-poll the device all over again + +/** + * @namespace Phaser.Device + * @since 3.0.0 + */ + +/** + * @typedef {object} Phaser.DeviceConf + * + * @property {Phaser.Device.OS} os - The OS Device functions. + * @property {Phaser.Device.Browser} browser - The Browser Device functions. + * @property {Phaser.Device.Features} features - The Features Device functions. + * @property {Phaser.Device.Input} input - The Input Device functions. + * @property {Phaser.Device.Audio} audio - The Audio Device functions. + * @property {Phaser.Device.Video} video - The Video Device functions. + * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions. + * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions. + */ + +module.exports = { + + os: __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"), + browser: __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"), + features: __webpack_require__(/*! ./Features */ "../../../src/device/Features.js"), + input: __webpack_require__(/*! ./Input */ "../../../src/device/Input.js"), + audio: __webpack_require__(/*! ./Audio */ "../../../src/device/Audio.js"), + video: __webpack_require__(/*! ./Video */ "../../../src/device/Video.js"), + fullscreen: __webpack_require__(/*! ./Fullscreen */ "../../../src/device/Fullscreen.js"), + canvasFeatures: __webpack_require__(/*! ./CanvasFeatures */ "../../../src/device/CanvasFeatures.js") + +}; + + +/***/ }), + +/***/ "../../../src/display/canvas/CanvasPool.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(/*! ../../const */ "../../../src/const.js"); +var Smoothing = __webpack_require__(/*! ./Smoothing */ "../../../src/display/canvas/Smoothing.js"); + +// The pool into which the canvas elements are placed. +var pool = []; + +// Automatically apply smoothing(false) to created Canvas elements +var _disableContextSmoothing = false; + +/** + * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements. + * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, + * which is useless for some of the Phaser pipelines / renderer. + * + * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created. + * Which means all instances of Phaser Games on the same page can share the one single pool. + * + * @namespace Phaser.Display.Canvas.CanvasPool + * @since 3.0.0 + */ +var CanvasPool = function () +{ + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent? + * + * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool + */ + var create = function (parent, width, height, canvasType, selfParent) + { + if (width === undefined) { width = 1; } + if (height === undefined) { height = 1; } + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + if (selfParent === undefined) { selfParent = false; } + + var canvas; + var container = first(canvasType); + + if (container === null) + { + container = { + parent: parent, + canvas: document.createElement('canvas'), + type: canvasType + }; + + if (canvasType === CONST.CANVAS) + { + pool.push(container); + } + + canvas = container.canvas; + } + else + { + container.parent = parent; + + canvas = container.canvas; + } + + if (selfParent) + { + container.parent = canvas; + } + + canvas.width = width; + canvas.height = height; + + if (_disableContextSmoothing && canvasType === CONST.CANVAS) + { + Smoothing.disable(canvas.getContext('2d')); + } + + return canvas; + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create2D + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created canvas. + */ + var create2D = function (parent, width, height) + { + return create(parent, width, height, CONST.CANVAS); + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.createWebGL + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created WebGL canvas. + */ + var createWebGL = function (parent, width, height) + { + return create(parent, width, height, CONST.WEBGL); + }; + + /** + * Gets the first free canvas index from the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.first + * @since 3.0.0 + * + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * + * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases. + */ + var first = function (canvasType) + { + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + + if (canvasType === CONST.WEBGL) + { + return null; + } + + for (var i = 0; i < pool.length; i++) + { + var container = pool[i]; + + if (!container.parent && container.type === canvasType) + { + return container; + } + } + + return null; + }; + + /** + * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use. + * The canvas has its width and height set to 1, and its parent attribute nulled. + * + * @function Phaser.Display.Canvas.CanvasPool.remove + * @since 3.0.0 + * + * @param {*} parent - The canvas or the parent of the canvas to free. + */ + var remove = function (parent) + { + // Check to see if the parent is a canvas object + var isCanvas = parent instanceof HTMLCanvasElement; + + pool.forEach(function (container) + { + if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent)) + { + container.parent = null; + container.canvas.width = 1; + container.canvas.height = 1; + } + }); + }; + + /** + * Gets the total number of used canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.total + * @since 3.0.0 + * + * @return {number} The number of used canvases. + */ + var total = function () + { + var c = 0; + + pool.forEach(function (container) + { + if (container.parent) + { + c++; + } + }); + + return c; + }; + + /** + * Gets the total number of free canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.free + * @since 3.0.0 + * + * @return {number} The number of free canvases. + */ + var free = function () + { + return pool.length - total(); + }; + + /** + * Disable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing + * @since 3.0.0 + */ + var disableSmoothing = function () + { + _disableContextSmoothing = true; + }; + + /** + * Enable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing + * @since 3.0.0 + */ + var enableSmoothing = function () + { + _disableContextSmoothing = false; + }; + + return { + create2D: create2D, + create: create, + createWebGL: createWebGL, + disableSmoothing: disableSmoothing, + enableSmoothing: enableSmoothing, + first: first, + free: free, + pool: pool, + remove: remove, + total: total + }; +}; + +// If we export the called function here, it'll only be invoked once (not every time it's required). +module.exports = CanvasPool(); + + +/***/ }), + +/***/ "../../../src/display/canvas/Smoothing.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Browser specific prefix, so not going to change between contexts, only between browsers +var prefix = ''; + +/** + * @namespace Phaser.Display.Canvas.Smoothing + * @since 3.0.0 + */ +var Smoothing = function () +{ + /** + * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set. + * + * @function Phaser.Display.Canvas.Smoothing.getPrefix + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check. + * + * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported. + */ + var getPrefix = function (context) + { + var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ]; + + for (var i = 0; i < vendors.length; i++) + { + var s = vendors[i] + 'mageSmoothingEnabled'; + + if (s in context) + { + return s; + } + } + + return null; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.enable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var enable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = true; + } + + return context; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.disable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var disable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = false; + } + + return context; + }; + + /** + * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`. + * Returns null if no smoothing prefix is available. + * + * @function Phaser.Display.Canvas.Smoothing.isEnabled + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check. + * + * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported. + */ + var isEnabled = function (context) + { + return (prefix !== null) ? context[prefix] : null; + }; + + return { + disable: disable, + enable: enable, + getPrefix: getPrefix, + isEnabled: isEnabled + }; + +}; + +module.exports = Smoothing(); + + +/***/ }), + +/***/ "../../../src/display/mask/BitmapMask.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ "../../../src/gameobjects/GameObjectFactory.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 or Dynamic Texture 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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 to which this mask is being added. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + */ +var BitmapMask = new Class({ + + initialize: + + function BitmapMask (scene, maskObject, x, y, texture, frame) + { + if (!maskObject) + { + maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false }); + } + + /** + * The Game Object that is used as the mask. Must use a texture, such as a Sprite. + * + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} + * @since 3.0.0 + */ + this.bitmapMask = maskObject; + + /** + * 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? This is false by default and should not be changed. + * + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = false; + }, + + /** + * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use. + * + * If a Game Object it must have a texture, such as a Sprite. + * + * You can update the source of the mask as often as you like. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite. + */ + setBitmap: function (maskObject) + { + this.bitmapMask = maskObject; + }, + + /** + * 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.BITMAPMASK_PIPELINE.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. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget. + */ + postRenderWebGL: function (renderer, camera, renderTarget) + { + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget); + }, + + /** + * 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; + } + +}); + +/** + * 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, or Dynamic Texture, 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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. + * + * @method Phaser.GameObjects.GameObjectFactory#bitmapMask + * @since 3.60.0 + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + * + * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created. + */ +GameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame) +{ + return new BitmapMask(this.scene, maskObject, x, y, key, frame); +}); + +module.exports = BitmapMask; + + +/***/ }), + +/***/ "../../../src/display/mask/GeometryMask.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../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. + * + * This is a WebGL only feature. + * + * @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. + * + * This is a WebGL only feature. + * + * @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, 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--; + + // Force flush before disabling stencil test + renderer.flush(); + + var current = renderer.currentMask; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + current.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + current.mask = prev.mask; + current.camera = prev.camera; + } + else + { + current.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, 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": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(/*! ../renderer/BlendModes */ "../../../src/renderer/BlendModes.js"); +var GetAdvancedValue = __webpack_require__(/*! ../utils/object/GetAdvancedValue */ "../../../src/utils/object/GetAdvancedValue.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/gameobjects/GameObject.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var ComponentsToJSON = __webpack_require__(/*! ./components/ToJSON */ "../../../src/gameobjects/components/ToJSON.js"); +var DataManager = __webpack_require__(/*! ../data/DataManager */ "../../../src/data/DataManager.js"); +var EventEmitter = __webpack_require__(/*! eventemitter3 */ "../../../node_modules/eventemitter3/index.js"); +var Events = __webpack_require__(/*! ./events */ "../../../src/gameobjects/events/index.js"); +var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene/events/index.js"); + +/** + * @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); + + /** + * A reference to the Scene to which this Game Object belongs. + * + * Game Objects can only belong to one Scene. + * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + * + * @name Phaser.GameObjects.GameObject#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene = scene; + + /** + * Holds a reference to the Display List that contains this Game Object. + * + * This is set automatically when this Game Object is added to a Scene or Layer. + * + * You should treat this property as being read-only. + * + * @name Phaser.GameObjects.GameObject#displayList + * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} + * @default null + * @since 3.50.0 + */ + this.displayList = null; + + /** + * 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 {(number|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 {number} + * @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 {number} + * @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; + + this.on(Events.ADDED_TO_SCENE, this.addedToScene, this); + this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this); + + // 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 {(number|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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 () + { + this.scene.sys.input.disable(this); + + 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) + { + var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; + + return !(!listWillRender || 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 {number[]} 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)); + + child = parent; + + if (!parent.parentContainer) + { + break; + } + else + { + parent = parent.parentContainer; + } + } + + if (this.displayList) + { + indexes.unshift(this.displayList.getIndex(child)); + } + else + { + indexes.unshift(this.scene.sys.displayList.getIndex(child)); + } + + return indexes; + }, + + /** + * Adds this Game Object to the given Display List. + * + * If no Display List is specified, it will default to the Display List owned by the Scene to which + * this Game Object belongs. + * + * A Game Object can only exist on one Display List at any given time, but may move freely between them. + * + * If this Game Object is already on another Display List when this method is called, it will first + * be removed from it, before being added to the new list. + * + * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. + * + * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly + * disable it from rendering, consider using the `setVisible` method, instead. + * + * @method Phaser.GameObjects.GameObject#addToDisplayList + * @fires Phaser.Scenes.Events#ADDED_TO_SCENE + * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.53.0 + * + * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List. + * + * @return {this} This Game Object. + */ + addToDisplayList: function (displayList) + { + if (displayList === undefined) { displayList = this.scene.sys.displayList; } + + if (this.displayList && this.displayList !== displayList) + { + this.removeFromDisplayList(); + } + + // Don't repeat if it's already on this list + if (!displayList.exists(this)) + { + this.displayList = displayList; + + displayList.add(this, true); + + displayList.queueDepthSort(); + + this.emit(Events.ADDED_TO_SCENE, this, this.scene); + + displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene); + } + + return this; + }, + + /** + * Adds this Game Object to the Update List belonging to the Scene. + * + * When a Game Object is added to the Update List it will have its `preUpdate` method called + * every game frame. This method is passed two parameters: `delta` and `time`. + * + * If you wish to run your own logic within `preUpdate` then you should always call + * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, + * such as Sprite animations. + * + * @method Phaser.GameObjects.GameObject#addToUpdateList + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + addToUpdateList: function () + { + if (this.scene && this.preUpdate) + { + this.scene.sys.updateList.add(this); + } + + return this; + }, + + /** + * Removes this Game Object from the Display List it is currently on. + * + * A Game Object can only exist on one Display List at any given time, but may move freely removed + * and added back at a later stage. + * + * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. + * + * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly + * disable it from rendering, consider using the `setVisible` method, instead. + * + * @method Phaser.GameObjects.GameObject#removeFromDisplayList + * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + removeFromDisplayList: function () + { + var displayList = this.displayList || this.scene.sys.displayList; + + if (displayList && displayList.exists(this)) + { + displayList.remove(this, true); + + displayList.queueDepthSort(); + + this.displayList = null; + + this.emit(Events.REMOVED_FROM_SCENE, this, this.scene); + + displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene); + } + + return this; + }, + + /** + * Removes this Game Object from the Scene's Update List. + * + * When a Game Object is on the Update List, it will have its `preUpdate` method called + * every game frame. Calling this method will remove it from the list, preventing this. + * + * Removing a Game Object from the Update List will stop most internal functions working. + * For example, removing a Sprite from the Update List will prevent it from being able to + * run animations. + * + * @method Phaser.GameObjects.GameObject#removeFromUpdateList + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + removeFromUpdateList: function () + { + if (this.scene && this.preUpdate) + { + this.scene.sys.updateList.remove(this); + } + + return this; + }, + + /** + * 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] - `True` if this Game Object is being destroyed by the Scene, `false` if not. + */ + destroy: function (fromScene) + { + // This Game Object has already been destroyed + if (!this.scene || this.ignoreDestroy) + { + return; + } + + if (fromScene === undefined) { fromScene = false; } + + if (this.preDestroy) + { + this.preDestroy.call(this); + } + + this.emit(Events.DESTROY, this, fromScene); + + this.removeAllListeners(); + + if (this.postPipelines) + { + this.resetPostPipeline(true); + } + + this.removeFromDisplayList(); + this.removeFromUpdateList(); + + if (this.input) + { + this.scene.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; + } + + this.active = false; + this.visible = false; + + this.scene = undefined; + this.parentContainer = undefined; + } + +}); + +/** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * + * @constant {number} RENDER_MASK + * @memberof Phaser.GameObjects.GameObject + * @default + */ +GameObject.RENDER_MASK = 15; + +module.exports = GameObject; + + +/***/ }), + +/***/ "../../../src/gameobjects/GameObjectFactory.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "../../../src/plugins/PluginCache.js"); +var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene/events/index.js"); + +/** + * @classdesc + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. + * + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. + * + * @class GameObjectFactory + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. + */ +var GameObjectFactory = new Class({ + + initialize: + + function GameObjectFactory (scene) + { + /** + * The Scene to which this Game Object Factory belongs. + * + * @name Phaser.GameObjects.GameObjectFactory#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + + /** + * A reference to the Scene.Systems. + * + * @name Phaser.GameObjects.GameObjectFactory#systems + * @type {Phaser.Scenes.Systems} + * @protected + * @since 3.0.0 + */ + 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. + * + * @name Phaser.GameObjects.GameObjectFactory#displayList + * @type {Phaser.GameObjects.DisplayList} + * @protected + * @since 3.0.0 + */ + this.displayList; + + /** + * A reference to the Scene Update List. + * + * @name Phaser.GameObjects.GameObjectFactory#updateList + * @type {Phaser.GameObjects.UpdateList} + * @protected + * @since 3.0.0 + */ + this.updateList; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); + }, + + /** + * This method is called automatically, only once, when the Scene is first created. + * Do not invoke it directly. + * + * @method Phaser.GameObjects.GameObjectFactory#boot + * @private + * @since 3.5.1 + */ + boot: function () + { + this.displayList = this.systems.displayList; + this.updateList = this.systems.updateList; + + this.events.once(SceneEvents.DESTROY, this.destroy, this); + }, + + /** + * This method is called automatically by the Scene when it is starting up. + * It is responsible for creating local systems, properties and listening for Scene events. + * Do not invoke it directly. + * + * @method Phaser.GameObjects.GameObjectFactory#start + * @private + * @since 3.5.0 + */ + start: function () + { + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * Adds an existing Game Object to this Scene. + * + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * + * @method Phaser.GameObjects.GameObjectFactory#existing + * @since 3.0.0 + * + * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was added. + */ + existing: function (child) + { + if (child.renderCanvas || child.renderWebGL) + { + this.displayList.add(child); + } + + // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event: + // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway. + if (child.preUpdate) + { + this.updateList.add(child); + } + + return child; + }, + + /** + * 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.GameObjectFactory#shutdown + * @private + * @since 3.0.0 + */ + shutdown: function () + { + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + * + * @method Phaser.GameObjects.GameObjectFactory#destroy + * @private + * @since 3.0.0 + */ + destroy: function () + { + this.shutdown(); + + this.events.off(SceneEvents.START, this.start, this); + + this.scene = null; + this.systems = null; + this.events = null; + + this.displayList = null; + this.updateList = null; + } + +}); + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ +GameObjectFactory.register = function (factoryType, factoryFunction) +{ + if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + GameObjectFactory.prototype[factoryType] = factoryFunction; + } +}; + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ +GameObjectFactory.remove = function (factoryType) +{ + if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + delete GameObjectFactory.prototype[factoryType]; + } +}; + +PluginCache.register('GameObjectFactory', GameObjectFactory, 'add'); + +module.exports = GameObjectFactory; + + +/***/ }), + +/***/ "../../../src/gameobjects/GetCalcMatrix.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GetCalcMatrix.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TransformMatrix = __webpack_require__(/*! ./components/TransformMatrix */ "../../../src/gameobjects/components/TransformMatrix.js"); + +var tempMatrix1 = new TransformMatrix(); +var tempMatrix2 = new TransformMatrix(); +var tempMatrix3 = new TransformMatrix(); + +var result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 }; + +/** + * Calculates the Transform Matrix of the given Game Object and Camera, factoring in + * the parent matrix if provided. + * + * Note that the object this results contains _references_ to the Transform Matrices, + * not new instances of them. Therefore, you should use their values immediately, or + * copy them to your own matrix, as they will be replaced as soon as another Game + * Object is rendered. + * + * @function Phaser.GameObjects.GetCalcMatrix + * @memberof Phaser.GameObjects + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any. + * + * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices. + */ +var GetCalcMatrix = function (src, camera, parentMatrix) +{ + var camMatrix = tempMatrix1; + var spriteMatrix = tempMatrix2; + var calcMatrix = tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + + camMatrix.copyFrom(camera.matrix); + + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + } + else + { + spriteMatrix.e -= camera.scrollX * src.scrollFactorX; + spriteMatrix.f -= camera.scrollY * src.scrollFactorY; + } + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + + return result; +}; + +module.exports = GetCalcMatrix; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Alpha.js": +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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/BlendMode.js": +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @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: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string|number)} + * @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: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/ComputedSize.js": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Crop.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @private + * @default 0 + * @since 3.0.0 + */ + _depth: 0, + + /** + * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type. + * + * 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) + { + if (this.displayList) + { + this.displayList.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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type. + * + * @return {this} This Game Object instance. + */ + setDepth: function (value) + { + if (value === undefined) { value = 0; } + + this.depth = value; + + return this; + } + +}; + +module.exports = Depth; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/FX.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the FX values of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.FX + * @webglOnly + * @since 3.60.0 + */ + +var FX = { + + /** + * The amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @name Phaser.GameObjects.Components.FX#fxPadding + * @type {number} + * @default 0 + * @since 3.60.0 + */ + fxPadding: 0, + + /** + * Sets the amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @method Phaser.GameObjects.Components.FX#setFXPadding + * @webglOnly + * @since 3.60.0 + * + * @param {number} [padding=0] - The amount of padding to add to the texture. + * + * @return {this} This Game Object instance. + */ + setFXPadding: function (padding) + { + if (padding === undefined) { padding = 0; } + + this.fxPadding = padding; + + return this; + }, + + /** + * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `copySprite` method. + * + * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFXCopy + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFXCopy: function () + { + }, + + /** + * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `drawSprite` method. + * + * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFX + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFX: function () + { + } + +}; + +module.exports = FX; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Flip.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/GetBounds.js": +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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, or a Dynamic Texture. + * + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * 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 texture-based Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @generic {Phaser.GameObjects.GameObject} G + * @generic {Phaser.Textures.DynamicTexture} T + * @genericUse {(G|T|null)} [maskObject] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. + */ + createBitmapMask: function (maskObject, x, y, texture, frame) + { + if (maskObject === undefined && (this.texture || this.shader || this.geom)) + { + // eslint-disable-next-line consistent-this + maskObject = this; + } + + return new BitmapMask(this.scene, maskObject, x, y, texture, frame); + }, + + /** + * 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 + * + * @generic {Phaser.GameObjects.Graphics} G + * @generic {Phaser.GameObjects.Shape} S + * @genericUse {(G|S)} [graphics] + * + * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom)) + { + // eslint-disable-next-line consistent-this + graphics = this; + } + + return new GeometryMask(this.scene, graphics); + } + +}; + +module.exports = Mask; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Origin.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @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.setTargetValue(); + }; + } + + 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(); + + config.persist = true; + + 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(tweenData.end, 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": +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DeepCopy = __webpack_require__(/*! ../../utils/object/DeepCopy */ "../../../src/utils/object/DeepCopy.js"); +var SpliceOne = __webpack_require__(/*! ../../utils/array/SpliceOne */ "../../../src/utils/array/SpliceOne.js"); + +/** + * 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. + * + * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default. + * + * @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, + + /** + * Does this Game Object have any Post Pipelines set? + * + * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline + * @type {boolean} + * @webglOnly + * @since 3.50.0 + */ + hasPostPipeline: false, + + /** + * The WebGL Post FX Pipelines this Game Object uses for post-render effects. + * + * The pipelines are processed in the order in which they appear in this array. + * + * If you modify this array directly, be sure to set the + * `hasPostPipeline` property accordingly. + * + * @name Phaser.GameObjects.Components.Pipeline#postPipelines + * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} + * @webglOnly + * @since 3.50.0 + */ + postPipelines: null, + + /** + * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses. + * + * @name Phaser.GameObjects.Components.Pipeline#pipelineData + * @type {object} + * @webglOnly + * @since 3.50.0 + */ + pipelineData: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipeline) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) + { + return false; + } + + var pipelines = renderer.pipelines; + + this.postPipelines = []; + this.pipelineData = {}; + + if (pipelines) + { + if (pipeline === undefined) + { + pipeline = pipelines.default; + } + + var instance = pipelines.get(pipeline); + + if (instance) + { + this.defaultPipeline = instance; + this.pipeline = instance; + + return true; + } + } + + return false; + }, + + /** + * Sets the main WebGL Pipeline of this Game Object. + * + * Also sets the `pipelineData` property, if the parameter is given. + * + * Both the pipeline and post pipelines share the same pipeline data object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. + * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. + * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipeline, pipelineData, copyData) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) + { + return this; + } + + var pipelines = renderer.pipelines; + + if (pipelines) + { + var instance = pipelines.get(pipeline); + + if (instance) + { + this.pipeline = instance; + } + + if (pipelineData) + { + this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; + } + } + + return this; + }, + + /** + * Sets one, or more, Post Pipelines on this Game Object. + * + * Post Pipelines are invoked after this Game Object has rendered to its target and + * are commonly used for post-fx. + * + * The post pipelines are appended to the `postPipelines` array belonging to this + * Game Object. When the renderer processes this Game Object, it iterates through the post + * pipelines in the order in which they appear in the array. If you are stacking together + * multiple effects, be aware that the order is important. + * + * If you call this method multiple times, the new pipelines will be appended to any existing + * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. + * + * You can optionally also set the `pipelineData` property, if the parameter is given. + * + * Both the pipeline and post pipelines share the pipeline data object together. + * + * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them. + * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. + * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. + * + * @return {this} This Game Object instance. + */ + setPostPipeline: function (pipelines, pipelineData, copyData) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) + { + return this; + } + + var pipelineManager = renderer.pipelines; + + if (pipelineManager) + { + if (!Array.isArray(pipelines)) + { + pipelines = [ pipelines ]; + } + + for (var i = 0; i < pipelines.length; i++) + { + var instance = pipelineManager.getPostPipeline(pipelines[i], this); + + if (instance) + { + this.postPipelines.push(instance); + } + } + + if (pipelineData) + { + this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; + } + } + + this.hasPostPipeline = (this.postPipelines.length > 0); + + return this; + }, + + /** + * Adds an entry to the `pipelineData` object belonging to this Game Object. + * + * If the 'key' already exists, its value is updated. If it doesn't exist, it is created. + * + * If `value` is undefined, and `key` exists, `key` is removed from the data object. + * + * Both the pipeline and post pipelines share the pipeline data object together. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipelineData + * @webglOnly + * @since 3.50.0 + * + * @param {string} key - The key of the pipeline data to set, update, or delete. + * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object. + * + * @return {this} This Game Object instance. + */ + setPipelineData: function (key, value) + { + var data = this.pipelineData; + + if (value === undefined) + { + delete data[key]; + } + else + { + data[key] = value; + } + + return this; + }, + + /** + * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it. + * + * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class. + * + * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array. + */ + getPostPipeline: function (pipeline) + { + var isString = (typeof pipeline === 'string'); + + var pipelines = this.postPipelines; + + var results = []; + + for (var i = 0; i < pipelines.length; i++) + { + var instance = pipelines[i]; + + if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline)) + { + results.push(instance); + } + } + + return (results.length === 1) ? results[0] : results; + }, + + /** + * 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 + * + * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines? + * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? + * + * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`. + */ + resetPipeline: function (resetPostPipelines, resetData) + { + if (resetPostPipelines === undefined) { resetPostPipelines = false; } + if (resetData === undefined) { resetData = false; } + + this.pipeline = this.defaultPipeline; + + if (resetPostPipelines) + { + this.postPipelines = []; + this.hasPostPipeline = false; + } + + if (resetData) + { + this.pipelineData = {}; + } + + return (this.pipeline !== null); + }, + + /** + * Resets the WebGL Post Pipelines of this Game Object. It does this by calling + * the `destroy` method on each post pipeline and then clearing the local array. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? + */ + resetPostPipeline: function (resetData) + { + if (resetData === undefined) { resetData = false; } + + var pipelines = this.postPipelines; + + for (var i = 0; i < pipelines.length; i++) + { + pipelines[i].destroy(); + } + + this.postPipelines = []; + this.hasPostPipeline = false; + + if (resetData) + { + this.pipelineData = {}; + } + }, + + /** + * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them. + * + * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead. + * + * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class. + * + * @return {this} This Game Object. + */ + removePostPipeline: function (pipeline) + { + var pipelines = this.postPipelines; + + for (var i = pipelines.length - 1; i >= 0; i--) + { + var instance = pipelines[i]; + + if ( + (typeof pipeline === 'string' && instance.name === pipeline) || + (typeof pipeline !== 'string' && instance instanceof pipeline)) + { + instance.destroy(); + + SpliceOne(pipelines, i); + } + } + + this.hasPostPipeline = (this.postPipelines.length > 0); + + return this; + }, + + /** + * 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": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Size.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + var input = this.input; + + if (input && !input.customHitArea) + { + input.hitArea.width = this.width; + input.hitArea.height = this.height; + } + + 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": +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Frame = __webpack_require__(/*! ../../textures/Frame */ "../../../src/textures/Frame.js"); + +// 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|number)} [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. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. + * @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; } + + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + 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": +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Frame = __webpack_require__(/*! ../../textures/Frame */ "../../../src/textures/Frame.js"); + +// 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|number)} [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. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. + * @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; } + + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + 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": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * 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 = { + + /** + * The tint value being applied to the top-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintTopLeft: 0xffffff, + + /** + * The tint value being applied to the top-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintTopRight: 0xffffff, + + /** + * The tint value being applied to the bottom-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintBottomLeft: 0xffffff, + + /** + * The tint value being applied to the bottom-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintBottomRight: 0xffffff, + + /** + * The tint fill mode. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * + * @name Phaser.GameObjects.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); + + 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {number} [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.tintTopLeft = topLeft; + this.tintTopRight = topRight; + this.tintBottomLeft = bottomLeft; + this.tintBottomRight = bottomRight; + + 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {number} [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 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 {number} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied? + * + * It checks to see if the 4 tint properties are set to the value 0xffffff + * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + var white = 0xffffff; + + return ( + this.tintFill || + this.tintTopLeft !== white || + this.tintTopRight !== white || + this.tintBottomLeft !== white || + this.tintBottomRight !== white + ); + } + + } + +}; + +module.exports = Tint; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/ToJSON.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Transform.js": +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + +/** + * 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 = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Transform#hasTransformComponent + * @type {boolean} + * @readonly + * @default true + * @since 3.60.0 + */ + hasTransformComponent: true, + + /** + * 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 {number} + * @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; + }, + + /** + * Copies an object's coordinates to this Game Object's position. + * + * @method Phaser.GameObjects.Components.Transform#copyPosition + * @since 3.50.0 + * + * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. + * + * @return {this} This Game Object instance. + */ + copyPosition: function (source) + { + if (source.x !== undefined) { this.x = source.x; } + if (source.y !== undefined) { this.y = source.y; } + if (source.z !== undefined) { this.z = source.z; } + if (source.w !== undefined) { this.w = source.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; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/TransformMatrix.js": +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var MATH_CONST = __webpack_require__(/*! ../../math/const */ "../../../src/math/const.js"); +var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/Vector2.js"); + +/** + * @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 temporary quad value cache. + * + * @name Phaser.GameObjects.Components.TransformMatrix#quad + * @type {Float32Array} + * @since 3.60.0 + */ + this.quad = new Float32Array(8); + }, + + /** + * 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) ? matrix : out.matrix; + + destinationMatrix[0] = (sourceA * localA) + (sourceB * localC); + destinationMatrix[1] = (sourceA * localB) + (sourceB * localD); + destinationMatrix[2] = (sourceC * localA) + (sourceD * localC); + destinationMatrix[3] = (sourceC * localB) + (sourceD * localD); + destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. + * + * @return {Phaser.Types.Math.Vector2Like} 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; + }, + + /** + * Performs the 8 calculations required to create the vertices of + * a quad based on this matrix and the given x/y/xw/yh values. + * + * The result is stored in `TransformMatrix.quad`, which is returned + * from this method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setQuad + * @since 3.60.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} xw - The xw value. + * @param {number} yh - The yh value. + * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. + * + * @return {Float32Array} The quad Float32Array. + */ + setQuad: function (x, y, xw, yh, roundPixels, quad) + { + if (quad === undefined) { quad = this.quad; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var e = matrix[4]; + var f = matrix[5]; + + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; + + if (roundPixels) + { + quad.forEach(function (value, index) + { + quad[index] = Math.round(value); + }); + } + + return quad; + }, + + /** + * 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.quad = null; + this.decomposedMatrix = null; + } + +}); + +module.exports = TransformMatrix; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Visible.js": +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/index.js": +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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"), + 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"), + FX: __webpack_require__(/*! ./FX */ "../../../src/gameobjects/components/FX.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": +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 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 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 transform point 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. + * + * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child, + * or the input area will become misaligned. + * + * 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.Pipeline + * @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.Pipeline, + 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 {number} + * @default -1 + * @since 3.4.0 + */ + this.maxSize = -1; + + /** + * The cursor position. + * + * @name Phaser.GameObjects.Container#position + * @type {number} + * @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(); + + /** + * 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.4.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.4.0 + */ + this.scrollFactorY = 1; + + this.initPipeline(); + + 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 + * @override + * @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 + * @override + * @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 + * @override + * @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 + * @override + * @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) + { + if (gameObject.parentContainer) + { + gameObject.parentContainer.remove(gameObject); + } + + gameObject.parentContainer = this; + + gameObject.removeFromDisplayList(); + + gameObject.addedToScene(); + } + }, + + /** + * 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, this); + + if (this.exclusive) + { + gameObject.parentContainer = null; + + gameObject.removedFromScene(); + + gameObject.addToDisplayList(); + } + }, + + /** + * 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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed. + * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned. + * + * @return {Phaser.Types.Math.Vector2Like} The transformed point. + */ + pointToContainer: function (source, output) + { + if (output === undefined) { output = new Vector2(); } + + if (this.parentContainer) + { + this.parentContainer.pointToContainer(source, output); + } + else + { + output.x = source.x; + output.y = 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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * + * @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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * @param {number} [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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * + * @param {number} 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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. + * + * @return {number} 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(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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * + * @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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * + * @param {number} [startIndex=0] - An optional start index. + * @param {number} [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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * + * @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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T[]} - [$return] + * + * @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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {number} 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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * + * @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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. + * @param {number} 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; + }, + + /** + * Moves a Game Object above another one within this Container. + * + * These 2 Game Objects must already be children of this Container. + * + * @method Phaser.GameObjects.Container#moveAbove + * @since 3.55.0 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * + * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object. + * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. + * + * @return {this} This Container instance. + */ + moveAbove: function (child1, child2) + { + ArrayUtils.MoveAbove(this.list, child1, child2); + + return this; + }, + + /** + * Moves a Game Object below another one within this Container. + * + * These 2 Game Objects must already be children of this Container. + * + * @method Phaser.GameObjects.Container#moveBelow + * @since 3.55.0 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * + * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object. + * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. + * + * @return {this} This Container instance. + */ + moveBelow: function (child1, child2) + { + ArrayUtils.MoveBelow(this.list, child1, child2); + + 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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * + * @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 {number} 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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [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 list = this.list; + + if (destroyChild) + { + for (var i = 0; i < list.length; i++) + { + if (list[i] && list[i].scene) + { + list[i].off(Events.DESTROY, this.remove, this); + + list[i].destroy(); + } + } + + this.list = []; + } + else + { + ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this); + } + + 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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * + * @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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * + * @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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * + * @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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * + * @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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [oldChild,newChild] + * + * @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 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * + * @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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [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.4.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 {number} + * @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 = []; + } + +}); + +module.exports = Container; + + +/***/ }), + +/***/ "../../../src/gameobjects/container/ContainerCanvasRenderer.js": +/*!*****************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 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 {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, camera, parentMatrix) +{ + camera.addToRenderList(container); + + 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, 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": +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var NOOP = __webpack_require__(/*! ../../utils/NOOP */ "../../../src/utils/NOOP.js"); +var renderWebGL = NOOP; +var renderCanvas = NOOP; + +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": +/*!****************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 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 {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, camera, parentMatrix) +{ + camera.addToRenderList(container); + + var children = container.list; + var childCount = children.length; + + if (childCount === 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); + } + + renderer.pipelines.preBatch(container); + + 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; + + 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) ? (children[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, camera, transformMatrix, container); + + // Restore original values + + child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); + + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + + if (mask) + { + mask.postRenderWebGL(renderer, camera); + } + + renderer.newType = false; + } + + renderer.pipelines.postBatch(container); +}; + +module.exports = ContainerWebGLRenderer; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js": +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @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": +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. + * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. + */ +module.exports = 'destroy'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js": +/*!***************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @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": +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback. + */ +module.exports = 'complete'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js": +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + * @param {number} width - The width of the video. + * @param {number} height - The height of the video. + */ +module.exports = 'created'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js": +/*!********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped. + */ +module.exports = 'loop'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback. + */ +module.exports = 'play'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js": +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking. + */ +module.exports = 'seeked'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js": +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking. + */ +module.exports = 'seeking'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_STOP_EVENT.js": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback. + */ +module.exports = 'stop'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js": +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out. + */ +module.exports = 'timeout'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js": +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + */ +module.exports = 'unlocked'; + + +/***/ }), + +/***/ "../../../src/gameobjects/events/index.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Events + */ + +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"), + VIDEO_LOOP: __webpack_require__(/*! ./VIDEO_LOOP_EVENT */ "../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js"), + VIDEO_PLAY: __webpack_require__(/*! ./VIDEO_PLAY_EVENT */ "../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js"), + VIDEO_SEEKED: __webpack_require__(/*! ./VIDEO_SEEKED_EVENT */ "../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js"), + VIDEO_SEEKING: __webpack_require__(/*! ./VIDEO_SEEKING_EVENT */ "../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js"), + VIDEO_STOP: __webpack_require__(/*! ./VIDEO_STOP_EVENT */ "../../../src/gameobjects/events/VIDEO_STOP_EVENT.js"), + VIDEO_TIMEOUT: __webpack_require__(/*! ./VIDEO_TIMEOUT_EVENT */ "../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js"), + VIDEO_UNLOCKED: __webpack_require__(/*! ./VIDEO_UNLOCKED_EVENT */ "../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js") + +}; + + +/***/ }), + +/***/ "../../../src/geom/const.js": +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/const.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {number} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {number} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {number} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {number} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {number} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {number} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), + +/***/ "../../../src/geom/line/GetPoint.js": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../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 {number} + * @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 {number} 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[])} [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": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../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 {number} + * @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": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * @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 {number} 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": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../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 {number} + * @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 {number} 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": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/File.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var CONST = __webpack_require__(/*! ./const */ "../../../src/loader/const.js"); +var Events = __webpack_require__(/*! ./events */ "../../../src/loader/events/index.js"); +var GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); +var GetURL = __webpack_require__(/*! ./GetURL */ "../../../src/loader/GetURL.js"); +var MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ "../../../src/loader/MergeXHRSettings.js"); +var XHRLoader = __webpack_require__(/*! ./XHRLoader */ "../../../src/loader/XHRLoader.js"); +var XHRSettings = __webpack_require__(/*! ./XHRSettings */ "../../../src/loader/XHRSettings.js"); + +/** + * @classdesc + * The base File class used by all File Types that the Loader can support. + * 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. + * + * @class File + * @memberof Phaser.Loader + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File. + * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type. + */ +var File = new Class({ + + initialize: + + function File (loader, fileConfig) + { + /** + * A reference to the Loader that is going to load this file. + * + * @name Phaser.Loader.File#loader + * @type {Phaser.Loader.LoaderPlugin} + * @since 3.0.0 + */ + this.loader = loader; + + /** + * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. + * + * @name Phaser.Loader.File#cache + * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)} + * @since 3.7.0 + */ + this.cache = GetFastValue(fileConfig, 'cache', false); + + /** + * The file type string (image, json, etc) for sorting within the Loader. + * + * @name Phaser.Loader.File#type + * @type {string} + * @since 3.0.0 + */ + this.type = GetFastValue(fileConfig, 'type', false); + + if (!this.type) + { + throw new Error('Invalid File type: ' + this.type); + } + + /** + * Unique cache key (unique within its file type) + * + * @name Phaser.Loader.File#key + * @type {string} + * @since 3.0.0 + */ + this.key = GetFastValue(fileConfig, 'key', false); + + var loadKey = this.key; + + if (loader.prefix && loader.prefix !== '') + { + this.key = loader.prefix + loadKey; + } + + if (!this.key) + { + throw new Error('Invalid File key: ' + this.key); + } + + var url = GetFastValue(fileConfig, 'url'); + + if (url === undefined) + { + url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); + } + else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) + { + url = loader.path + url; + } + + /** + * The URL of the file, not including baseURL. + * + * 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 {object|string} + * @since 3.0.0 + */ + this.url = url; + + /** + * The final URL this file will load from, including baseURL and path. + * Set automatically when the Loader calls 'load' on this file. + * + * @name Phaser.Loader.File#src + * @type {string} + * @since 3.0.0 + */ + this.src = ''; + + /** + * The merged XHRSettings for this file. + * + * @name Phaser.Loader.File#xhrSettings + * @type {Phaser.Types.Loader.XHRSettingsObject} + * @since 3.0.0 + */ + this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined)); + + if (GetFastValue(fileConfig, 'xhrSettings', false)) + { + this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {})); + } + + /** + * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. + * + * @name Phaser.Loader.File#xhrLoader + * @type {?XMLHttpRequest} + * @since 3.0.0 + */ + this.xhrLoader = null; + + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.File#state + * @type {number} + * @since 3.0.0 + */ + this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING; + + /** + * The total size of this file. + * Set by onProgress and only if loading via XHR. + * + * @name Phaser.Loader.File#bytesTotal + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.bytesTotal = 0; + + /** + * Updated as the file loads. + * Only set if loading via XHR. + * + * @name Phaser.Loader.File#bytesLoaded + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.bytesLoaded = -1; + + /** + * A percentage value between 0 and 1 indicating how much of this file has loaded. + * Only set if loading via XHR. + * + * @name Phaser.Loader.File#percentComplete + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.percentComplete = -1; + + /** + * For CORs based loading. + * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) + * + * @name Phaser.Loader.File#crossOrigin + * @type {(string|undefined)} + * @since 3.0.0 + */ + this.crossOrigin = undefined; + + /** + * The processed file data, stored here after the file has loaded. + * + * @name Phaser.Loader.File#data + * @type {*} + * @since 3.0.0 + */ + this.data = undefined; + + /** + * A config object that can be used by file types to store transitional data. + * + * @name Phaser.Loader.File#config + * @type {*} + * @since 3.0.0 + */ + this.config = GetFastValue(fileConfig, 'config', {}); + + /** + * If this is a multipart file, i.e. an atlas and its json together, then this is a reference + * to the parent MultiFile. Set and used internally by the Loader or specific file types. + * + * @name Phaser.Loader.File#multiFile + * @type {?Phaser.Loader.MultiFile} + * @since 3.7.0 + */ + this.multiFile; + + /** + * Does this file have an associated linked file? Such as an image and a normal map. + * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't + * actually bound by data, where-as a linkFile is. + * + * @name Phaser.Loader.File#linkFile + * @type {?Phaser.Loader.File} + * @since 3.7.0 + */ + this.linkFile; + }, + + /** + * Links this File with another, so they depend upon each other for loading and processing. + * + * @method Phaser.Loader.File#setLink + * @since 3.7.0 + * + * @param {Phaser.Loader.File} fileB - The file to link to this one. + */ + setLink: function (fileB) + { + this.linkFile = fileB; + + fileB.linkFile = this; + }, + + /** + * Resets the XHRLoader instance this file is using. + * + * @method Phaser.Loader.File#resetXHR + * @since 3.0.0 + */ + resetXHR: function () + { + if (this.xhrLoader) + { + this.xhrLoader.onload = undefined; + this.xhrLoader.onerror = undefined; + this.xhrLoader.onprogress = undefined; + } + }, + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + * + * @method Phaser.Loader.File#load + * @since 3.0.0 + */ + load: function () + { + if (this.state === CONST.FILE_POPULATED) + { + // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL + this.loader.nextFile(this, true); + } + else + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) + { + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + // 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 + + this.xhrLoader = XHRLoader(this, this.loader.xhr); + } + } + }, + + /** + * Called when the file finishes loading, is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onLoad + * @since 3.0.0 + * + * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. + * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load. + */ + onLoad: function (xhr, event) + { + var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme) + { + return xhr.responseURL.indexOf(scheme) === 0; + }); + + var localFileOk = (isLocalFile && event.target.status === 0); + + var success = !(event.target && event.target.status !== 200) || localFileOk; + + // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called. + if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) + { + success = false; + } + + this.state = CONST.FILE_LOADED; + + this.resetXHR(); + + this.loader.nextFile(this, success); + }, + + /** + * Called if the file errors while loading, is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onError + * @since 3.0.0 + * + * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. + * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. + */ + onError: function () + { + this.resetXHR(); + + this.loader.nextFile(this, false); + }, + + /** + * Called during the file load progress. Is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onProgress + * @fires Phaser.Loader.Events#FILE_PROGRESS + * @since 3.0.0 + * + * @param {ProgressEvent} event - The DOM ProgressEvent. + */ + onProgress: function (event) + { + if (event.lengthComputable) + { + this.bytesLoaded = event.loaded; + this.bytesTotal = event.total; + + this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1); + + this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete); + } + }, + + /** + * Usually overridden by the FileTypes and is called by Loader.nextFile. + * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. + * + * @method Phaser.Loader.File#onProcess + * @since 3.0.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.onProcessComplete(); + }, + + /** + * Called when the File has completed processing. + * Checks on the state of its multifile, if set. + * + * @method Phaser.Loader.File#onProcessComplete + * @since 3.7.0 + */ + onProcessComplete: function () + { + this.state = CONST.FILE_COMPLETE; + + if (this.multiFile) + { + this.multiFile.onFileComplete(this); + } + + this.loader.fileProcessComplete(this); + }, + + /** + * Called when the File has completed processing but it generated an error. + * Checks on the state of its multifile, if set. + * + * @method Phaser.Loader.File#onProcessError + * @since 3.7.0 + */ + onProcessError: function () + { + // eslint-disable-next-line no-console + console.error('Failed to process file: %s "%s"', this.type, this.key); + + this.state = CONST.FILE_ERRORED; + + if (this.multiFile) + { + this.multiFile.onFileFailed(this); + } + + this.loader.fileProcessComplete(this); + }, + + /** + * Checks if a key matching the one used by this file exists in the target Cache or not. + * This is called automatically by the LoaderPlugin to decide if the file can be safely + * loaded or will conflict. + * + * @method Phaser.Loader.File#hasCacheConflict + * @since 3.7.0 + * + * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`. + */ + hasCacheConflict: function () + { + return (this.cache && this.cache.exists(this.key)); + }, + + /** + * Adds this file to its target cache upon successful loading and processing. + * This method is often overridden by specific file types. + * + * @method Phaser.Loader.File#addToCache + * @since 3.7.0 + */ + addToCache: function () + { + if (this.cache && this.data) + { + this.cache.add(this.key, this.data); + } + }, + + /** + * Called once the file has been added to its cache and is now ready for deletion from the Loader. + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.File#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.7.0 + */ + pendingDestroy: function (data) + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + if (data === undefined) { data = this.data; } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type, data); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); + + this.loader.flagForRemoval(this); + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this File and any references it holds. + * + * @method Phaser.Loader.File#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.loader = null; + this.cache = null; + this.xhrSettings = null; + this.multiFile = null; + this.linkFile = null; + this.data = null; + } + +}); + +/** + * Static method for creating object URL using URL API and setting it as image 'src' attribute. + * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. + * + * @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. + */ +File.createObjectURL = function (image, blob, defaultType) +{ + if (typeof URL === 'function') + { + image.src = URL.createObjectURL(blob); + } + else + { + var reader = new FileReader(); + + reader.onload = function () + { + image.removeAttribute('crossOrigin'); + image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1]; + }; + + reader.onerror = image.onerror; + + reader.readAsDataURL(blob); + } +}; + +/** + * Static method for releasing an existing object URL which was previously created + * by calling {@link File#createObjectURL} method. + * + * @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) +{ + if (typeof URL === 'function') + { + URL.revokeObjectURL(image.src); + } +}; + +module.exports = File; + + +/***/ }), + +/***/ "../../../src/loader/FileTypesManager.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var types = {}; + +/** + * @namespace Phaser.Loader.FileTypesManager + */ + +var FileTypesManager = { + + /** + * Static method called when a LoaderPlugin is created. + * + * Loops through the local types object and injects all of them as + * properties into the LoaderPlugin instance. + * + * @method Phaser.Loader.FileTypesManager.install + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. + */ + install: function (loader) + { + for (var key in types) + { + loader[key] = types[key]; + } + }, + + /** + * Static method called directly by the File Types. + * + * The key is a reference to the function used to load the files via the Loader, i.e. `image`. + * + * @method Phaser.Loader.FileTypesManager.register + * @since 3.0.0 + * + * @param {string} key - The key that will be used as the method name in the LoaderPlugin. + * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. + */ + register: function (key, factoryFunction) + { + types[key] = factoryFunction; + }, + + /** + * Removed all associated file types. + * + * @method Phaser.Loader.FileTypesManager.destroy + * @since 3.0.0 + */ + destroy: function () + { + types = {}; + } + +}; + +module.exports = FileTypesManager; + + +/***/ }), + +/***/ "../../../src/loader/GetURL.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a File and a baseURL value this returns the URL the File will use to download from. + * + * @function Phaser.Loader.GetURL + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - The File object. + * @param {string} baseURL - A default base URL. + * + * @return {string} The URL the File will use. + */ +var GetURL = function (file, baseURL) +{ + if (!file.url) + { + return false; + } + + if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) + { + return file.url; + } + else + { + return baseURL + file.url; + } +}; + +module.exports = GetURL; + + +/***/ }), + +/***/ "../../../src/loader/MergeXHRSettings.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Extend = __webpack_require__(/*! ../utils/object/Extend */ "../../../src/utils/object/Extend.js"); +var XHRSettings = __webpack_require__(/*! ./XHRSettings */ "../../../src/loader/XHRSettings.js"); + +/** + * Takes two XHRSettings Objects and creates a new XHRSettings object from them. + * + * The new object is seeded by the values given in the global settings, but any setting in + * the local object overrides the global ones. + * + * @function Phaser.Loader.MergeXHRSettings + * @since 3.0.0 + * + * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object. + * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object. + * + * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object. + */ +var MergeXHRSettings = function (global, local) +{ + var output = (global === undefined) ? XHRSettings() : Extend({}, global); + + if (local) + { + for (var setting in local) + { + if (local[setting] !== undefined) + { + output[setting] = local[setting]; + } + } + } + + return output; +}; + +module.exports = MergeXHRSettings; + + +/***/ }), + +/***/ "../../../src/loader/MultiFile.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var CONST = __webpack_require__(/*! ./const */ "../../../src/loader/const.js"); +var Events = __webpack_require__(/*! ./events */ "../../../src/loader/events/index.js"); + +/** + * @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) + { + var finalFiles = []; + + // Clean out any potential 'null' or 'undefined' file entries + files.forEach(function (file) + { + if (file) + { + finalFiles.push(file); + } + }); + + /** + * 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 {number} + * @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 = finalFiles; + + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.MultiFile#state + * @type {number} + * @since 3.60.0 + */ + this.state = CONST.FILE_PENDING; + + /** + * 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 {number} + * @since 3.7.0 + */ + + this.pending = finalFiles.length; + + /** + * The number of files that failed to load. + * + * @name Phaser.Loader.MultiFile#failed + * @type {number} + * @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 < finalFiles.length; i++) + { + finalFiles[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++; + + // eslint-disable-next-line no-console + console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); + } + }, + + /** + * Called once all children of this multi file have been added to their caches and is now + * ready for deletion from the Loader. + * + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.MultiFile#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.60.0 + */ + pendingDestroy: function () + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); + + this.loader.flagForRemoval(this); + + for (var i = 0; i < this.files.length; i++) + { + this.files[i].pendingDestroy(); + } + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this Multi File and any references it holds. + * + * @method Phaser.Loader.MultiFile#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.loader = null; + this.files = null; + this.config = null; + } + +}); + +module.exports = MultiFile; + + +/***/ }), + +/***/ "../../../src/loader/XHRLoader.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ "../../../src/loader/MergeXHRSettings.js"); + +/** + * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings + * and starts the download of it. It uses the Files own XHRSettings and merges them + * with the global XHRSettings object to set the xhr values before download. + * + * @function Phaser.Loader.XHRLoader + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - The File to download. + * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object. + * + * @return {XMLHttpRequest} The XHR object. + */ +var XHRLoader = function (file, globalXHRSettings) +{ + var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings); + + var xhr = new XMLHttpRequest(); + + xhr.open('GET', file.src, config.async, config.user, config.password); + + 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); + } + + if (config.requestedWith) + { + xhr.setRequestHeader('X-Requested-With', config.requestedWith); + } + + if (config.overrideMimeType) + { + 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); + xhr.onerror = file.onError.bind(file, xhr); + xhr.onprogress = file.onProgress.bind(file); + + // This is the only standard method, the ones above are browser additions (maybe not universal?) + // xhr.onreadystatechange + + xhr.send(); + + return xhr; +}; + +module.exports = XHRLoader; + + +/***/ }), + +/***/ "../../../src/loader/XHRSettings.js": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Creates an XHRSettings Object with default values. + * + * @function Phaser.Loader.XHRSettings + * @since 3.0.0 + * + * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'. + * @param {boolean} [async=true] - Should the XHR request use async or not? + * @param {string} [user=''] - Optional username for the XHR request. + * @param {string} [password=''] - Optional password for the XHR request. + * @param {number} [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, 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. + // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". + + return { + + // Ignored by the Loader, only used by File. + responseType: responseType, + + async: async, + + // credentials + user: user, + password: password, + + // timeout in ms (0 = no timeout) + timeout: timeout, + + // setRequestHeader + headers: undefined, + header: undefined, + headerValue: undefined, + requestedWith: false, + + // overrideMimeType + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials + + }; +}; + +module.exports = XHRSettings; + + +/***/ }), + +/***/ "../../../src/loader/const.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/const.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FILE_CONST = { + + /** + * The Loader is idle. + * + * @name Phaser.Loader.LOADER_IDLE + * @type {number} + * @since 3.0.0 + */ + LOADER_IDLE: 0, + + /** + * The Loader is actively loading. + * + * @name Phaser.Loader.LOADER_LOADING + * @type {number} + * @since 3.0.0 + */ + LOADER_LOADING: 1, + + /** + * The Loader is processing files is has loaded. + * + * @name Phaser.Loader.LOADER_PROCESSING + * @type {number} + * @since 3.0.0 + */ + LOADER_PROCESSING: 2, + + /** + * The Loader has completed loading and processing. + * + * @name Phaser.Loader.LOADER_COMPLETE + * @type {number} + * @since 3.0.0 + */ + LOADER_COMPLETE: 3, + + /** + * The Loader is shutting down. + * + * @name Phaser.Loader.LOADER_SHUTDOWN + * @type {number} + * @since 3.0.0 + */ + LOADER_SHUTDOWN: 4, + + /** + * The Loader has been destroyed. + * + * @name Phaser.Loader.LOADER_DESTROYED + * @type {number} + * @since 3.0.0 + */ + LOADER_DESTROYED: 5, + + /** + * File is in the load queue but not yet started. + * + * @name Phaser.Loader.FILE_PENDING + * @type {number} + * @since 3.0.0 + */ + FILE_PENDING: 10, + + /** + * File has been started to load by the loader (onLoad called) + * + * @name Phaser.Loader.FILE_LOADING + * @type {number} + * @since 3.0.0 + */ + FILE_LOADING: 11, + + /** + * File has loaded successfully, awaiting processing. + * + * @name Phaser.Loader.FILE_LOADED + * @type {number} + * @since 3.0.0 + */ + FILE_LOADED: 12, + + /** + * File failed to load. + * + * @name Phaser.Loader.FILE_FAILED + * @type {number} + * @since 3.0.0 + */ + FILE_FAILED: 13, + + /** + * File is being processed (onProcess callback) + * + * @name Phaser.Loader.FILE_PROCESSING + * @type {number} + * @since 3.0.0 + */ + FILE_PROCESSING: 14, + + /** + * The File has errored somehow during processing. + * + * @name Phaser.Loader.FILE_ERRORED + * @type {number} + * @since 3.0.0 + */ + FILE_ERRORED: 16, + + /** + * File has finished processing. + * + * @name Phaser.Loader.FILE_COMPLETE + * @type {number} + * @since 3.0.0 + */ + FILE_COMPLETE: 17, + + /** + * File has been destroyed. + * + * @name Phaser.Loader.FILE_DESTROYED + * @type {number} + * @since 3.0.0 + */ + FILE_DESTROYED: 18, + + /** + * File was populated from local data and doesn't need an HTTP request. + * + * @name Phaser.Loader.FILE_POPULATED + * @type {number} + * @since 3.0.0 + */ + FILE_POPULATED: 19, + + /** + * File is pending being destroyed. + * + * @name Phaser.Loader.FILE_PENDING_DESTROY + * @type {number} + * @since 3.60.0 + */ + FILE_PENDING_DESTROY: 20 + +}; + +module.exports = FILE_CONST; + + +/***/ }), + +/***/ "../../../src/loader/events/ADD_EVENT.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Add File Event. + * + * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. + * + * Listen to it from a Scene using: `this.load.on('addfile', listener)`. + * + * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. + * + * @event Phaser.Loader.Events#ADD + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The unique key of the file that was added to the Loader. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader. + */ +module.exports = 'addfile'; + + +/***/ }), + +/***/ "../../../src/loader/events/COMPLETE_EVENT.js": +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Complete Event. + * + * This event is dispatched when the Loader has fully processed everything in the load queue. + * By this point every loaded file will now be in its associated cache and ready for use. + * + * Listen to it from a Scene using: `this.load.on('complete', listener)`. + * + * @event Phaser.Loader.Events#COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + * @param {number} totalComplete - The total number of files that successfully loaded. + * @param {number} totalFailed - The total number of files that failed to load. + */ +module.exports = 'complete'; + + +/***/ }), + +/***/ "../../../src/loader/events/FILE_COMPLETE_EVENT.js": +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The File Load Complete Event. + * + * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. + * + * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. + * + * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. + * + * 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. + * + * @event Phaser.Loader.Events#FILE_COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The key of the file that just loaded and finished processing. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. + */ +module.exports = 'filecomplete'; + + +/***/ }), + +/***/ "../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js": +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The File Load Complete Event. + * + * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. + * + * It uses a special dynamic event name constructed from the key and type of the file. + * + * For example, if you have loaded an `image` with a key of `monster`, you can listen for it + * using the following: + * + * ```javascript + * this.load.on('filecomplete-image-monster', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a texture `atlas` with a key of `Level1`: + * + * ```javascript + * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: + * + * ```javascript + * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. + * + * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. + * + * @event Phaser.Loader.Events#FILE_KEY_COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The key of the file that just loaded and finished processing. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. + */ +module.exports = 'filecomplete-'; + + +/***/ }), + +/***/ "../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The File Load Error Event. + * + * This event is dispatched by the Loader Plugin when a file fails to load. + * + * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. + * + * @event Phaser.Loader.Events#FILE_LOAD_ERROR + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which errored during load. + */ +module.exports = 'loaderror'; + + +/***/ }), + +/***/ "../../../src/loader/events/FILE_LOAD_EVENT.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The File Load Event. + * + * This event is dispatched by the Loader Plugin when a file finishes loading, + * but _before_ it is processed and added to the internal Phaser caches. + * + * Listen to it from a Scene using: `this.load.on('load', listener)`. + * + * @event Phaser.Loader.Events#FILE_LOAD + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. + */ +module.exports = 'load'; + + +/***/ }), + +/***/ "../../../src/loader/events/FILE_PROGRESS_EVENT.js": +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The File Load Progress Event. + * + * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and + * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. + * + * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. + * + * @event Phaser.Loader.Events#FILE_PROGRESS + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which errored during load. + * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. + */ +module.exports = 'fileprogress'; + + +/***/ }), + +/***/ "../../../src/loader/events/POST_PROCESS_EVENT.js": +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Post Process Event. + * + * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. + * It is dispatched before the internal lists are cleared and each File is destroyed. + * + * Use this hook to perform any last minute processing of files that can only happen once the + * Loader has completed, but prior to it emitting the `complete` event. + * + * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. + * + * @event Phaser.Loader.Events#POST_PROCESS + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + */ +module.exports = 'postprocess'; + + +/***/ }), + +/***/ "../../../src/loader/events/PROGRESS_EVENT.js": +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Progress Event. + * + * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. + * + * Listen to it from a Scene using: `this.load.on('progress', listener)`. + * + * @event Phaser.Loader.Events#PROGRESS + * @type {string} + * @since 3.0.0 + * + * @param {number} progress - The current progress of the load. A value between 0 and 1. + */ +module.exports = 'progress'; + + +/***/ }), + +/***/ "../../../src/loader/events/START_EVENT.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Start Event. + * + * This event is dispatched when the Loader starts running. At this point load progress is zero. + * + * This event is dispatched even if there aren't any files in the load queue. + * + * Listen to it from a Scene using: `this.load.on('start', listener)`. + * + * @event Phaser.Loader.Events#START + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + */ +module.exports = 'start'; + + +/***/ }), + +/***/ "../../../src/loader/events/index.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Loader.Events + */ + +module.exports = { + + ADD: __webpack_require__(/*! ./ADD_EVENT */ "../../../src/loader/events/ADD_EVENT.js"), + COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "../../../src/loader/events/COMPLETE_EVENT.js"), + FILE_COMPLETE: __webpack_require__(/*! ./FILE_COMPLETE_EVENT */ "../../../src/loader/events/FILE_COMPLETE_EVENT.js"), + FILE_KEY_COMPLETE: __webpack_require__(/*! ./FILE_KEY_COMPLETE_EVENT */ "../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js"), + FILE_LOAD_ERROR: __webpack_require__(/*! ./FILE_LOAD_ERROR_EVENT */ "../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js"), + FILE_LOAD: __webpack_require__(/*! ./FILE_LOAD_EVENT */ "../../../src/loader/events/FILE_LOAD_EVENT.js"), + FILE_PROGRESS: __webpack_require__(/*! ./FILE_PROGRESS_EVENT */ "../../../src/loader/events/FILE_PROGRESS_EVENT.js"), + POST_PROCESS: __webpack_require__(/*! ./POST_PROCESS_EVENT */ "../../../src/loader/events/POST_PROCESS_EVENT.js"), + PROGRESS: __webpack_require__(/*! ./PROGRESS_EVENT */ "../../../src/loader/events/PROGRESS_EVENT.js"), + START: __webpack_require__(/*! ./START_EVENT */ "../../../src/loader/events/START_EVENT.js") + +}; + + +/***/ }), + +/***/ "../../../src/loader/filetypes/ImageFile.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var CONST = __webpack_require__(/*! ../const */ "../../../src/loader/const.js"); +var File = __webpack_require__(/*! ../File */ "../../../src/loader/File.js"); +var FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "../../../src/loader/FileTypesManager.js"); +var GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); +var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); +var GetURL = __webpack_require__(/*! ../GetURL */ "../../../src/loader/GetURL.js"); + +/** + * @classdesc + * 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 + * @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.ImageFileConfig)} key - The key to use for this file, or a file configuration object. + * @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] - Extra XHR Settings specifically for this file. + * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets. + */ +var ImageFile = new Class({ + + Extends: File, + + initialize: + + function ImageFile (loader, key, url, xhrSettings, frameConfig) + { + var extension = 'png'; + var normalMapURL; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + normalMapURL = GetFastValue(config, 'normalMap'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + frameConfig = GetFastValue(config, 'frameConfig'); + } + + if (Array.isArray(url)) + { + normalMapURL = url[1]; + url = url[0]; + } + + var fileConfig = { + type: 'image', + cache: loader.textureManager, + extension: extension, + responseType: 'blob', + key: key, + url: url, + xhrSettings: xhrSettings, + config: frameConfig + }; + + File.call(this, loader, fileConfig); + + // Do we have a normal map to load as well? + if (normalMapURL) + { + var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig); + + normalMap.type = 'normalMap'; + + this.setLink(normalMap); + + loader.addFile(normalMap); + } + + this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; + + if (this.useImageElementLoad) + { + this.load = this.loadImage; + this.onProcess = this.onProcessImage; + } + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + File.revokeObjectURL(_this.data); + + _this.onProcessComplete(); + }; + + this.data.onerror = function () + { + File.revokeObjectURL(_this.data); + + _this.onProcessError(); + }; + + File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); + }, + + /** + * Handles image load processing. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage + * @private + * @since 3.60.0 + */ + onProcessImage: function () + { + var result = this.state; + + this.state = CONST.FILE_PROCESSING; + + if (result === CONST.FILE_LOADED) + { + this.onProcessComplete(); + } + else + { + this.onProcessError(); + } + }, + + /** + * Loads the image using either XHR or an Image tag. + * + * @method Phaser.Loader.FileTypes.ImageFile#loadImage + * @private + * @since 3.60.0 + */ + loadImage: function () + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) + { + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + _this.state = CONST.FILE_LOADED; + + _this.loader.nextFile(_this, true); + }; + + this.data.onerror = function () + { + _this.loader.nextFile(_this, false); + }; + + this.data.src = this.src; + } + }, + + /** + * Adds this file to its target cache upon successful loading and processing. + * + * @method Phaser.Loader.FileTypes.ImageFile#addToCache + * @since 3.7.0 + */ + addToCache: function () + { + // Check if we have a linked normal map + var linkFile = this.linkFile; + + if (linkFile) + { + // We do, but has it loaded? + if (linkFile.state >= CONST.FILE_COMPLETE) + { + // Both files have loaded + if (this.type === 'normalMap') + { + // linkFile.data = Image + // this.data = Normal Map + this.cache.addImage(this.key, linkFile.data, this.data); + } + else + { + // linkFile.data = Normal Map + // this.data = Image + this.cache.addImage(this.key, this.data, linkFile.data); + } + } + + // Nothing to do here, we'll use the linkFile `addToCache` call + // to process this pair + } + else + { + this.cache.addImage(this.key, this.data); + } + } + +}); + +/** + * 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 () + * { + * this.load.image('logo', 'images/phaserLogo.png'); + * } + * ``` + * + * 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. + * + * 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. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * 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 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', + * url: 'images/AtariLogo.png' + * }); + * ``` + * + * 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 ... + * this.add.image(x, y, 'logo'); + * ``` + * + * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * 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 "alien" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * 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', + * url: 'images/AtariLogo.png', + * normalMap: 'images/AtariLogo-n.png' + * }); + * ``` + * + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. + * + * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. + * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images + * via the Image tag instead. + * + * Note: The ability to load this type of file will only be available if the Image 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#image + * @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 {this} The Loader instance. + */ +FileTypesManager.register('image', function (key, url, 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 ImageFile(this, key[i])); + } + } + else + { + this.addFile(new ImageFile(this, key, url, xhrSettings)); + } + + return this; +}); + +module.exports = ImageFile; + + +/***/ }), + +/***/ "../../../src/loader/filetypes/JSONFile.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var CONST = __webpack_require__(/*! ../const */ "../../../src/loader/const.js"); +var File = __webpack_require__(/*! ../File */ "../../../src/loader/File.js"); +var FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "../../../src/loader/FileTypesManager.js"); +var GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); +var GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ "../../../src/utils/object/GetValue.js"); +var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); + +/** + * @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); + + // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it. + if (IsPlainObject(url)) + { + 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; + + try + { + var json = JSON.parse(this.xhrLoader.responseText); + } + catch (e) + { + this.onProcessError(); + + throw e; + } + + 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; + + +/***/ }), + +/***/ "../../../src/loader/filetypes/TextFile.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var CONST = __webpack_require__(/*! ../const */ "../../../src/loader/const.js"); +var File = __webpack_require__(/*! ../File */ "../../../src/loader/File.js"); +var FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "../../../src/loader/FileTypesManager.js"); +var GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); +var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); + +/** + * @classdesc + * A single Text File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. + * + * @class TextFile + * @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.TextFileConfig)} 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 `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + */ +var TextFile = new Class({ + + Extends: File, + + initialize: + + function TextFile (loader, key, url, xhrSettings) + { + var type = 'text'; + var extension = 'txt'; + var cache = loader.cacheManager.text; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + type = GetFastValue(config, 'type', type); + cache = GetFastValue(config, 'cache', cache); + } + + var fileConfig = { + type: type, + cache: cache, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings + }; + + File.call(this, loader, fileConfig); + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.TextFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = this.xhrLoader.responseText; + + this.onProcessComplete(); + } + +}); + +/** + * Adds a Text file, or array of Text 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.text('story', 'files/IntroStory.txt'); + * } + * ``` + * + * 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 Text Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Text 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 Text Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.text({ + * key: 'story', + * url: 'files/IntroStory.txt' + * }); + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.text('story', 'files/IntroStory.txt'); + * // and later in your game ... + * var data = this.cache.text.get('story'); + * ``` + * + * 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 `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the text from the Text 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 "story" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Text 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#text + * @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 {this} The Loader instance. + */ +FileTypesManager.register('text', function (key, url, 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 TextFile(this, key[i])); + } + } + else + { + this.addFile(new TextFile(this, key, url, xhrSettings)); + } + + return this; +}); + +module.exports = TextFile; + + +/***/ }), + +/***/ "../../../src/math/Average.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Average.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/Bernstein.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Factorial = __webpack_require__(/*! ./Factorial */ "../../../src/math/Factorial.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/Between.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Between.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The random integer. + */ +var Between = function (min, max) +{ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +module.exports = Between; + + +/***/ }), + +/***/ "../../../src/math/CatmullRom.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/CeilTo.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), + +/***/ "../../../src/math/Clamp.js": +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/DegToRad.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(/*! ./const */ "../../../src/math/const.js"); + +/** + * Convert the given angle from degrees, to the equivalent angle in radians. + * + * @function Phaser.Math.DegToRad + * @since 3.0.0 + * + * @param {number} 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; + + +/***/ }), + +/***/ "../../../src/math/Difference.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/Euler.js": +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(/*! ./Clamp */ "../../../src/math/Clamp.js"); +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var Matrix4 = __webpack_require__(/*! ./Matrix4 */ "../../../src/math/Matrix4.js"); +var NOOP = __webpack_require__(/*! ../utils/NOOP */ "../../../src/utils/NOOP.js"); + +var tempMatrix = new Matrix4(); + +/** + * @classdesc + * + * @class Euler + * @memberof Phaser.Math + * @constructor + * @since 3.50.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + */ +var Euler = new Class({ + + initialize: + + function Euler (x, y, z, order) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (z === undefined) { z = 0; } + if (order === undefined) { order = Euler.DefaultOrder; } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this.onChangeCallback = NOOP; + }, + + x: { + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + + this.onChangeCallback(this); + } + }, + + y: { + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + + this.onChangeCallback(this); + } + }, + + z: { + get: function () + { + return this._z; + }, + + set: function (value) + { + this._z = value; + + this.onChangeCallback(this); + } + }, + + order: { + get: function () + { + return this._order; + }, + + set: function (value) + { + this._order = value; + + this.onChangeCallback(this); + } + }, + + set: function (x, y, z, order) + { + if (order === undefined) { order = this._order; } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this.onChangeCallback(this); + + return this; + }, + + copy: function (euler) + { + return this.set(euler.x, euler.y, euler.z, euler.order); + }, + + setFromQuaternion: function (quaternion, order, update) + { + if (order === undefined) { order = this._order; } + if (update === undefined) { update = false; } + + tempMatrix.fromQuat(quaternion); + + return this.setFromRotationMatrix(tempMatrix, order, update); + }, + + setFromRotationMatrix: function (matrix, order, update) + { + if (order === undefined) { order = this._order; } + if (update === undefined) { update = false; } + + var elements = matrix.val; + + // Upper 3x3 of matrix is un-scaled rotation matrix + var m11 = elements[0]; + var m12 = elements[4]; + var m13 = elements[8]; + var m21 = elements[1]; + var m22 = elements[5]; + var m23 = elements[9]; + var m31 = elements[2]; + var m32 = elements[6]; + var m33 = elements[10]; + + var x = 0; + var y = 0; + var z = 0; + var epsilon = 0.99999; + + switch (order) + { + case 'XYZ': + { + y = Math.asin(Clamp(m13, -1, 1)); + + if (Math.abs(m13) < epsilon) + { + x = Math.atan2(-m23, m33); + z = Math.atan2(-m12, m11); + } + else + { + x = Math.atan2(m32, m22); + } + + break; + } + + case 'YXZ': + { + x = Math.asin(-Clamp(m23, -1, 1)); + + if (Math.abs(m23) < epsilon) + { + y = Math.atan2(m13, m33); + z = Math.atan2(m21, m22); + } + else + { + y = Math.atan2(-m31, m11); + } + + break; + } + + case 'ZXY': + { + x = Math.asin(Clamp(m32, -1, 1)); + + if (Math.abs(m32) < epsilon) + { + y = Math.atan2(-m31, m33); + z = Math.atan2(-m12, m22); + } + else + { + z = Math.atan2(m21, m11); + } + + break; + } + + case 'ZYX': + { + y = Math.asin(-Clamp(m31, -1, 1)); + + if (Math.abs(m31) < epsilon) + { + x = Math.atan2(m32, m33); + z = Math.atan2(m21, m11); + } + else + { + z = Math.atan2(-m12, m22); + } + + break; + } + + case 'YZX': + { + z = Math.asin(Clamp(m21, -1, 1)); + + if (Math.abs(m21) < epsilon) + { + x = Math.atan2(-m23, m22); + y = Math.atan2(-m31, m11); + } + else + { + y = Math.atan2(m13, m33); + } + + break; + } + + case 'XZY': + { + z = Math.asin(-Clamp(m12, -1, 1)); + + if (Math.abs(m12) < epsilon) + { + x = Math.atan2(m32, m22); + y = Math.atan2(m13, m11); + } + else + { + x = Math.atan2(-m23, m33); + } + + break; + } + } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + if (update) + { + this.onChangeCallback(this); + } + + return this; + } + +}); + +Euler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ]; + +Euler.DefaultOrder = 'XYZ'; + +module.exports = Euler; + + +/***/ }), + +/***/ "../../../src/math/Factorial.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/FloatBetween.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/FloorTo.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [place=0] - The place to round to. + * @param {number} [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; + + +/***/ }), + +/***/ "../../../src/math/FromPercent.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(/*! ./Clamp */ "../../../src/math/Clamp.js"); + +/** + * 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 + min; +}; + +module.exports = FromPercent; + + +/***/ }), + +/***/ "../../../src/math/GetSpeed.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), + +/***/ "../../../src/math/IsEven.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/IsEvenStrict.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/Linear.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/LinearXY.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Interpolates two given Vectors and returns a new Vector between them. + * + * Does not modify either of the passed Vectors. + * + * @function Phaser.Math.LinearXY + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} vector1 - Starting vector + * @param {Phaser.Math.Vector2} vector2 - Ending vector + * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * + * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + */ +var LinearXY = function (vector1, vector2, t) +{ + if (t === undefined) { t = 0; } + + return vector1.clone().lerp(vector2, t); +}; + +module.exports = LinearXY; + + +/***/ }), + +/***/ "../../../src/math/Matrix3.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); + +/** + * @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; + + +/***/ }), + +/***/ "../../../src/math/Matrix4.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var Vector3 = __webpack_require__(/*! ./Vector3 */ "../../../src/math/Vector3.js"); + +/** + * @ignore + */ +var EPSILON = 0.000001; + +/** + * @classdesc + * A four-dimensional matrix. + * + * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji + * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + * + * @class Matrix4 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from. + */ +var Matrix4 = new Class({ + + initialize: + + function Matrix4 (m) + { + /** + * The matrix values. + * + * @name Phaser.Math.Matrix4#val + * @type {Float32Array} + * @since 3.0.0 + */ + this.val = new Float32Array(16); + + if (m) + { + // Assume Matrix4 with val: + this.copy(m); + } + else + { + // Default to identity + this.identity(); + } + }, + + /** + * Make a clone of this Matrix4. + * + * @method Phaser.Math.Matrix4#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix4} A clone of this Matrix4. + */ + clone: function () + { + return new Matrix4(this); + }, + + /** + * This method is an alias for `Matrix4.copy`. + * + * @method Phaser.Math.Matrix4#set + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from. + * + * @return {this} This Matrix4. + */ + set: function (src) + { + return this.copy(src); + }, + + /** + * Sets all values of this Matrix4. + * + * @method Phaser.Math.Matrix4#setValues + * @since 3.50.0 + * + * @param {number} m00 - The m00 value. + * @param {number} m01 - The m01 value. + * @param {number} m02 - The m02 value. + * @param {number} m03 - The m03 value. + * @param {number} m10 - The m10 value. + * @param {number} m11 - The m11 value. + * @param {number} m12 - The m12 value. + * @param {number} m13 - The m13 value. + * @param {number} m20 - The m20 value. + * @param {number} m21 - The m21 value. + * @param {number} m22 - The m22 value. + * @param {number} m23 - The m23 value. + * @param {number} m30 - The m30 value. + * @param {number} m31 - The m31 value. + * @param {number} m32 - The m32 value. + * @param {number} m33 - The m33 value. + * + * @return {this} This Matrix4 instance. + */ + setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) + { + var out = this.val; + + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + + return this; + }, + + /** + * Copy the values of a given Matrix into this Matrix. + * + * @method Phaser.Math.Matrix4#copy + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from. + * + * @return {this} This Matrix4. + */ + copy: function (src) + { + var a = src.val; + + return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + }, + + /** + * Set the values of this Matrix from the given array. + * + * @method Phaser.Math.Matrix4#fromArray + * @since 3.0.0 + * + * @param {number[]} a - The array to copy the values from. Must have at least 16 elements. + * + * @return {this} This Matrix4. + */ + fromArray: function (a) + { + return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + }, + + /** + * Reset this Matrix. + * + * Sets all values to `0`. + * + * @method Phaser.Math.Matrix4#zero + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix4} This Matrix4. + */ + zero: function () + { + return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + }, + + /** + * Generates a transform matrix based on the given position, scale and rotation. + * + * @method Phaser.Math.Matrix4#transform + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} position - The position vector. + * @param {Phaser.Math.Vector3} scale - The scale vector. + * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion. + * + * @return {this} This Matrix4. + */ + transform: function (position, scale, rotation) + { + var rotMatrix = _tempMat1.fromQuat(rotation); + + var rm = rotMatrix.val; + + var sx = scale.x; + var sy = scale.y; + var sz = scale.z; + + return this.setValues( + rm[0] * sx, + rm[1] * sx, + rm[2] * sx, + 0, + + rm[4] * sy, + rm[5] * sy, + rm[6] * sy, + 0, + + rm[8] * sz, + rm[9] * sz, + rm[10] * sz, + 0, + + position.x, + position.y, + position.z, + 1 + ); + }, + + /** + * Set the `x`, `y` and `z` values of this Matrix. + * + * @method Phaser.Math.Matrix4#xyz + * @since 3.0.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} z - The z value. + * + * @return {this} This Matrix4. + */ + xyz: function (x, y, z) + { + this.identity(); + + var out = this.val; + + out[12] = x; + out[13] = y; + out[14] = z; + + return this; + }, + + /** + * Set the scaling values of this Matrix. + * + * @method Phaser.Math.Matrix4#scaling + * @since 3.0.0 + * + * @param {number} x - The x scaling value. + * @param {number} y - The y scaling value. + * @param {number} z - The z scaling value. + * + * @return {this} This Matrix4. + */ + scaling: function (x, y, z) + { + this.zero(); + + var out = this.val; + + out[0] = x; + out[5] = y; + out[10] = z; + out[15] = 1; + + return this; + }, + + /** + * Reset this Matrix to an identity (default) matrix. + * + * @method Phaser.Math.Matrix4#identity + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + identity: function () + { + return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + }, + + /** + * Transpose this Matrix. + * + * @method Phaser.Math.Matrix4#transpose + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + transpose: function () + { + var a = this.val; + + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + var a12 = a[6]; + var a13 = a[7]; + var a23 = a[11]; + + a[1] = a[4]; + a[2] = a[8]; + a[3] = a[12]; + a[4] = a01; + a[6] = a[9]; + a[7] = a[13]; + a[8] = a02; + a[9] = a12; + a[11] = a[14]; + a[12] = a03; + a[13] = a13; + a[14] = a23; + + return this; + }, + + /** + * Copies the given Matrix4 into this Matrix and then inverses it. + * + * @method Phaser.Math.Matrix4#getInverse + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4. + * + * @return {this} This Matrix4. + */ + getInverse: function (m) + { + this.copy(m); + + return this.invert(); + }, + + /** + * Invert this Matrix. + * + * @method Phaser.Math.Matrix4#invert + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + invert: function () + { + var a = 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 this; + } + + det = 1 / det; + + return this.setValues( + (a11 * b11 - a12 * b10 + a13 * b09) * det, + (a02 * b10 - a01 * b11 - a03 * b09) * det, + (a31 * b05 - a32 * b04 + a33 * b03) * det, + (a22 * b04 - a21 * b05 - a23 * b03) * det, + (a12 * b08 - a10 * b11 - a13 * b07) * det, + (a00 * b11 - a02 * b08 + a03 * b07) * det, + (a32 * b02 - a30 * b05 - a33 * b01) * det, + (a20 * b05 - a22 * b02 + a23 * b01) * det, + (a10 * b10 - a11 * b08 + a13 * b06) * det, + (a01 * b08 - a00 * b10 - a03 * b06) * det, + (a30 * b04 - a31 * b02 + a33 * b00) * det, + (a21 * b02 - a20 * b04 - a23 * b00) * det, + (a11 * b07 - a10 * b09 - a12 * b06) * det, + (a00 * b09 - a01 * b07 + a02 * b06) * det, + (a31 * b01 - a30 * b03 - a32 * b00) * det, + (a20 * b03 - a21 * b01 + a22 * b00) * det + ); + }, + + /** + * Calculate the adjoint, or adjugate, of this Matrix. + * + * @method Phaser.Math.Matrix4#adjoint + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + adjoint: function () + { + var a = 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]; + + return this.setValues( + (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)), + -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)), + (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)), + -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)), + -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)), + (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)), + -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)), + (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)), + (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)), + -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)), + (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)), + -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)), + -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)), + (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)), + -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)), + (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)) + ); + }, + + /** + * Calculate the determinant of this Matrix. + * + * @method Phaser.Math.Matrix4#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 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 + return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + }, + + /** + * Multiply this Matrix by the given Matrix. + * + * @method Phaser.Math.Matrix4#multiply + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by. + * + * @return {this} This Matrix4. + */ + multiply: function (src) + { + var a = 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 b = src.val; + + // Cache only the current line of the second matrix + var b0 = b[0]; + var b1 = b[1]; + var b2 = b[2]; + var b3 = b[3]; + + a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[4]; + b1 = b[5]; + b2 = b[6]; + b3 = b[7]; + + a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[8]; + b1 = b[9]; + b2 = b[10]; + b3 = b[11]; + + a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[12]; + b1 = b[13]; + b2 = b[14]; + b3 = b[15]; + + a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + return this; + }, + + /** + * 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 - The source Matrix4 that this Matrix4 is multiplied by. + * + * @return {this} This Matrix4. + */ + multiplyLocal: function (src) + { + var a = this.val; + var b = src.val; + + return this.setValues( + a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12], + a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13], + a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14], + a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15], + + a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12], + a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13], + a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14], + a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15], + + a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12], + a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13], + a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14], + a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15], + + a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12], + a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13], + a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14], + a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15] + ); + }, + + /** + * Multiplies the given Matrix4 object with this Matrix. + * + * This is the same as calling `multiplyMatrices(m, this)`. + * + * @method Phaser.Math.Matrix4#premultiply + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one. + * + * @return {this} This Matrix4. + */ + premultiply: function (m) + { + return this.multiplyMatrices(m, this); + }, + + /** + * Multiplies the two given Matrix4 objects and stores the results in this Matrix. + * + * @method Phaser.Math.Matrix4#multiplyMatrices + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply. + * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply. + * + * @return {this} This Matrix4. + */ + multiplyMatrices: function (a, b) + { + var am = a.val; + var bm = b.val; + + var a11 = am[0]; + var a12 = am[4]; + var a13 = am[8]; + var a14 = am[12]; + var a21 = am[1]; + var a22 = am[5]; + var a23 = am[9]; + var a24 = am[13]; + var a31 = am[2]; + var a32 = am[6]; + var a33 = am[10]; + var a34 = am[14]; + var a41 = am[3]; + var a42 = am[7]; + var a43 = am[11]; + var a44 = am[15]; + + var b11 = bm[0]; + var b12 = bm[4]; + var b13 = bm[8]; + var b14 = bm[12]; + var b21 = bm[1]; + var b22 = bm[5]; + var b23 = bm[9]; + var b24 = bm[13]; + var b31 = bm[2]; + var b32 = bm[6]; + var b33 = bm[10]; + var b34 = bm[14]; + var b41 = bm[3]; + var b42 = bm[7]; + var b43 = bm[11]; + var b44 = bm[15]; + + return this.setValues( + a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41, + a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41, + a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41, + a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41, + a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42, + a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42, + a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42, + a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42, + a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43, + a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43, + a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43, + a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43, + a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44, + a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44, + a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44, + a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44 + ); + }, + + /** + * Translate this Matrix using the given Vector. + * + * @method Phaser.Math.Matrix4#translate + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. + * + * @return {this} This Matrix4. + */ + translate: function (v) + { + return this.translateXYZ(v.x, v.y, v.z); + }, + + /** + * 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 {this} 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. + * + * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. + * + * @method Phaser.Math.Matrix4#scale + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. + * + * @return {this} This Matrix4. + */ + scale: function (v) + { + return this.scaleXYZ(v.x, v.y, v.z); + }, + + /** + * 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 {this} 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. + * + * @method Phaser.Math.Matrix4#makeRotationAxis + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis. + * @param {number} angle - The rotation angle in radians. + * + * @return {this} This Matrix4. + */ + makeRotationAxis: function (axis, angle) + { + // Based on http://www.gamedev.net/reference/articles/article1199.asp + + var c = Math.cos(angle); + var s = Math.sin(angle); + var t = 1 - c; + var x = axis.x; + var y = axis.y; + var z = axis.z; + var tx = t * x; + var ty = t * y; + + return this.setValues( + tx * x + c, tx * y - s * z, tx * z + s * y, 0, + tx * y + s * z, ty * y + c, ty * z - s * x, 0, + tx * z - s * y, ty * z + s * x, t * z * z + c, 0, + 0, 0, 0, 1 + ); + }, + + /** + * Apply a rotation transformation to this Matrix. + * + * @method Phaser.Math.Matrix4#rotate + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * @param {Phaser.Math.Vector3} axis - The axis to rotate upon. + * + * @return {this} This Matrix4. + */ + rotate: function (rad, axis) + { + var a = this.val; + var x = axis.x; + var y = axis.y; + var z = axis.z; + var len = Math.sqrt(x * x + y * y + z * z); + + if (Math.abs(len) < EPSILON) + { + return this; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + + var s = Math.sin(rad); + var c = Math.cos(rad); + var t = 1 - c; + + 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]; + + // Construct the elements of the rotation matrix + var b00 = x * x * t + c; + var b01 = y * x * t + z * s; + var b02 = z * x * t - y * s; + + var b10 = x * y * t - z * s; + var b11 = y * y * t + c; + var b12 = z * y * t + x * s; + + var b20 = x * z * t + y * s; + var b21 = y * z * t - x * s; + var b22 = z * z * t + c; + + // Perform rotation-specific matrix multiplication + return this.setValues( + a00 * b00 + a10 * b01 + a20 * b02, + a01 * b00 + a11 * b01 + a21 * b02, + a02 * b00 + a12 * b01 + a22 * b02, + a03 * b00 + a13 * b01 + a23 * b02, + a00 * b10 + a10 * b11 + a20 * b12, + a01 * b10 + a11 * b11 + a21 * b12, + a02 * b10 + a12 * b11 + a22 * b12, + a03 * b10 + a13 * b11 + a23 * b12, + a00 * b20 + a10 * b21 + a20 * b22, + a01 * b20 + a11 * b21 + a21 * b22, + a02 * b20 + a12 * b21 + a22 * b22, + a03 * b20 + a13 * b21 + a23 * b22, + a30, a31, a32, a33 + ); + }, + + /** + * Rotate this matrix on its X axis. + * + * @method Phaser.Math.Matrix4#rotateX + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * + * @return {this} This Matrix4. + */ + rotateX: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + 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]; + + // Perform axis-specific matrix multiplication + a[4] = a10 * c + a20 * s; + a[5] = a11 * c + a21 * s; + a[6] = a12 * c + a22 * s; + a[7] = a13 * c + a23 * s; + a[8] = a20 * c - a10 * s; + a[9] = a21 * c - a11 * s; + a[10] = a22 * c - a12 * s; + a[11] = a23 * c - a13 * s; + + return this; + }, + + /** + * Rotate this matrix on its Y axis. + * + * @method Phaser.Math.Matrix4#rotateY + * @since 3.0.0 + * + * @param {number} rad - The angle to rotate by, in radians. + * + * @return {this} This Matrix4. + */ + rotateY: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + + // Perform axis-specific matrix multiplication + a[0] = a00 * c - a20 * s; + a[1] = a01 * c - a21 * s; + a[2] = a02 * c - a22 * s; + a[3] = a03 * c - a23 * s; + a[8] = a00 * s + a20 * c; + a[9] = a01 * s + a21 * c; + a[10] = a02 * s + a22 * c; + a[11] = a03 * s + a23 * c; + + return this; + }, + + /** + * Rotate this matrix on its Z axis. + * + * @method Phaser.Math.Matrix4#rotateZ + * @since 3.0.0 + * + * @param {number} rad - The angle to rotate by, in radians. + * + * @return {this} This Matrix4. + */ + rotateZ: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + 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]; + + // Perform axis-specific matrix multiplication + a[0] = a00 * c + a10 * s; + a[1] = a01 * c + a11 * s; + a[2] = a02 * c + a12 * s; + a[3] = a03 * c + a13 * s; + a[4] = a10 * c - a00 * s; + a[5] = a11 * c - a01 * s; + a[6] = a12 * c - a02 * s; + a[7] = a13 * c - a03 * s; + + return this; + }, + + /** + * Set the values of this Matrix from the given rotation Quaternion and translation Vector. + * + * @method Phaser.Math.Matrix4#fromRotationTranslation + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from. + * @param {Phaser.Math.Vector3} v - The Vector to set translation from. + * + * @return {this} This Matrix4. + */ + fromRotationTranslation: function (q, v) + { + // Quaternion math + 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; + + return this.setValues( + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + v.x, + v.y, + v.z, + 1 + ); + }, + + /** + * Set the values of this Matrix from the given Quaternion. + * + * @method Phaser.Math.Matrix4#fromQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. + * + * @return {this} This Matrix4. + */ + 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; + + return this.setValues( + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + 0, + 0, + 0, + 1 + ); + }, + + /** + * Generate a frustum matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#frustum + * @since 3.0.0 + * + * @param {number} left - The left bound of the frustum. + * @param {number} right - The right bound of the frustum. + * @param {number} bottom - The bottom bound of the frustum. + * @param {number} top - The top bound of the frustum. + * @param {number} near - The near bound of the frustum. + * @param {number} far - The far bound of the frustum. + * + * @return {this} This Matrix4. + */ + frustum: function (left, right, bottom, top, near, far) + { + var rl = 1 / (right - left); + var tb = 1 / (top - bottom); + var nf = 1 / (near - far); + + return this.setValues( + (near * 2) * rl, + 0, + 0, + 0, + + 0, + (near * 2) * tb, + 0, + 0, + + (right + left) * rl, + (top + bottom) * tb, + (far + near) * nf, + -1, + + 0, + 0, + (far * near * 2) * nf, + 0 + ); + }, + + /** + * Generate a perspective projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#perspective + * @since 3.0.0 + * + * @param {number} fovy - Vertical field of view in radians + * @param {number} aspect - Aspect ratio. Typically viewport width /height. + * @param {number} near - Near bound of the frustum. + * @param {number} far - Far bound of the frustum. + * + * @return {this} This Matrix4. + */ + perspective: function (fovy, aspect, near, far) + { + var f = 1.0 / Math.tan(fovy / 2); + var nf = 1 / (near - far); + + return this.setValues( + f / aspect, + 0, + 0, + 0, + + 0, + f, + 0, + 0, + + 0, + 0, + (far + near) * nf, + -1, + + 0, + 0, + (2 * far * near) * nf, + 0 + ); + }, + + /** + * Generate a perspective projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#perspectiveLH + * @since 3.0.0 + * + * @param {number} width - The width of the frustum. + * @param {number} height - The height of the frustum. + * @param {number} near - Near bound of the frustum. + * @param {number} far - Far bound of the frustum. + * + * @return {this} This Matrix4. + */ + perspectiveLH: function (width, height, near, far) + { + return this.setValues( + (2 * near) / width, + 0, + 0, + 0, + + 0, + (2 * near) / height, + 0, + 0, + + 0, + 0, + -far / (near - far), + 1, + + 0, + 0, + (near * far) / (near - far), + 0 + ); + }, + + /** + * Generate an orthogonal projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#ortho + * @since 3.0.0 + * + * @param {number} left - The left bound of the frustum. + * @param {number} right - The right bound of the frustum. + * @param {number} bottom - The bottom bound of the frustum. + * @param {number} top - The top bound of the frustum. + * @param {number} near - The near bound of the frustum. + * @param {number} far - The far bound of the frustum. + * + * @return {this} This Matrix4. + */ + ortho: function (left, right, bottom, top, near, far) + { + var lr = left - right; + var bt = bottom - top; + var nf = near - far; + + // Avoid division by zero + lr = (lr === 0) ? lr : 1 / lr; + bt = (bt === 0) ? bt : 1 / bt; + nf = (nf === 0) ? nf : 1 / nf; + + return this.setValues( + -2 * lr, + 0, + 0, + 0, + + 0, + -2 * bt, + 0, + 0, + + 0, + 0, + 2 * nf, + 0, + + (left + right) * lr, + (top + bottom) * bt, + (far + near) * nf, + 1 + ); + }, + + /** + * Generate a right-handed look-at matrix with the given eye position, target and up axis. + * + * @method Phaser.Math.Matrix4#lookAtRH + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} eye - Position of the viewer. + * @param {Phaser.Math.Vector3} target - Point the viewer is looking at. + * @param {Phaser.Math.Vector3} up - vec3 pointing up. + * + * @return {this} This Matrix4. + */ + lookAtRH: function (eye, target, up) + { + var m = this.val; + + _z.subVectors(eye, target); + + if (_z.getLengthSquared() === 0) + { + // eye and target are in the same position + _z.z = 1; + } + + _z.normalize(); + _x.crossVectors(up, _z); + + if (_x.getLengthSquared() === 0) + { + // up and z are parallel + + if (Math.abs(up.z) === 1) + { + _z.x += 0.0001; + } + else + { + _z.z += 0.0001; + } + + _z.normalize(); + _x.crossVectors(up, _z); + } + + _x.normalize(); + _y.crossVectors(_z, _x); + + m[0] = _x.x; + m[1] = _x.y; + m[2] = _x.z; + m[4] = _y.x; + m[5] = _y.y; + m[6] = _y.z; + m[8] = _z.x; + m[9] = _z.y; + m[10] = _z.z; + + return this; + }, + + /** + * Generate a look-at matrix with the given eye position, focal point, and up axis. + * + * @method Phaser.Math.Matrix4#lookAt + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} eye - Position of the viewer + * @param {Phaser.Math.Vector3} center - Point the viewer is looking at + * @param {Phaser.Math.Vector3} up - vec3 pointing up. + * + * @return {this} This Matrix4. + */ + lookAt: function (eye, center, up) + { + var eyex = eye.x; + var eyey = eye.y; + var eyez = eye.z; + + var upx = up.x; + var upy = up.y; + var upz = up.z; + + var centerx = center.x; + var centery = center.y; + var centerz = center.z; + + if (Math.abs(eyex - centerx) < EPSILON && + Math.abs(eyey - centery) < EPSILON && + Math.abs(eyez - centerz) < EPSILON) + { + return this.identity(); + } + + var z0 = eyex - centerx; + var z1 = eyey - centery; + var z2 = eyez - centerz; + + var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); + + z0 *= len; + z1 *= len; + z2 *= len; + + var x0 = upy * z2 - upz * z1; + var x1 = upz * z0 - upx * z2; + var x2 = upx * z1 - upy * z0; + + len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); + + if (!len) + { + x0 = 0; + x1 = 0; + x2 = 0; + } + else + { + len = 1 / len; + x0 *= len; + x1 *= len; + x2 *= len; + } + + var y0 = z1 * x2 - z2 * x1; + var y1 = z2 * x0 - z0 * x2; + var y2 = z0 * x1 - z1 * x0; + + len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); + + if (!len) + { + y0 = 0; + y1 = 0; + y2 = 0; + } + else + { + len = 1 / len; + y0 *= len; + y1 *= len; + y2 *= len; + } + + return this.setValues( + x0, + y0, + z0, + 0, + + x1, + y1, + z1, + 0, + + x2, + y2, + z2, + 0, + + -(x0 * eyex + x1 * eyey + x2 * eyez), + -(y0 * eyex + y1 * eyey + y2 * eyez), + -(z0 * eyex + z1 * eyey + z2 * eyez), + 1 + ); + }, + + /** + * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. + * + * @method Phaser.Math.Matrix4#yawPitchRoll + * @since 3.0.0 + * + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. + * + * @return {this} This Matrix4. + */ + yawPitchRoll: function (yaw, pitch, roll) + { + this.zero(); + _tempMat1.zero(); + _tempMat2.zero(); + + var m0 = this.val; + var m1 = _tempMat1.val; + var m2 = _tempMat2.val; + + // Rotate Z + var s = Math.sin(roll); + var c = Math.cos(roll); + + m0[10] = 1; + m0[15] = 1; + m0[0] = c; + m0[1] = s; + m0[4] = -s; + m0[5] = c; + + // Rotate X + s = Math.sin(pitch); + c = Math.cos(pitch); + + m1[0] = 1; + m1[15] = 1; + m1[5] = c; + m1[10] = c; + m1[9] = -s; + m1[6] = s; + + // Rotate Y + s = Math.sin(yaw); + c = Math.cos(yaw); + + m2[5] = 1; + m2[15] = 1; + m2[0] = c; + m2[2] = -s; + m2[8] = s; + m2[10] = c; + + this.multiplyLocal(_tempMat1); + this.multiplyLocal(_tempMat2); + + return this; + }, + + /** + * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. + * + * @method Phaser.Math.Matrix4#setWorldMatrix + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix. + * @param {Phaser.Math.Vector3} position - The position of the world matrix. + * @param {Phaser.Math.Vector3} scale - The scale of the world matrix. + * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix. + * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix. + * + * @return {this} This Matrix4. + */ + setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix) + { + this.yawPitchRoll(rotation.y, rotation.x, rotation.z); + + _tempMat1.scaling(scale.x, scale.y, scale.z); + _tempMat2.xyz(position.x, position.y, position.z); + + this.multiplyLocal(_tempMat1); + this.multiplyLocal(_tempMat2); + + if (viewMatrix) + { + this.multiplyLocal(viewMatrix); + } + + if (projectionMatrix) + { + this.multiplyLocal(projectionMatrix); + } + + return this; + }, + + /** + * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4. + * + * @method Phaser.Math.Matrix4#multiplyToMat4 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one. + * @param {Phaser.Math.Matrix4} out - The receiving Matrix. + * + * @return {Phaser.Math.Matrix4} This `out` Matrix4. + */ + multiplyToMat4: function (src, out) + { + var a = this.val; + var b = src.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 = b[0]; + var b01 = b[1]; + var b02 = b[2]; + var b03 = b[3]; + var b10 = b[4]; + var b11 = b[5]; + var b12 = b[6]; + var b13 = b[7]; + var b20 = b[8]; + var b21 = b[9]; + var b22 = b[10]; + var b23 = b[11]; + var b30 = b[12]; + var b31 = b[13]; + var b32 = b[14]; + var b33 = b[15]; + + return out.setValues( + b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, + b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31, + b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32, + b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33, + + b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, + b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, + b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, + b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, + + b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, + b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, + b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, + b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, + + b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, + b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, + b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, + b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 + ); + }, + + /** + * Takes the rotation and position vectors and builds this Matrix4 from them. + * + * @method Phaser.Math.Matrix4#fromRotationXYTranslation + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} rotation - The rotation vector. + * @param {Phaser.Math.Vector3} position - The position vector. + * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`) + * + * @return {this} This Matrix4. + */ + fromRotationXYTranslation: function (rotation, position, translateFirst) + { + var x = position.x; + var y = position.y; + var z = position.z; + + var sx = Math.sin(rotation.x); + var cx = Math.cos(rotation.x); + + var sy = Math.sin(rotation.y); + var cy = Math.cos(rotation.y); + + var a30 = x; + var a31 = y; + var a32 = z; + + // Rotate X + + var b21 = -sx; + + // Rotate Y + + var c01 = 0 - b21 * sy; + + var c02 = 0 - cx * sy; + + var c21 = b21 * cy; + + var c22 = cx * cy; + + // Translate + if (!translateFirst) + { + // a30 = cy * x + 0 * y + sy * z; + a30 = cy * x + sy * z; + a31 = c01 * x + cx * y + c21 * z; + a32 = c02 * x + sx * y + c22 * z; + } + + return this.setValues( + cy, + c01, + c02, + 0, + 0, + cx, + sx, + 0, + sy, + c21, + c22, + 0, + a30, + a31, + a32, + 1 + ); + }, + + /** + * Returns the maximum axis scale from this Matrix4. + * + * @method Phaser.Math.Matrix4#getMaxScaleOnAxis + * @since 3.50.0 + * + * @return {number} The maximum axis scale. + */ + getMaxScaleOnAxis: function () + { + var m = this.val; + + var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2]; + var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6]; + var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10]; + + return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); + } + +}); + +/** + * @ignore + */ +var _tempMat1 = new Matrix4(); + +/** + * @ignore + */ +var _tempMat2 = new Matrix4(); + +/** + * @ignore + */ +var _x = new Vector3(); + +/** + * @ignore + */ +var _y = new Vector3(); + +/** + * @ignore + */ +var _z = new Vector3(); + +module.exports = Matrix4; + + +/***/ }), + +/***/ "../../../src/math/MaxAdd.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/Median.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Median.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the median of the given values. The values are sorted and the middle value is returned. + * In case of an even number of values, the average of the two middle values is returned. + * + * @function Phaser.Math.Median + * @since 3.54.0 + * + * @param {number[]} values - The values to average. + * + * @return {number} The median value. + */ +var Median = function (values) +{ + var valuesNum = values.length; + if (valuesNum === 0) + { + return 0; + } + + values.sort(function (a, b) { return a - b; }); + + var halfIndex = Math.floor(valuesNum / 2); + + return valuesNum % 2 === 0 + ? (values[halfIndex] + values[halfIndex - 1]) / 2 + : values[halfIndex]; +}; + +module.exports = Median; + + +/***/ }), + +/***/ "../../../src/math/MinSub.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/Percent.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/Quaternion.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var Matrix3 = __webpack_require__(/*! ./Matrix3 */ "../../../src/math/Matrix3.js"); +var NOOP = __webpack_require__(/*! ../utils/NOOP */ "../../../src/utils/NOOP.js"); +var Vector3 = __webpack_require__(/*! ./Vector3 */ "../../../src/math/Vector3.js"); + +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=0] - The x component. + * @param {number} [y=0] - The y component. + * @param {number} [z=0] - The z component. + * @param {number} [w=1] - 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 + * @private + * @since 3.50.0 + */ + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_y + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_z + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_w + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * This callback is invoked, if set, each time a value in this quaternion is changed. + * The callback is passed one argument, a reference to this quaternion. + * + * @name Phaser.Math.Quaternion#onChangeCallback + * @type {function} + * @since 3.50.0 + */ + this.onChangeCallback = NOOP; + + this.set(x, y, z, w); + }, + + /** + * The x component of this Quaternion. + * + * @name Phaser.Math.Quaternion#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + x: { + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + + this.onChangeCallback(this); + } + }, + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + y: { + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + + this.onChangeCallback(this); + } + }, + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + z: { + get: function () + { + return this._z; + }, + + set: function (value) + { + this._z = value; + + this.onChangeCallback(this); + } + }, + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + w: { + get: function () + { + return this._w; + }, + + set: function (value) + { + this._w = value; + + this.onChangeCallback(this); + } + }, + + /** + * 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) + { + return this.set(src); + }, + + /** + * Set the components of this Quaternion and optionally call the `onChangeCallback`. + * + * @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. + * @param {boolean} [update=true] - Call the `onChangeCallback`? + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + set: function (x, y, z, w, update) + { + if (update === undefined) { update = true; } + + 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; + } + + if (update) + { + this.onChangeCallback(this); + } + + 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; + + this.onChangeCallback(this); + + 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; + + this.onChangeCallback(this); + + 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; + + this.onChangeCallback(this); + + 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; + } + + this.onChangeCallback(this); + + 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; + + return this.set( + ax + t * (v.x - ax), + ay + t * (v.y - ay), + az + t * (v.z - az), + aw + t * (v.w - aw) + ); + }, + + /** + * 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) + { + return this.set(0, 0, 0, 1); + } + 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 () + { + return this.set(0, 0, 0, 1); + }, + + /** + * 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); + + return this.set( + s * axis.x, + s * axis.y, + s * axis.z, + Math.cos(rad) + ); + }, + + /** + * 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; + + return this.set( + ax * bw + aw * bx + ay * bz - az * by, + ay * bw + aw * by + az * bx - ax * bz, + az * bw + aw * bz + ax * by - ay * bx, + aw * bw - ax * bx - ay * by - az * bz + ); + }, + + /** + * 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 + return this.set( + scale0 * ax + scale1 * bx, + scale0 * ay + scale1 * by, + scale0 * az + scale1 * bz, + scale0 * aw + scale1 * bw + ); + }, + + /** + * 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; + + return this.set( + -a0 * invDot, + -a1 * invDot, + -a2 * invDot, + a3 * invDot + ); + }, + + /** + * 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; + + this.onChangeCallback(this); + + 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); + + return this.set( + ax * bw + aw * bx, + ay * bw + az * bx, + az * bw - ay * bx, + aw * bw - ax * bx + ); + }, + + /** + * 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); + + return this.set( + ax * bw - az * by, + ay * bw + aw * by, + az * bw + ax * by, + aw * bw - ay * by + ); + }, + + /** + * 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); + + return this.set( + ax * bw + ay * bz, + ay * bw - ax * bz, + az * bw + aw * bz, + aw * bw - az * bz + ); + }, + + /** + * 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; + }, + + /** + * Set this Quaternion from the given Euler, based on Euler order. + * + * @method Phaser.Math.Quaternion#setFromEuler + * @since 3.50.0 + * + * @param {Phaser.Math.Euler} euler - The Euler to convert from. + * @param {boolean} [update=true] - Run the `onChangeCallback`? + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setFromEuler: function (euler, update) + { + var x = euler.x / 2; + var y = euler.y / 2; + var z = euler.z / 2; + + var c1 = Math.cos(x); + var c2 = Math.cos(y); + var c3 = Math.cos(z); + + var s1 = Math.sin(x); + var s2 = Math.sin(y); + var s3 = Math.sin(z); + + switch (euler.order) + { + case 'XYZ': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'YXZ': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + + case 'ZXY': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'ZYX': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + + case 'YZX': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'XZY': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + } + + return this; + }, + + /** + * Sets the rotation of this Quaternion from the given Matrix4. + * + * @method Phaser.Math.Quaternion#setFromRotationMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setFromRotationMatrix: function (mat4) + { + var m = mat4.val; + + var m11 = m[0]; + var m12 = m[4]; + var m13 = m[8]; + var m21 = m[1]; + var m22 = m[5]; + var m23 = m[9]; + var m31 = m[2]; + var m32 = m[6]; + var m33 = m[10]; + + var trace = m11 + m22 + m33; + var s; + + if (trace > 0) + { + s = 0.5 / Math.sqrt(trace + 1.0); + + this.set( + (m32 - m23) * s, + (m13 - m31) * s, + (m21 - m12) * s, + 0.25 / s + ); + } + else if (m11 > m22 && m11 > m33) + { + s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); + + this.set( + 0.25 * s, + (m12 + m21) / s, + (m13 + m31) / s, + (m32 - m23) / s + ); + } + else if (m22 > m33) + { + s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); + + this.set( + (m12 + m21) / s, + 0.25 * s, + (m23 + m32) / s, + (m13 - m31) / s + ); + } + else + { + s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); + + this.set( + (m13 + m31) / s, + (m23 + m32) / s, + 0.25 * s, + (m21 - m12) / s + ); + } + + 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; + } + + this.onChangeCallback(this); + + return this; + } + +}); + +module.exports = Quaternion; + + +/***/ }), + +/***/ "../../../src/math/RadToDeg.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(/*! ./const */ "../../../src/math/const.js"); + +/** + * 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 {number} The given angle converted to degrees. + */ +var RadToDeg = function (radians) +{ + return radians * CONST.RAD_TO_DEG; +}; + +module.exports = RadToDeg; + + +/***/ }), + +/***/ "../../../src/math/RandomXY.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/RandomXYZ.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/RandomXYZW.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; } + + 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; + + +/***/ }), + +/***/ "../../../src/math/Rotate.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/RotateAround.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/RotateAroundDistance.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/RotateTo.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(/*! ../math/Vector3 */ "../../../src/math/Vector3.js"); +var Matrix4 = __webpack_require__(/*! ../math/Matrix4 */ "../../../src/math/Matrix4.js"); +var Quaternion = __webpack_require__(/*! ../math/Quaternion */ "../../../src/math/Quaternion.js"); + +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; + + +/***/ }), + +/***/ "../../../src/math/RoundAwayFromZero.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/RoundTo.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. + * @param {number} [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; + + +/***/ }), + +/***/ "../../../src/math/SinCosTableGenerator.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/SmoothStep.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/SmootherStep.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/ToXY.js": +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(/*! ./Vector2 */ "../../../src/math/Vector2.js"); + +/** + * 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 {number} index - The position within the grid to get the x/y value for. + * @param {number} width - The width of the grid. + * @param {number} 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; + } + } + + return out.set(x, y); +}; + +module.exports = ToXY; + + +/***/ }), + +/***/ "../../../src/math/TransformXY.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(/*! ./Vector2 */ "../../../src/math/Vector2.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/Vector2.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var FuzzyEqual = __webpack_require__(/*! ../math/fuzzy/Equal */ "../../../src/math/fuzzy/Equal.js"); + +/** + * @classdesc + * A representation of a vector in 2D space. + * + * A two-component vector. + * + * @class Vector2 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. + * @param {number} [y=x] - The y component. + */ +var Vector2 = new Class({ + + initialize: + + function Vector2 (x, y) + { + /** + * The x component of this Vector. + * + * @name Phaser.Math.Vector2#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The y component of this Vector. + * + * @name Phaser.Math.Vector2#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; + } + }, + + /** + * Make a clone of this Vector2. + * + * @method Phaser.Math.Vector2#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} A clone of this Vector2. + */ + 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.Types.Math.Vector2Like} 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 (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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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); + }, + + /** + * Project this Vector onto another. + * + * @method Phaser.Math.Vector2#project + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} src - The vector to project onto. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + project: function (src) + { + var scalar = this.dot(src) / src.dot(src); + + return this.copy(src).scale(scalar); + } + +}); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/Vector3.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); + +/** + * @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; + }, + + /** + * Sets the components of this Vector to be the `Math.min` result from the given vector. + * + * @method Phaser.Math.Vector3#min + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + min: function (v) + { + this.x = Math.min(this.x, v.x); + this.y = Math.min(this.y, v.y); + this.z = Math.min(this.z, v.z); + + return this; + }, + + /** + * Sets the components of this Vector to be the `Math.max` result from the given vector. + * + * @method Phaser.Math.Vector3#max + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + max: function (v) + { + this.x = Math.max(this.x, v.x); + this.y = Math.max(this.y, v.y); + this.z = Math.max(this.z, v.z); + + 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); + }, + + /** + * Adds the two given Vector3s and sets the results into this Vector3. + * + * @method Phaser.Math.Vector3#addVectors + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} a - The first Vector to add. + * @param {Phaser.Math.Vector3} b - The second Vector to add. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addVectors: function (a, b) + { + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + + return this; + }, + + /** + * 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; + }, + + /** + * Sets the components of this Vector3 from the position of the given Matrix4. + * + * @method Phaser.Math.Vector3#setFromMatrixPosition + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + setFromMatrixPosition: function (m) + { + return this.fromArray(m.val, 12); + }, + + /** + * Sets the components of this Vector3 from the Matrix4 column specified. + * + * @method Phaser.Math.Vector3#setFromMatrixColumn + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from. + * @param {number} index - The column index. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + setFromMatrixColumn: function (mat4, index) + { + return this.fromArray(mat4.val, index * 4); + }, + + /** + * Sets the components of this Vector3 from the given array, based on the offset. + * + * Vector3.x = array[offset] + * Vector3.y = array[offset + 1] + * Vector3.z = array[offset + 2] + * + * @method Phaser.Math.Vector3#fromArray + * @since 3.50.0 + * + * @param {number[]} array - The array of values to get this Vector from. + * @param {number} [offset=0] - The offset index into the array. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + fromArray: function (array, offset) + { + if (offset === undefined) { offset = 0; } + + this.x = array[offset]; + this.y = array[offset + 1]; + this.z = array[offset + 2]; + + 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; + }, + + /** + * Add the given value to each component of this Vector. + * + * @method Phaser.Math.Vector3#addScalar + * @since 3.50.0 + * + * @param {number} s - The amount to add to this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScalar: function (s) + { + this.x += s; + this.y += s; + this.z += s; + + return this; + }, + + /** + * Add and scale a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector3#addScale + * @since 3.50.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. + * @param {number} scale - The amount to scale `v` by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScale: function (v, scale) + { + this.x += v.x * scale; + this.y += v.y * scale; + this.z += v.z * scale || 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; + }, + + /** + * Takes a Matrix3 and applies it to this Vector3. + * + * @method Phaser.Math.Vector3#applyMatrix3 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + applyMatrix3: function (mat3) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat3.val; + + this.x = m[0] * x + m[3] * y + m[6] * z; + this.y = m[1] * x + m[4] * y + m[7] * z; + this.z = m[2] * x + m[5] * y + m[8] * z; + + return this; + }, + + /** + * Takes a Matrix4 and applies it to this Vector3. + * + * @method Phaser.Math.Vector3#applyMatrix4 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + applyMatrix4: function (mat4) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat4.val; + + var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]); + + 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; + + 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 Matrix4. + * + * @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; + }, + + /** + * Multiplies this Vector3 by the given view and projection matrices. + * + * @method Phaser.Math.Vector3#projectViewMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix. + * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + projectViewMatrix: function (viewMatrix, projectionMatrix) + { + return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix); + }, + + /** + * Multiplies this Vector3 by the given inversed projection matrix and world matrix. + * + * @method Phaser.Math.Vector3#unprojectViewMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix. + * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + unprojectViewMatrix: function (projectionMatrix, worldMatrix) + { + return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix); + }, + + /** + * 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; + + +/***/ }), + +/***/ "../../../src/math/Vector4.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); + +/** + * @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) + { + 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; + } + +}); + +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; + + +/***/ }), + +/***/ "../../../src/math/Within.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Within.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/Wrap.js": +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/angle/Between.js": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/angle/BetweenPoints.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/angle/BetweenPointsY.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/angle/BetweenY.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/angle/CounterClockwise.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(/*! ../const */ "../../../src/math/const.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/angle/Normalize.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/angle/Random.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 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": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 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": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Normalize = __webpack_require__(/*! ./Normalize */ "../../../src/math/angle/Normalize.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/angle/RotateTo.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(/*! ../const */ "../../../src/math/const.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/angle/ShortestBetween.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * @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; + + +/***/ }), + +/***/ "../../../src/math/angle/Wrap.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MathWrap = __webpack_require__(/*! ../Wrap */ "../../../src/math/Wrap.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/angle/WrapDegrees.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Wrap = __webpack_require__(/*! ../Wrap */ "../../../src/math/Wrap.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/angle/index.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Angle + */ + +module.exports = { + + Between: __webpack_require__(/*! ./Between */ "../../../src/math/angle/Between.js"), + BetweenPoints: __webpack_require__(/*! ./BetweenPoints */ "../../../src/math/angle/BetweenPoints.js"), + BetweenPointsY: __webpack_require__(/*! ./BetweenPointsY */ "../../../src/math/angle/BetweenPointsY.js"), + 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"), + Wrap: __webpack_require__(/*! ./Wrap */ "../../../src/math/angle/Wrap.js"), + WrapDegrees: __webpack_require__(/*! ./WrapDegrees */ "../../../src/math/angle/WrapDegrees.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/const.js": +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/const.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/distance/DistanceBetween.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/distance/DistanceBetweenPoints.js": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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": +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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": +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/distance/DistanceSnake.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/distance/index.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Distance + */ + +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") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/back/In.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/back/InOut.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/back/Out.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/back/index.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Back + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/back/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/back/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/back/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/bounce/In.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/bounce/InOut.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/bounce/Out.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/bounce/index.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Bounce + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/bounce/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/bounce/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/bounce/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/circular/In.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/circular/InOut.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/circular/Out.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/circular/index.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Circular + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/circular/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/circular/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/circular/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/cubic/In.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/cubic/InOut.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/cubic/Out.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/cubic/index.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Cubic + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/cubic/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/cubic/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/cubic/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/elastic/In.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/elastic/InOut.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/elastic/Out.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/elastic/index.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/elastic/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/elastic/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/elastic/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/expo/In.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/expo/InOut.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/expo/Out.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/expo/index.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/expo/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/expo/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/expo/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/index.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing + */ + +module.exports = { + + Back: __webpack_require__(/*! ./back */ "../../../src/math/easing/back/index.js"), + Bounce: __webpack_require__(/*! ./bounce */ "../../../src/math/easing/bounce/index.js"), + Circular: __webpack_require__(/*! ./circular */ "../../../src/math/easing/circular/index.js"), + Cubic: __webpack_require__(/*! ./cubic */ "../../../src/math/easing/cubic/index.js"), + Elastic: __webpack_require__(/*! ./elastic */ "../../../src/math/easing/elastic/index.js"), + Expo: __webpack_require__(/*! ./expo */ "../../../src/math/easing/expo/index.js"), + Linear: __webpack_require__(/*! ./linear */ "../../../src/math/easing/linear/index.js"), + Quadratic: __webpack_require__(/*! ./quadratic */ "../../../src/math/easing/quadratic/index.js"), + Quartic: __webpack_require__(/*! ./quartic */ "../../../src/math/easing/quartic/index.js"), + Quintic: __webpack_require__(/*! ./quintic */ "../../../src/math/easing/quintic/index.js"), + Sine: __webpack_require__(/*! ./sine */ "../../../src/math/easing/sine/index.js"), + Stepped: __webpack_require__(/*! ./stepped */ "../../../src/math/easing/stepped/index.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/linear/Linear.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/linear/index.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(/*! ./Linear */ "../../../src/math/easing/linear/Linear.js"); + + +/***/ }), + +/***/ "../../../src/math/easing/quadratic/In.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quadratic/InOut.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quadratic/Out.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quadratic/index.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/quadratic/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/quadratic/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/quadratic/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/quartic/In.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quartic/InOut.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quartic/Out.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quartic/index.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/quartic/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/quartic/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/quartic/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/quintic/In.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quintic/InOut.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quintic/Out.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/quintic/index.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/quintic/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/quintic/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/quintic/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/sine/In.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/sine/InOut.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/sine/Out.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/sine/index.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(/*! ./In */ "../../../src/math/easing/sine/In.js"), + Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/sine/Out.js"), + InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/sine/InOut.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/easing/stepped/Stepped.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/easing/stepped/index.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(/*! ./Stepped */ "../../../src/math/easing/stepped/Stepped.js"); + + +/***/ }), + +/***/ "../../../src/math/fuzzy/Ceil.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/fuzzy/Equal.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/fuzzy/Floor.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/fuzzy/GreaterThan.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/fuzzy/LessThan.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/fuzzy/index.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Fuzzy + */ + +module.exports = { + + Ceil: __webpack_require__(/*! ./Ceil */ "../../../src/math/fuzzy/Ceil.js"), + Equal: __webpack_require__(/*! ./Equal */ "../../../src/math/fuzzy/Equal.js"), + Floor: __webpack_require__(/*! ./Floor */ "../../../src/math/fuzzy/Floor.js"), + GreaterThan: __webpack_require__(/*! ./GreaterThan */ "../../../src/math/fuzzy/GreaterThan.js"), + LessThan: __webpack_require__(/*! ./LessThan */ "../../../src/math/fuzzy/LessThan.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/index.js": +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/index.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(/*! ./const */ "../../../src/math/const.js"); +var Extend = __webpack_require__(/*! ../utils/object/Extend */ "../../../src/utils/object/Extend.js"); + +/** + * @namespace Phaser.Math + */ + +var PhaserMath = { + + // Collections of functions + Angle: __webpack_require__(/*! ./angle/ */ "../../../src/math/angle/index.js"), + Distance: __webpack_require__(/*! ./distance/ */ "../../../src/math/distance/index.js"), + Easing: __webpack_require__(/*! ./easing/ */ "../../../src/math/easing/index.js"), + Fuzzy: __webpack_require__(/*! ./fuzzy/ */ "../../../src/math/fuzzy/index.js"), + Interpolation: __webpack_require__(/*! ./interpolation/ */ "../../../src/math/interpolation/index.js"), + Pow2: __webpack_require__(/*! ./pow2/ */ "../../../src/math/pow2/index.js"), + Snap: __webpack_require__(/*! ./snap/ */ "../../../src/math/snap/index.js"), + + // Expose the RNG Class + RandomDataGenerator: __webpack_require__(/*! ./random-data-generator/RandomDataGenerator */ "../../../src/math/random-data-generator/RandomDataGenerator.js"), + + // Single functions + Average: __webpack_require__(/*! ./Average */ "../../../src/math/Average.js"), + Bernstein: __webpack_require__(/*! ./Bernstein */ "../../../src/math/Bernstein.js"), + Between: __webpack_require__(/*! ./Between */ "../../../src/math/Between.js"), + CatmullRom: __webpack_require__(/*! ./CatmullRom */ "../../../src/math/CatmullRom.js"), + CeilTo: __webpack_require__(/*! ./CeilTo */ "../../../src/math/CeilTo.js"), + Clamp: __webpack_require__(/*! ./Clamp */ "../../../src/math/Clamp.js"), + DegToRad: __webpack_require__(/*! ./DegToRad */ "../../../src/math/DegToRad.js"), + Difference: __webpack_require__(/*! ./Difference */ "../../../src/math/Difference.js"), + Euler: __webpack_require__(/*! ./Euler */ "../../../src/math/Euler.js"), + Factorial: __webpack_require__(/*! ./Factorial */ "../../../src/math/Factorial.js"), + FloatBetween: __webpack_require__(/*! ./FloatBetween */ "../../../src/math/FloatBetween.js"), + FloorTo: __webpack_require__(/*! ./FloorTo */ "../../../src/math/FloorTo.js"), + FromPercent: __webpack_require__(/*! ./FromPercent */ "../../../src/math/FromPercent.js"), + GetSpeed: __webpack_require__(/*! ./GetSpeed */ "../../../src/math/GetSpeed.js"), + IsEven: __webpack_require__(/*! ./IsEven */ "../../../src/math/IsEven.js"), + IsEvenStrict: __webpack_require__(/*! ./IsEvenStrict */ "../../../src/math/IsEvenStrict.js"), + Linear: __webpack_require__(/*! ./Linear */ "../../../src/math/Linear.js"), + LinearXY: __webpack_require__(/*! ./LinearXY */ "../../../src/math/LinearXY.js"), + MaxAdd: __webpack_require__(/*! ./MaxAdd */ "../../../src/math/MaxAdd.js"), + Median: __webpack_require__(/*! ./Median */ "../../../src/math/Median.js"), + MinSub: __webpack_require__(/*! ./MinSub */ "../../../src/math/MinSub.js"), + Percent: __webpack_require__(/*! ./Percent */ "../../../src/math/Percent.js"), + RadToDeg: __webpack_require__(/*! ./RadToDeg */ "../../../src/math/RadToDeg.js"), + RandomXY: __webpack_require__(/*! ./RandomXY */ "../../../src/math/RandomXY.js"), + RandomXYZ: __webpack_require__(/*! ./RandomXYZ */ "../../../src/math/RandomXYZ.js"), + RandomXYZW: __webpack_require__(/*! ./RandomXYZW */ "../../../src/math/RandomXYZW.js"), + 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"), + SmootherStep: __webpack_require__(/*! ./SmootherStep */ "../../../src/math/SmootherStep.js"), + SmoothStep: __webpack_require__(/*! ./SmoothStep */ "../../../src/math/SmoothStep.js"), + ToXY: __webpack_require__(/*! ./ToXY */ "../../../src/math/ToXY.js"), + TransformXY: __webpack_require__(/*! ./TransformXY */ "../../../src/math/TransformXY.js"), + Within: __webpack_require__(/*! ./Within */ "../../../src/math/Within.js"), + Wrap: __webpack_require__(/*! ./Wrap */ "../../../src/math/Wrap.js"), + + // Vector classes + Vector2: __webpack_require__(/*! ./Vector2 */ "../../../src/math/Vector2.js"), + Vector3: __webpack_require__(/*! ./Vector3 */ "../../../src/math/Vector3.js"), + Vector4: __webpack_require__(/*! ./Vector4 */ "../../../src/math/Vector4.js"), + Matrix3: __webpack_require__(/*! ./Matrix3 */ "../../../src/math/Matrix3.js"), + Matrix4: __webpack_require__(/*! ./Matrix4 */ "../../../src/math/Matrix4.js"), + Quaternion: __webpack_require__(/*! ./Quaternion */ "../../../src/math/Quaternion.js"), + RotateVec3: __webpack_require__(/*! ./RotateVec3 */ "../../../src/math/RotateVec3.js") + +}; + +// Merge in the consts + +PhaserMath = Extend(false, PhaserMath, CONST); + +// Export it + +module.exports = PhaserMath; + + +/***/ }), + +/***/ "../../../src/math/interpolation/BezierInterpolation.js": +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bernstein = __webpack_require__(/*! ../Bernstein */ "../../../src/math/Bernstein.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/interpolation/CatmullRomInterpolation.js": +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CatmullRom = __webpack_require__(/*! ../CatmullRom */ "../../../src/math/CatmullRom.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/interpolation/CubicBezierInterpolation.js": +/*!***************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/interpolation/LinearInterpolation.js": +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Linear = __webpack_require__(/*! ../Linear */ "../../../src/math/Linear.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/interpolation/QuadraticBezierInterpolation.js": +/*!*******************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/interpolation/SmoothStepInterpolation.js": +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmoothStep = __webpack_require__(/*! ../SmoothStep */ "../../../src/math/SmoothStep.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/interpolation/SmootherStepInterpolation.js": +/*!****************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmootherStep = __webpack_require__(/*! ../SmootherStep */ "../../../src/math/SmootherStep.js"); + +/** + * 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; + + +/***/ }), + +/***/ "../../../src/math/interpolation/index.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Interpolation + */ + +module.exports = { + + Bezier: __webpack_require__(/*! ./BezierInterpolation */ "../../../src/math/interpolation/BezierInterpolation.js"), + CatmullRom: __webpack_require__(/*! ./CatmullRomInterpolation */ "../../../src/math/interpolation/CatmullRomInterpolation.js"), + CubicBezier: __webpack_require__(/*! ./CubicBezierInterpolation */ "../../../src/math/interpolation/CubicBezierInterpolation.js"), + Linear: __webpack_require__(/*! ./LinearInterpolation */ "../../../src/math/interpolation/LinearInterpolation.js"), + QuadraticBezier: __webpack_require__(/*! ./QuadraticBezierInterpolation */ "../../../src/math/interpolation/QuadraticBezierInterpolation.js"), + SmoothStep: __webpack_require__(/*! ./SmoothStepInterpolation */ "../../../src/math/interpolation/SmoothStepInterpolation.js"), + SmootherStep: __webpack_require__(/*! ./SmootherStepInterpolation */ "../../../src/math/interpolation/SmootherStepInterpolation.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/pow2/GetPowerOfTwo.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), + +/***/ "../../../src/math/pow2/IsSizePowerOfTwo.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/pow2/IsValuePowerOfTwo.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/pow2/index.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Pow2 + */ + +module.exports = { + + GetNext: __webpack_require__(/*! ./GetPowerOfTwo */ "../../../src/math/pow2/GetPowerOfTwo.js"), + IsSize: __webpack_require__(/*! ./IsSizePowerOfTwo */ "../../../src/math/pow2/IsSizePowerOfTwo.js"), + IsValue: __webpack_require__(/*! ./IsValuePowerOfTwo */ "../../../src/math/pow2/IsValuePowerOfTwo.js") + +}; + + +/***/ }), + +/***/ "../../../src/math/random-data-generator/RandomDataGenerator.js": +/*!******************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! + \******************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); + +/** + * @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; + + +/***/ }), + +/***/ "../../../src/math/snap/SnapCeil.js": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/snap/SnapFloor.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/snap/SnapTo.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/math/snap/index.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Snap + */ + +module.exports = { + + Ceil: __webpack_require__(/*! ./SnapCeil */ "../../../src/math/snap/SnapCeil.js"), + Floor: __webpack_require__(/*! ./SnapFloor */ "../../../src/math/snap/SnapFloor.js"), + To: __webpack_require__(/*! ./SnapTo */ "../../../src/math/snap/SnapTo.js") + +}; + + +/***/ }), + +/***/ "../../../src/plugins/BasePlugin.js": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); + +/** + * @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; + + +/***/ }), + +/***/ "../../../src/plugins/PluginCache.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Contains the plugins that Phaser uses globally and locally. +// These are the source objects, not instantiated. +var corePlugins = {}; + +// Contains the plugins that the dev has loaded into their game +// These are the source objects, not instantiated. +var customPlugins = {}; + +var PluginCache = {}; + +/** + * @namespace Phaser.Plugins.PluginCache + */ + +/** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * + * @method Phaser.Plugins.PluginCache.register + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin? + */ +PluginCache.register = function (key, plugin, mapping, custom) +{ + if (custom === undefined) { custom = false; } + + corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom }; +}; + +/** + * Stores a custom plugin in the global plugin cache. + * The key must be unique, within the scope of the cache. + * + * @method Phaser.Plugins.PluginCache.registerCustom + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {?any} data - A value to be passed to the plugin's `init` method. + */ +PluginCache.registerCustom = function (key, plugin, mapping, data) +{ + customPlugins[key] = { plugin: plugin, mapping: mapping, data: data }; +}; + +/** + * Checks if the given key is already being used in the core plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCore + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`. + */ +PluginCache.hasCore = function (key) +{ + return corePlugins.hasOwnProperty(key); +}; + +/** + * Checks if the given key is already being used in the custom plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCustom + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`. + */ +PluginCache.hasCustom = function (key) +{ + return customPlugins.hasOwnProperty(key); +}; + +/** + * Returns the core plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCore + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to get. + * + * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object. + */ +PluginCache.getCore = function (key) +{ + return corePlugins[key]; +}; + +/** + * Returns the custom plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object. + */ +PluginCache.getCustom = function (key) +{ + return customPlugins[key]; +}; + +/** + * Returns an object from the custom cache based on the given key that can be instantiated. + * + * @method Phaser.Plugins.PluginCache.getCustomClass + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {function} The custom plugin object. + */ +PluginCache.getCustomClass = function (key) +{ + return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null; +}; + +/** + * Removes a core plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.remove + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to remove. + */ +PluginCache.remove = function (key) +{ + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } +}; + +/** + * Removes a custom plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.removeCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to remove. + */ +PluginCache.removeCustom = function (key) +{ + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } +}; + +/** + * Removes all Core Plugins. + * + * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. + * So be sure you only call this if you do not wish to run Phaser again. + * + * @method Phaser.Plugins.PluginCache.destroyCorePlugins + * @since 3.12.0 + */ +PluginCache.destroyCorePlugins = function () +{ + for (var key in corePlugins) + { + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } + } +}; + +/** + * Removes all Custom Plugins. + * + * @method Phaser.Plugins.PluginCache.destroyCustomPlugins + * @since 3.12.0 + */ +PluginCache.destroyCustomPlugins = function () +{ + for (var key in customPlugins) + { + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } + } +}; + +module.exports = PluginCache; + + +/***/ }), + +/***/ "../../../src/plugins/ScenePlugin.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +var BasePlugin = __webpack_require__(/*! ./BasePlugin */ "../../../src/plugins/BasePlugin.js"); +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene/events/index.js"); + +/** + * @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. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + */ +var ScenePlugin = new Class({ + + Extends: BasePlugin, + + initialize: + + function ScenePlugin (scene, pluginManager, pluginKey) + { + 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; + + /** + * The key under which this plugin was installed into the Scene Systems. + * + * 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#pluginKey + * @type {string} + * @readonly + * @since 3.54.0 + */ + this.pluginKey = pluginKey; + + 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; + + +/***/ }), + +/***/ "../../../src/renderer/BlendModes.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + DIFFERENCE: 11, + + /** + * Exclusion blend mode. For Canvas only. + * Like difference, but with lower contrast. + * + * @name Phaser.BlendModes.EXCLUSION + * @type {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + LUMINOSITY: 16, + + /** + * Alpha erase blend mode. For Canvas and WebGL. + * + * @name Phaser.BlendModes.ERASE + * @type {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + LIGHTER: 25, + + /** + * Copy blend mode. For Canvas only. + * Only the new shape is shown. + * + * @name Phaser.BlendModes.COPY + * @type {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + XOR: 27 + +}; + + +/***/ }), + +/***/ "../../../src/renderer/ScaleModes.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Scale Modes. + * + * @namespace Phaser.ScaleModes + * @since 3.0.0 + */ + +var ScaleModes = { + + /** + * Default Scale Mode (Linear). + * + * @name Phaser.ScaleModes.DEFAULT + * @type {number} + * @readonly + * @since 3.0.0 + */ + DEFAULT: 0, + + /** + * Linear Scale Mode. + * + * @name Phaser.ScaleModes.LINEAR + * @type {number} + * @readonly + * @since 3.0.0 + */ + LINEAR: 0, + + /** + * Nearest Scale Mode. + * + * @name Phaser.ScaleModes.NEAREST + * @type {number} + * @readonly + * @since 3.0.0 + */ + NEAREST: 1 + +}; + +module.exports = ScaleModes; + + +/***/ }), + +/***/ "../../../src/scale/events/RESIZE_EVENT.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scale Manager Resize Event. + * + * This event is dispatched whenever the Scale Manager detects a resize event from the browser. + * It sends three parameters to the callback, each of them being Size components. You can read + * the `width`, `height`, `aspectRatio` and other properties of these components to help with + * scaling your own game content. + * + * @event Phaser.Scale.Events#RESIZE + * @type {string} + * @since 3.16.1 + * + * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. + * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. + * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. + * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. + * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. + */ +module.exports = 'resize'; + + +/***/ }), + +/***/ "../../../src/scene/events/ADDED_TO_SCENE_EVENT.js": +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @type {string} + * @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": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('boot', listener)`. + * + * @event Phaser.Scenes.Events#BOOT + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/CREATE_EVENT.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('create', listener)`. + * + * @event Phaser.Scenes.Events#CREATE + * @type {string} + * @since 3.17.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. + */ +module.exports = 'create'; + + +/***/ }), + +/***/ "../../../src/scene/events/DESTROY_EVENT.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/PAUSE_EVENT.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('pause', listener)`. + * + * @event Phaser.Scenes.Events#PAUSE + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/POST_UPDATE_EVENT.js": +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('postupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#POST_UPDATE + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/PRE_RENDER_EVENT.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to this event from a Scene using `this.events.on('prerender', listener)`. + * + * A Scene will only render if it is visible. + * + * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. + * + * @event Phaser.Scenes.Events#PRE_RENDER + * @type {string} + * @since 3.53.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'prerender'; + + +/***/ }), + +/***/ "../../../src/scene/events/PRE_UPDATE_EVENT.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('preupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#PRE_UPDATE + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/READY_EVENT.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('ready', listener)`. + * + * @event Phaser.Scenes.Events#READY + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js": +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @type {string} + * @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": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('render', listener)`. + * + * A Scene will only render if it is visible. + * + * By the time this event is dispatched, the Scene will have already been rendered. + * + * @event Phaser.Scenes.Events#RENDER + * @type {string} + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'render'; + + +/***/ }), + +/***/ "../../../src/scene/events/RESUME_EVENT.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('resume', listener)`. + * + * @event Phaser.Scenes.Events#RESUME + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/SHUTDOWN_EVENT.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/SLEEP_EVENT.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('sleep', listener)`. + * + * @event Phaser.Scenes.Events#SLEEP + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/START_EVENT.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('start', listener)`. + * + * @event Phaser.Scenes.Events#START + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js": +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @since 3.5.0 + * + * @param {Phaser.Scene} scene -The Scene on which the transitioned completed. + */ +module.exports = 'transitioncomplete'; + + +/***/ }), + +/***/ "../../../src/scene/events/TRANSITION_INIT_EVENT.js": +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/TRANSITION_OUT_EVENT.js": +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/TRANSITION_START_EVENT.js": +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/TRANSITION_WAKE_EVENT.js": +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/UPDATE_EVENT.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped. + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('update', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#UPDATE + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/WAKE_EVENT.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('wake', listener)`. + * + * @event Phaser.Scenes.Events#WAKE + * @type {string} + * @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'; + + +/***/ }), + +/***/ "../../../src/scene/events/index.js": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Scenes.Events + */ + +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"), + PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "../../../src/scene/events/PAUSE_EVENT.js"), + POST_UPDATE: __webpack_require__(/*! ./POST_UPDATE_EVENT */ "../../../src/scene/events/POST_UPDATE_EVENT.js"), + PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "../../../src/scene/events/PRE_RENDER_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"), + SLEEP: __webpack_require__(/*! ./SLEEP_EVENT */ "../../../src/scene/events/SLEEP_EVENT.js"), + START: __webpack_require__(/*! ./START_EVENT */ "../../../src/scene/events/START_EVENT.js"), + TRANSITION_COMPLETE: __webpack_require__(/*! ./TRANSITION_COMPLETE_EVENT */ "../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js"), + TRANSITION_INIT: __webpack_require__(/*! ./TRANSITION_INIT_EVENT */ "../../../src/scene/events/TRANSITION_INIT_EVENT.js"), + TRANSITION_OUT: __webpack_require__(/*! ./TRANSITION_OUT_EVENT */ "../../../src/scene/events/TRANSITION_OUT_EVENT.js"), + TRANSITION_START: __webpack_require__(/*! ./TRANSITION_START_EVENT */ "../../../src/scene/events/TRANSITION_START_EVENT.js"), + TRANSITION_WAKE: __webpack_require__(/*! ./TRANSITION_WAKE_EVENT */ "../../../src/scene/events/TRANSITION_WAKE_EVENT.js"), + UPDATE: __webpack_require__(/*! ./UPDATE_EVENT */ "../../../src/scene/events/UPDATE_EVENT.js"), + WAKE: __webpack_require__(/*! ./WAKE_EVENT */ "../../../src/scene/events/WAKE_EVENT.js") + +}; + + +/***/ }), + +/***/ "../../../src/textures/Frame.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var Clamp = __webpack_require__(/*! ../math/Clamp */ "../../../src/math/Clamp.js"); +var Extend = __webpack_require__(/*! ../utils/object/Extend */ "../../../src/utils/object/Extend.js"); + +/** + * @classdesc + * A Frame is a section of a Texture. + * + * @class Frame + * @memberof Phaser.Textures + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of. + * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture. + * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of. + * @param {number} x - The x coordinate of the top-left of this Frame. + * @param {number} y - The y coordinate of the top-left of this Frame. + * @param {number} width - The width of this Frame. + * @param {number} height - The height of this Frame. + */ +var Frame = new Class({ + + initialize: + + function Frame (texture, name, sourceIndex, x, y, width, height) + { + /** + * The Texture this Frame is a part of. + * + * @name Phaser.Textures.Frame#texture + * @type {Phaser.Textures.Texture} + * @since 3.0.0 + */ + this.texture = texture; + + /** + * The name of this Frame. + * The name is unique within the Texture. + * + * @name Phaser.Textures.Frame#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The TextureSource this Frame is part of. + * + * @name Phaser.Textures.Frame#source + * @type {Phaser.Textures.TextureSource} + * @since 3.0.0 + */ + this.source = texture.source[sourceIndex]; + + /** + * The index of the TextureSource in the Texture sources array. + * + * @name Phaser.Textures.Frame#sourceIndex + * @type {number} + * @since 3.0.0 + */ + this.sourceIndex = sourceIndex; + + /** + * A reference to the Texture Source WebGL Texture that this Frame is using. + * + * @name Phaser.Textures.Frame#glTexture + * @type {?WebGLTexture} + * @default null + * @since 3.11.0 + */ + this.glTexture = this.source.glTexture; + + /** + * X position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutX + * @type {number} + * @since 3.0.0 + */ + this.cutX; + + /** + * Y position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutY + * @type {number} + * @since 3.0.0 + */ + this.cutY; + + /** + * The width of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutWidth + * @type {number} + * @since 3.0.0 + */ + this.cutWidth; + + /** + * The height of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutHeight + * @type {number} + * @since 3.0.0 + */ + this.cutHeight; + + /** + * The X rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The Y rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The rendering width of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#width + * @type {number} + * @since 3.0.0 + */ + this.width; + + /** + * The rendering height of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#height + * @type {number} + * @since 3.0.0 + */ + this.height; + + /** + * Half the width, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfWidth + * @type {number} + * @since 3.0.0 + */ + this.halfWidth; + + /** + * Half the height, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfHeight + * @type {number} + * @since 3.0.0 + */ + this.halfHeight; + + /** + * The x center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerX + * @type {number} + * @since 3.0.0 + */ + this.centerX; + + /** + * The y center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerY + * @type {number} + * @since 3.0.0 + */ + this.centerY; + + /** + * The horizontal pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotX = 0; + + /** + * The vertical pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotY = 0; + + /** + * Does this Frame have a custom pivot point? + * + * @name Phaser.Textures.Frame#customPivot + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.customPivot = false; + + /** + * **CURRENTLY UNSUPPORTED** + * + * Is this frame is rotated or not in the Texture? + * Rotation allows you to use rotated frames in texture atlas packing. + * It has nothing to do with Sprite rotation. + * + * @name Phaser.Textures.Frame#rotated + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.rotated = false; + + /** + * Over-rides the Renderer setting. + * -1 = use Renderer Setting + * 0 = No rounding + * 1 = Round + * + * @name Phaser.Textures.Frame#autoRound + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.autoRound = -1; + + /** + * Any Frame specific custom data can be stored here. + * + * @name Phaser.Textures.Frame#customData + * @type {object} + * @since 3.0.0 + */ + this.customData = {}; + + /** + * WebGL UV u0 value. + * + * @name Phaser.Textures.Frame#u0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u0 = 0; + + /** + * WebGL UV v0 value. + * + * @name Phaser.Textures.Frame#v0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v0 = 0; + + /** + * WebGL UV u1 value. + * + * @name Phaser.Textures.Frame#u1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u1 = 0; + + /** + * WebGL UV v1 value. + * + * @name Phaser.Textures.Frame#v1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v1 = 0; + + /** + * The un-modified source frame, trim and UV data. + * + * @name Phaser.Textures.Frame#data + * @type {object} + * @private + * @since 3.0.0 + */ + this.data = { + cut: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + trim: false, + sourceSize: { + w: 0, + h: 0 + }, + spriteSourceSize: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + radius: 0, + drawImage: { + x: 0, + y: 0, + width: 0, + height: 0 + } + }; + + this.setSize(width, height, x, y); + }, + + /** + * Sets the width, height, x and y of this Frame. + * + * This is called automatically by the constructor + * and should rarely be changed on-the-fly. + * + * @method Phaser.Textures.Frame#setSize + * @since 3.7.0 + * + * @param {number} width - The width of the frame before being trimmed. + * @param {number} height - The height of the frame before being trimmed. + * @param {number} [x=0] - The x coordinate of the top-left of this Frame. + * @param {number} [y=0] - The y coordinate of the top-left of this Frame. + * + * @return {this} This Frame object. + */ + setSize: function (width, height, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.cutX = x; + this.cutY = y; + this.cutWidth = width; + this.cutHeight = height; + + this.width = width; + this.height = height; + + this.halfWidth = Math.floor(width * 0.5); + this.halfHeight = Math.floor(height * 0.5); + + this.centerX = Math.floor(width / 2); + this.centerY = Math.floor(height / 2); + + var data = this.data; + var cut = data.cut; + + cut.x = x; + cut.y = y; + cut.w = width; + cut.h = height; + cut.r = x + width; + cut.b = y + height; + + data.sourceSize.w = width; + data.sourceSize.h = height; + + data.spriteSourceSize.w = width; + data.spriteSourceSize.h = height; + + data.radius = 0.5 * Math.sqrt(width * width + height * height); + + var drawImage = data.drawImage; + + drawImage.x = x; + drawImage.y = y; + drawImage.width = width; + drawImage.height = height; + + return this.updateUVs(); + }, + + /** + * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data. + * + * @method Phaser.Textures.Frame#setTrim + * @since 3.0.0 + * + * @param {number} actualWidth - The width of the frame before being trimmed. + * @param {number} actualHeight - The height of the frame before being trimmed. + * @param {number} destX - The destination X position of the trimmed frame for display. + * @param {number} destY - The destination Y position of the trimmed frame for display. + * @param {number} destWidth - The destination width of the trimmed frame for display. + * @param {number} destHeight - The destination height of the trimmed frame for display. + * + * @return {this} This Frame object. + */ + setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight) + { + var data = this.data; + var ss = data.spriteSourceSize; + + // Store actual values + + data.trim = true; + + data.sourceSize.w = actualWidth; + data.sourceSize.h = actualHeight; + + ss.x = destX; + ss.y = destY; + ss.w = destWidth; + ss.h = destHeight; + ss.r = destX + destWidth; + ss.b = destY + destHeight; + + // Adjust properties + this.x = destX; + this.y = destY; + + this.width = destWidth; + this.height = destHeight; + + this.halfWidth = destWidth * 0.5; + this.halfHeight = destHeight * 0.5; + + this.centerX = Math.floor(destWidth / 2); + this.centerY = Math.floor(destHeight / 2); + + return this.updateUVs(); + }, + + /** + * Takes a crop data object and, based on the rectangular region given, calculates the + * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. + * + * This is called directly by the Game Object Texture Components `setCrop` method. + * Please use that method to crop a Game Object. + * + * @method Phaser.Textures.Frame#setCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. + * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height. + * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width. + * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + setCropUVs: function (crop, x, y, width, height, flipX, flipY) + { + // Clamp the input values + + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + var rw = this.realWidth; + var rh = this.realHeight; + + x = Clamp(x, 0, rw); + y = Clamp(y, 0, rh); + + width = Clamp(width, 0, rw - x); + height = Clamp(height, 0, rh - y); + + var ox = cx + x; + var oy = cy + y; + var ow = width; + var oh = height; + + var data = this.data; + + if (data.trim) + { + var ss = data.spriteSourceSize; + + // Need to check for intersection between the cut area and the crop area + // If there is none, we set UV to be empty, otherwise set it to be the intersection area + + width = Clamp(width, 0, cw - x); + height = Clamp(height, 0, ch - y); + + var cropRight = x + width; + var cropBottom = y + height; + + var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom); + + if (intersects) + { + var ix = Math.max(ss.x, x); + var iy = Math.max(ss.y, y); + var iw = Math.min(ss.r, cropRight) - ix; + var ih = Math.min(ss.b, cropBottom) - iy; + + ow = iw; + oh = ih; + + if (flipX) + { + ox = cx + (cw - (ix - ss.x) - iw); + } + else + { + ox = cx + (ix - ss.x); + } + + if (flipY) + { + oy = cy + (ch - (iy - ss.y) - ih); + } + else + { + oy = cy + (iy - ss.y); + } + + x = ix; + y = iy; + + width = iw; + height = ih; + } + else + { + ox = 0; + oy = 0; + ow = 0; + oh = 0; + } + } + else + { + if (flipX) + { + ox = cx + (cw - x - width); + } + + if (flipY) + { + oy = cy + (ch - y - height); + } + } + + var tw = this.source.width; + var th = this.source.height; + + // Map the given coordinates into UV space, clamping to the 0-1 range. + + crop.u0 = Math.max(0, ox / tw); + crop.v0 = Math.max(0, oy / th); + crop.u1 = Math.min(1, (ox + ow) / tw); + crop.v1 = Math.min(1, (oy + oh) / th); + + crop.x = x; + crop.y = y; + + crop.cx = ox; + crop.cy = oy; + crop.cw = ow; + crop.ch = oh; + + crop.width = width; + crop.height = height; + + crop.flipX = flipX; + crop.flipY = flipY; + + return crop; + }, + + /** + * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object. + * Called automatically by `setFrame`. + * + * @method Phaser.Textures.Frame#updateCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + updateCropUVs: function (crop, flipX, flipY) + { + return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY); + }, + + /** + * Directly sets the canvas and WebGL UV data for this frame. + * + * Use this if you need to override the values that are generated automatically + * when the Frame is created. + * + * @method Phaser.Textures.Frame#setUVs + * @since 3.50.0 + * + * @param {number} width - Width of this frame for the Canvas data. + * @param {number} height - Height of this frame for the Canvas data. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * + * @return {this} This Frame object. + */ + setUVs: function (width, height, u0, v0, u1, v1) + { + // Canvas data + + var cd = this.data.drawImage; + + cd.width = width; + cd.height = height; + + // WebGL data + + this.u0 = u0; + this.v0 = v0; + + this.u1 = u1; + this.v1 = v1; + + return this; + }, + + /** + * Updates the internal WebGL UV cache and the drawImage cache. + * + * @method Phaser.Textures.Frame#updateUVs + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVs: function () + { + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + + // Canvas data + + var cd = this.data.drawImage; + + cd.width = cw; + cd.height = ch; + + // WebGL data + + var tw = this.source.width; + var th = this.source.height; + + this.u0 = cx / tw; + this.v0 = cy / th; + + this.u1 = (cx + cw) / tw; + this.v1 = (cy + ch) / th; + + return this; + }, + + /** + * Updates the internal WebGL UV cache. + * + * @method Phaser.Textures.Frame#updateUVsInverted + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVsInverted: function () + { + var tw = this.source.width; + var th = this.source.height; + + this.u0 = (this.cutX + this.cutHeight) / tw; + this.v0 = this.cutY / th; + + this.u1 = this.cutX / tw; + this.v1 = (this.cutY + this.cutWidth) / th; + + return this; + }, + + /** + * Clones this Frame into a new Frame object. + * + * @method Phaser.Textures.Frame#clone + * @since 3.0.0 + * + * @return {Phaser.Textures.Frame} A clone of this Frame. + */ + clone: function () + { + var clone = new Frame(this.texture, this.name, this.sourceIndex); + + clone.cutX = this.cutX; + clone.cutY = this.cutY; + clone.cutWidth = this.cutWidth; + clone.cutHeight = this.cutHeight; + + clone.x = this.x; + clone.y = this.y; + + clone.width = this.width; + clone.height = this.height; + + clone.halfWidth = this.halfWidth; + clone.halfHeight = this.halfHeight; + + clone.centerX = this.centerX; + clone.centerY = this.centerY; + + clone.rotated = this.rotated; + + clone.data = Extend(true, clone.data, this.data); + + clone.updateUVs(); + + return clone; + }, + + /** + * Destroys this Frame by nulling its reference to the parent Texture and and data objects. + * + * @method Phaser.Textures.Frame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.source = null; + this.texture = null; + this.glTexture = null; + this.customData = null; + this.data = null; + }, + + /** + * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realWidth + * @type {number} + * @readonly + * @since 3.0.0 + */ + realWidth: { + + get: function () + { + return this.data.sourceSize.w; + } + + }, + + /** + * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realHeight + * @type {number} + * @readonly + * @since 3.0.0 + */ + realHeight: { + + get: function () + { + return this.data.sourceSize.h; + } + + }, + + /** + * The radius of the Frame (derived from sqrt(w * w + h * h) / 2) + * + * @name Phaser.Textures.Frame#radius + * @type {number} + * @readonly + * @since 3.0.0 + */ + radius: { + + get: function () + { + return this.data.radius; + } + + }, + + /** + * Is the Frame trimmed or not? + * + * @name Phaser.Textures.Frame#trimmed + * @type {boolean} + * @readonly + * @since 3.0.0 + */ + trimmed: { + + get: function () + { + return this.data.trim; + } + + }, + + /** + * The Canvas drawImage data object. + * + * @name Phaser.Textures.Frame#canvasData + * @type {object} + * @readonly + * @since 3.0.0 + */ + canvasData: { + + get: function () + { + return this.data.drawImage; + } + + } + +}); + +module.exports = Frame; + + +/***/ }), + +/***/ "../../../src/tweens/builders/GetBoolean.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. + * + * @return {boolean} 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": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Tween States. + * + * @namespace Phaser.Tweens.States + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + +/** + * Phaser Tween state constants. + * + * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + +var TWEEN_CONST = { + + /** + * TweenData state. + * + * @name Phaser.Tweens.States.CREATED + * @type {number} + * @const + * @since 3.0.0 + */ + CREATED: 0, + + // 1 used to be INIT prior to 3.60 + + /** + * TweenData state. + * + * @name Phaser.Tweens.States.DELAY + * @type {number} + * @const + * @since 3.0.0 + */ + DELAY: 2, + + // 3 used to be OFFSET_DELAY prior to 3.60 + + /** + * TweenData state. + * + * @name Phaser.Tweens.States.PENDING_RENDER + * @type {number} + * @const + * @since 3.0.0 + */ + PENDING_RENDER: 4, + + /** + * TweenData state. + * + * @name Phaser.Tweens.States.PLAYING_FORWARD + * @type {number} + * @const + * @since 3.0.0 + */ + PLAYING_FORWARD: 5, + + /** + * TweenData state. + * + * @name Phaser.Tweens.States.PLAYING_BACKWARD + * @type {number} + * @const + * @since 3.0.0 + */ + PLAYING_BACKWARD: 6, + + /** + * TweenData state. + * + * @name Phaser.Tweens.States.HOLD_DELAY + * @type {number} + * @const + * @since 3.0.0 + */ + HOLD_DELAY: 7, + + /** + * TweenData state. + * + * @name Phaser.Tweens.States.REPEAT_DELAY + * @type {number} + * @const + * @since 3.0.0 + */ + REPEAT_DELAY: 8, + + /** + * TweenData state. + * + * @name Phaser.Tweens.States.COMPLETE + * @type {number} + * @const + * @since 3.0.0 + */ + COMPLETE: 9, + + // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) + + /** + * Tween state. The Tween has been created but has not yet been added to the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING + * @type {number} + * @const + * @since 3.0.0 + */ + PENDING: 20, + + /** + * Tween state. The Tween is active within the Tween Manager. This means it is either playing, + * or was playing and is currently paused, but in both cases it's still being processed by + * the Tween Manager, so is considered 'active'. + * + * @name Phaser.Tweens.States.ACTIVE + * @type {number} + * @const + * @since 3.0.0 + */ + ACTIVE: 21, + + /** + * Tween state. The Tween is waiting for a loop countdown to elapse. + * + * @name Phaser.Tweens.States.LOOP_DELAY + * @type {number} + * @const + * @since 3.0.0 + */ + LOOP_DELAY: 22, + + /** + * Tween state. The Tween is waiting for a complete delay to elapse. + * + * @name Phaser.Tweens.States.COMPLETE_DELAY + * @type {number} + * @const + * @since 3.0.0 + */ + COMPLETE_DELAY: 23, + + /** + * Tween state. The Tween is waiting for a starting delay to elapse. + * + * @name Phaser.Tweens.States.START_DELAY + * @type {number} + * @const + * @since 3.0.0 + */ + START_DELAY: 24, + + /** + * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING_REMOVE + * @type {number} + * @const + * @since 3.0.0 + */ + PENDING_REMOVE: 25, + + /** + * Tween state. The Tween has been removed from the Tween Manager. + * + * @name Phaser.Tweens.States.REMOVED + * @type {number} + * @const + * @since 3.0.0 + */ + REMOVED: 26, + + /** + * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation, + * so will not be automatically removed by the Tween Manager. + * + * @name Phaser.Tweens.States.FINISHED + * @type {number} + * @const + * @since 3.60.0 + */ + FINISHED: 27, + + /** + * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager. + * + * @name Phaser.Tweens.States.DESTROYED + * @type {number} + * @const + * @since 3.60.0 + */ + DESTROYED: 28, + + /** + * A large integer value used for 'infinite' style countdowns. + * + * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not + * supported on IE. + * + * @name Phaser.Tweens.States.MAX + * @type {number} + * @const + * @since 3.60.0 + */ + MAX: 999999999999 + +}; + +module.exports = TWEEN_CONST; + + +/***/ }), + +/***/ "../../../src/utils/Class.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Taken from klasse by mattdesl https://github.com/mattdesl/klasse + +function hasGetterOrSetter (def) +{ + return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); +} + +function getProperty (definition, k, isClassDescriptor) +{ + // This may be a lightweight object, OR it might be a property that was defined previously. + + // For simple class descriptors we can just assume its NOT previously defined. + var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); + + if (!isClassDescriptor && def.value && typeof def.value === 'object') + { + def = def.value; + } + + // This might be a regular property, or it may be a getter/setter the user defined in a class. + if (def && hasGetterOrSetter(def)) + { + if (typeof def.enumerable === 'undefined') + { + def.enumerable = true; + } + + if (typeof def.configurable === 'undefined') + { + def.configurable = true; + } + + return def; + } + else + { + return false; + } +} + +function hasNonConfigurable (obj, k) +{ + var prop = Object.getOwnPropertyDescriptor(obj, k); + + if (!prop) + { + return false; + } + + if (prop.value && typeof prop.value === 'object') + { + prop = prop.value; + } + + if (prop.configurable === false) + { + return true; + } + + return false; +} + +/** + * Extends the given `myClass` object's prototype with the properties of `definition`. + * + * @function extend + * @ignore + * @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) + { + if (!definition.hasOwnProperty(k)) + { + continue; + } + + var def = getProperty(definition, k, isClassDescriptor); + + if (def !== false) + { + // If Extends is used, we will check its prototype to see if the final variable exists. + + var parent = extend || ctor; + + if (hasNonConfigurable(parent.prototype, k)) + { + // Just skip the final property + if (Class.ignoreFinals) + { + continue; + } + + // We cannot re-define a property that is configurable=false. + // So we will consider them final and throw an error. This is by + // default so it is clear to the developer what is happening. + // You can set ignoreFinals to true if you need to extend a class + // which has configurable=false; it will simply not re-define final properties. + throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); + } + + Object.defineProperty(ctor.prototype, k, def); + } + else + { + ctor.prototype[k] = definition[k]; + } + } +} + +/** + * Applies the given `mixins` to the prototype of `myClass`. + * + * @function mixin + * @ignore + * @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) + { + return; + } + + if (!Array.isArray(mixins)) + { + mixins = [ mixins ]; + } + + for (var i = 0; i < mixins.length; i++) + { + extend(myClass, mixins[i].prototype || mixins[i]); + } +} + +/** + * Creates a new class with the given descriptor. + * The constructor, defined by the name `initialize`, + * is an optional function. If unspecified, an anonymous + * function will be used which calls the parent class (if + * one exists). + * + * You can also use `Extends` and `Mixins` to provide subclassing + * and inheritance. + * + * @class Phaser.Class + * @constructor + * @param {Object} definition a dictionary of functions for the class + * @example + * + * var MyClass = new Phaser.Class({ + * + * initialize: function() { + * this.foo = 2.0; + * }, + * + * bar: function() { + * return this.foo + 5; + * } + * }); + */ +function Class (definition) +{ + if (!definition) + { + definition = {}; + } + + // The variable name here dictates what we see in Chrome debugger + var initialize; + var Extends; + + if (definition.initialize) + { + if (typeof definition.initialize !== 'function') + { + throw new Error('initialize must be a function'); + } + + initialize = definition.initialize; + + // Usually we should avoid 'delete' in V8 at all costs. + // However, its unlikely to make any performance difference + // here since we only call this on class creation (i.e. not object creation). + delete definition.initialize; + } + else if (definition.Extends) + { + var base = definition.Extends; + + initialize = function () + { + base.apply(this, arguments); + }; + } + else + { + initialize = function () {}; + } + + if (definition.Extends) + { + initialize.prototype = Object.create(definition.Extends.prototype); + initialize.prototype.constructor = initialize; + + // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) + + Extends = definition.Extends; + + delete definition.Extends; + } + else + { + initialize.prototype.constructor = initialize; + } + + // Grab the mixins, if they are specified... + var mixins = null; + + if (definition.Mixins) + { + mixins = definition.Mixins; + delete definition.Mixins; + } + + // First, mixin if we can. + mixin(initialize, mixins); + + // Now we grab the actual definition which defines the overrides. + extend(initialize, definition, true, Extends); + + return initialize; +} + +Class.extend = extend; +Class.mixin = mixin; +Class.ignoreFinals = false; + +module.exports = Class; + + +/***/ }), + +/***/ "../../../src/utils/NOOP.js": +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/utils/array/Add.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted. + * @param {number} [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": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [endIndex] - An optional end index to search to. + * + * @return {number} 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": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index to search from. + * @param {number} 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": +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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/Flatten.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes an array and flattens it, returning a shallow-copy flattened array. + * + * @function Phaser.Utils.Array.Flatten + * @since 3.60.0 + * + * @param {array} array - The array to flatten. + * @param {array} [output] - An array to hold the results in. + * + * @return {array} The flattened output array. + */ +var Flatten = function (array, output) +{ + if (output === undefined) { output = []; } + + for (var i = 0; i < array.length; i++) + { + if (Array.isArray(array[i])) + { + Flatten(array[i], output); + } + else + { + output.push(array[i]); + } + } + + return output; +}; + +module.exports = Flatten; + + +/***/ }), + +/***/ "../../../src/utils/array/GetAll.js": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [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": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [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": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex=0] - An optional start index. + * @param {number} [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/MoveAbove.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element above another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveAbove + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move above base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveAbove = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex > baseIndex) + { + // item1 is already above item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === array.length - 1) + { + array.push(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveAbove; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveBelow.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element below another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveBelow + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move below base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveBelow = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex < baseIndex) + { + // item1 is already below item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === 0) + { + array.unshift(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveBelow; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveDown.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/utils/array/NumberArrayStep.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} k - The k-th element index. + * @param {number} [left=0] - The index of the left part of the range. + * @param {number} [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": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + var removed = []; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + removed.push(entry); + + if (callback) + { + callback.call(context, entry); + } + } + + itemLength--; + } + + return removed; +}; + +module.exports = Remove; + + +/***/ }), + +/***/ "../../../src/utils/array/RemoveAt.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index to remove from. + * @param {number} 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": +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [start=0] - The array index to start the search from. + * @param {number} [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": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index. + * @param {number} 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) + { + if (throwError) + { + throw new Error('Range Error: Values outside acceptable range'); + } + + return false; + } + else + { + return true; + } +}; + +module.exports = SafeRange; + + +/***/ }), + +/***/ "../../../src/utils/array/SendToBack.js": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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": +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [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": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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/SortByDigits.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/utils/array/SpliceOne.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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": +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Device = __webpack_require__(/*! ../../device */ "../../../src/device/index.js"); + +/** + * 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); +} + +/** + * 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 = 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) + { + RunPass(array, compare, chk, buffer); + + var tmp = array; + + array = buffer; + + buffer = tmp; + } + + return array; +} + +/** + * 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) + { + 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++]; + } + } + else if (li < r) + { + // Nothing to compare, just flush what's left. + result[i++] = arr[li++]; + } + else if (ri < e) + { + result[i++] = arr[ri++]; + } + 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; } + + // Short-circuit when there's nothing to sort. + if (!array || array.length < 2) + { + return array; + } + + if (Device.features.stableSort) + { + return array.sort(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; +}; + +module.exports = StableSort; + + +/***/ }), + +/***/ "../../../src/utils/array/Swap.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 array; + } + + 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": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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"), + Flatten: __webpack_require__(/*! ./Flatten */ "../../../src/utils/array/Flatten.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"), + MoveAbove: __webpack_require__(/*! ./MoveAbove */ "../../../src/utils/array/MoveAbove.js"), + MoveBelow: __webpack_require__(/*! ./MoveBelow */ "../../../src/utils/array/MoveBelow.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"), + SortByDigits: __webpack_require__(/*! ./SortByDigits */ "../../../src/utils/array/SortByDigits.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": +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. This is an example matrix: + * + * ``` + * [ + * [ 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) || !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": +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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": +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the columns in the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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": +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the rows in the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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": +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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) + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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": +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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/}. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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": +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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) + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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/TranslateMatrix.js": +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateLeft = __webpack_require__(/*! ../RotateLeft */ "../../../src/utils/array/RotateLeft.js"); +var RotateRight = __webpack_require__(/*! ../RotateRight */ "../../../src/utils/array/RotateRight.js"); + +/** + * Translates the given Array Matrix by shifting each column and row the + * amount specified. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.Translate + * @since 3.50.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to translate. + * @param {number} [x=0] - The amount to horizontally translate the matrix by. + * @param {number} [y=0] - The amount to vertically translate the matrix by. + * + * @return {T[][]} The translated matrix. + */ +var TranslateMatrix = function (matrix, x, y) +{ + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + // Vertical translation + + if (y !== 0) + { + if (y < 0) + { + // Shift Up + RotateLeft(matrix, Math.abs(y)); + } + else + { + // Shift Down + RotateRight(matrix, y); + } + } + + // Horizontal translation + + if (x !== 0) + { + for (var i = 0; i < matrix.length; i++) + { + var row = matrix[i]; + + if (x < 0) + { + RotateLeft(row, Math.abs(x)); + } + else + { + RotateRight(row, x); + } + } + } + + return matrix; +}; + +module.exports = TranslateMatrix; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/TransposeMatrix.js": +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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"), + Translate: __webpack_require__(/*! ./TranslateMatrix */ "../../../src/utils/array/matrix/TranslateMatrix.js"), + TransposeMatrix: __webpack_require__(/*! ./TransposeMatrix */ "../../../src/utils/array/matrix/TransposeMatrix.js") + +}; + + +/***/ }), + +/***/ "../../../src/utils/object/DeepCopy.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Deep Copy the given object or array. + * + * @function Phaser.Utils.Objects.DeepCopy + * @since 3.50.0 + * + * @param {object} obj - The object to deep copy. + * + * @return {object} A deep copy of the original object. + */ +var DeepCopy = function (inObject) +{ + var outObject; + var value; + var key; + + if (typeof inObject !== 'object' || inObject === null) + { + // inObject is not an object + return inObject; + } + + // Create an array or object to hold the values + outObject = Array.isArray(inObject) ? [] : {}; + + for (key in inObject) + { + value = inObject[key]; + + // Recursively (deep) copy for nested objects, including arrays + outObject[key] = DeepCopy(value); + } + + return outObject; +}; + +module.exports = DeepCopy; + + +/***/ }), + +/***/ "../../../src/utils/object/Extend.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(/*! ./IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); + +// @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; + + +/***/ }), + +/***/ "../../../src/utils/object/GetAdvancedValue.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH = __webpack_require__(/*! ../../math */ "../../../src/math/index.js"); +var GetValue = __webpack_require__(/*! ./GetValue */ "../../../src/utils/object/GetValue.js"); + +/** + * 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 - 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 GetAdvancedValue = function (source, key, defaultValue) +{ + var value = GetValue(source, key, null); + + if (value === null) + { + return defaultValue; + } + else if (Array.isArray(value)) + { + return MATH.RND.pick(value); + } + else if (typeof value === 'object') + { + if (value.hasOwnProperty('randInt')) + { + return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]); + } + else if (value.hasOwnProperty('randFloat')) + { + return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]); + } + } + else if (typeof value === 'function') + { + return value(key); + } + + return value; +}; + +module.exports = GetAdvancedValue; + + +/***/ }), + +/***/ "../../../src/utils/object/GetFastValue.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), + +/***/ "../../../src/utils/object/GetValue.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. + * + * The key is a string, which can be split based on the use of the period character. + * + * For example: + * + * ```javascript + * const source = { + * lives: 3, + * render: { + * screen: { + * width: 1024 + * } + * } + * } + * + * const lives = GetValue(source, 'lives', 1); + * const width = GetValue(source, 'render.screen.width', 800); + * const height = GetValue(source, 'render.screen.height', 600); + * ``` + * + * In the code above, `lives` will be 3 because it's defined at the top level of `source`. + * The `width` value will be 1024 because it can be found inside the `render.screen` object. + * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. + * + * @function Phaser.Utils.Objects.GetValue + * @since 3.0.0 + * + * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. + * @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. + * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. + * + * @return {*} The value of the requested key. + */ +var GetValue = function (source, key, defaultValue, altSource) +{ + if ((!source && !altSource) || typeof source === 'number') + { + return defaultValue; + } + else if (source && source.hasOwnProperty(key)) + { + return source[key]; + } + else if (altSource && altSource.hasOwnProperty(key)) + { + return altSource[key]; + } + else if (key.indexOf('.') !== -1) + { + var keys = key.split('.'); + var parentA = source; + var parentB = altSource; + var valueA = defaultValue; + var valueB = defaultValue; + var valueAFound = true; + var valueBFound = true; + + // Use for loop here so we can break early + for (var i = 0; i < keys.length; i++) + { + if (parentA && parentA.hasOwnProperty(keys[i])) + { + // Yes parentA has a key property, let's carry on down + valueA = parentA[keys[i]]; + parentA = parentA[keys[i]]; + } + else + { + valueAFound = false; + } + + if (parentB && parentB.hasOwnProperty(keys[i])) + { + // Yes parentB has a key property, let's carry on down + valueB = parentB[keys[i]]; + parentB = parentB[keys[i]]; + } + else + { + valueBFound = false; + } + } + + if (valueAFound) + { + return valueA; + } + else if (valueBFound) + { + return valueB; + } + else + { + return defaultValue; + } + } + else + { + return defaultValue; + } +}; + +module.exports = GetValue; + + +/***/ }), + +/***/ "../../../src/utils/object/IsPlainObject.js": +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 (!obj || 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; + + +/***/ }), + +/***/ "../../../src/utils/string/Pad.js": +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/string/Pad.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {number} [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": +/*!**********************!*\ + !*** ./SpineFile.js ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 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 GetFastValue = __webpack_require__(/*! ../../../src/utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); +var ImageFile = __webpack_require__(/*! ../../../src/loader/filetypes/ImageFile.js */ "../../../src/loader/filetypes/ImageFile.js"); +var IsPlainObject = __webpack_require__(/*! ../../../src/utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); +var JSONFile = __webpack_require__(/*! ../../../src/loader/filetypes/JSONFile.js */ "../../../src/loader/filetypes/JSONFile.js"); +var MultiFile = __webpack_require__(/*! ../../../src/loader/MultiFile.js */ "../../../src/loader/MultiFile.js"); +var TextFile = __webpack_require__(/*! ../../../src/loader/filetypes/TextFile.js */ "../../../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|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. + */ + +/** + * @classdesc + * 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 + * @extends Phaser.Loader.MultiFile + * @memberof Phaser.Loader.FileTypes + * @constructor + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object. + * @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". + * @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". + * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not? + * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. + */ +var SpineFile = new Class({ + + Extends: MultiFile, + + initialize: + + function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) + { + var i; + var json; + var atlas; + var files = []; + var cache = loader.cacheManager.custom.spine; + + // atlas can be an array of atlas files, not just a single one + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + + json = new JSONFile(loader, { + key: key, + url: GetFastValue(config, 'jsonURL'), + extension: GetFastValue(config, 'jsonExtension', 'json'), + xhrSettings: GetFastValue(config, 'jsonXhrSettings') + }); + + atlasURL = GetFastValue(config, 'atlasURL'); + preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha'); + + if (!Array.isArray(atlasURL)) + { + atlasURL = [ atlasURL ]; + } + + for (i = 0; i < atlasURL.length; i++) + { + atlas = new TextFile(loader, { + key: key + '!' + i, + url: atlasURL[i], + extension: GetFastValue(config, 'atlasExtension', 'atlas'), + xhrSettings: GetFastValue(config, 'atlasXhrSettings') + }); + + atlas.cache = cache; + + files.push(atlas); + } + } + else + { + json = new JSONFile(loader, key, jsonURL, jsonXhrSettings); + + if (!Array.isArray(atlasURL)) + { + atlasURL = [ atlasURL ]; + } + + for (i = 0; i < atlasURL.length; i++) + { + atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings); + atlas.cache = cache; + + files.push(atlas); + } + } + + files.unshift(json); + + MultiFile.call(this, loader, 'spine', key, files); + + this.config.preMultipliedAlpha = preMultipliedAlpha; + }, + + /** + * Called by each File when it finishes loading. + * + * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete + * @since 3.19.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--; + + if (file.type === 'text') + { + // Inspect the data for the files to now load + var content = file.data.split('\n'); + + // Extract the textures + var textures = []; + + for (var t = 0; t < content.length; t++) + { + var line = content[t]; + + if (line.trim() === '' && t < content.length - 1) + { + line = content[t + 1]; + + textures.push(line); + } + } + + var config = this.config; + var loader = this.loader; + + var currentBaseURL = loader.baseURL; + var currentPath = loader.path; + var currentPrefix = loader.prefix; + + var baseURL = GetFastValue(config, 'baseURL', this.baseURL); + var path = GetFastValue(config, 'path', file.src.match(/^.*\//))[0]; + var prefix = GetFastValue(config, 'prefix', this.prefix); + var textureXhrSettings = GetFastValue(config, 'textureXhrSettings'); + + loader.setBaseURL(baseURL); + loader.setPath(path); + loader.setPrefix(prefix); + + for (var i = 0; i < textures.length; i++) + { + var textureURL = textures[i]; + + var key = textureURL; + + var image = new ImageFile(loader, key, textureURL, textureXhrSettings); + + if (!loader.keyExists(image)) + { + this.addToMultiFile(image); + + loader.addFile(image); + } + } + + // Reset the loader settings + loader.setBaseURL(currentBaseURL); + loader.setPath(currentPath); + loader.setPrefix(currentPrefix); + } + } + }, + + /** + * Adds this file to its target cache upon successful loading and processing. + * + * @method Phaser.Loader.FileTypes.SpineFile#addToCache + * @since 3.19.0 + */ + addToCache: function () + { + if (this.isReadyToProcess()) + { + var fileJSON = this.files[0]; + + fileJSON.addToCache(); + + var atlasCache; + 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++) + { + var file = this.files[i]; + + if (file.type === 'text') + { + atlasKey = file.key.replace(/![\d]$/, ''); + + atlasCache = file.cache; + + combinedAtlasData = combinedAtlasData.concat(file.data); + } + else + { + var src = file.key.trim(); + var pos = src.indexOf('!'); + var key = src.substr(pos + 1); + + if (!textureManager.exists(key)) + { + textureManager.addImage(key, file.data); + } + } + + file.pendingDestroy(); + } + + atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix }); + + this.complete = true; + } + } + +}); + +module.exports = SpineFile; + + +/***/ }), + +/***/ "./SpinePlugin.js": +/*!************************!*\ + !*** ./SpinePlugin.js ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BuildGameObject = __webpack_require__(/*! ../../../src/gameobjects/BuildGameObject */ "../../../src/gameobjects/BuildGameObject.js"); +var Class = __webpack_require__(/*! ../../../src/utils/Class */ "../../../src/utils/Class.js"); +var GetValue = __webpack_require__(/*! ../../../src/utils/object/GetValue */ "../../../src/utils/object/GetValue.js"); +var ResizeEvent = __webpack_require__(/*! ../../../src/scale/events/RESIZE_EVENT */ "../../../src/scale/events/RESIZE_EVENT.js"); +var ScenePlugin = __webpack_require__(/*! ../../../src/plugins/ScenePlugin */ "../../../src/plugins/ScenePlugin.js"); +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 + * 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.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: [ + * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } + * ] + * } + * ``` + * + * 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, + * create: create, + * pack: { + * files: [ + * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' } + * ] + * } + * } + * ``` + * + * 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. + * + * ## A note about inlined data: + * + * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader + * at all. Instead, call the functions directly as required: + * + * scene.cache.json.add + * scene.cache.custom.spine.add + * scene.textures.addBase64 + * + * ## Using the plugin + * + * 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 two Game Object Factory methods, allowing you to create Spine Game Objects + * and Spine Containers: + * + * ```javascript + * 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 + * 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 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. + * + * 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 + * @extends Phaser.Plugins.ScenePlugin + * @constructor + * @since 3.19.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. + * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + */ +var SpinePlugin = new Class({ + + Extends: ScenePlugin, + + initialize: + + function SpinePlugin (scene, pluginManager, pluginKey) + { + ScenePlugin.call(this, scene, pluginManager, pluginKey); + + var game = pluginManager.game; + + /** + * A read-only flag that indicates if the game is running under WebGL or Canvas. + * + * @name SpinePlugin#isWebGL + * @type {boolean} + * @readonly + * @since 3.19.0 + */ + this.isWebGL = (game.config.renderType === 2); + + /** + * 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. + * + * @name SpinePlugin#cache + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.cache = game.cache.addCustom('spine'); + + /** + * 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. + * + * @name SpinePlugin#spineTextures + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.spineTextures = game.cache.addCustom('spineTextures'); + + /** + * A reference to the global JSON Cache. + * + * @name SpinePlugin#json + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.json = game.cache.json; + + /** + * A reference to the global Texture Manager. + * + * @name SpinePlugin#textures + * @type {Phaser.Textures.TextureManager} + * @since 3.19.0 + */ + this.textures = game.textures; + + /** + * A flag that sets if the Skeleton Renderers will render debug information over the top + * of the skeleton or not. + * + * @name SpinePlugin#drawDebug + * @type {boolean} + * @since 3.19.0 + */ + this.drawDebug = false; + + /** + * The underlying WebGL context of the Phaser renderer. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#gl + * @type {WebGLRenderingContext} + * @since 3.19.0 + */ + this.gl; + + /** + * A reference to either the Canvas or WebGL Renderer that this Game is using. + * + * @name SpinePlugin#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.19.0 + */ + this.renderer; + + /** + * An instance of the Spine WebGL Scene Renderer. + * + * There is only one instance of the Scene Renderer shared across the whole plugin. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#sceneRenderer + * @type {spine.webgl.SceneRenderer} + * @since 3.19.0 + */ + this.sceneRenderer; + + /** + * An instance of the Spine Skeleton Renderer. + * + * @name SpinePlugin#skeletonRenderer + * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)} + * @since 3.19.0 + */ + this.skeletonRenderer; + + /** + * An instance of the Spine Skeleton Debug Renderer. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#skeletonDebugRenderer + * @type {spine.webgl.skeletonDebugRenderer} + * @since 3.19.0 + */ + this.skeletonDebugRenderer; + + /** + * A reference to the Spine runtime. + * This is the runtime created by Esoteric Software. + * + * @name SpinePlugin#plugin + * @type {spine} + * @since 3.19.0 + */ + this.plugin = Spine; + + /** + * An internal vector3 used by the screen to world method. + * + * @name SpinePlugin#temp1 + * @private + * @type {spine.webgl.Vector3} + * @since 3.19.0 + */ + this.temp1; + + /** + * An internal vector3 used by the screen to world method. + * + * @name SpinePlugin#temp2 + * @private + * @type {spine.webgl.Vector3} + * @since 3.19.0 + */ + this.temp2; + + if (this.isWebGL) + { + this.runtime = Spine.webgl; + + this.renderer = game.renderer; + this.gl = game.renderer.gl; + + this.getAtlas = this.getAtlasWebGL; + } + else + { + this.runtime = Spine.canvas; + + this.renderer = game.renderer; + + 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 add = function (x, y, key, animationName, loop) + { + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 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(); + }; + + var addContainer = function (x, y, children) + { + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; + var container = new SpineContainer(this.scene, spinePlugin, 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); + }, + + /** + * Internal boot handler. + * + * @method SpinePlugin#boot + * @private + * @since 3.19.0 + */ + boot: function () + { + if (this.isWebGL) + { + this.bootWebGL(); + this.onResize(); + this.game.scale.on(ResizeEvent, this.onResize, this); + } + else + { + this.bootCanvas(); + } + + var eventEmitter = this.systems.events; + + eventEmitter.once('shutdown', this.shutdown, this); + eventEmitter.once('destroy', this.destroy, this); + + this.game.events.once('destroy', this.gameDestroy, this); + }, + + /** + * Internal boot handler for the Canvas Renderer. + * + * @method SpinePlugin#bootCanvas + * @private + * @since 3.19.0 + */ + bootCanvas: function () + { + this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context); + }, + + /** + * Internal boot handler for the WebGL Renderer. + * + * @method SpinePlugin#bootWebGL + * @private + * @since 3.19.0 + */ + bootWebGL: function () + { + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! + + var setBlendMode = function (srcBlend, dstBlend) + { + if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend) + { + var gl = this.context.gl; + + this.srcBlend = srcBlend; + this.dstBlend = dstBlend; + + if (this.isDrawing) + { + this.flush(); + gl.blendFunc(this.srcBlend, this.dstBlend); + } + } + }; + + var sceneRenderer = this.renderer.spineSceneRenderer; + + if (!sceneRenderer) + { + sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); + sceneRenderer.batcher.setBlendMode = setBlendMode; + sceneRenderer.shapes.setBlendMode = setBlendMode; + + this.renderer.spineSceneRenderer = sceneRenderer; + } + + // All scene share the same instance + this.sceneRenderer = sceneRenderer; + this.skeletonRenderer = sceneRenderer.skeletonRenderer; + this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; + + this.temp1 = new Spine.webgl.Vector3(0, 0, 0); + this.temp2 = new Spine.webgl.Vector3(0, 0, 0); + }, + + /** + * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, + * then returns it. You do not normally need to invoke this method directly. + * + * @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) + { + var atlasEntry = this.cache.get(key); + + if (!atlasEntry) + { + console.warn('No atlas data for: ' + key); + return; + } + + var atlas; + var spineTextures = this.spineTextures; + + if (spineTextures.has(key)) + { + atlas = spineTextures.get(key); + } + else + { + var textures = this.textures; + + atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) + { + return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); + }); + } + + return atlas; + }, + + /** + * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, + * then returns it. You do not normally need to invoke this method directly. + * + * @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) + { + var atlasEntry = this.cache.get(key); + + if (!atlasEntry) + { + console.warn('No atlas data for: ' + key); + return; + } + + var atlas; + var spineTextures = this.spineTextures; + + if (spineTextures.has(key)) + { + atlas = spineTextures.get(key); + } + else + { + var textures = this.textures; + + var gl = this.sceneRenderer.context.gl; + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); + + atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) + { + return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); + }); + } + + return atlas; + }, + + /** + * 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 () + * { + * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true); + * } + * ``` + * + * 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. + * + * 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 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', + * jsonURL: 'boy.json', + * atlasURL: 'boy.atlas', + * preMultipliedAlpha: true + * }); + * ``` + * + * If you need to load multiple Spine atlas files, provide them as an array: + * + * ```javascript + * function preload () + * { + * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true); + * } + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details. + * + * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the data from the Spine plugin. + * + * 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 "alien" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * 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#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} [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. + * @param {object} [settings] - An external Settings configuration object { prefix: '' } + * + * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + */ + spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings) + { + var multifile; + settings = settings || {}; + + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + multifile = new SpineFile(this, key[i]); + + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + + this.addFile(multifile.files); + } + } + else + { + multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); + + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + + 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) + { + var temp1 = this.temp1; + var temp2 = this.temp2; + var camera = this.sceneRenderer.camera; + + temp1.set(x + skeleton.x, y - skeleton.y, 0); + + var width = camera.viewportWidth; + var height = camera.viewportHeight; + + camera.screenToWorld(temp1, width, height); + + if (bone && bone.parent !== null) + { + bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0)); + + return new Spine.Vector2(temp2.x, temp2.y); + } + else if (bone) + { + return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y); + } + else + { + return new Spine.Vector2(temp1.x, temp1.y); + } + }, + + /** + * Returns a Spine Vector2 based on the given x and y values. + * + * @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) + { + return new Spine.Vector2(x, y); + }, + + /** + * 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) + { + return new Spine.webgl.Vector3(x, y, z); + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawBones = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawRegionAttachments = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawBoundingBoxes = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawMeshHull = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawMeshTriangles = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawPaths = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawSkeletonXY = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawClipping = value; + + return this; + }, + + /** + * 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) + { + this.sceneRenderer.skeletonRenderer.vertexEffect = effect; + + return this; + }, + + /** + * 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) + { + var atlasKey = key; + var jsonKey = key; + var split = (key.indexOf('.') !== -1); + + if (split) + { + var parts = key.split('.'); + + atlasKey = parts.shift(); + jsonKey = parts.join('.'); + } + + var atlasData = this.cache.get(atlasKey); + var atlas = this.getAtlas(atlasKey); + + if (!atlas) + { + return null; + } + + if (!this.spineTextures.has(atlasKey)) + { + this.spineTextures.add(atlasKey, atlas); + } + + var preMultipliedAlpha = atlasData.preMultipliedAlpha; + + var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); + + var skeletonJson = new Spine.SkeletonJson(atlasLoader); + + var data; + + if (skeletonJSON) + { + data = skeletonJSON; + } + else + { + var json = this.json.get(atlasKey); + + data = (split) ? GetValue(json, jsonKey) : json; + } + + if (data) + { + var skeletonData = skeletonJson.readSkeletonData(data); + + var skeleton = new Spine.Skeleton(skeletonData); + + return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; + } + else + { + return null; + } + }, + + /** + * 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) + { + var stateData = new Spine.AnimationStateData(skeleton.data); + + var state = new Spine.AnimationState(stateData); + + return { stateData: stateData, state: state }; + }, + + /** + * 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) + { + var offset = new Spine.Vector2(); + var size = new Spine.Vector2(); + + skeleton.getBounds(offset, size, []); + + return { offset: offset, size: size }; + }, + + /** + * Internal handler for when the renderer resizes. + * + * Only called if running in WebGL. + * + * @method SpinePlugin#onResize + * @since 3.19.0 + */ + onResize: function () + { + var renderer = this.renderer; + var sceneRenderer = this.sceneRenderer; + + var viewportWidth = renderer.width; + var viewportHeight = renderer.height; + + sceneRenderer.camera.position.x = viewportWidth / 2; + sceneRenderer.camera.position.y = viewportHeight / 2; + + sceneRenderer.camera.setViewport(viewportWidth, 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 + * @private + * @since 3.19.0 + */ + shutdown: function () + { + 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 + * @private + * @since 3.19.0 + */ + destroy: function () + { + this.shutdown(); + + this.game = null; + this.scene = null; + this.systems = null; + + this.cache = null; + this.spineTextures = null; + this.json = null; + this.textures = 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.pluginManager.removeGameObject('spine', true, true); + this.pluginManager.removeGameObject('spineContainer', true, true); + + this.pluginManager = null; + + var sceneRenderer = this.renderer.spineSceneRenderer; + + if (sceneRenderer) + { + sceneRenderer.dispose(); + } + + this.renderer.spineSceneRenderer = null; + this.sceneRenderer = null; + } + +}); + +SpinePlugin.SpineGameObject = SpineGameObject; +SpinePlugin.SpineContainer = SpineContainer; + +/** + * 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. + * @param {string} [animationName] - The name of the animation to set on this Skeleton. + * @param {boolean} [loop=false] - Should the animation playback be looped or not? + * + * @return {SpineGameObject} The Game Object that was created. + */ + +/** + * 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', + * scale: 1.5, + * skinName: 'square_Green', + * animationName: 'jelly-idle', loop: true, + * slotName: 'hat', attachmentName: 'images/La_14' + * }); + * ``` + * + * @method SpinePlugin#make + * @since 3.19.0 + * + * @param {any} config - The configuration object this Game Object will use to create itself. + * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + * + * @return {SpineGameObject} The Game Object that was created. + */ + +module.exports = SpinePlugin; + + +/***/ }), + +/***/ "./container/SpineContainer.js": +/*!*************************************!*\ + !*** ./container/SpineContainer.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 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 must only add ever Spine Game Objects, or other Spine Containers, 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: + * + * ```javascript + * this.add.spineContainer(); + * ``` + * + * or + * + * ```javascript + * this.make.spineContainer(); + * ``` + * + * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the + * container children. You can, however, mask children of Spine Containers if they are embedded within other + * Spine Containers. In short, if you need masking, don't mix and match the types. + * + * See the Container documentation for further details about what Containers can do. + * + * @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 SpineContainer#plugin + * @type {SpinePlugin} + * @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; + } + +}); + +module.exports = SpineContainer; + + +/***/ }), + +/***/ "./container/SpineContainerCanvasRenderer.js": +/*!***************************************************!*\ + !*** ./container/SpineContainerCanvasRenderer.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 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 {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, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + camera.addToRenderList(container); + + 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, 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 2022 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) { + +/** + * @author Richard Davey + * @copyright 2022 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 SpineContainerWebGLRenderer#renderWebGL + * @since 3.50.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineContainer} container - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var SpineContainerWebGLRenderer = function (renderer, container, 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(); + + renderer.pipelines.rebind(); + } + + return; + } + + camera.addToRenderList(container); + + 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); + } + + if (renderer.newType) + { + // flush + clear if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + var rendererNextType = renderer.nextTypeMatch; + + // Force these to avoid batch flushing during SpineGameObject.renderWebGL + renderer.nextTypeMatch = true; + renderer.newType = false; + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (child.willRender(camera, container)) + { + var mask = child.mask; + + if (mask) + { + sceneRenderer.end(); + + renderer.pipelines.rebind(); + + mask.preRenderWebGL(renderer, child, camera); + + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + child.renderWebGL(renderer, child, camera, transformMatrix, container); + + if (mask) + { + sceneRenderer.end(); + + renderer.pipelines.rebind(); + + mask.postRenderWebGL(renderer, camera); + + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + } + } + + renderer.nextTypeMatch = rendererNextType; + + if (!rendererNextType) + { + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch + sceneRenderer.end(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); + } +}; + +module.exports = SpineContainerWebGLRenderer; + + +/***/ }), + +/***/ "./events/COMPLETE_EVENT.js": +/*!**********************************!*\ + !*** ./events/COMPLETE_EVENT.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Complete Event. + * + * @event SpinePluginEvents#COMPLETE + * @since 3.19.0 + */ +module.exports = 'complete'; + + +/***/ }), + +/***/ "./events/DISPOSE_EVENT.js": +/*!*********************************!*\ + !*** ./events/DISPOSE_EVENT.js ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Dispose Event. + * + * @event SpinePluginEvents#DISPOSE + * @since 3.19.0 + */ +module.exports = 'dispose'; + + +/***/ }), + +/***/ "./events/END_EVENT.js": +/*!*****************************!*\ + !*** ./events/END_EVENT.js ***! + \*****************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The End Event. + * + * @event SpinePluginEvents#END + * @since 3.19.0 + */ +module.exports = 'end'; + + +/***/ }), + +/***/ "./events/EVENT_EVENT.js": +/*!*******************************!*\ + !*** ./events/EVENT_EVENT.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Custom Event Event. + * + * @event SpinePluginEvents#EVENT + * @since 3.19.0 + */ +module.exports = 'event'; + + +/***/ }), + +/***/ "./events/INTERRUPTED_EVENT.js": +/*!*************************************!*\ + !*** ./events/INTERRUPTED_EVENT.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Interrupted Event. + * + * @event SpinePluginEvents#INTERRUPTED + * @since 3.19.0 + */ +module.exports = 'interrupted'; + + +/***/ }), + +/***/ "./events/START_EVENT.js": +/*!*******************************!*\ + !*** ./events/START_EVENT.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Start Event. + * + * @event SpinePluginEvents#START + * @since 3.19.0 + */ +module.exports = 'start'; + + +/***/ }), + +/***/ "./events/index.js": +/*!*************************!*\ + !*** ./events/index.js ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace SpinePluginEvents + */ + +module.exports = { + + COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "./events/COMPLETE_EVENT.js"), + DISPOSE: __webpack_require__(/*! ./DISPOSE_EVENT */ "./events/DISPOSE_EVENT.js"), + END: __webpack_require__(/*! ./END_EVENT */ "./events/END_EVENT.js"), + EVENT: __webpack_require__(/*! ./EVENT_EVENT */ "./events/EVENT_EVENT.js"), + INTERRUPTED: __webpack_require__(/*! ./INTERRUPTED_EVENT */ "./events/INTERRUPTED_EVENT.js"), + START: __webpack_require__(/*! ./START_EVENT */ "./events/START_EVENT.js") + +}; + + +/***/ }), + +/***/ "./gameobject/SpineGameObject.js": +/*!***************************************!*\ + !*** ./gameobject/SpineGameObject.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var AngleBetween = __webpack_require__(/*! ../../../../src/math/angle/Between */ "../../../src/math/angle/Between.js"); +var Clamp = __webpack_require__(/*! ../../../../src/math/Clamp */ "../../../src/math/Clamp.js"); +var Class = __webpack_require__(/*! ../../../../src/utils/Class */ "../../../src/utils/Class.js"); +var ComponentsComputedSize = __webpack_require__(/*! ../../../../src/gameobjects/components/ComputedSize */ "../../../src/gameobjects/components/ComputedSize.js"); +var ComponentsDepth = __webpack_require__(/*! ../../../../src/gameobjects/components/Depth */ "../../../src/gameobjects/components/Depth.js"); +var ComponentsFlip = __webpack_require__(/*! ../../../../src/gameobjects/components/Flip */ "../../../src/gameobjects/components/Flip.js"); +var ComponentsScrollFactor = __webpack_require__(/*! ../../../../src/gameobjects/components/ScrollFactor */ "../../../src/gameobjects/components/ScrollFactor.js"); +var ComponentsTransform = __webpack_require__(/*! ../../../../src/gameobjects/components/Transform */ "../../../src/gameobjects/components/Transform.js"); +var ComponentsVisible = __webpack_require__(/*! ../../../../src/gameobjects/components/Visible */ "../../../src/gameobjects/components/Visible.js"); +var CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.js"); +var DegToRad = __webpack_require__(/*! ../../../../src/math/DegToRad */ "../../../src/math/DegToRad.js"); +var GameObject = __webpack_require__(/*! ../../../../src/gameobjects/GameObject */ "../../../src/gameobjects/GameObject.js"); +var RadToDeg = __webpack_require__(/*! ../../../../src/math/RadToDeg */ "../../../src/math/RadToDeg.js"); +var SpineEvents = __webpack_require__(/*! ../events/ */ "./events/index.js"); +var SpineGameObjectRender = __webpack_require__(/*! ./SpineGameObjectRender */ "./gameobject/SpineGameObjectRender.js"); + +/** + * @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', + * scale: 1.5, + * skinName: 'square_Green', + * animationName: 'jelly-think', loop: true, + * 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. Ensure that your setup + * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable + * to get an accurate bounds. You can 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. + * + * @class SpineGameObject + * @extends Phaser.GameObjects.GameObject + * @constructor + * @since 3.19.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 {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin. + * @param {string} [animationName] - The name of the animation to set on this Skeleton. + * @param {boolean} [loop=false] - Should the animation playback be looped or not? + */ +var SpineGameObject = new Class({ + + Extends: GameObject, + + Mixins: [ + ComponentsComputedSize, + ComponentsDepth, + ComponentsFlip, + ComponentsScrollFactor, + ComponentsTransform, + ComponentsVisible, + SpineGameObjectRender + ], + + initialize: + + function SpineGameObject (scene, plugin, x, y, key, animationName, loop) + { + GameObject.call(this, scene, 'Spine'); + + /** + * A reference to the Spine Plugin. + * + * @name SpineGameObject#plugin + * @type {SpinePlugin} + * @since 3.19.0 + */ + this.plugin = plugin; + + /** + * The Spine Skeleton this Game Object is using. + * + * @name SpineGameObject#skeleton + * @type {spine.Skeleton} + * @since 3.19.0 + */ + this.skeleton = null; + + /** + * The Spine Skeleton Data associated with the Skeleton this Game Object is using. + * + * @name SpineGameObject#skeletonData + * @type {spine.SkeletonData} + * @since 3.19.0 + */ + this.skeletonData = null; + + /** + * The Spine Animation State this Game Object is using. + * + * @name SpineGameObject#state + * @type {spine.AnimationState} + * @since 3.19.0 + */ + this.state = null; + + /** + * The Spine Animation State Data associated with the Animation State this Game Object is using. + * + * @name SpineGameObject#stateData + * @type {spine.AnimationStateData} + * @since 3.19.0 + */ + this.stateData = null; + + /** + * A reference to the root bone of the Skeleton. + * + * @name SpineGameObject#root + * @type {spine.Bone} + * @since 3.19.0 + */ + this.root = null; + + /** + * This object holds the calculated bounds of the current + * pose, as set when a new Skeleton is applied. + * + * @name SpineGameObject#bounds + * @type {any} + * @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. + * + * @name SpineGameObject#drawDebug + * @type {boolean} + * @since 3.19.0 + */ + this.drawDebug = false; + + /** + * The factor to scale the Animation update time by. + * + * @name SpineGameObject#timeScale + * @type {number} + * @since 3.19.0 + */ + this.timeScale = 1; + + /** + * The calculated Display Origin of this Game Object. + * + * @name SpineGameObject#displayOriginX + * @type {number} + * @since 3.19.0 + */ + this.displayOriginX = 0; + + /** + * The calculated Display Origin of this Game Object. + * + * @name SpineGameObject#displayOriginY + * @type {number} + * @since 3.19.0 + */ + this.displayOriginY = 0; + + /** + * A flag that stores if the texture associated with the current + * Skin being used by this Game Object, has its alpha pre-multiplied + * into it, or not. + * + * @name SpineGameObject#preMultipliedAlpha + * @type {boolean} + * @since 3.19.0 + */ + this.preMultipliedAlpha = false; + + /** + * A default Blend Mode. You cannot change the blend mode of a + * Spine Game Object. + * + * @name SpineGameObject#blendMode + * @type {number} + * @readonly + * @since 3.19.0 + */ + this.blendMode = -1; + + this.setPosition(x, y); + + if (key) + { + this.setSkeleton(key, animationName, loop); + } + }, + + /** + * Returns `true` if this Spine Game Object both has a skeleton and + * also passes the render tests for the given Camera. + * + * @method SpineGameObject#willRender + * @since 3.19.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. + * + * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`. + */ + willRender: function (camera, container) + { + var GameObjectRenderMask = 15; + + var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)))); + + if (!container && !result && this.parentContainer) + { + var plugin = this.plugin; + var sceneRenderer = plugin.sceneRenderer; + + if (plugin.gl && sceneRenderer.batcher.isDrawing) + { + sceneRenderer.end(); + + plugin.renderer.pipelines.rebind(); + } + } + + return result; + }, + + /** + * 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 + * @since 3.19.0 + * + * @param {number} [value=1] - The alpha value used for the whole Skeleton. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (value, slotName) + { + if (value === undefined) { value = 1; } + + if (slotName) + { + var slot = this.findSlot(slotName); + + if (slot) + { + slot.color.a = Clamp(value, 0, 1); + } + } + else + { + this.alpha = value; + } + + return this; + }, + + /** + * 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. + * + * @name SpineGameObject#alpha + * @type {number} + * @since 3.19.0 + */ + alpha: { + + get: function () + { + return this.skeleton.color.a; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + if (this.skeleton) + { + this.skeleton.color.a = v; + } + + if (v === 0) + { + this.renderFlags &= ~2; + } + else + { + this.renderFlags |= 2; + } + } + + }, + + /** + * 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. + * + * @name SpineGameObject#red + * @type {number} + * @since 3.19.0 + */ + red: { + + get: function () + { + return this.skeleton.color.r; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + if (this.skeleton) + { + this.skeleton.color.r = v; + } + } + + }, + + /** + * 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. + * + * @name SpineGameObject#green + * @type {number} + * @since 3.19.0 + */ + green: { + + get: function () + { + return this.skeleton.color.g; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + if (this.skeleton) + { + this.skeleton.color.g = v; + } + } + + }, + + /** + * 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. + * + * @name SpineGameObject#blue + * @type {number} + * @since 3.19.0 + */ + blue: { + + get: function () + { + return this.skeleton.color.b; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + if (this.skeleton) + { + this.skeleton.color.b = v; + } + } + + }, + + /** + * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton. + * + * @method SpineGameObject#setColor + * @since 3.19.0 + * + * @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) + { + if (color === undefined) { color = 0xffffff; } + + var red = (color >> 16 & 0xFF) / 255; + var green = (color >> 8 & 0xFF) / 255; + var blue = (color & 0xFF) / 255; + var alpha = (color > 16777215) ? (color >>> 24) / 255 : null; + + var target = this.skeleton; + + if (slotName) + { + var slot = this.findSlot(slotName); + + if (slot) + { + target = slot; + } + } + + target.color.r = red; + target.color.g = green; + target.color.b = blue; + + if (alpha !== null) + { + target.color.a = alpha; + } + + return this; + }, + + /** + * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object + * that contains the Skeleton data. + * + * @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. + * @param {boolean} [loop=false] - Should the animation, if set, loop or not? + * + * @return {this} This Game Object. + */ + setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop) + { + return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop); + }, + + /** + * 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 {string} [animationName] - Optional name of the animation to set on the Skeleton. + * @param {boolean} [loop=false] - Should the animation, if set, loop or not? + * @param {object} [skeletonJSON] - The JSON data for the Skeleton. + * + * @return {this} This Game Object. + */ + setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON) + { + if (this.state) + { + this.state.clearListeners(); + this.state.clearListenerNotifications(); + } + + var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON); + + this.skeletonData = data.skeletonData; + + this.preMultipliedAlpha = data.preMultipliedAlpha; + + var skeleton = data.skeleton; + + skeleton.setSkin(); + skeleton.setToSetupPose(); + + this.skeleton = skeleton; + + // AnimationState + data = this.plugin.createAnimationState(skeleton); + + if (this.state) + { + this.state.clearListeners(); + this.state.clearListenerNotifications(); + } + + this.state = data.state; + this.stateData = data.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) + }); + + if (animationName) + { + this.setAnimation(0, animationName, loop); + } + + this.root = this.getRootBone(); + + if (this.root) + { + // +90 degrees to account for the difference in Spine vs. Phaser rotation + this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90; + } + + this.state.apply(skeleton); + + skeleton.updateCache(); + + return this.updateSize(); + }, + + /** + * Internal event handler that emits the Spine onComplete event via this Game Object. + * + * @method SpineGameObject#onComplete + * @fires SpinePluginEvents#COMPLETE + * @private + * @since 3.19.0 + * + * @param {any} entry - The event data from Spine. + */ + onComplete: function (entry) + { + this.emit(SpineEvents.COMPLETE, entry); + }, + + /** + * Internal event handler that emits the Spine onDispose event via this Game Object. + * + * @method SpineGameObject#onDispose + * @fires SpinePluginEvents#DISPOSE + * @private + * @since 3.19.0 + * + * @param {any} entry - The event data from Spine. + */ + onDispose: function (entry) + { + this.emit(SpineEvents.DISPOSE, entry); + }, + + /** + * Internal event handler that emits the Spine onEnd event via this Game Object. + * + * @method SpineGameObject#onEnd + * @fires SpinePluginEvents#END + * @private + * @since 3.19.0 + * + * @param {any} entry - The event data from Spine. + */ + onEnd: function (entry) + { + this.emit(SpineEvents.END, entry); + }, + + /** + * Internal event handler that emits the Spine Event event via this Game Object. + * + * @method SpineGameObject#onEvent + * @fires SpinePluginEvents#EVENT + * @private + * @since 3.19.0 + * + * @param {any} entry - The event data from Spine. + * @param {spine.Event} event - The Spine event. + */ + onEvent: function (entry, event) + { + this.emit(SpineEvents.EVENT, entry, event); + }, + + /** + * Internal event handler that emits the Spine onInterrupted event via this Game Object. + * + * @method SpineGameObject#onInterrupted + * @fires SpinePluginEvents#INTERRUPTED + * @private + * @since 3.19.0 + * + * @param {any} entry - The event data from Spine. + */ + onInterrupted: function (entry) + { + this.emit(SpineEvents.INTERRUPTED, entry); + }, + + /** + * Internal event handler that emits the Spine onStart event via this Game Object. + * + * @method SpineGameObject#onStart + * @fires SpinePluginEvents#START + * @private + * @since 3.19.0 + * + * @param {any} entry - The event data from Spine. + */ + onStart: function (entry) + { + this.emit(SpineEvents.START, entry); + }, + + /** + * 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 () + { + if (this.root) + { + // +90 degrees to account for the difference in Spine vs. Phaser rotation + this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90; + } + + this.updateSize(); + + this.skeleton.updateCache(); + + return this; + }, + + /** + * 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) + { + var skeleton = this.skeleton; + + if (width === undefined) { width = skeleton.data.width; } + if (height === undefined) { height = skeleton.data.height; } + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + this.width = width; + this.height = height; + + this.displayOriginX = skeleton.x - offsetX; + this.displayOriginY = skeleton.y - offsetY; + + return this; + }, + + /** + * 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) + { + var skeleton = this.skeleton; + + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = 0; } + + this.displayOriginX = skeleton.x - offsetX; + this.displayOriginY = skeleton.y - offsetY; + + return this; + }, + + /** + * 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 () + { + var skeleton = this.skeleton; + var renderer = this.plugin.renderer; + + var height = renderer.height; + + var oldScaleX = this.scaleX; + var oldScaleY = this.scaleY; + + skeleton.x = this.x; + skeleton.y = height - this.y; + skeleton.scaleX = 1; + skeleton.scaleY = 1; + + skeleton.updateWorldTransform(); + + var bounds = this.getBounds(); + + this.width = bounds.size.x; + this.height = bounds.size.y; + + this.displayOriginX = this.x - bounds.offset.x; + this.displayOriginY = this.y - (height - (this.height + bounds.offset.y)); + + skeleton.scaleX = oldScaleX; + skeleton.scaleY = oldScaleY; + + skeleton.updateWorldTransform(); + + return this; + }, + + /** + * The horizontal scale of this Game Object, as applied to the Skeleton it is using. + * + * @name SpineGameObject#scaleX + * @type {number} + * @default 1 + * @since 3.19.0 + */ + scaleX: { + + get: function () + { + return this._scaleX; + }, + + set: function (value) + { + this._scaleX = value; + + this.refresh(); + } + + }, + + /** + * The vertical scale of this Game Object, as applied to the Skeleton it is using. + * + * @name SpineGameObject#scaleY + * @type {number} + * @default 1 + * @since 3.19.0 + */ + scaleY: { + + get: function () + { + return this._scaleY; + }, + + set: function (value) + { + this._scaleY = value; + + this.refresh(); + } + + }, + + /** + * Returns an array containing the names of all the bones in the Skeleton Data. + * + * @method SpineGameObject#getBoneList + * @since 3.19.0 + * + * @return {string[]} An array containing the names of all the bones in the Skeleton Data. + */ + getBoneList: function () + { + var output = []; + + var skeletonData = this.skeletonData; + + if (skeletonData) + { + for (var i = 0; i < skeletonData.bones.length; i++) + { + output.push(skeletonData.bones[i].name); + } + } + + return output; + }, + + /** + * Returns an array containing the names of all the skins in the Skeleton Data. + * + * @method SpineGameObject#getSkinList + * @since 3.19.0 + * + * @return {string[]} An array containing the names of all the skins in the Skeleton Data. + */ + getSkinList: function () + { + var output = []; + + var skeletonData = this.skeletonData; + + if (skeletonData) + { + for (var i = 0; i < skeletonData.skins.length; i++) + { + output.push(skeletonData.skins[i].name); + } + } + + return output; + }, + + /** + * Returns an array containing the names of all the slots in the Skeleton. + * + * @method SpineGameObject#getSlotList + * @since 3.19.0 + * + * @return {string[]} An array containing the names of all the slots in the Skeleton. + */ + getSlotList: function () + { + var output = []; + + var skeleton = this.skeleton; + + for (var i = 0; i < skeleton.slots.length; i++) + { + output.push(skeleton.slots[i].data.name); + } + + return output; + }, + + /** + * Returns an array containing the names of all the animations in the Skeleton Data. + * + * @method SpineGameObject#getAnimationList + * @since 3.19.0 + * + * @return {string[]} An array containing the names of all the animations in the Skeleton Data. + */ + getAnimationList: function () + { + var output = []; + + var skeletonData = this.skeletonData; + + if (skeletonData) + { + for (var i = 0; i < skeletonData.animations.length; i++) + { + output.push(skeletonData.animations[i].name); + } + } + + return output; + }, + + /** + * Returns the current animation being played on the given track, if any. + * + * @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) + { + if (trackIndex === undefined) { trackIndex = 0; } + + var current = this.state.getCurrent(trackIndex); + + if (current) + { + return current.animation; + } + }, + + /** + * 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 + * @fires SpinePluginEvents#START + * @since 3.19.0 + * + * @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. + * + * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead. + */ + play: function (animationName, loop, ignoreIfPlaying) + { + this.setAnimation(0, animationName, loop, ignoreIfPlaying); + + return this; + }, + + /** + * 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 + * @fires SpinePluginEvents#START + * @since 3.19.0 + * + * @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 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. + */ + setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying) + { + if (loop === undefined) { loop = false; } + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + if (ignoreIfPlaying && this.state) + { + var currentTrack = this.state.getCurrent(trackIndex); + + if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) + { + return; + } + } + + if (this.findAnimation(animationName)) + { + return this.state.setAnimation(trackIndex, animationName, loop); + } + }, + + /** + * 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). + * If the previous entry is looping, its next loop completion is used instead of its duration. + * + * @method SpineGameObject#addAnimation + * @since 3.19.0 + * + * @param {integer} trackIndex - The track index to add the animation to. + * @param {string} animationName - The string-based key of the animation to add. + * @param {boolean} [loop=false] - Should the animation be looped when played? + * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played. + * + * @return {spine.TrackEntry} A track entry to allow further customization of animation playback. + */ + addAnimation: function (trackIndex, animationName, loop, delay) + { + if (loop === undefined) { loop = false; } + if (delay === undefined) { delay = 0; } + + return this.state.addAnimation(trackIndex, animationName, loop, delay); + }, + + /** + * 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 + * transition from the value from lower tracks or from the setup pose value if no lower tracks key the + * property to the value keyed in the new animation. + * + * @method SpineGameObject#setEmptyAnimation + * @since 3.19.0 + * + * @param {integer} trackIndex - The track index to add the animation to. + * @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). + * + * @return {spine.TrackEntry} The returned Track Entry. + */ + setEmptyAnimation: function (trackIndex, mixDuration) + { + return this.state.setEmptyAnimation(trackIndex, mixDuration); + }, + + /** + * 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. + * + * @method SpineGameObject#clearTrack + * @since 3.19.0 + * + * @param {integer} trackIndex - The track index to add the animation to. + * + * @return {this} This Game Object. + */ + clearTrack: function (trackIndex) + { + this.state.clearTrack(trackIndex); + + 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. + * + * @method SpineGameObject#clearTracks + * @since 3.19.0 + * + * @return {this} This Game Object. + */ + clearTracks: function () + { + this.state.clearTracks(); + + return this; + }, + + /** + * 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 + * or show attachments from the new skin. + * + * @method SpineGameObject#setSkinByName + * @since 3.19.0 + * + * @param {string} skinName - The name of the skin to set. + * + * @return {this} This Game Object. + */ + setSkinByName: function (skinName) + { + var skeleton = this.skeleton; + + skeleton.setSkinByName(skinName); + + skeleton.setSlotsToSetupPose(); + + this.state.apply(skeleton); + + return this; + }, + + /** + * 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 + * or show attachments from the new skin. + * + * @method SpineGameObject#setSkin + * @since 3.19.0 + * + * @param {?spine.Skin} newSkin - The Skin to set. May be `null`. + * + * @return {this} This Game Object. + */ + setSkin: function (newSkin) + { + var skeleton = this.skeleton; + + skeleton.setSkin(newSkin); + + skeleton.setSlotsToSetupPose(); + + this.state.apply(skeleton); + + return this; + }, + + /** + * Sets the mix duration when changing from the specified animation to the other. + * + * @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). + * + * @return {this} This Game Object. + */ + setMix: function (fromName, toName, duration) + { + this.stateData.setMix(fromName, toName, duration); + + return this; + }, + + /** + * Finds an attachment by looking in the skin and defaultSkin using the slot + * index and attachment name. First the skin is checked and if the attachment was not found, + * the default skin is checked. + * + * @method SpineGameObject#getAttachment + * @since 3.19.0 + * + * @param {integer} slotIndex - The slot index to search. + * @param {string} attachmentName - The attachment name to look for. + * + * @return {?spine.Attachment} The Attachment, if found. May be null. + */ + getAttachment: function (slotIndex, attachmentName) + { + return this.skeleton.getAttachment(slotIndex, attachmentName); + }, + + /** + * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name. + * + * @method SpineGameObject#getAttachmentByName + * @since 3.19.0 + * + * @param {string} slotName - The slot name to search. + * @param {string} attachmentName - The attachment name to look for. + * + * @return {?spine.Attachment} The Attachment, if found. May be null. + */ + getAttachmentByName: function (slotName, attachmentName) + { + return this.skeleton.getAttachmentByName(slotName, attachmentName); + }, + + /** + * A convenience method to set an attachment by finding the slot with findSlot, + * finding the attachment with getAttachment, then setting the slot's attachment. + * + * @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. + * + * @return {this} This Game Object. + */ + setAttachment: function (slotName, attachmentName) + { + if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length) + { + for (var i = 0; i < slotName.length; i++) + { + this.skeleton.setAttachment(slotName[i], attachmentName[i]); + } + } + else + { + this.skeleton.setAttachment(slotName, attachmentName); + } + + return this; + }, + + /** + * Sets the bones, constraints, slots, and draw order to their setup pose values. + * + * @method SpineGameObject#setToSetupPose + * @since 3.19.0 + * + * @return {this} This Game Object. + */ + setToSetupPose: function () + { + this.skeleton.setToSetupPose(); + + return this; + }, + + /** + * Sets the slots and draw order to their setup pose values. + * + * @method SpineGameObject#setSlotsToSetupPose + * @since 3.19.0 + * + * @return {this} This Game Object. + */ + setSlotsToSetupPose: function () + { + this.skeleton.setSlotsToSetupPose(); + + return this; + }, + + /** + * Sets the bones and constraints to their setup pose values. + * + * @method SpineGameObject#setBonesToSetupPose + * @since 3.19.0 + * + * @return {this} This Game Object. + */ + setBonesToSetupPose: function () + { + this.skeleton.setBonesToSetupPose(); + + return this; + }, + + /** + * Gets the root bone, or null. + * + * @method SpineGameObject#getRootBone + * @since 3.19.0 + * + * @return {spine.Bone} The root bone, or null. + */ + getRootBone: function () + { + return this.skeleton.getRootBone(); + }, + + /** + * Takes a Bone object and a position in world space and rotates the Bone so it is angled + * towards the given position. You can set an optional angle offset, should the bone be + * designed at a specific angle already. You can also set a minimum and maximum range for the angle. + * + * @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. + * @param {number} [offset=0] - An offset to add to the rotation angle. + * @param {number} [minAngle=0] - The minimum range of the rotation angle. + * @param {number} [maxAngle=360] - The maximum range of the rotation angle. + * + * @return {this} This Game Object. + */ + angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle) + { + if (offset === undefined) { offset = 0; } + if (minAngle === undefined) { minAngle = 0; } + if (maxAngle === undefined) { maxAngle = 360; } + + var renderer = this.plugin.renderer; + var height = renderer.height; + + var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset)); + + bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle); + + return this; + }, + + /** + * Finds a bone by comparing each bone's name. It is more efficient to cache the results + * of this method than to call it multiple times. + * + * @method SpineGameObject#findBone + * @since 3.19.0 + * + * @param {string} boneName - The name of the bone to find. + * + * @return {spine.Bone} The bone, or null. + */ + findBone: function (boneName) + { + return this.skeleton.findBone(boneName); + }, + + /** + * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results + * of this method than to call it multiple times. + * + * @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. + */ + findBoneIndex: function (boneName) + { + return this.skeleton.findBoneIndex(boneName); + }, + + /** + * Finds a slot by comparing each slot's name. It is more efficient to cache the results + * of this method than to call it multiple times. + * + * @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. + */ + findSlot: function (slotName) + { + return this.skeleton.findSlot(slotName); + }, + + /** + * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results + * of this method than to call it multiple times. + * + * @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. + */ + findSlotIndex: function (slotName) + { + return this.skeleton.findSlotIndex(slotName); + }, + + /** + * Finds a skin by comparing each skin's name. It is more efficient to cache the results of + * this method than to call it multiple times. + * + * @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. + */ + findSkin: function (skinName) + { + return this.skeletonData.findSkin(skinName); + }, + + /** + * Finds an event by comparing each events's name. It is more efficient to cache the results + * of this method than to call it multiple times. + * + * @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. + */ + findEvent: function (eventDataName) + { + return this.skeletonData.findEvent(eventDataName); + }, + + /** + * Finds an animation by comparing each animation's name. It is more efficient to cache the results + * of this method than to call it multiple times. + * + * @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. + */ + findAnimation: function (animationName) + { + return this.skeletonData.findAnimation(animationName); + }, + + /** + * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results + * of this method than to call it multiple times. + * + * @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. + */ + findIkConstraint: function (constraintName) + { + return this.skeletonData.findIkConstraint(constraintName); + }, + + /** + * Finds an transform constraint by comparing each transform constraint's name. + * It is more efficient to cache the results of this method than to call it multiple times. + * + * @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. + */ + findTransformConstraint: function (constraintName) + { + return this.skeletonData.findTransformConstraint(constraintName); + }, + + /** + * Finds a path constraint by comparing each path constraint's name. + * It is more efficient to cache the results of this method than to call it multiple times. + * + * @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. + */ + findPathConstraint: function (constraintName) + { + return this.skeletonData.findPathConstraint(constraintName); + }, + + /** + * Finds the index of a path constraint by comparing each path constraint's name. + * It is more efficient to cache the results of this method than to call it multiple times. + * + * @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. + */ + findPathConstraintIndex: function (constraintName) + { + return this.skeletonData.findPathConstraintIndex(constraintName); + }, + + /** + * 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 () + { + return this.plugin.getBounds(this.skeleton); + }, + + /** + * Internal update handler. + * + * @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. + */ + preUpdate: function (time, delta) + { + var skeleton = this.skeleton; + + this.state.update((delta / 1000) * this.timeScale); + + this.state.apply(skeleton); + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method SpineGameObject#preDestroy + * @protected + * @since 3.19.0 + */ + preDestroy: function () + { + if (this.state) + { + this.state.clearListeners(); + this.state.clearListenerNotifications(); + } + + this.plugin = null; + + this.skeleton = null; + this.skeletonData = null; + + this.state = null; + this.stateData = null; + } + +}); + +module.exports = SpineGameObject; + + +/***/ }), + +/***/ "./gameobject/SpineGameObjectCanvasRenderer.js": +/*!*****************************************************!*\ + !*** ./gameobject/SpineGameObjectCanvasRenderer.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.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 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 SpineGameObject#renderCanvas + * @since 3.19.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix) +{ + var context = renderer.currentContext; + + var plugin = src.plugin; + var skeleton = src.skeleton; + var skeletonRenderer = plugin.skeletonRenderer; + + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; + + camera.addToRenderList(src); + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); + + camMatrix.copyFrom(camera.matrix); + + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.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); + } + else + { + spriteMatrix.e -= camera.scrollX * src.scrollFactorX; + spriteMatrix.f -= camera.scrollY * src.scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + + skeleton.x = calcMatrix.tx; + skeleton.y = calcMatrix.ty; + + skeleton.scaleX = calcMatrix.scaleX; + + // Inverse or we get upside-down skeletons + skeleton.scaleY = calcMatrix.scaleY * -1; + + 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) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + + skeleton.updateWorldTransform(); + + skeletonRenderer.ctx = context; + skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug); + + context.save(); + + skeletonRenderer.draw(skeleton); + + context.restore(); +}; + +module.exports = SpineGameObjectCanvasRenderer; + + +/***/ }), + +/***/ "./gameobject/SpineGameObjectRender.js": +/*!*********************************************!*\ + !*** ./gameobject/SpineGameObjectRender.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var renderWebGL = __webpack_require__(/*! ../../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); +var renderCanvas = __webpack_require__(/*! ../../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); +var renderDirect = __webpack_require__(/*! ../../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); + +if (true) +{ + renderWebGL = __webpack_require__(/*! ./SpineGameObjectWebGLRenderer */ "./gameobject/SpineGameObjectWebGLRenderer.js"); + renderDirect = __webpack_require__(/*! ./SpineGameObjectWebGLDirect */ "./gameobject/SpineGameObjectWebGLDirect.js"); +} + +if (true) +{ + renderCanvas = __webpack_require__(/*! ./SpineGameObjectCanvasRenderer */ "./gameobject/SpineGameObjectCanvasRenderer.js"); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas, + renderDirect: renderDirect + +}; + + +/***/ }), + +/***/ "./gameobject/SpineGameObjectWebGLDirect.js": +/*!**************************************************!*\ + !*** ./gameobject/SpineGameObjectWebGLDirect.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(/*! ../../../../src/math/Clamp */ "../../../src/math/Clamp.js"); +var CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.js"); +var GetCalcMatrix = __webpack_require__(/*! ../../../../src/gameobjects/GetCalcMatrix */ "../../../src/gameobjects/GetCalcMatrix.js"); +var RadToDeg = __webpack_require__(/*! ../../../../src/math/RadToDeg */ "../../../src/math/RadToDeg.js"); +var Wrap = __webpack_require__(/*! ../../../../src/math/Wrap */ "../../../src/math/Wrap.js"); + +/** + * Directly 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 SpineGameObject#renderDirect + * @since 3.50.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. + */ +var SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container) +{ + var plugin = src.plugin; + var skeleton = src.skeleton; + var sceneRenderer = plugin.sceneRenderer; + + // flush + clear previous pipeline if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + + var scrollFactorX = src.scrollFactorX; + var scrollFactorY = src.scrollFactorY; + var alpha = skeleton.color.a; + + if (container) + { + src.scrollFactorX = container.scrollFactorX; + src.scrollFactorY = container.scrollFactorY; + + skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); + } + + camera.addToRenderList(src); + + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; + + 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; + + // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled + src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); + } + 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 (renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + */ + + skeleton.updateWorldTransform(); + + // Draw the current skeleton + + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + if (container) + { + src.scrollFactorX = scrollFactorX; + src.scrollFactorY = scrollFactorY; + skeleton.color.a = alpha; + } + + if (plugin.drawDebug || src.drawDebug) + { + // Because if we don't, the bones render positions are completely wrong (*sigh*) + var oldX = skeleton.x; + var oldY = skeleton.y; + + skeleton.x = 0; + skeleton.y = 0; + + sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); + + skeleton.x = oldX; + skeleton.y = oldY; + } + + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch + sceneRenderer.end(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); +}; + +module.exports = SpineGameObjectWebGLDirect; + + +/***/ }), + +/***/ "./gameobject/SpineGameObjectWebGLRenderer.js": +/*!****************************************************!*\ + !*** ./gameobject/SpineGameObjectWebGLRenderer.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(/*! ../../../../src/math/Clamp */ "../../../src/math/Clamp.js"); +var CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.js"); +var GetCalcMatrix = __webpack_require__(/*! ../../../../src/gameobjects/GetCalcMatrix */ "../../../src/gameobjects/GetCalcMatrix.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 SpineGameObject#renderWebGL + * @since 3.19.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. + */ +var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container) +{ + var plugin = src.plugin; + var skeleton = src.skeleton; + var sceneRenderer = plugin.sceneRenderer; + + if (renderer.newType) + { + // flush + clear previous pipeline if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + var scrollFactorX = src.scrollFactorX; + var scrollFactorY = src.scrollFactorY; + var alpha = skeleton.color.a; + + if (container) + { + src.scrollFactorX = container.scrollFactorX; + src.scrollFactorY = container.scrollFactorY; + + skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); + } + + camera.addToRenderList(src); + + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; + + 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; + + // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled + src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); + } + 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 (renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + */ + + skeleton.updateWorldTransform(); + + // Draw the current skeleton + + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + if (container) + { + src.scrollFactorX = scrollFactorX; + src.scrollFactorY = scrollFactorY; + skeleton.color.a = alpha; + } + + if (plugin.drawDebug || src.drawDebug) + { + // Because if we don't, the bones render positions are completely wrong (*sigh*) + var oldX = skeleton.x; + var oldY = skeleton.y; + + skeleton.x = 0; + skeleton.y = 0; + + sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); + + skeleton.x = oldX; + skeleton.y = oldY; + } + + 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(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); + } +}; + +module.exports = SpineGameObjectWebGLRenderer; + + /***/ }), /***/ "./runtimes/spine-both.js": /*!********************************!*\ !*** ./runtimes/spine-both.js ***! \********************************/ -/***/ ((module) => { +/*! no static exports found */ +/***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ @@ -11172,36766 +51183,10 @@ var spine; /*** EXPORTS FROM exports-loader ***/ module.exports = spine; - }.call(window)); -/***/ }), - -/***/ "./SpineFile.js": -/*!**********************!*\ - !*** ./SpineFile.js ***! - \**********************/ -/***/ ((module, __unused_webpack_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__(/*! ../../../src/utils/Class */ "../../../src/utils/Class.js"); -var GetFastValue = __webpack_require__(/*! ../../../src/utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); -var ImageFile = __webpack_require__(/*! ../../../src/loader/filetypes/ImageFile.js */ "../../../src/loader/filetypes/ImageFile.js"); -var IsPlainObject = __webpack_require__(/*! ../../../src/utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); -var JSONFile = __webpack_require__(/*! ../../../src/loader/filetypes/JSONFile.js */ "../../../src/loader/filetypes/JSONFile.js"); -var MultiFile = __webpack_require__(/*! ../../../src/loader/MultiFile.js */ "../../../src/loader/MultiFile.js"); -var TextFile = __webpack_require__(/*! ../../../src/loader/filetypes/TextFile.js */ "../../../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|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. - */ - -/** - * @classdesc - * 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 - * @extends Phaser.Loader.MultiFile - * @memberof Phaser.Loader.FileTypes - * @constructor - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object. - * @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". - * @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". - * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not? - * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. - * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. - */ -var SpineFile = new Class({ - - Extends: MultiFile, - - initialize: - - function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) - { - var i; - var json; - var atlas; - var files = []; - var cache = loader.cacheManager.custom.spine; - - // atlas can be an array of atlas files, not just a single one - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - - json = new JSONFile(loader, { - key: key, - url: GetFastValue(config, 'jsonURL'), - extension: GetFastValue(config, 'jsonExtension', 'json'), - xhrSettings: GetFastValue(config, 'jsonXhrSettings') - }); - - atlasURL = GetFastValue(config, 'atlasURL'); - preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha'); - - if (!Array.isArray(atlasURL)) - { - atlasURL = [ atlasURL ]; - } - - for (i = 0; i < atlasURL.length; i++) - { - atlas = new TextFile(loader, { - key: key + '!' + i, - url: atlasURL[i], - extension: GetFastValue(config, 'atlasExtension', 'atlas'), - xhrSettings: GetFastValue(config, 'atlasXhrSettings') - }); - - atlas.cache = cache; - - files.push(atlas); - } - } - else - { - json = new JSONFile(loader, key, jsonURL, jsonXhrSettings); - - if (!Array.isArray(atlasURL)) - { - atlasURL = [ atlasURL ]; - } - - for (i = 0; i < atlasURL.length; i++) - { - atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings); - atlas.cache = cache; - - files.push(atlas); - } - } - - files.unshift(json); - - MultiFile.call(this, loader, 'spine', key, files); - - this.config.preMultipliedAlpha = preMultipliedAlpha; - }, - - /** - * Called by each File when it finishes loading. - * - * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete - * @since 3.19.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--; - - if (file.type === 'text') - { - // Inspect the data for the files to now load - var content = file.data.split('\n'); - - // Extract the textures - var textures = []; - - for (var t = 0; t < content.length; t++) - { - var line = content[t]; - - if (line.trim() === '' && t < content.length - 1) - { - line = content[t + 1]; - - textures.push(line); - } - } - - var config = this.config; - var loader = this.loader; - - var currentBaseURL = loader.baseURL; - var currentPath = loader.path; - var currentPrefix = loader.prefix; - - var baseURL = GetFastValue(config, 'baseURL', this.baseURL); - var path = GetFastValue(config, 'path', file.src.match(/^.*\//))[0]; - var prefix = GetFastValue(config, 'prefix', this.prefix); - var textureXhrSettings = GetFastValue(config, 'textureXhrSettings'); - - loader.setBaseURL(baseURL); - loader.setPath(path); - loader.setPrefix(prefix); - - for (var i = 0; i < textures.length; i++) - { - var textureURL = textures[i]; - - var key = textureURL; - - var image = new ImageFile(loader, key, textureURL, textureXhrSettings); - - if (!loader.keyExists(image)) - { - this.addToMultiFile(image); - - loader.addFile(image); - } - } - - // Reset the loader settings - loader.setBaseURL(currentBaseURL); - loader.setPath(currentPath); - loader.setPrefix(currentPrefix); - } - } - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * - * @method Phaser.Loader.FileTypes.SpineFile#addToCache - * @since 3.19.0 - */ - addToCache: function () - { - if (this.isReadyToProcess()) - { - var fileJSON = this.files[0]; - - fileJSON.addToCache(); - - var atlasCache; - 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++) - { - var file = this.files[i]; - - if (file.type === 'text') - { - atlasKey = file.key.replace(/![\d]$/, ''); - - atlasCache = file.cache; - - combinedAtlasData = combinedAtlasData.concat(file.data); - } - else - { - var src = file.key.trim(); - var pos = src.indexOf('!'); - var key = src.substr(pos + 1); - - if (!textureManager.exists(key)) - { - textureManager.addImage(key, file.data); - } - } - - file.pendingDestroy(); - } - - atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix }); - - this.complete = true; - } - } - -}); - -module.exports = SpineFile; - - -/***/ }), - -/***/ "./SpinePlugin.js": -/*!************************!*\ - !*** ./SpinePlugin.js ***! - \************************/ -/***/ ((module, __unused_webpack_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__(/*! ../../../src/gameobjects/BuildGameObject */ "../../../src/gameobjects/BuildGameObject.js"); -var Class = __webpack_require__(/*! ../../../src/utils/Class */ "../../../src/utils/Class.js"); -var GetValue = __webpack_require__(/*! ../../../src/utils/object/GetValue */ "../../../src/utils/object/GetValue.js"); -var ResizeEvent = __webpack_require__(/*! ../../../src/scale/events/RESIZE_EVENT */ "../../../src/scale/events/RESIZE_EVENT.js"); -var ScenePlugin = __webpack_require__(/*! ../../../src/plugins/ScenePlugin */ "../../../src/plugins/ScenePlugin.js"); -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 - * 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.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: [ - * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } - * ] - * } - * ``` - * - * 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, - * create: create, - * pack: { - * files: [ - * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' } - * ] - * } - * } - * ``` - * - * 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. - * - * ## A note about inlined data: - * - * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader - * at all. Instead, call the functions directly as required: - * - * scene.cache.json.add - * scene.cache.custom.spine.add - * scene.textures.addBase64 - * - * ## Using the plugin - * - * 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 two Game Object Factory methods, allowing you to create Spine Game Objects - * and Spine Containers: - * - * ```javascript - * 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 - * 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 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. - * - * 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 - * @extends Phaser.Plugins.ScenePlugin - * @constructor - * @since 3.19.0 - * - * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. - * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. - * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. - */ -var SpinePlugin = new Class({ - - Extends: ScenePlugin, - - initialize: - - function SpinePlugin (scene, pluginManager, pluginKey) - { - ScenePlugin.call(this, scene, pluginManager, pluginKey); - - var game = pluginManager.game; - - /** - * A read-only flag that indicates if the game is running under WebGL or Canvas. - * - * @name SpinePlugin#isWebGL - * @type {boolean} - * @readonly - * @since 3.19.0 - */ - this.isWebGL = (game.config.renderType === 2); - - /** - * 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. - * - * @name SpinePlugin#cache - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.cache = game.cache.addCustom('spine'); - - /** - * 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. - * - * @name SpinePlugin#spineTextures - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.spineTextures = game.cache.addCustom('spineTextures'); - - /** - * A reference to the global JSON Cache. - * - * @name SpinePlugin#json - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.json = game.cache.json; - - /** - * A reference to the global Texture Manager. - * - * @name SpinePlugin#textures - * @type {Phaser.Textures.TextureManager} - * @since 3.19.0 - */ - this.textures = game.textures; - - /** - * A flag that sets if the Skeleton Renderers will render debug information over the top - * of the skeleton or not. - * - * @name SpinePlugin#drawDebug - * @type {boolean} - * @since 3.19.0 - */ - this.drawDebug = false; - - /** - * The underlying WebGL context of the Phaser renderer. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#gl - * @type {WebGLRenderingContext} - * @since 3.19.0 - */ - this.gl; - - /** - * A reference to either the Canvas or WebGL Renderer that this Game is using. - * - * @name SpinePlugin#renderer - * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} - * @since 3.19.0 - */ - this.renderer; - - /** - * An instance of the Spine WebGL Scene Renderer. - * - * There is only one instance of the Scene Renderer shared across the whole plugin. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#sceneRenderer - * @type {spine.webgl.SceneRenderer} - * @since 3.19.0 - */ - this.sceneRenderer; - - /** - * An instance of the Spine Skeleton Renderer. - * - * @name SpinePlugin#skeletonRenderer - * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)} - * @since 3.19.0 - */ - this.skeletonRenderer; - - /** - * An instance of the Spine Skeleton Debug Renderer. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#skeletonDebugRenderer - * @type {spine.webgl.skeletonDebugRenderer} - * @since 3.19.0 - */ - this.skeletonDebugRenderer; - - /** - * A reference to the Spine runtime. - * This is the runtime created by Esoteric Software. - * - * @name SpinePlugin#plugin - * @type {spine} - * @since 3.19.0 - */ - this.plugin = Spine; - - /** - * An internal vector3 used by the screen to world method. - * - * @name SpinePlugin#temp1 - * @private - * @type {spine.webgl.Vector3} - * @since 3.19.0 - */ - this.temp1; - - /** - * An internal vector3 used by the screen to world method. - * - * @name SpinePlugin#temp2 - * @private - * @type {spine.webgl.Vector3} - * @since 3.19.0 - */ - this.temp2; - - if (this.isWebGL) - { - this.runtime = Spine.webgl; - - this.renderer = game.renderer; - this.gl = game.renderer.gl; - - this.getAtlas = this.getAtlasWebGL; - } - else - { - this.runtime = Spine.canvas; - - this.renderer = game.renderer; - - 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 add = function (x, y, key, animationName, loop) - { - var spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineGameObject(this.scene, spinePlugin, 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(); - }; - - var addContainer = function (x, y, children) - { - var spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; - var container = new SpineContainer(this.scene, spinePlugin, 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); - }, - - /** - * Internal boot handler. - * - * @method SpinePlugin#boot - * @private - * @since 3.19.0 - */ - boot: function () - { - if (this.isWebGL) - { - this.bootWebGL(); - this.onResize(); - this.game.scale.on(ResizeEvent, this.onResize, this); - } - else - { - this.bootCanvas(); - } - - var eventEmitter = this.systems.events; - - eventEmitter.once('shutdown', this.shutdown, this); - eventEmitter.once('destroy', this.destroy, this); - - this.game.events.once('destroy', this.gameDestroy, this); - }, - - /** - * Internal boot handler for the Canvas Renderer. - * - * @method SpinePlugin#bootCanvas - * @private - * @since 3.19.0 - */ - bootCanvas: function () - { - this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context); - }, - - /** - * Internal boot handler for the WebGL Renderer. - * - * @method SpinePlugin#bootWebGL - * @private - * @since 3.19.0 - */ - bootWebGL: function () - { - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! - - var setBlendMode = function (srcBlend, dstBlend) - { - if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend) - { - var gl = this.context.gl; - - this.srcBlend = srcBlend; - this.dstBlend = dstBlend; - - if (this.isDrawing) - { - this.flush(); - gl.blendFunc(this.srcBlend, this.dstBlend); - } - } - }; - - var sceneRenderer = this.renderer.spineSceneRenderer; - - if (!sceneRenderer) - { - sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - sceneRenderer.batcher.setBlendMode = setBlendMode; - sceneRenderer.shapes.setBlendMode = setBlendMode; - - this.renderer.spineSceneRenderer = sceneRenderer; - } - - // All scene share the same instance - this.sceneRenderer = sceneRenderer; - this.skeletonRenderer = sceneRenderer.skeletonRenderer; - this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; - - this.temp1 = new Spine.webgl.Vector3(0, 0, 0); - this.temp2 = new Spine.webgl.Vector3(0, 0, 0); - }, - - /** - * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, - * then returns it. You do not normally need to invoke this method directly. - * - * @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) - { - var atlasEntry = this.cache.get(key); - - if (!atlasEntry) - { - console.warn('No atlas data for: ' + key); - return; - } - - var atlas; - var spineTextures = this.spineTextures; - - if (spineTextures.has(key)) - { - atlas = spineTextures.get(key); - } - else - { - var textures = this.textures; - - atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) - { - return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); - }); - } - - return atlas; - }, - - /** - * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, - * then returns it. You do not normally need to invoke this method directly. - * - * @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) - { - var atlasEntry = this.cache.get(key); - - if (!atlasEntry) - { - console.warn('No atlas data for: ' + key); - return; - } - - var atlas; - var spineTextures = this.spineTextures; - - if (spineTextures.has(key)) - { - atlas = spineTextures.get(key); - } - else - { - var textures = this.textures; - - var gl = this.sceneRenderer.context.gl; - - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - - atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) - { - return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); - }); - } - - return atlas; - }, - - /** - * 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 () - * { - * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true); - * } - * ``` - * - * 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. - * - * 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 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', - * jsonURL: 'boy.json', - * atlasURL: 'boy.atlas', - * preMultipliedAlpha: true - * }); - * ``` - * - * If you need to load multiple Spine atlas files, provide them as an array: - * - * ```javascript - * function preload () - * { - * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true); - * } - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details. - * - * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the data from the Spine plugin. - * - * 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 "alien" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * 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#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} [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. - * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. - */ - 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); - } - } - else - { - multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); - - 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) - { - var temp1 = this.temp1; - var temp2 = this.temp2; - var camera = this.sceneRenderer.camera; - - temp1.set(x + skeleton.x, y - skeleton.y, 0); - - var width = camera.viewportWidth; - var height = camera.viewportHeight; - - camera.screenToWorld(temp1, width, height); - - if (bone && bone.parent !== null) - { - bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0)); - - return new Spine.Vector2(temp2.x, temp2.y); - } - else if (bone) - { - return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y); - } - else - { - return new Spine.Vector2(temp1.x, temp1.y); - } - }, - - /** - * Returns a Spine Vector2 based on the given x and y values. - * - * @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) - { - return new Spine.Vector2(x, y); - }, - - /** - * 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) - { - return new Spine.webgl.Vector3(x, y, z); - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawBones = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawRegionAttachments = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawBoundingBoxes = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawMeshHull = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawMeshTriangles = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawPaths = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawSkeletonXY = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawClipping = value; - - return this; - }, - - /** - * 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) - { - this.sceneRenderer.skeletonRenderer.vertexEffect = effect; - - return this; - }, - - /** - * 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) - { - var atlasKey = key; - var jsonKey = key; - var split = (key.indexOf('.') !== -1); - - if (split) - { - var parts = key.split('.'); - - atlasKey = parts.shift(); - jsonKey = parts.join('.'); - } - - var atlasData = this.cache.get(atlasKey); - var atlas = this.getAtlas(atlasKey); - - if (!atlas) - { - return null; - } - - if (!this.spineTextures.has(atlasKey)) - { - this.spineTextures.add(atlasKey, atlas); - } - - var preMultipliedAlpha = atlasData.preMultipliedAlpha; - - var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); - - var skeletonJson = new Spine.SkeletonJson(atlasLoader); - - var data; - - if (skeletonJSON) - { - data = skeletonJSON; - } - else - { - var json = this.json.get(atlasKey); - - data = (split) ? GetValue(json, jsonKey) : json; - } - - if (data) - { - var skeletonData = skeletonJson.readSkeletonData(data); - - var skeleton = new Spine.Skeleton(skeletonData); - - return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; - } - else - { - return null; - } - }, - - /** - * 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) - { - var stateData = new Spine.AnimationStateData(skeleton.data); - - var state = new Spine.AnimationState(stateData); - - return { stateData: stateData, state: state }; - }, - - /** - * 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) - { - var offset = new Spine.Vector2(); - var size = new Spine.Vector2(); - - skeleton.getBounds(offset, size, []); - - return { offset: offset, size: size }; - }, - - /** - * Internal handler for when the renderer resizes. - * - * Only called if running in WebGL. - * - * @method SpinePlugin#onResize - * @since 3.19.0 - */ - onResize: function () - { - var renderer = this.renderer; - var sceneRenderer = this.sceneRenderer; - - var viewportWidth = renderer.width; - var viewportHeight = renderer.height; - - sceneRenderer.camera.position.x = viewportWidth / 2; - sceneRenderer.camera.position.y = viewportHeight / 2; - - sceneRenderer.camera.setViewport(viewportWidth, 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 - * @private - * @since 3.19.0 - */ - shutdown: function () - { - 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 - * @private - * @since 3.19.0 - */ - destroy: function () - { - this.shutdown(); - - this.game = null; - this.scene = null; - this.systems = null; - - this.cache = null; - this.spineTextures = null; - this.json = null; - this.textures = 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.pluginManager.removeGameObject('spine', true, true); - this.pluginManager.removeGameObject('spineContainer', true, true); - - this.pluginManager = null; - - var sceneRenderer = this.renderer.spineSceneRenderer; - - if (sceneRenderer) - { - sceneRenderer.dispose(); - } - - this.renderer.spineSceneRenderer = null; - this.sceneRenderer = null; - } - -}); - -SpinePlugin.SpineGameObject = SpineGameObject; -SpinePlugin.SpineContainer = SpineContainer; - -/** - * 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. - * @param {string} [animationName] - The name of the animation to set on this Skeleton. - * @param {boolean} [loop=false] - Should the animation playback be looped or not? - * - * @return {SpineGameObject} The Game Object that was created. - */ - -/** - * 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', - * scale: 1.5, - * skinName: 'square_Green', - * animationName: 'jelly-idle', loop: true, - * slotName: 'hat', attachmentName: 'images/La_14' - * }); - * ``` - * - * @method SpinePlugin#make - * @since 3.19.0 - * - * @param {any} config - The configuration object this Game Object will use to create itself. - * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - * - * @return {SpineGameObject} The Game Object that was created. - */ - -module.exports = SpinePlugin; - - -/***/ }), - -/***/ "./container/SpineContainer.js": -/*!*************************************!*\ - !*** ./container/SpineContainer.js ***! - \*************************************/ -/***/ ((module, __unused_webpack_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 must only add ever Spine Game Objects, or other Spine Containers, 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: - * - * ```javascript - * this.add.spineContainer(); - * ``` - * - * or - * - * ```javascript - * this.make.spineContainer(); - * ``` - * - * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the - * container children. You can, however, mask children of Spine Containers if they are embedded within other - * Spine Containers. In short, if you need masking, don't mix and match the types. - * - * See the Container documentation for further details about what Containers can do. - * - * @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 SpineContainer#plugin - * @type {SpinePlugin} - * @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; - } - -}); - -module.exports = SpineContainer; - - -/***/ }), - -/***/ "./container/SpineContainerCanvasRenderer.js": -/*!***************************************************!*\ - !*** ./container/SpineContainerCanvasRenderer.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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 {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, camera, parentMatrix) -{ - var children = container.list; - - if (children.length === 0) - { - return; - } - - camera.addToRenderList(container); - - 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, 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 ***! - \*******************************************/ -/***/ ((module, __unused_webpack_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 ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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 SpineContainerWebGLRenderer#renderWebGL - * @since 3.50.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineContainer} container - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var SpineContainerWebGLRenderer = function (renderer, container, 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(); - - renderer.pipelines.rebind(); - } - - return; - } - - camera.addToRenderList(container); - - 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); - } - - if (renderer.newType) - { - // flush + clear if this is a new type - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - - var rendererNextType = renderer.nextTypeMatch; - - // Force these to avoid batch flushing during SpineGameObject.renderWebGL - renderer.nextTypeMatch = true; - renderer.newType = false; - - for (var i = 0; i < children.length; i++) - { - var child = children[i]; - - if (child.willRender(camera, container)) - { - var mask = child.mask; - - if (mask) - { - sceneRenderer.end(); - - renderer.pipelines.rebind(); - - mask.preRenderWebGL(renderer, child, camera); - - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - - child.renderWebGL(renderer, child, camera, transformMatrix, container); - - if (mask) - { - sceneRenderer.end(); - - renderer.pipelines.rebind(); - - mask.postRenderWebGL(renderer, camera); - - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - } - } - - renderer.nextTypeMatch = rendererNextType; - - if (!rendererNextType) - { - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch - sceneRenderer.end(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); - } -}; - -module.exports = SpineContainerWebGLRenderer; - - -/***/ }), - -/***/ "./events/COMPLETE_EVENT.js": -/*!**********************************!*\ - !*** ./events/COMPLETE_EVENT.js ***! - \**********************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Complete Event. - * - * @event SpinePluginEvents#COMPLETE - * @since 3.19.0 - */ -module.exports = 'complete'; - - -/***/ }), - -/***/ "./events/DISPOSE_EVENT.js": -/*!*********************************!*\ - !*** ./events/DISPOSE_EVENT.js ***! - \*********************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Dispose Event. - * - * @event SpinePluginEvents#DISPOSE - * @since 3.19.0 - */ -module.exports = 'dispose'; - - -/***/ }), - -/***/ "./events/END_EVENT.js": -/*!*****************************!*\ - !*** ./events/END_EVENT.js ***! - \*****************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The End Event. - * - * @event SpinePluginEvents#END - * @since 3.19.0 - */ -module.exports = 'end'; - - -/***/ }), - -/***/ "./events/EVENT_EVENT.js": -/*!*******************************!*\ - !*** ./events/EVENT_EVENT.js ***! - \*******************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Custom Event Event. - * - * @event SpinePluginEvents#EVENT - * @since 3.19.0 - */ -module.exports = 'event'; - - -/***/ }), - -/***/ "./events/INTERRUPTED_EVENT.js": -/*!*************************************!*\ - !*** ./events/INTERRUPTED_EVENT.js ***! - \*************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Interrupted Event. - * - * @event SpinePluginEvents#INTERRUPTED - * @since 3.19.0 - */ -module.exports = 'interrupted'; - - -/***/ }), - -/***/ "./events/START_EVENT.js": -/*!*******************************!*\ - !*** ./events/START_EVENT.js ***! - \*******************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Start Event. - * - * @event SpinePluginEvents#START - * @since 3.19.0 - */ -module.exports = 'start'; - - -/***/ }), - -/***/ "./events/index.js": -/*!*************************!*\ - !*** ./events/index.js ***! - \*************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace SpinePluginEvents - */ - -module.exports = { - - COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "./events/COMPLETE_EVENT.js"), - DISPOSE: __webpack_require__(/*! ./DISPOSE_EVENT */ "./events/DISPOSE_EVENT.js"), - END: __webpack_require__(/*! ./END_EVENT */ "./events/END_EVENT.js"), - EVENT: __webpack_require__(/*! ./EVENT_EVENT */ "./events/EVENT_EVENT.js"), - INTERRUPTED: __webpack_require__(/*! ./INTERRUPTED_EVENT */ "./events/INTERRUPTED_EVENT.js"), - START: __webpack_require__(/*! ./START_EVENT */ "./events/START_EVENT.js") - -}; - - -/***/ }), - -/***/ "./gameobject/SpineGameObject.js": -/*!***************************************!*\ - !*** ./gameobject/SpineGameObject.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_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 AngleBetween = __webpack_require__(/*! ../../../../src/math/angle/Between */ "../../../src/math/angle/Between.js"); -var Clamp = __webpack_require__(/*! ../../../../src/math/Clamp */ "../../../src/math/Clamp.js"); -var Class = __webpack_require__(/*! ../../../../src/utils/Class */ "../../../src/utils/Class.js"); -var ComponentsComputedSize = __webpack_require__(/*! ../../../../src/gameobjects/components/ComputedSize */ "../../../src/gameobjects/components/ComputedSize.js"); -var ComponentsDepth = __webpack_require__(/*! ../../../../src/gameobjects/components/Depth */ "../../../src/gameobjects/components/Depth.js"); -var ComponentsFlip = __webpack_require__(/*! ../../../../src/gameobjects/components/Flip */ "../../../src/gameobjects/components/Flip.js"); -var ComponentsScrollFactor = __webpack_require__(/*! ../../../../src/gameobjects/components/ScrollFactor */ "../../../src/gameobjects/components/ScrollFactor.js"); -var ComponentsTransform = __webpack_require__(/*! ../../../../src/gameobjects/components/Transform */ "../../../src/gameobjects/components/Transform.js"); -var ComponentsVisible = __webpack_require__(/*! ../../../../src/gameobjects/components/Visible */ "../../../src/gameobjects/components/Visible.js"); -var CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.js"); -var DegToRad = __webpack_require__(/*! ../../../../src/math/DegToRad */ "../../../src/math/DegToRad.js"); -var GameObject = __webpack_require__(/*! ../../../../src/gameobjects/GameObject */ "../../../src/gameobjects/GameObject.js"); -var RadToDeg = __webpack_require__(/*! ../../../../src/math/RadToDeg */ "../../../src/math/RadToDeg.js"); -var SpineEvents = __webpack_require__(/*! ../events/ */ "./events/index.js"); -var SpineGameObjectRender = __webpack_require__(/*! ./SpineGameObjectRender */ "./gameobject/SpineGameObjectRender.js"); - -/** - * @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', - * scale: 1.5, - * skinName: 'square_Green', - * animationName: 'jelly-think', loop: true, - * 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. - * - * @class SpineGameObject - * @constructor - * @since 3.19.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 {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin. - * @param {string} [animationName] - The name of the animation to set on this Skeleton. - * @param {boolean} [loop=false] - Should the animation playback be looped or not? - */ -var SpineGameObject = new Class({ - - Extends: GameObject, - - Mixins: [ - ComponentsComputedSize, - ComponentsDepth, - ComponentsFlip, - ComponentsScrollFactor, - ComponentsTransform, - ComponentsVisible, - SpineGameObjectRender - ], - - initialize: - - function SpineGameObject (scene, plugin, x, y, key, animationName, loop) - { - GameObject.call(this, scene, 'Spine'); - - /** - * A reference to the Spine Plugin. - * - * @name SpineGameObject#plugin - * @type {SpinePlugin} - * @since 3.19.0 - */ - this.plugin = plugin; - - /** - * The Spine Skeleton this Game Object is using. - * - * @name SpineGameObject#skeleton - * @type {spine.Skeleton} - * @since 3.19.0 - */ - this.skeleton = null; - - /** - * The Spine Skeleton Data associated with the Skeleton this Game Object is using. - * - * @name SpineGameObject#skeletonData - * @type {spine.SkeletonData} - * @since 3.19.0 - */ - this.skeletonData = null; - - /** - * The Spine Animation State this Game Object is using. - * - * @name SpineGameObject#state - * @type {spine.AnimationState} - * @since 3.19.0 - */ - this.state = null; - - /** - * The Spine Animation State Data associated with the Animation State this Game Object is using. - * - * @name SpineGameObject#stateData - * @type {spine.AnimationStateData} - * @since 3.19.0 - */ - this.stateData = null; - - /** - * A reference to the root bone of the Skeleton. - * - * @name SpineGameObject#root - * @type {spine.Bone} - * @since 3.19.0 - */ - this.root = null; - - /** - * This object holds the calculated bounds of the current - * pose, as set when a new Skeleton is applied. - * - * @name SpineGameObject#bounds - * @type {any} - * @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. - * - * @name SpineGameObject#drawDebug - * @type {boolean} - * @since 3.19.0 - */ - this.drawDebug = false; - - /** - * The factor to scale the Animation update time by. - * - * @name SpineGameObject#timeScale - * @type {number} - * @since 3.19.0 - */ - this.timeScale = 1; - - /** - * The calculated Display Origin of this Game Object. - * - * @name SpineGameObject#displayOriginX - * @type {number} - * @since 3.19.0 - */ - this.displayOriginX = 0; - - /** - * The calculated Display Origin of this Game Object. - * - * @name SpineGameObject#displayOriginY - * @type {number} - * @since 3.19.0 - */ - this.displayOriginY = 0; - - /** - * A flag that stores if the texture associated with the current - * Skin being used by this Game Object, has its alpha pre-multiplied - * into it, or not. - * - * @name SpineGameObject#preMultipliedAlpha - * @type {boolean} - * @since 3.19.0 - */ - this.preMultipliedAlpha = false; - - /** - * A default Blend Mode. You cannot change the blend mode of a - * Spine Game Object. - * - * @name SpineGameObject#blendMode - * @type {number} - * @readonly - * @since 3.19.0 - */ - this.blendMode = -1; - - this.setPosition(x, y); - - if (key) - { - this.setSkeleton(key, animationName, loop); - } - }, - - /** - * Returns `true` if this Spine Game Object both has a skeleton and - * also passes the render tests for the given Camera. - * - * @method SpineGameObject#willRender - * @since 3.19.0 - * - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. - * - * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`. - */ - willRender: function (camera, container) - { - var GameObjectRenderMask = 15; - - var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)))); - - if (!container && !result && this.parentContainer) - { - var plugin = this.plugin; - var sceneRenderer = plugin.sceneRenderer; - - if (plugin.gl && sceneRenderer.batcher.isDrawing) - { - sceneRenderer.end(); - - plugin.renderer.pipelines.rebind(); - } - } - - return result; - }, - - /** - * 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 - * @since 3.19.0 - * - * @param {number} [value=1] - The alpha value used for the whole Skeleton. - * - * @return {this} This Game Object instance. - */ - setAlpha: function (value, slotName) - { - if (value === undefined) { value = 1; } - - if (slotName) - { - var slot = this.findSlot(slotName); - - if (slot) - { - slot.color.a = Clamp(value, 0, 1); - } - } - else - { - this.alpha = value; - } - - return this; - }, - - /** - * 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. - * - * @name SpineGameObject#alpha - * @type {number} - * @since 3.19.0 - */ - alpha: { - - get: function () - { - return this.skeleton.color.a; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - if (this.skeleton) - { - this.skeleton.color.a = v; - } - - if (v === 0) - { - this.renderFlags &= ~2; - } - else - { - this.renderFlags |= 2; - } - } - - }, - - /** - * 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. - * - * @name SpineGameObject#red - * @type {number} - * @since 3.19.0 - */ - red: { - - get: function () - { - return this.skeleton.color.r; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - if (this.skeleton) - { - this.skeleton.color.r = v; - } - } - - }, - - /** - * 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. - * - * @name SpineGameObject#green - * @type {number} - * @since 3.19.0 - */ - green: { - - get: function () - { - return this.skeleton.color.g; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - if (this.skeleton) - { - this.skeleton.color.g = v; - } - } - - }, - - /** - * 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. - * - * @name SpineGameObject#blue - * @type {number} - * @since 3.19.0 - */ - blue: { - - get: function () - { - return this.skeleton.color.b; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - if (this.skeleton) - { - this.skeleton.color.b = v; - } - } - - }, - - /** - * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton. - * - * @method SpineGameObject#setColor - * @since 3.19.0 - * - * @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) - { - if (color === undefined) { color = 0xffffff; } - - var red = (color >> 16 & 0xFF) / 255; - var green = (color >> 8 & 0xFF) / 255; - var blue = (color & 0xFF) / 255; - var alpha = (color > 16777215) ? (color >>> 24) / 255 : null; - - var target = this.skeleton; - - if (slotName) - { - var slot = this.findSlot(slotName); - - if (slot) - { - target = slot; - } - } - - target.color.r = red; - target.color.g = green; - target.color.b = blue; - - if (alpha !== null) - { - target.color.a = alpha; - } - - return this; - }, - - /** - * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object - * that contains the Skeleton data. - * - * @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. - * @param {boolean} [loop=false] - Should the animation, if set, loop or not? - * - * @return {this} This Game Object. - */ - setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop) - { - return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop); - }, - - /** - * 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. - * @param {boolean} [loop=false] - Should the animation, if set, loop or not? - * - * @return {this} This Game Object. - */ - setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON) - { - if (this.state) - { - this.state.clearListeners(); - this.state.clearListenerNotifications(); - } - - var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON); - - this.skeletonData = data.skeletonData; - - this.preMultipliedAlpha = data.preMultipliedAlpha; - - var skeleton = data.skeleton; - - skeleton.setSkin(); - skeleton.setToSetupPose(); - - this.skeleton = skeleton; - - // AnimationState - data = this.plugin.createAnimationState(skeleton); - - if (this.state) - { - this.state.clearListeners(); - this.state.clearListenerNotifications(); - } - - this.state = data.state; - this.stateData = data.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) - }); - - if (animationName) - { - this.setAnimation(0, animationName, loop); - } - - this.root = this.getRootBone(); - - if (this.root) - { - // +90 degrees to account for the difference in Spine vs. Phaser rotation - this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90; - } - - this.state.apply(skeleton); - - skeleton.updateCache(); - - return this.updateSize(); - }, - - /** - * Internal event handler that emits the Spine onComplete event via this Game Object. - * - * @method SpineGameObject#onComplete - * @fires SpinePluginEvents#COMPLETE - * @private - * @since 3.19.0 - * - * @param {any} entry - The event data from Spine. - */ - onComplete: function (entry) - { - this.emit(SpineEvents.COMPLETE, entry); - }, - - /** - * Internal event handler that emits the Spine onDispose event via this Game Object. - * - * @method SpineGameObject#onDispose - * @fires SpinePluginEvents#DISPOSE - * @private - * @since 3.19.0 - * - * @param {any} entry - The event data from Spine. - */ - onDispose: function (entry) - { - this.emit(SpineEvents.DISPOSE, entry); - }, - - /** - * Internal event handler that emits the Spine onEnd event via this Game Object. - * - * @method SpineGameObject#onEnd - * @fires SpinePluginEvents#END - * @private - * @since 3.19.0 - * - * @param {any} entry - The event data from Spine. - */ - onEnd: function (entry) - { - this.emit(SpineEvents.END, entry); - }, - - /** - * Internal event handler that emits the Spine Event event via this Game Object. - * - * @method SpineGameObject#onEvent - * @fires SpinePluginEvents#EVENT - * @private - * @since 3.19.0 - * - * @param {any} entry - The event data from Spine. - * @param {spine.Event} event - The Spine event. - */ - onEvent: function (entry, event) - { - this.emit(SpineEvents.EVENT, entry, event); - }, - - /** - * Internal event handler that emits the Spine onInterrupted event via this Game Object. - * - * @method SpineGameObject#onInterrupted - * @fires SpinePluginEvents#INTERRUPTED - * @private - * @since 3.19.0 - * - * @param {any} entry - The event data from Spine. - */ - onInterrupted: function (entry) - { - this.emit(SpineEvents.INTERRUPTED, entry); - }, - - /** - * Internal event handler that emits the Spine onStart event via this Game Object. - * - * @method SpineGameObject#onStart - * @fires SpinePluginEvents#START - * @private - * @since 3.19.0 - * - * @param {any} entry - The event data from Spine. - */ - onStart: function (entry) - { - this.emit(SpineEvents.START, entry); - }, - - /** - * 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 () - { - if (this.root) - { - // +90 degrees to account for the difference in Spine vs. Phaser rotation - this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90; - } - - this.updateSize(); - - this.skeleton.updateCache(); - - return this; - }, - - /** - * 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) - { - var skeleton = this.skeleton; - - if (width === undefined) { width = skeleton.data.width; } - if (height === undefined) { height = skeleton.data.height; } - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - this.width = width; - this.height = height; - - this.displayOriginX = skeleton.x - offsetX; - this.displayOriginY = skeleton.y - offsetY; - - return this; - }, - - /** - * 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) - { - var skeleton = this.skeleton; - - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = 0; } - - this.displayOriginX = skeleton.x - offsetX; - this.displayOriginY = skeleton.y - offsetY; - - return this; - }, - - /** - * 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 () - { - var skeleton = this.skeleton; - var renderer = this.plugin.renderer; - - var height = renderer.height; - - var oldScaleX = this.scaleX; - var oldScaleY = this.scaleY; - - skeleton.x = this.x; - skeleton.y = height - this.y; - skeleton.scaleX = 1; - skeleton.scaleY = 1; - - skeleton.updateWorldTransform(); - - var bounds = this.getBounds(); - - this.width = bounds.size.x; - this.height = bounds.size.y; - - this.displayOriginX = this.x - bounds.offset.x; - this.displayOriginY = this.y - (height - (this.height + bounds.offset.y)); - - skeleton.scaleX = oldScaleX; - skeleton.scaleY = oldScaleY; - - skeleton.updateWorldTransform(); - - return this; - }, - - /** - * The horizontal scale of this Game Object, as applied to the Skeleton it is using. - * - * @name SpineGameObject#scaleX - * @type {number} - * @default 1 - * @since 3.19.0 - */ - scaleX: { - - get: function () - { - return this._scaleX; - }, - - set: function (value) - { - this._scaleX = value; - - this.refresh(); - } - - }, - - /** - * The vertical scale of this Game Object, as applied to the Skeleton it is using. - * - * @name SpineGameObject#scaleY - * @type {number} - * @default 1 - * @since 3.19.0 - */ - scaleY: { - - get: function () - { - return this._scaleY; - }, - - set: function (value) - { - this._scaleY = value; - - this.refresh(); - } - - }, - - /** - * Returns an array containing the names of all the bones in the Skeleton Data. - * - * @method SpineGameObject#getBoneList - * @since 3.19.0 - * - * @return {string[]} An array containing the names of all the bones in the Skeleton Data. - */ - getBoneList: function () - { - var output = []; - - var skeletonData = this.skeletonData; - - if (skeletonData) - { - for (var i = 0; i < skeletonData.bones.length; i++) - { - output.push(skeletonData.bones[i].name); - } - } - - return output; - }, - - /** - * Returns an array containing the names of all the skins in the Skeleton Data. - * - * @method SpineGameObject#getSkinList - * @since 3.19.0 - * - * @return {string[]} An array containing the names of all the skins in the Skeleton Data. - */ - getSkinList: function () - { - var output = []; - - var skeletonData = this.skeletonData; - - if (skeletonData) - { - for (var i = 0; i < skeletonData.skins.length; i++) - { - output.push(skeletonData.skins[i].name); - } - } - - return output; - }, - - /** - * Returns an array containing the names of all the slots in the Skeleton. - * - * @method SpineGameObject#getSlotList - * @since 3.19.0 - * - * @return {string[]} An array containing the names of all the slots in the Skeleton. - */ - getSlotList: function () - { - var output = []; - - var skeleton = this.skeleton; - - for (var i = 0; i < skeleton.slots.length; i++) - { - output.push(skeleton.slots[i].data.name); - } - - return output; - }, - - /** - * Returns an array containing the names of all the animations in the Skeleton Data. - * - * @method SpineGameObject#getAnimationList - * @since 3.19.0 - * - * @return {string[]} An array containing the names of all the animations in the Skeleton Data. - */ - getAnimationList: function () - { - var output = []; - - var skeletonData = this.skeletonData; - - if (skeletonData) - { - for (var i = 0; i < skeletonData.animations.length; i++) - { - output.push(skeletonData.animations[i].name); - } - } - - return output; - }, - - /** - * Returns the current animation being played on the given track, if any. - * - * @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) - { - if (trackIndex === undefined) { trackIndex = 0; } - - var current = this.state.getCurrent(trackIndex); - - if (current) - { - return current.animation; - } - }, - - /** - * 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 - * @fires SpinePluginEvents#START - * @since 3.19.0 - * - * @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. - * - * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead. - */ - play: function (animationName, loop, ignoreIfPlaying) - { - this.setAnimation(0, animationName, loop, ignoreIfPlaying); - - return this; - }, - - /** - * 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 - * @fires SpinePluginEvents#START - * @since 3.19.0 - * - * @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 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. - */ - setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying) - { - if (loop === undefined) { loop = false; } - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - - if (ignoreIfPlaying && this.state) - { - var currentTrack = this.state.getCurrent(trackIndex); - - if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) - { - return; - } - } - - if (this.findAnimation(animationName)) - { - return this.state.setAnimation(trackIndex, animationName, loop); - } - }, - - /** - * 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). - * If the previous entry is looping, its next loop completion is used instead of its duration. - * - * @method SpineGameObject#addAnimation - * @since 3.19.0 - * - * @param {integer} trackIndex - The track index to add the animation to. - * @param {string} animationName - The string-based key of the animation to add. - * @param {boolean} [loop=false] - Should the animation be looped when played? - * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played. - * - * @return {spine.TrackEntry} A track entry to allow further customization of animation playback. - */ - addAnimation: function (trackIndex, animationName, loop, delay) - { - if (loop === undefined) { loop = false; } - if (delay === undefined) { delay = 0; } - - return this.state.addAnimation(trackIndex, animationName, loop, delay); - }, - - /** - * 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 - * transition from the value from lower tracks or from the setup pose value if no lower tracks key the - * property to the value keyed in the new animation. - * - * @method SpineGameObject#setEmptyAnimation - * @since 3.19.0 - * - * @param {integer} trackIndex - The track index to add the animation to. - * @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). - * - * @return {spine.TrackEntry} The returned Track Entry. - */ - setEmptyAnimation: function (trackIndex, mixDuration) - { - return this.state.setEmptyAnimation(trackIndex, mixDuration); - }, - - /** - * 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. - * - * @method SpineGameObject#clearTrack - * @since 3.19.0 - * - * @param {integer} trackIndex - The track index to add the animation to. - * - * @return {this} This Game Object. - */ - clearTrack: function (trackIndex) - { - this.state.clearTrack(trackIndex); - - 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. - * - * @method SpineGameObject#clearTracks - * @since 3.19.0 - * - * @return {this} This Game Object. - */ - clearTracks: function () - { - this.state.clearTracks(); - - return this; - }, - - /** - * 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 - * or show attachments from the new skin. - * - * @method SpineGameObject#setSkinByName - * @since 3.19.0 - * - * @param {string} skinName - The name of the skin to set. - * - * @return {this} This Game Object. - */ - setSkinByName: function (skinName) - { - var skeleton = this.skeleton; - - skeleton.setSkinByName(skinName); - - skeleton.setSlotsToSetupPose(); - - this.state.apply(skeleton); - - return this; - }, - - /** - * 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 - * or show attachments from the new skin. - * - * @method SpineGameObject#setSkin - * @since 3.19.0 - * - * @param {?spine.Skin} newSkin - The Skin to set. May be `null`. - * - * @return {this} This Game Object. - */ - setSkin: function (newSkin) - { - var skeleton = this.skeleton; - - skeleton.setSkin(newSkin); - - skeleton.setSlotsToSetupPose(); - - this.state.apply(skeleton); - - return this; - }, - - /** - * Sets the mix duration when changing from the specified animation to the other. - * - * @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). - * - * @return {this} This Game Object. - */ - setMix: function (fromName, toName, duration) - { - this.stateData.setMix(fromName, toName, duration); - - return this; - }, - - /** - * Finds an attachment by looking in the skin and defaultSkin using the slot - * index and attachment name. First the skin is checked and if the attachment was not found, - * the default skin is checked. - * - * @method SpineGameObject#getAttachment - * @since 3.19.0 - * - * @param {integer} slotIndex - The slot index to search. - * @param {string} attachmentName - The attachment name to look for. - * - * @return {?spine.Attachment} The Attachment, if found. May be null. - */ - getAttachment: function (slotIndex, attachmentName) - { - return this.skeleton.getAttachment(slotIndex, attachmentName); - }, - - /** - * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name. - * - * @method SpineGameObject#getAttachmentByName - * @since 3.19.0 - * - * @param {string} slotName - The slot name to search. - * @param {string} attachmentName - The attachment name to look for. - * - * @return {?spine.Attachment} The Attachment, if found. May be null. - */ - getAttachmentByName: function (slotName, attachmentName) - { - return this.skeleton.getAttachmentByName(slotName, attachmentName); - }, - - /** - * A convenience method to set an attachment by finding the slot with findSlot, - * finding the attachment with getAttachment, then setting the slot's attachment. - * - * @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. - * - * @return {this} This Game Object. - */ - setAttachment: function (slotName, attachmentName) - { - if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length) - { - for (var i = 0; i < slotName.length; i++) - { - this.skeleton.setAttachment(slotName[i], attachmentName[i]); - } - } - else - { - this.skeleton.setAttachment(slotName, attachmentName); - } - - return this; - }, - - /** - * Sets the bones, constraints, slots, and draw order to their setup pose values. - * - * @method SpineGameObject#setToSetupPose - * @since 3.19.0 - * - * @return {this} This Game Object. - */ - setToSetupPose: function () - { - this.skeleton.setToSetupPose(); - - return this; - }, - - /** - * Sets the slots and draw order to their setup pose values. - * - * @method SpineGameObject#setSlotsToSetupPose - * @since 3.19.0 - * - * @return {this} This Game Object. - */ - setSlotsToSetupPose: function () - { - this.skeleton.setSlotsToSetupPose(); - - return this; - }, - - /** - * Sets the bones and constraints to their setup pose values. - * - * @method SpineGameObject#setBonesToSetupPose - * @since 3.19.0 - * - * @return {this} This Game Object. - */ - setBonesToSetupPose: function () - { - this.skeleton.setBonesToSetupPose(); - - return this; - }, - - /** - * Gets the root bone, or null. - * - * @method SpineGameObject#getRootBone - * @since 3.19.0 - * - * @return {spine.Bone} The root bone, or null. - */ - getRootBone: function () - { - return this.skeleton.getRootBone(); - }, - - /** - * Takes a Bone object and a position in world space and rotates the Bone so it is angled - * towards the given position. You can set an optional angle offset, should the bone be - * designed at a specific angle already. You can also set a minimum and maximum range for the angle. - * - * @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. - * @param {number} [offset=0] - An offset to add to the rotation angle. - * @param {number} [minAngle=0] - The minimum range of the rotation angle. - * @param {number} [maxAngle=360] - The maximum range of the rotation angle. - * - * @return {this} This Game Object. - */ - angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle) - { - if (offset === undefined) { offset = 0; } - if (minAngle === undefined) { minAngle = 0; } - if (maxAngle === undefined) { maxAngle = 360; } - - var renderer = this.plugin.renderer; - var height = renderer.height; - - var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset)); - - bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle); - - return this; - }, - - /** - * Finds a bone by comparing each bone's name. It is more efficient to cache the results - * of this method than to call it multiple times. - * - * @method SpineGameObject#findBone - * @since 3.19.0 - * - * @param {string} boneName - The name of the bone to find. - * - * @return {spine.Bone} The bone, or null. - */ - findBone: function (boneName) - { - return this.skeleton.findBone(boneName); - }, - - /** - * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results - * of this method than to call it multiple times. - * - * @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. - */ - findBoneIndex: function (boneName) - { - return this.skeleton.findBoneIndex(boneName); - }, - - /** - * Finds a slot by comparing each slot's name. It is more efficient to cache the results - * of this method than to call it multiple times. - * - * @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. - */ - findSlot: function (slotName) - { - return this.skeleton.findSlot(slotName); - }, - - /** - * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results - * of this method than to call it multiple times. - * - * @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. - */ - findSlotIndex: function (slotName) - { - return this.skeleton.findSlotIndex(slotName); - }, - - /** - * Finds a skin by comparing each skin's name. It is more efficient to cache the results of - * this method than to call it multiple times. - * - * @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. - */ - findSkin: function (skinName) - { - return this.skeletonData.findSkin(skinName); - }, - - /** - * Finds an event by comparing each events's name. It is more efficient to cache the results - * of this method than to call it multiple times. - * - * @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. - */ - findEvent: function (eventDataName) - { - return this.skeletonData.findEvent(eventDataName); - }, - - /** - * Finds an animation by comparing each animation's name. It is more efficient to cache the results - * of this method than to call it multiple times. - * - * @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. - */ - findAnimation: function (animationName) - { - return this.skeletonData.findAnimation(animationName); - }, - - /** - * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results - * of this method than to call it multiple times. - * - * @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. - */ - findIkConstraint: function (constraintName) - { - return this.skeletonData.findIkConstraint(constraintName); - }, - - /** - * Finds an transform constraint by comparing each transform constraint's name. - * It is more efficient to cache the results of this method than to call it multiple times. - * - * @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. - */ - findTransformConstraint: function (constraintName) - { - return this.skeletonData.findTransformConstraint(constraintName); - }, - - /** - * Finds a path constraint by comparing each path constraint's name. - * It is more efficient to cache the results of this method than to call it multiple times. - * - * @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. - */ - findPathConstraint: function (constraintName) - { - return this.skeletonData.findPathConstraint(constraintName); - }, - - /** - * Finds the index of a path constraint by comparing each path constraint's name. - * It is more efficient to cache the results of this method than to call it multiple times. - * - * @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. - */ - findPathConstraintIndex: function (constraintName) - { - return this.skeletonData.findPathConstraintIndex(constraintName); - }, - - /** - * 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 () - { - return this.plugin.getBounds(this.skeleton); - }, - - /** - * Internal update handler. - * - * @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. - */ - preUpdate: function (time, delta) - { - var skeleton = this.skeleton; - - this.state.update((delta / 1000) * this.timeScale); - - this.state.apply(skeleton); - }, - - /** - * Internal destroy handler, called as part of the destroy process. - * - * @method SpineGameObject#preDestroy - * @protected - * @since 3.19.0 - */ - preDestroy: function () - { - if (this.state) - { - this.state.clearListeners(); - this.state.clearListenerNotifications(); - } - - this.plugin = null; - - this.skeleton = null; - this.skeletonData = null; - - this.state = null; - this.stateData = null; - } - -}); - -module.exports = SpineGameObject; - - -/***/ }), - -/***/ "./gameobject/SpineGameObjectCanvasRenderer.js": -/*!*****************************************************!*\ - !*** ./gameobject/SpineGameObjectCanvasRenderer.js ***! - \*****************************************************/ -/***/ ((module, __unused_webpack_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 CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.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 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 SpineGameObject#renderCanvas - * @since 3.19.0 - * @private - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix) -{ - var context = renderer.currentContext; - - var plugin = src.plugin; - var skeleton = src.skeleton; - var skeletonRenderer = plugin.skeletonRenderer; - - var camMatrix = renderer._tempMatrix1; - var spriteMatrix = renderer._tempMatrix2; - var calcMatrix = renderer._tempMatrix3; - - camera.addToRenderList(src); - - spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.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); - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - - skeleton.x = calcMatrix.tx; - skeleton.y = calcMatrix.ty; - - skeleton.scaleX = calcMatrix.scaleX; - - // Inverse or we get upside-down skeletons - skeleton.scaleY = calcMatrix.scaleY * -1; - - 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) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - - skeleton.updateWorldTransform(); - - skeletonRenderer.ctx = context; - skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug); - - context.save(); - - skeletonRenderer.draw(skeleton); - - context.restore(); -}; - -module.exports = SpineGameObjectCanvasRenderer; - - -/***/ }), - -/***/ "./gameobject/SpineGameObjectRender.js": -/*!*********************************************!*\ - !*** ./gameobject/SpineGameObjectRender.js ***! - \*********************************************/ -/***/ ((module, __unused_webpack_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 renderWebGL = __webpack_require__(/*! ../../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); -var renderCanvas = __webpack_require__(/*! ../../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); -var renderDirect = __webpack_require__(/*! ../../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); - -if (true) -{ - renderWebGL = __webpack_require__(/*! ./SpineGameObjectWebGLRenderer */ "./gameobject/SpineGameObjectWebGLRenderer.js"); - renderDirect = __webpack_require__(/*! ./SpineGameObjectWebGLDirect */ "./gameobject/SpineGameObjectWebGLDirect.js"); -} - -if (true) -{ - renderCanvas = __webpack_require__(/*! ./SpineGameObjectCanvasRenderer */ "./gameobject/SpineGameObjectCanvasRenderer.js"); -} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas, - renderDirect: renderDirect - -}; - - -/***/ }), - -/***/ "./gameobject/SpineGameObjectWebGLDirect.js": -/*!**************************************************!*\ - !*** ./gameobject/SpineGameObjectWebGLDirect.js ***! - \**************************************************/ -/***/ ((module, __unused_webpack_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 Clamp = __webpack_require__(/*! ../../../../src/math/Clamp */ "../../../src/math/Clamp.js"); -var CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.js"); -var GetCalcMatrix = __webpack_require__(/*! ../../../../src/gameobjects/GetCalcMatrix */ "../../../src/gameobjects/GetCalcMatrix.js"); -var RadToDeg = __webpack_require__(/*! ../../../../src/math/RadToDeg */ "../../../src/math/RadToDeg.js"); -var Wrap = __webpack_require__(/*! ../../../../src/math/Wrap */ "../../../src/math/Wrap.js"); - -/** - * Directly 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 SpineGameObject#renderDirect - * @since 3.50.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. - */ -var SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container) -{ - var plugin = src.plugin; - var skeleton = src.skeleton; - var sceneRenderer = plugin.sceneRenderer; - - // flush + clear previous pipeline if this is a new type - renderer.pipelines.clear(); - - sceneRenderer.begin(); - - var scrollFactorX = src.scrollFactorX; - var scrollFactorY = src.scrollFactorY; - var alpha = skeleton.color.a; - - if (container) - { - src.scrollFactorX = container.scrollFactorX; - src.scrollFactorY = container.scrollFactorY; - - skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); - } - - camera.addToRenderList(src); - - var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - - 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; - - // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled - src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); - } - 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 (renderer.currentFramebuffer !== null) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - */ - - skeleton.updateWorldTransform(); - - // Draw the current skeleton - - sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); - - if (container) - { - src.scrollFactorX = scrollFactorX; - src.scrollFactorY = scrollFactorY; - skeleton.color.a = alpha; - } - - if (plugin.drawDebug || src.drawDebug) - { - // Because if we don't, the bones render positions are completely wrong (*sigh*) - var oldX = skeleton.x; - var oldY = skeleton.y; - - skeleton.x = 0; - skeleton.y = 0; - - sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); - - skeleton.x = oldX; - skeleton.y = oldY; - } - - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch - sceneRenderer.end(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); -}; - -module.exports = SpineGameObjectWebGLDirect; - - -/***/ }), - -/***/ "./gameobject/SpineGameObjectWebGLRenderer.js": -/*!****************************************************!*\ - !*** ./gameobject/SpineGameObjectWebGLRenderer.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_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 Clamp = __webpack_require__(/*! ../../../../src/math/Clamp */ "../../../src/math/Clamp.js"); -var CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.js"); -var GetCalcMatrix = __webpack_require__(/*! ../../../../src/gameobjects/GetCalcMatrix */ "../../../src/gameobjects/GetCalcMatrix.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 SpineGameObject#renderWebGL - * @since 3.19.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. - */ -var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container) -{ - var plugin = src.plugin; - var skeleton = src.skeleton; - var sceneRenderer = plugin.sceneRenderer; - - if (renderer.newType) - { - // flush + clear previous pipeline if this is a new type - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - - var scrollFactorX = src.scrollFactorX; - var scrollFactorY = src.scrollFactorY; - var alpha = skeleton.color.a; - - if (container) - { - src.scrollFactorX = container.scrollFactorX; - src.scrollFactorY = container.scrollFactorY; - - skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); - } - - camera.addToRenderList(src); - - var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - - 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; - - // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled - src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); - } - 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 (renderer.currentFramebuffer !== null) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - */ - - skeleton.updateWorldTransform(); - - // Draw the current skeleton - - sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); - - if (container) - { - src.scrollFactorX = scrollFactorX; - src.scrollFactorY = scrollFactorY; - skeleton.color.a = alpha; - } - - if (plugin.drawDebug || src.drawDebug) - { - // Because if we don't, the bones render positions are completely wrong (*sigh*) - var oldX = skeleton.x; - var oldY = skeleton.y; - - skeleton.x = 0; - skeleton.y = 0; - - sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); - - skeleton.x = oldX; - skeleton.y = oldY; - } - - 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(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); - } -}; - -module.exports = SpineGameObjectWebGLRenderer; - - -/***/ }), - -/***/ "../../../src/core/events/BLUR_EVENT.js": -/*!**********************************************!*\ - !*** ../../../src/core/events/BLUR_EVENT.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!**********************************************!*\ - !*** ../../../src/core/events/BOOT_EVENT.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!******************************************************!*\ - !*** ../../../src/core/events/CONTEXT_LOST_EVENT.js ***! - \******************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!**********************************************************!*\ - !*** ../../../src/core/events/CONTEXT_RESTORED_EVENT.js ***! - \**********************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!*************************************************!*\ - !*** ../../../src/core/events/DESTROY_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***********************************************!*\ - !*** ../../../src/core/events/FOCUS_EVENT.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!************************************************!*\ - !*** ../../../src/core/events/HIDDEN_EVENT.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***********************************************!*\ - !*** ../../../src/core/events/PAUSE_EVENT.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!*****************************************************!*\ - !*** ../../../src/core/events/POST_RENDER_EVENT.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***************************************************!*\ - !*** ../../../src/core/events/POST_STEP_EVENT.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!****************************************************!*\ - !*** ../../../src/core/events/PRE_RENDER_EVENT.js ***! - \****************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!**************************************************!*\ - !*** ../../../src/core/events/PRE_STEP_EVENT.js ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***********************************************!*\ - !*** ../../../src/core/events/READY_EVENT.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!************************************************!*\ - !*** ../../../src/core/events/RESUME_EVENT.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!**********************************************!*\ - !*** ../../../src/core/events/STEP_EVENT.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!*************************************************!*\ - !*** ../../../src/core/events/VISIBLE_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!*****************************************!*\ - !*** ../../../src/core/events/index.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_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": -/*!****************************************!*\ - !*** ../../../src/data/DataManager.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_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 Events = __webpack_require__(/*! ./events */ "../../../src/data/events/index.js"); - -/** - * @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(Events.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 {number} - * @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; - - -/***/ }), - -/***/ "../../../src/data/events/CHANGE_DATA_EVENT.js": -/*!*****************************************************!*\ - !*** ../../../src/data/events/CHANGE_DATA_EVENT.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js": -/*!*********************************************************!*\ - !*** ../../../src/data/events/CHANGE_DATA_KEY_EVENT.js ***! - \*********************************************************/ -/***/ ((module) => { - -/** - * @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-'; - - -/***/ }), - -/***/ "../../../src/data/events/DESTROY_EVENT.js": -/*!*************************************************!*\ - !*** ../../../src/data/events/DESTROY_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Data Manager Destroy Event. - * - * The Data Manager will listen for the destroy event from its parent, and then close itself down. - * - * @event Phaser.Data.Events#DESTROY - * @since 3.50.0 - */ -module.exports = 'destroy'; - - -/***/ }), - -/***/ "../../../src/data/events/REMOVE_DATA_EVENT.js": -/*!*****************************************************!*\ - !*** ../../../src/data/events/REMOVE_DATA_EVENT.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/data/events/SET_DATA_EVENT.js": -/*!**************************************************!*\ - !*** ../../../src/data/events/SET_DATA_EVENT.js ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/data/events/index.js": -/*!*****************************************!*\ - !*** ../../../src/data/events/index.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./CHANGE_DATA_EVENT */ "../../../src/data/events/CHANGE_DATA_EVENT.js"), - CHANGE_DATA_KEY: __webpack_require__(/*! ./CHANGE_DATA_KEY_EVENT */ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js"), - DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "../../../src/data/events/DESTROY_EVENT.js"), - REMOVE_DATA: __webpack_require__(/*! ./REMOVE_DATA_EVENT */ "../../../src/data/events/REMOVE_DATA_EVENT.js"), - SET_DATA: __webpack_require__(/*! ./SET_DATA_EVENT */ "../../../src/data/events/SET_DATA_EVENT.js") - -}; - - -/***/ }), - -/***/ "../../../src/display/mask/BitmapMask.js": -/*!***********************************************!*\ - !*** ../../../src/display/mask/BitmapMask.js ***! - \***********************************************/ -/***/ ((module, __unused_webpack_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"); -var RenderEvents = __webpack_require__(/*! ../../renderer/events */ "../../../src/renderer/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. - * - * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, - * combine Geometry Masks and Blend Modes together. - * - * 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.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 masks 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; - - /** - * 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; - - /** - * The Scene which this Bitmap Mask will be used in. - * - * @name Phaser.Display.Masks.BitmapMask#scene - * @type {Phaser.Scene} - * @since 3.60.0 - */ - this.scene = scene; - - this.createMask(); - - scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (renderer) - { - renderer.on(RenderEvents.RESIZE, this.createMask, this); - } - }, - - /** - * Creates the WebGL Texture2D objects and Framebuffers required for this - * mask. If this mask has already been created, then `clearMask` is called first. - * - * @method Phaser.Display.Masks.BitmapMask#createMask - * @since 3.50.0 - */ - createMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl) - { - return; - } - - if (this.mainTexture) - { - this.clearMask(); - } - - 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); - }, - - /** - * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes - * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references. - * - * This is called when this mask is destroyed, or if you try to creat a new - * mask from this object when one is already set. - * - * @method Phaser.Display.Masks.BitmapMask#clearMask - * @since 3.50.0 - */ - clearMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl || !this.mainTexture) - { - return; - } - - 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; - }, - - /** - * 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.BITMAPMASK_PIPELINE.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.BITMAPMASK_PIPELINE.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.clearMask(); - - this.scene.sys.game.events.off(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (this.renderer) - { - this.renderer.off(RenderEvents.RESIZE, this.createMask, this); - } - - this.bitmapMask = null; - this.prevFramebuffer = null; - this.renderer = null; - } - -}); - -module.exports = BitmapMask; - - -/***/ }), - -/***/ "../../../src/display/mask/GeometryMask.js": -/*!*************************************************!*\ - !*** ../../../src/display/mask/GeometryMask.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_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. - * - * This is a WebGL only feature. - * - * @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. - * - * This is a WebGL only feature. - * - * @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, 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--; - - // Force flush before disabling stencil test - renderer.flush(); - - var current = renderer.currentMask; - - if (renderer.maskStack.length === 0) - { - // If this is the only mask in the stack, flush and disable - current.mask = null; - - gl.disable(gl.STENCIL_TEST); - } - else - { - var prev = renderer.maskStack[renderer.maskStack.length - 1]; - - prev.mask.applyStencil(renderer, prev.camera, false); - - if (renderer.currentCameraMask.mask !== prev.mask) - { - current.mask = prev.mask; - current.camera = prev.camera; - } - else - { - current.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, 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": -/*!***************************************************!*\ - !*** ../../../src/gameobjects/BuildGameObject.js ***! - \***************************************************/ -/***/ ((module, __unused_webpack_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"); -var GetAdvancedValue = __webpack_require__(/*! ../utils/object/GetAdvancedValue */ "../../../src/utils/object/GetAdvancedValue.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/gameobjects/GameObject.js": -/*!**********************************************!*\ - !*** ../../../src/gameobjects/GameObject.js ***! - \**********************************************/ -/***/ ((module, __unused_webpack_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 ComponentsToJSON = __webpack_require__(/*! ./components/ToJSON */ "../../../src/gameobjects/components/ToJSON.js"); -var DataManager = __webpack_require__(/*! ../data/DataManager */ "../../../src/data/DataManager.js"); -var EventEmitter = __webpack_require__(/*! eventemitter3 */ "../../../node_modules/eventemitter3/index.js"); -var Events = __webpack_require__(/*! ./events */ "../../../src/gameobjects/events/index.js"); -var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene/events/index.js"); - -/** - * @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); - - /** - * A reference to the Scene to which this Game Object belongs. - * - * Game Objects can only belong to one Scene. - * - * You should consider this property as being read-only. You cannot move a - * Game Object to another Scene by simply changing it. - * - * @name Phaser.GameObjects.GameObject#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * Holds a reference to the Display List that contains this Game Object. - * - * This is set automatically when this Game Object is added to a Scene or Layer. - * - * You should treat this property as being read-only. - * - * @name Phaser.GameObjects.GameObject#displayList - * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} - * @default null - * @since 3.50.0 - */ - this.displayList = null; - - /** - * 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 {(number|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 {number} - * @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 {number} - * @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; - - this.on(Events.ADDED_TO_SCENE, this.addedToScene, this); - this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this); - - // 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 {(number|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 () - { - this.scene.sys.input.disable(this); - - 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) - { - var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; - - return !(!listWillRender || 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 {number[]} 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)); - - child = parent; - - if (!parent.parentContainer) - { - break; - } - else - { - parent = parent.parentContainer; - } - } - - if (this.displayList) - { - indexes.unshift(this.displayList.getIndex(child)); - } - else - { - indexes.unshift(this.scene.sys.displayList.getIndex(child)); - } - - return indexes; - }, - - /** - * Adds this Game Object to the given Display List. - * - * If no Display List is specified, it will default to the Display List owned by the Scene to which - * this Game Object belongs. - * - * A Game Object can only exist on one Display List at any given time, but may move freely between them. - * - * If this Game Object is already on another Display List when this method is called, it will first - * be removed from it, before being added to the new list. - * - * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. - * - * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly - * disable it from rendering, consider using the `setVisible` method, instead. - * - * @method Phaser.GameObjects.GameObject#addToDisplayList - * @fires Phaser.Scenes.Events#ADDED_TO_SCENE - * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE - * @since 3.53.0 - * - * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List. - * - * @return {this} This Game Object. - */ - addToDisplayList: function (displayList) - { - if (displayList === undefined) { displayList = this.scene.sys.displayList; } - - if (this.displayList && this.displayList !== displayList) - { - this.removeFromDisplayList(); - } - - // Don't repeat if it's already on this list - if (!displayList.exists(this)) - { - this.displayList = displayList; - - displayList.add(this, true); - - displayList.queueDepthSort(); - - this.emit(Events.ADDED_TO_SCENE, this, this.scene); - - displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene); - } - - return this; - }, - - /** - * Adds this Game Object to the Update List belonging to the Scene. - * - * When a Game Object is added to the Update List it will have its `preUpdate` method called - * every game frame. This method is passed two parameters: `delta` and `time`. - * - * If you wish to run your own logic within `preUpdate` then you should always call - * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, - * such as Sprite animations. - * - * @method Phaser.GameObjects.GameObject#addToUpdateList - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - addToUpdateList: function () - { - if (this.scene && this.preUpdate) - { - this.scene.sys.updateList.add(this); - } - - return this; - }, - - /** - * Removes this Game Object from the Display List it is currently on. - * - * A Game Object can only exist on one Display List at any given time, but may move freely removed - * and added back at a later stage. - * - * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. - * - * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly - * disable it from rendering, consider using the `setVisible` method, instead. - * - * @method Phaser.GameObjects.GameObject#removeFromDisplayList - * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE - * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - removeFromDisplayList: function () - { - var displayList = this.displayList || this.scene.sys.displayList; - - if (displayList.exists(this)) - { - displayList.remove(this, true); - - displayList.queueDepthSort(); - - this.displayList = null; - - this.emit(Events.REMOVED_FROM_SCENE, this, this.scene); - - displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene); - } - - return this; - }, - - /** - * Removes this Game Object from the Scene's Update List. - * - * When a Game Object is on the Update List, it will have its `preUpdate` method called - * every game frame. Calling this method will remove it from the list, preventing this. - * - * Removing a Game Object from the Update List will stop most internal functions working. - * For example, removing a Sprite from the Update List will prevent it from being able to - * run animations. - * - * @method Phaser.GameObjects.GameObject#removeFromUpdateList - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - removeFromUpdateList: function () - { - if (this.scene && this.preUpdate) - { - this.scene.sys.updateList.remove(this); - } - - return this; - }, - - /** - * 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] - `True` if this Game Object is being destroyed by the Scene, `false` if not. - */ - destroy: function (fromScene) - { - // This Game Object has already been destroyed - if (!this.scene || this.ignoreDestroy) - { - return; - } - - if (fromScene === undefined) { fromScene = false; } - - if (this.preDestroy) - { - this.preDestroy.call(this); - } - - this.emit(Events.DESTROY, this, fromScene); - - this.removeAllListeners(); - - if (this.postPipelines) - { - this.resetPostPipeline(true); - } - - this.removeFromDisplayList(); - this.removeFromUpdateList(); - - if (this.input) - { - this.scene.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; - } - - this.active = false; - this.visible = false; - - this.scene = undefined; - this.parentContainer = undefined; - } - -}); - -/** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. - * - * @constant {number} RENDER_MASK - * @memberof Phaser.GameObjects.GameObject - * @default - */ -GameObject.RENDER_MASK = 15; - -module.exports = GameObject; - - -/***/ }), - -/***/ "../../../src/gameobjects/GetCalcMatrix.js": -/*!*************************************************!*\ - !*** ../../../src/gameobjects/GetCalcMatrix.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var TransformMatrix = __webpack_require__(/*! ./components/TransformMatrix */ "../../../src/gameobjects/components/TransformMatrix.js"); - -var tempMatrix1 = new TransformMatrix(); -var tempMatrix2 = new TransformMatrix(); -var tempMatrix3 = new TransformMatrix(); - -var result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 }; - -/** - * Calculates the Transform Matrix of the given Game Object and Camera, factoring in - * the parent matrix if provided. - * - * Note that the object this results contains _references_ to the Transform Matrices, - * not new instances of them. Therefore, you should use their values immediately, or - * copy them to your own matrix, as they will be replaced as soon as another Game - * Object is rendered. - * - * @function Phaser.GameObjects.GetCalcMatrix - * @memberof Phaser.GameObjects - * @since 3.50.0 - * - * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any. - * - * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices. - */ -var GetCalcMatrix = function (src, camera, parentMatrix) -{ - var camMatrix = tempMatrix1; - var spriteMatrix = tempMatrix2; - var calcMatrix = tempMatrix3; - - spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = src.x; - spriteMatrix.f = src.y; - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - - return result; -}; - -module.exports = GetCalcMatrix; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/Alpha.js": -/*!****************************************************!*\ - !*** ../../../src/gameobjects/components/Alpha.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_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": -/*!**********************************************************!*\ - !*** ../../../src/gameobjects/components/AlphaSingle.js ***! - \**********************************************************/ -/***/ ((module, __unused_webpack_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/BlendMode.js": -/*!********************************************************!*\ - !*** ../../../src/gameobjects/components/BlendMode.js ***! - \********************************************************/ -/***/ ((module, __unused_webpack_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 {number} - * @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": -/*!***********************************************************!*\ - !*** ../../../src/gameobjects/components/ComputedSize.js ***! - \***********************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/Crop.js": -/*!***************************************************!*\ - !*** ../../../src/gameobjects/components/Crop.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!****************************************************!*\ - !*** ../../../src/gameobjects/components/Depth.js ***! - \****************************************************/ -/***/ ((module) => { - -/** - * @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 {number} - * @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) - { - if (this.displayList) - { - this.displayList.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 {number} 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; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/FX.js": -/*!*************************************************!*\ - !*** ../../../src/gameobjects/components/FX.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for setting the FX values of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.FX - * @webglOnly - * @since 3.60.0 - */ - -var FX = { - - /** - * The amount of extra padding to be applied to this Game Object - * when it is being rendered by a SpriteFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shaddow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * @name Phaser.GameObjects.Components.FX#fxPadding - * @type {number} - * @default 0 - * @since 3.60.0 - */ - fxPadding: 0, - - /** - * Sets the amount of extra padding to be applied to this Game Object - * when it is being rendered by a SpriteFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shaddow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * @method Phaser.GameObjects.Components.FX#setFXPadding - * @webglOnly - * @since 3.60.0 - * - * @param {number} [padding=0] - The amount of padding to add to the texture. - * - * @return {this} This Game Object instance. - */ - setFXPadding: function (padding) - { - if (padding === undefined) { padding = 0; } - - this.fxPadding = padding; - - return this; - }, - - /** - * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. - * - * This happens when the pipeline uses its `copySprite` method. - * - * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFXCopy - * @webglOnly - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. - */ - onFXCopy: function () - { - }, - - /** - * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. - * - * This happens when the pipeline uses its `drawSprite` method. - * - * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFX - * @webglOnly - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. - */ - onFX: function () - { - } - -}; - -module.exports = FX; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/Flip.js": -/*!***************************************************!*\ - !*** ../../../src/gameobjects/components/Flip.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/GetBounds.js": -/*!********************************************************!*\ - !*** ../../../src/gameobjects/components/GetBounds.js ***! - \********************************************************/ -/***/ ((module, __unused_webpack_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": -/*!***************************************************!*\ - !*** ../../../src/gameobjects/components/Mask.js ***! - \***************************************************/ -/***/ ((module, __unused_webpack_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. - * - * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. - * - * 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|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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 instanceof Phaser.GameObjects.Graphics || this instanceof Phaser.GameObjects.Shape)) - { - // eslint-disable-next-line consistent-this - graphics = this; - } - - return new GeometryMask(this.scene, graphics); - } - -}; - -module.exports = Mask; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/Origin.js": -/*!*****************************************************!*\ - !*** ../../../src/gameobjects/components/Origin.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***********************************************************!*\ - !*** ../../../src/gameobjects/components/PathFollower.js ***! - \***********************************************************/ -/***/ ((module, __unused_webpack_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 {number} - * @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(tweenData.end, 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": -/*!*******************************************************!*\ - !*** ../../../src/gameobjects/components/Pipeline.js ***! - \*******************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var DeepCopy = __webpack_require__(/*! ../../utils/object/DeepCopy */ "../../../src/utils/object/DeepCopy.js"); -var PIPELINE_CONST = __webpack_require__(/*! ../../renderer/webgl/pipelines/const */ "../../../src/renderer/webgl/pipelines/const.js"); -var SpliceOne = __webpack_require__(/*! ../../utils/array/SpliceOne */ "../../../src/utils/array/SpliceOne.js"); - -/** - * 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. - * - * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default. - * - * @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, - - /** - * Does this Game Object have any Post Pipelines set? - * - * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline - * @type {boolean} - * @webglOnly - * @since 3.50.0 - */ - hasPostPipeline: false, - - /** - * The WebGL Post FX Pipelines this Game Object uses for post-render effects. - * - * The pipelines are processed in the order in which they appear in this array. - * - * If you modify this array directly, be sure to set the - * `hasPostPipeline` property accordingly. - * - * @name Phaser.GameObjects.Components.Pipeline#postPipelines - * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} - * @webglOnly - * @since 3.50.0 - */ - postPipelines: null, - - /** - * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses. - * - * @name Phaser.GameObjects.Components.Pipeline#pipelineData - * @type {object} - * @webglOnly - * @since 3.50.0 - */ - pipelineData: null, - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * - * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`. - * - * @method Phaser.GameObjects.Components.Pipeline#initPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - initPipeline: function (pipeline) - { - if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; } - - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return false; - } - - var pipelines = renderer.pipelines; - - this.postPipelines = []; - this.pipelineData = {}; - - if (pipelines) - { - var instance = pipelines.get(pipeline); - - if (instance) - { - this.defaultPipeline = instance; - this.pipeline = instance; - - return true; - } - } - - return false; - }, - - /** - * Sets the main WebGL Pipeline of this Game Object. - * - * Also sets the `pipelineData` property, if the parameter is given. - * - * Both the pipeline and post pipelines share the same pipeline data object. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. - * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. - * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. - * - * @return {this} This Game Object instance. - */ - setPipeline: function (pipeline, pipelineData, copyData) - { - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return this; - } - - var pipelines = renderer.pipelines; - - if (pipelines) - { - var instance = pipelines.get(pipeline); - - if (instance) - { - this.pipeline = instance; - } - - if (pipelineData) - { - this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; - } - } - - return this; - }, - - /** - * Sets one, or more, Post Pipelines on this Game Object. - * - * Post Pipelines are invoked after this Game Object has rendered to its target and - * are commonly used for post-fx. - * - * The post pipelines are appended to the `postPipelines` array belonging to this - * Game Object. When the renderer processes this Game Object, it iterates through the post - * pipelines in the order in which they appear in the array. If you are stacking together - * multiple effects, be aware that the order is important. - * - * If you call this method multiple times, the new pipelines will be appended to any existing - * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. - * - * You can optionally also set the `pipelineData` property, if the parameter is given. - * - * Both the pipeline and post pipelines share the pipeline data object together. - * - * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them. - * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. - * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. - * - * @return {this} This Game Object instance. - */ - setPostPipeline: function (pipelines, pipelineData, copyData) - { - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return this; - } - - var pipelineManager = renderer.pipelines; - - if (pipelineManager) - { - if (!Array.isArray(pipelines)) - { - pipelines = [ pipelines ]; - } - - for (var i = 0; i < pipelines.length; i++) - { - var instance = pipelineManager.getPostPipeline(pipelines[i], this); - - if (instance) - { - this.postPipelines.push(instance); - } - } - - if (pipelineData) - { - this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; - } - } - - this.hasPostPipeline = (this.postPipelines.length > 0); - - return this; - }, - - /** - * Adds an entry to the `pipelineData` object belonging to this Game Object. - * - * If the 'key' already exists, its value is updated. If it doesn't exist, it is created. - * - * If `value` is undefined, and `key` exists, `key` is removed from the data object. - * - * Both the pipeline and post pipelines share the pipeline data object together. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipelineData - * @webglOnly - * @since 3.50.0 - * - * @param {string} key - The key of the pipeline data to set, update, or delete. - * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object. - * - * @return {this} This Game Object instance. - */ - setPipelineData: function (key, value) - { - var data = this.pipelineData; - - if (value === undefined) - { - delete data[key]; - } - else - { - data[key] = value; - } - - return this; - }, - - /** - * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it. - * - * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class. - * - * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array. - */ - getPostPipeline: function (pipeline) - { - var pipelines = this.postPipelines; - - var results = []; - - for (var i = 0; i < pipelines.length; i++) - { - var instance = pipelines[i]; - - if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline) - { - results.push(instance); - } - } - - return (results.length === 1) ? results[0] : results; - }, - - /** - * 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 - * - * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines? - * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? - * - * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`. - */ - resetPipeline: function (resetPostPipelines, resetData) - { - if (resetPostPipelines === undefined) { resetPostPipelines = false; } - if (resetData === undefined) { resetData = false; } - - this.pipeline = this.defaultPipeline; - - if (resetPostPipelines) - { - this.postPipelines = []; - this.hasPostPipeline = false; - } - - if (resetData) - { - this.pipelineData = {}; - } - - return (this.pipeline !== null); - }, - - /** - * Resets the WebGL Post Pipelines of this Game Object. It does this by calling - * the `destroy` method on each post pipeline and then clearing the local array. - * - * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? - */ - resetPostPipeline: function (resetData) - { - if (resetData === undefined) { resetData = false; } - - var pipelines = this.postPipelines; - - for (var i = 0; i < pipelines.length; i++) - { - pipelines[i].destroy(); - } - - this.postPipelines = []; - this.hasPostPipeline = false; - - if (resetData) - { - this.pipelineData = {}; - } - }, - - /** - * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them. - * - * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead. - * - * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class. - * - * @return {this} This Game Object. - */ - removePostPipeline: function (pipeline) - { - var pipelines = this.postPipelines; - - for (var i = pipelines.length - 1; i >= 0; i--) - { - var instance = pipelines[i]; - - if ( - (typeof pipeline === 'string' && instance.name === pipeline) || - (typeof pipeline !== 'string' && instance instanceof pipeline)) - { - instance.destroy(); - - SpliceOne(pipelines, i); - } - } - - this.hasPostPipeline = (this.postPipelines.length > 0); - - return this; - }, - - /** - * 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": -/*!***********************************************************!*\ - !*** ../../../src/gameobjects/components/ScrollFactor.js ***! - \***********************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/Size.js": -/*!***************************************************!*\ - !*** ../../../src/gameobjects/components/Size.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!******************************************************!*\ - !*** ../../../src/gameobjects/components/Texture.js ***! - \******************************************************/ -/***/ ((module) => { - -/** - * @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|number)} [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|number)} 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": -/*!**********************************************************!*\ - !*** ../../../src/gameobjects/components/TextureCrop.js ***! - \**********************************************************/ -/***/ ((module) => { - -/** - * @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|number)} [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|number)} 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": -/*!***************************************************!*\ - !*** ../../../src/gameobjects/components/Tint.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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 = { - - /** - * The tint value being applied to the top-left vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintTopLeft - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintTopLeft: 0xffffff, - - /** - * The tint value being applied to the top-right vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintTopRight - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintTopRight: 0xffffff, - - /** - * The tint value being applied to the bottom-left vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomLeft - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintBottomLeft: 0xffffff, - - /** - * The tint value being applied to the bottom-right vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomRight - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintBottomRight: 0xffffff, - - /** - * The tint fill mode. - * - * `false` = An additive tint (the default), where vertices colors are blended with the texture. - * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. - * - * @name Phaser.GameObjects.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); - - 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {number} [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.tintTopLeft = topLeft; - this.tintTopRight = topRight; - this.tintBottomLeft = bottomLeft; - this.tintBottomRight = bottomRight; - - 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {number} [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 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 {number} - * @webglOnly - * @since 3.0.0 - */ - tint: { - - set: function (value) - { - this.setTint(value, value, value, value); - } - }, - - /** - * Does this Game Object have a tint applied? - * - * It checks to see if the 4 tint properties are set to the value 0xffffff - * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. - * - * @name Phaser.GameObjects.Components.Tint#isTinted - * @type {boolean} - * @webglOnly - * @readonly - * @since 3.11.0 - */ - isTinted: { - - get: function () - { - var white = 0xffffff; - - return ( - this.tintFill || - this.tintTopLeft !== white || - this.tintTopRight !== white || - this.tintBottomLeft !== white || - this.tintBottomRight !== white - ); - } - - } - -}; - -module.exports = Tint; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/ToJSON.js": -/*!*****************************************************!*\ - !*** ../../../src/gameobjects/components/ToJSON.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/Transform.js": -/*!********************************************************!*\ - !*** ../../../src/gameobjects/components/Transform.js ***! - \********************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ../../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 - -/** - * 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 {number} - * @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; - }, - - /** - * Copies an object's coordinates to this Game Object's position. - * - * @method Phaser.GameObjects.Components.Transform#copyPosition - * @since 3.50.0 - * - * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. - * - * @return {this} This Game Object instance. - */ - copyPosition: function (source) - { - if (source.x !== undefined) { this.x = source.x; } - if (source.y !== undefined) { this.y = source.y; } - if (source.z !== undefined) { this.z = source.z; } - if (source.w !== undefined) { this.w = source.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; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/TransformMatrix.js": -/*!**************************************************************!*\ - !*** ../../../src/gameobjects/components/TransformMatrix.js ***! - \**************************************************************/ -/***/ ((module, __unused_webpack_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 MATH_CONST = __webpack_require__(/*! ../../math/const */ "../../../src/math/const.js"); -var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/Vector2.js"); - -/** - * @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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. - * - * @return {Phaser.Types.Math.Vector2Like} 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; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/Visible.js": -/*!******************************************************!*\ - !*** ../../../src/gameobjects/components/Visible.js ***! - \******************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/gameobjects/components/index.js": -/*!****************************************************!*\ - !*** ../../../src/gameobjects/components/index.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_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"), - 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"), - FX: __webpack_require__(/*! ./FX */ "../../../src/gameobjects/components/FX.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": -/*!*******************************************************!*\ - !*** ../../../src/gameobjects/container/Container.js ***! - \*******************************************************/ -/***/ ((module, __unused_webpack_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 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 transform point 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. - * - * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child, - * or the input area will become misaligned. - * - * 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.Pipeline - * @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.Pipeline, - 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 {number} - * @default -1 - * @since 3.4.0 - */ - this.maxSize = -1; - - /** - * The cursor position. - * - * @name Phaser.GameObjects.Container#position - * @type {number} - * @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(); - - /** - * 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.4.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.4.0 - */ - this.scrollFactorY = 1; - - this.initPipeline(); - - 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 - * @override - * @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 - * @override - * @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 - * @override - * @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 - * @override - * @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) - { - if (gameObject.parentContainer) - { - gameObject.parentContainer.remove(gameObject); - } - - gameObject.removeFromDisplayList(); - - gameObject.parentContainer = this; - } - }, - - /** - * 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; - - gameObject.addToDisplayList(); - } - }, - - /** - * 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.x = source.x; - output.y = 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 {number} [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 {number} 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 {number} 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(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 {number} [startIndex=0] - An optional start index. - * @param {number} [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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included) - * - * @return {number} 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 {number} 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; - }, - - /** - * Moves a Game Object above another one within this Container. - * - * These 2 Game Objects must already be children of this Container. - * - * @method Phaser.GameObjects.Container#moveAbove - * @since 3.55.0 - * - * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object. - * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. - * - * @return {this} This Container instance. - */ - moveAbove: function (child1, child2) - { - ArrayUtils.MoveAbove(this.list, child1, child2); - - return this; - }, - - /** - * Moves a Game Object below another one within this Container. - * - * These 2 Game Objects must already be children of this Container. - * - * @method Phaser.GameObjects.Container#moveBelow - * @since 3.55.0 - * - * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object. - * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. - * - * @return {this} This Container instance. - */ - moveBelow: function (child1, child2) - { - ArrayUtils.MoveBelow(this.list, child1, child2); - - 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 {number} 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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [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.4.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 {number} - * @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 = []; - } - -}); - -module.exports = Container; - - -/***/ }), - -/***/ "../../../src/gameobjects/container/ContainerCanvasRenderer.js": -/*!*********************************************************************!*\ - !*** ../../../src/gameobjects/container/ContainerCanvasRenderer.js ***! - \*********************************************************************/ -/***/ ((module) => { - -/** - * @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 {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, camera, parentMatrix) -{ - camera.addToRenderList(container); - - 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, 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": -/*!*************************************************************!*\ - !*** ../../../src/gameobjects/container/ContainerRender.js ***! - \*************************************************************/ -/***/ ((module, __unused_webpack_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": -/*!********************************************************************!*\ - !*** ../../../src/gameobjects/container/ContainerWebGLRenderer.js ***! - \********************************************************************/ -/***/ ((module) => { - -/** - * @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 {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, camera, parentMatrix) -{ - camera.addToRenderList(container); - - var children = container.list; - var childCount = children.length; - - if (childCount === 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); - } - - renderer.pipelines.preBatch(container); - - 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; - - 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) ? (children[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, camera, transformMatrix); - - // Restore original values - - child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); - - child.setScrollFactor(childScrollFactorX, childScrollFactorY); - - if (mask) - { - mask.postRenderWebGL(renderer, camera); - } - - renderer.newType = false; - } - - renderer.pipelines.postBatch(container); -}; - -module.exports = ContainerWebGLRenderer; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js": -/*!***************************************************************!*\ - !*** ../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! - \***************************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!********************************************************!*\ - !*** ../../../src/gameobjects/events/DESTROY_EVENT.js ***! - \********************************************************/ -/***/ ((module) => { - -/** - * @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. - * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. - */ -module.exports = 'destroy'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js": -/*!*******************************************************************!*\ - !*** ../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! - \*******************************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***************************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! - \***************************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js": -/*!**************************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! - \**************************************************************/ -/***/ ((module) => { - -/** - * @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 {number} width - The width of the video. - * @param {number} height - The height of the video. - */ -module.exports = 'created'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js": -/*!************************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! - \************************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js": -/*!***********************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! - \***********************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js": -/*!***********************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! - \***********************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js": -/*!*************************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! - \*************************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js": -/*!**************************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! - \**************************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_STOP_EVENT.js": -/*!***********************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_STOP_EVENT.js ***! - \***********************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js": -/*!**************************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! - \**************************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js": -/*!***************************************************************!*\ - !*** ../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! - \***************************************************************/ -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ "../../../src/gameobjects/events/index.js": -/*!************************************************!*\ - !*** ../../../src/gameobjects/events/index.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./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"), - VIDEO_LOOP: __webpack_require__(/*! ./VIDEO_LOOP_EVENT */ "../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js"), - VIDEO_PLAY: __webpack_require__(/*! ./VIDEO_PLAY_EVENT */ "../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js"), - VIDEO_SEEKED: __webpack_require__(/*! ./VIDEO_SEEKED_EVENT */ "../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js"), - VIDEO_SEEKING: __webpack_require__(/*! ./VIDEO_SEEKING_EVENT */ "../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js"), - VIDEO_STOP: __webpack_require__(/*! ./VIDEO_STOP_EVENT */ "../../../src/gameobjects/events/VIDEO_STOP_EVENT.js"), - VIDEO_TIMEOUT: __webpack_require__(/*! ./VIDEO_TIMEOUT_EVENT */ "../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js"), - VIDEO_UNLOCKED: __webpack_require__(/*! ./VIDEO_UNLOCKED_EVENT */ "../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js") - -}; - - -/***/ }), - -/***/ "../../../src/geom/const.js": -/*!**********************************!*\ - !*** ../../../src/geom/const.js ***! - \**********************************/ -/***/ ((module) => { - -/** - * @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 {number} - * @since 3.19.0 - */ - CIRCLE: 0, - - /** - * An Ellipse Geometry object type. - * - * @name Phaser.Geom.ELLIPSE - * @type {number} - * @since 3.19.0 - */ - ELLIPSE: 1, - - /** - * A Line Geometry object type. - * - * @name Phaser.Geom.LINE - * @type {number} - * @since 3.19.0 - */ - LINE: 2, - - /** - * A Point Geometry object type. - * - * @name Phaser.Geom.POINT - * @type {number} - * @since 3.19.0 - */ - POINT: 3, - - /** - * A Polygon Geometry object type. - * - * @name Phaser.Geom.POLYGON - * @type {number} - * @since 3.19.0 - */ - POLYGON: 4, - - /** - * A Rectangle Geometry object type. - * - * @name Phaser.Geom.RECTANGLE - * @type {number} - * @since 3.19.0 - */ - RECTANGLE: 5, - - /** - * A Triangle Geometry object type. - * - * @name Phaser.Geom.TRIANGLE - * @type {number} - * @since 3.19.0 - */ - TRIANGLE: 6 - -}; - -module.exports = GEOM_CONST; - - -/***/ }), - -/***/ "../../../src/geom/line/GetPoint.js": -/*!******************************************!*\ - !*** ../../../src/geom/line/GetPoint.js ***! - \******************************************/ -/***/ ((module, __unused_webpack_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": -/*!*******************************************!*\ - !*** ../../../src/geom/line/GetPoints.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_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 {number} 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": -/*!****************************************!*\ - !*** ../../../src/geom/line/Length.js ***! - \****************************************/ -/***/ ((module) => { - -/** - * @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": -/*!**************************************!*\ - !*** ../../../src/geom/line/Line.js ***! - \**************************************/ -/***/ ((module, __unused_webpack_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 {number} - * @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 {number} 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[])} [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": -/*!****************************************!*\ - !*** ../../../src/geom/line/Random.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_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": -/*!****************************************!*\ - !*** ../../../src/geom/point/Point.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_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 {number} - * @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": -/*!***********************************************!*\ - !*** ../../../src/geom/rectangle/Contains.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***********************************************!*\ - !*** ../../../src/geom/rectangle/GetPoint.js ***! - \***********************************************/ -/***/ ((module, __unused_webpack_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": -/*!************************************************!*\ - !*** ../../../src/geom/rectangle/GetPoints.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_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 {number} 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": -/*!************************************************!*\ - !*** ../../../src/geom/rectangle/Perimeter.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!*********************************************!*\ - !*** ../../../src/geom/rectangle/Random.js ***! - \*********************************************/ -/***/ ((module, __unused_webpack_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": -/*!************************************************!*\ - !*** ../../../src/geom/rectangle/Rectangle.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_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 {number} - * @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 {number} 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": -/*!********************************************!*\ - !*** ../../../src/geom/rectangle/Union.js ***! - \********************************************/ -/***/ ((module, __unused_webpack_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": -/*!***********************************!*\ - !*** ../../../src/loader/File.js ***! - \***********************************/ -/***/ ((module, __unused_webpack_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 CONST = __webpack_require__(/*! ./const */ "../../../src/loader/const.js"); -var Events = __webpack_require__(/*! ./events */ "../../../src/loader/events/index.js"); -var GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); -var GetURL = __webpack_require__(/*! ./GetURL */ "../../../src/loader/GetURL.js"); -var MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ "../../../src/loader/MergeXHRSettings.js"); -var XHRLoader = __webpack_require__(/*! ./XHRLoader */ "../../../src/loader/XHRLoader.js"); -var XHRSettings = __webpack_require__(/*! ./XHRSettings */ "../../../src/loader/XHRSettings.js"); - -/** - * @classdesc - * The base File class used by all File Types that the Loader can support. - * 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. - * - * @class File - * @memberof Phaser.Loader - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File. - * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type. - */ -var File = new Class({ - - initialize: - - function File (loader, fileConfig) - { - /** - * A reference to the Loader that is going to load this file. - * - * @name Phaser.Loader.File#loader - * @type {Phaser.Loader.LoaderPlugin} - * @since 3.0.0 - */ - this.loader = loader; - - /** - * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. - * - * @name Phaser.Loader.File#cache - * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)} - * @since 3.7.0 - */ - this.cache = GetFastValue(fileConfig, 'cache', false); - - /** - * The file type string (image, json, etc) for sorting within the Loader. - * - * @name Phaser.Loader.File#type - * @type {string} - * @since 3.0.0 - */ - this.type = GetFastValue(fileConfig, 'type', false); - - /** - * Unique cache key (unique within its file type) - * - * @name Phaser.Loader.File#key - * @type {string} - * @since 3.0.0 - */ - this.key = GetFastValue(fileConfig, 'key', false); - - var loadKey = this.key; - - if (loader.prefix && loader.prefix !== '') - { - this.key = loader.prefix + loadKey; - } - - if (!this.type || !this.key) - { - throw new Error('Invalid Loader.' + this.type + ' key'); - } - - var url = GetFastValue(fileConfig, 'url'); - - if (url === undefined) - { - url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); - } - else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) - { - url = loader.path + url; - } - - /** - * The URL of the file, not including baseURL. - * - * 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 {object|string} - * @since 3.0.0 - */ - this.url = url; - - /** - * The final URL this file will load from, including baseURL and path. - * Set automatically when the Loader calls 'load' on this file. - * - * @name Phaser.Loader.File#src - * @type {string} - * @since 3.0.0 - */ - this.src = ''; - - /** - * The merged XHRSettings for this file. - * - * @name Phaser.Loader.File#xhrSettings - * @type {Phaser.Types.Loader.XHRSettingsObject} - * @since 3.0.0 - */ - this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined)); - - if (GetFastValue(fileConfig, 'xhrSettings', false)) - { - this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {})); - } - - /** - * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. - * - * @name Phaser.Loader.File#xhrLoader - * @type {?XMLHttpRequest} - * @since 3.0.0 - */ - this.xhrLoader = null; - - /** - * The current state of the file. One of the FILE_CONST values. - * - * @name Phaser.Loader.File#state - * @type {number} - * @since 3.0.0 - */ - this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING; - - /** - * The total size of this file. - * Set by onProgress and only if loading via XHR. - * - * @name Phaser.Loader.File#bytesTotal - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.bytesTotal = 0; - - /** - * Updated as the file loads. - * Only set if loading via XHR. - * - * @name Phaser.Loader.File#bytesLoaded - * @type {number} - * @default -1 - * @since 3.0.0 - */ - this.bytesLoaded = -1; - - /** - * A percentage value between 0 and 1 indicating how much of this file has loaded. - * Only set if loading via XHR. - * - * @name Phaser.Loader.File#percentComplete - * @type {number} - * @default -1 - * @since 3.0.0 - */ - this.percentComplete = -1; - - /** - * For CORs based loading. - * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) - * - * @name Phaser.Loader.File#crossOrigin - * @type {(string|undefined)} - * @since 3.0.0 - */ - this.crossOrigin = undefined; - - /** - * The processed file data, stored here after the file has loaded. - * - * @name Phaser.Loader.File#data - * @type {*} - * @since 3.0.0 - */ - this.data = undefined; - - /** - * A config object that can be used by file types to store transitional data. - * - * @name Phaser.Loader.File#config - * @type {*} - * @since 3.0.0 - */ - this.config = GetFastValue(fileConfig, 'config', {}); - - /** - * If this is a multipart file, i.e. an atlas and its json together, then this is a reference - * to the parent MultiFile. Set and used internally by the Loader or specific file types. - * - * @name Phaser.Loader.File#multiFile - * @type {?Phaser.Loader.MultiFile} - * @since 3.7.0 - */ - this.multiFile; - - /** - * Does this file have an associated linked file? Such as an image and a normal map. - * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't - * actually bound by data, where-as a linkFile is. - * - * @name Phaser.Loader.File#linkFile - * @type {?Phaser.Loader.File} - * @since 3.7.0 - */ - this.linkFile; - }, - - /** - * Links this File with another, so they depend upon each other for loading and processing. - * - * @method Phaser.Loader.File#setLink - * @since 3.7.0 - * - * @param {Phaser.Loader.File} fileB - The file to link to this one. - */ - setLink: function (fileB) - { - this.linkFile = fileB; - - fileB.linkFile = this; - }, - - /** - * Resets the XHRLoader instance this file is using. - * - * @method Phaser.Loader.File#resetXHR - * @since 3.0.0 - */ - resetXHR: function () - { - if (this.xhrLoader) - { - this.xhrLoader.onload = undefined; - this.xhrLoader.onerror = undefined; - this.xhrLoader.onprogress = undefined; - } - }, - - /** - * Called by the Loader, starts the actual file downloading. - * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. - * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. - * - * @method Phaser.Loader.File#load - * @since 3.0.0 - */ - load: function () - { - if (this.state === CONST.FILE_POPULATED) - { - // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL - this.loader.nextFile(this, true); - } - else - { - this.state = CONST.FILE_LOADING; - - this.src = GetURL(this, this.loader.baseURL); - - if (this.src.indexOf('data:') === 0) - { - console.warn('Local data URIs are not supported: ' + this.key); - } - else - { - // 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 - - this.xhrLoader = XHRLoader(this, this.loader.xhr); - } - } - }, - - /** - * Called when the file finishes loading, is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onLoad - * @since 3.0.0 - * - * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. - * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load. - */ - onLoad: function (xhr, event) - { - // On iOS, Capacitor often runs on a capacitor:// protocol, meaning local files are served from capacitor:// rather than file:// - // See: https://github.com/photonstorm/phaser/issues/5685 - - var isLocalFile = xhr.responseURL && (xhr.responseURL.indexOf('file://') === 0 || xhr.responseURL.indexOf('capacitor://') === 0); - - var localFileOk = (isLocalFile && event.target.status === 0); - - var success = !(event.target && event.target.status !== 200) || localFileOk; - - // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called. - if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) - { - success = false; - } - - this.state = CONST.FILE_LOADED; - - this.resetXHR(); - - this.loader.nextFile(this, success); - }, - - /** - * Called if the file errors while loading, is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onError - * @since 3.0.0 - * - * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. - * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. - */ - onError: function () - { - this.resetXHR(); - - this.loader.nextFile(this, false); - }, - - /** - * Called during the file load progress. Is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onProgress - * @fires Phaser.Loader.Events#FILE_PROGRESS - * @since 3.0.0 - * - * @param {ProgressEvent} event - The DOM ProgressEvent. - */ - onProgress: function (event) - { - if (event.lengthComputable) - { - this.bytesLoaded = event.loaded; - this.bytesTotal = event.total; - - this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1); - - this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete); - } - }, - - /** - * Usually overridden by the FileTypes and is called by Loader.nextFile. - * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. - * - * @method Phaser.Loader.File#onProcess - * @since 3.0.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.onProcessComplete(); - }, - - /** - * Called when the File has completed processing. - * Checks on the state of its multifile, if set. - * - * @method Phaser.Loader.File#onProcessComplete - * @since 3.7.0 - */ - onProcessComplete: function () - { - this.state = CONST.FILE_COMPLETE; - - if (this.multiFile) - { - this.multiFile.onFileComplete(this); - } - - this.loader.fileProcessComplete(this); - }, - - /** - * Called when the File has completed processing but it generated an error. - * Checks on the state of its multifile, if set. - * - * @method Phaser.Loader.File#onProcessError - * @since 3.7.0 - */ - onProcessError: function () - { - // eslint-disable-next-line no-console - console.error('Failed to process file: %s "%s"', this.type, this.key); - - this.state = CONST.FILE_ERRORED; - - if (this.multiFile) - { - this.multiFile.onFileFailed(this); - } - - this.loader.fileProcessComplete(this); - }, - - /** - * Checks if a key matching the one used by this file exists in the target Cache or not. - * This is called automatically by the LoaderPlugin to decide if the file can be safely - * loaded or will conflict. - * - * @method Phaser.Loader.File#hasCacheConflict - * @since 3.7.0 - * - * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`. - */ - hasCacheConflict: function () - { - return (this.cache && this.cache.exists(this.key)); - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * This method is often overridden by specific file types. - * - * @method Phaser.Loader.File#addToCache - * @since 3.7.0 - */ - addToCache: function () - { - if (this.cache && this.data) - { - this.cache.add(this.key, this.data); - } - }, - - /** - * Called once the file has been added to its cache and is now ready for deletion from the Loader. - * It will emit a `filecomplete` event from the LoaderPlugin. - * - * @method Phaser.Loader.File#pendingDestroy - * @fires Phaser.Loader.Events#FILE_COMPLETE - * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.7.0 - */ - pendingDestroy: function (data) - { - if (this.state === CONST.FILE_PENDING_DESTROY) - { - return; - } - - if (data === undefined) { data = this.data; } - - var key = this.key; - var type = this.type; - - this.loader.emit(Events.FILE_COMPLETE, key, type, data); - this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); - - this.loader.flagForRemoval(this); - - this.state = CONST.FILE_PENDING_DESTROY; - }, - - /** - * Destroy this File and any references it holds. - * - * @method Phaser.Loader.File#destroy - * @since 3.7.0 - */ - destroy: function () - { - this.loader = null; - this.cache = null; - this.xhrSettings = null; - this.multiFile = null; - this.linkFile = null; - this.data = null; - } - -}); - -/** - * Static method for creating object URL using URL API and setting it as image 'src' attribute. - * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. - * - * @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. - */ -File.createObjectURL = function (image, blob, defaultType) -{ - if (typeof URL === 'function') - { - image.src = URL.createObjectURL(blob); - } - else - { - var reader = new FileReader(); - - reader.onload = function () - { - image.removeAttribute('crossOrigin'); - image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1]; - }; - - reader.onerror = image.onerror; - - reader.readAsDataURL(blob); - } -}; - -/** - * Static method for releasing an existing object URL which was previously created - * by calling {@link File#createObjectURL} method. - * - * @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) -{ - if (typeof URL === 'function') - { - URL.revokeObjectURL(image.src); - } -}; - -module.exports = File; - - -/***/ }), - -/***/ "../../../src/loader/FileTypesManager.js": -/*!***********************************************!*\ - !*** ../../../src/loader/FileTypesManager.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var types = {}; - -/** - * @namespace Phaser.Loader.FileTypesManager - */ - -var FileTypesManager = { - - /** - * Static method called when a LoaderPlugin is created. - * - * Loops through the local types object and injects all of them as - * properties into the LoaderPlugin instance. - * - * @method Phaser.Loader.FileTypesManager.install - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. - */ - install: function (loader) - { - for (var key in types) - { - loader[key] = types[key]; - } - }, - - /** - * Static method called directly by the File Types. - * - * The key is a reference to the function used to load the files via the Loader, i.e. `image`. - * - * @method Phaser.Loader.FileTypesManager.register - * @since 3.0.0 - * - * @param {string} key - The key that will be used as the method name in the LoaderPlugin. - * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. - */ - register: function (key, factoryFunction) - { - types[key] = factoryFunction; - }, - - /** - * Removed all associated file types. - * - * @method Phaser.Loader.FileTypesManager.destroy - * @since 3.0.0 - */ - destroy: function () - { - types = {}; - } - -}; - -module.exports = FileTypesManager; - - -/***/ }), - -/***/ "../../../src/loader/GetURL.js": -/*!*************************************!*\ - !*** ../../../src/loader/GetURL.js ***! - \*************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Given a File and a baseURL value this returns the URL the File will use to download from. - * - * @function Phaser.Loader.GetURL - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - The File object. - * @param {string} baseURL - A default base URL. - * - * @return {string} The URL the File will use. - */ -var GetURL = function (file, baseURL) -{ - if (!file.url) - { - return false; - } - - if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) - { - return file.url; - } - else - { - return baseURL + file.url; - } -}; - -module.exports = GetURL; - - -/***/ }), - -/***/ "../../../src/loader/MergeXHRSettings.js": -/*!***********************************************!*\ - !*** ../../../src/loader/MergeXHRSettings.js ***! - \***********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Extend = __webpack_require__(/*! ../utils/object/Extend */ "../../../src/utils/object/Extend.js"); -var XHRSettings = __webpack_require__(/*! ./XHRSettings */ "../../../src/loader/XHRSettings.js"); - -/** - * Takes two XHRSettings Objects and creates a new XHRSettings object from them. - * - * The new object is seeded by the values given in the global settings, but any setting in - * the local object overrides the global ones. - * - * @function Phaser.Loader.MergeXHRSettings - * @since 3.0.0 - * - * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object. - * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object. - * - * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object. - */ -var MergeXHRSettings = function (global, local) -{ - var output = (global === undefined) ? XHRSettings() : Extend({}, global); - - if (local) - { - for (var setting in local) - { - if (local[setting] !== undefined) - { - output[setting] = local[setting]; - } - } - } - - return output; -}; - -module.exports = MergeXHRSettings; - - -/***/ }), - -/***/ "../../../src/loader/MultiFile.js": -/*!****************************************!*\ - !*** ../../../src/loader/MultiFile.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_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 CONST = __webpack_require__(/*! ./const */ "../../../src/loader/const.js"); -var Events = __webpack_require__(/*! ./events */ "../../../src/loader/events/index.js"); - -/** - * @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) - { - var finalFiles = []; - - // Clean out any potential 'null' or 'undefined' file entries - files.forEach(function (file) - { - if (file) - { - finalFiles.push(file); - } - }); - - /** - * 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 {number} - * @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 = finalFiles; - - /** - * The current state of the file. One of the FILE_CONST values. - * - * @name Phaser.Loader.MultiFile#state - * @type {number} - * @since 3.60.0 - */ - this.state = CONST.FILE_PENDING; - - /** - * 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 {number} - * @since 3.7.0 - */ - - this.pending = finalFiles.length; - - /** - * The number of files that failed to load. - * - * @name Phaser.Loader.MultiFile#failed - * @type {number} - * @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 < finalFiles.length; i++) - { - finalFiles[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++; - - // eslint-disable-next-line no-console - console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); - } - }, - - /** - * Called once all children of this multi file have been added to their caches and is now - * ready for deletion from the Loader. - * - * It will emit a `filecomplete` event from the LoaderPlugin. - * - * @method Phaser.Loader.MultiFile#pendingDestroy - * @fires Phaser.Loader.Events#FILE_COMPLETE - * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.60.0 - */ - pendingDestroy: function () - { - if (this.state === CONST.FILE_PENDING_DESTROY) - { - return; - } - - var key = this.key; - var type = this.type; - - this.loader.emit(Events.FILE_COMPLETE, key, type); - this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); - - this.loader.flagForRemoval(this); - - for (var i = 0; i < this.files.length; i++) - { - this.files[i].pendingDestroy(); - } - - this.state = CONST.FILE_PENDING_DESTROY; - }, - - /** - * Destroy this Multi File and any references it holds. - * - * @method Phaser.Loader.MultiFile#destroy - * @since 3.60.0 - */ - destroy: function () - { - this.loader = null; - this.files = null; - this.config = null; - } - -}); - -module.exports = MultiFile; - - -/***/ }), - -/***/ "../../../src/loader/XHRLoader.js": -/*!****************************************!*\ - !*** ../../../src/loader/XHRLoader.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ "../../../src/loader/MergeXHRSettings.js"); - -/** - * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings - * and starts the download of it. It uses the Files own XHRSettings and merges them - * with the global XHRSettings object to set the xhr values before download. - * - * @function Phaser.Loader.XHRLoader - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - The File to download. - * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object. - * - * @return {XMLHttpRequest} The XHR object. - */ -var XHRLoader = function (file, globalXHRSettings) -{ - var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings); - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', file.src, config.async, config.user, config.password); - - 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); - } - - if (config.requestedWith) - { - xhr.setRequestHeader('X-Requested-With', config.requestedWith); - } - - if (config.overrideMimeType) - { - 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); - xhr.onerror = file.onError.bind(file, xhr); - xhr.onprogress = file.onProgress.bind(file); - - // This is the only standard method, the ones above are browser additions (maybe not universal?) - // xhr.onreadystatechange - - xhr.send(); - - return xhr; -}; - -module.exports = XHRLoader; - - -/***/ }), - -/***/ "../../../src/loader/XHRSettings.js": -/*!******************************************!*\ - !*** ../../../src/loader/XHRSettings.js ***! - \******************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Creates an XHRSettings Object with default values. - * - * @function Phaser.Loader.XHRSettings - * @since 3.0.0 - * - * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'. - * @param {boolean} [async=true] - Should the XHR request use async or not? - * @param {string} [user=''] - Optional username for the XHR request. - * @param {string} [password=''] - Optional password for the XHR request. - * @param {number} [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, 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. - // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". - - return { - - // Ignored by the Loader, only used by File. - responseType: responseType, - - async: async, - - // credentials - user: user, - password: password, - - // timeout in ms (0 = no timeout) - timeout: timeout, - - // setRequestHeader - headers: undefined, - header: undefined, - headerValue: undefined, - requestedWith: false, - - // overrideMimeType - overrideMimeType: undefined, - - // withCredentials - withCredentials: withCredentials - - }; -}; - -module.exports = XHRSettings; - - -/***/ }), - -/***/ "../../../src/loader/const.js": -/*!************************************!*\ - !*** ../../../src/loader/const.js ***! - \************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var FILE_CONST = { - - /** - * The Loader is idle. - * - * @name Phaser.Loader.LOADER_IDLE - * @type {number} - * @since 3.0.0 - */ - LOADER_IDLE: 0, - - /** - * The Loader is actively loading. - * - * @name Phaser.Loader.LOADER_LOADING - * @type {number} - * @since 3.0.0 - */ - LOADER_LOADING: 1, - - /** - * The Loader is processing files is has loaded. - * - * @name Phaser.Loader.LOADER_PROCESSING - * @type {number} - * @since 3.0.0 - */ - LOADER_PROCESSING: 2, - - /** - * The Loader has completed loading and processing. - * - * @name Phaser.Loader.LOADER_COMPLETE - * @type {number} - * @since 3.0.0 - */ - LOADER_COMPLETE: 3, - - /** - * The Loader is shutting down. - * - * @name Phaser.Loader.LOADER_SHUTDOWN - * @type {number} - * @since 3.0.0 - */ - LOADER_SHUTDOWN: 4, - - /** - * The Loader has been destroyed. - * - * @name Phaser.Loader.LOADER_DESTROYED - * @type {number} - * @since 3.0.0 - */ - LOADER_DESTROYED: 5, - - /** - * File is in the load queue but not yet started. - * - * @name Phaser.Loader.FILE_PENDING - * @type {number} - * @since 3.0.0 - */ - FILE_PENDING: 10, - - /** - * File has been started to load by the loader (onLoad called) - * - * @name Phaser.Loader.FILE_LOADING - * @type {number} - * @since 3.0.0 - */ - FILE_LOADING: 11, - - /** - * File has loaded successfully, awaiting processing. - * - * @name Phaser.Loader.FILE_LOADED - * @type {number} - * @since 3.0.0 - */ - FILE_LOADED: 12, - - /** - * File failed to load. - * - * @name Phaser.Loader.FILE_FAILED - * @type {number} - * @since 3.0.0 - */ - FILE_FAILED: 13, - - /** - * File is being processed (onProcess callback) - * - * @name Phaser.Loader.FILE_PROCESSING - * @type {number} - * @since 3.0.0 - */ - FILE_PROCESSING: 14, - - /** - * The File has errored somehow during processing. - * - * @name Phaser.Loader.FILE_ERRORED - * @type {number} - * @since 3.0.0 - */ - FILE_ERRORED: 16, - - /** - * File has finished processing. - * - * @name Phaser.Loader.FILE_COMPLETE - * @type {number} - * @since 3.0.0 - */ - FILE_COMPLETE: 17, - - /** - * File has been destroyed. - * - * @name Phaser.Loader.FILE_DESTROYED - * @type {number} - * @since 3.0.0 - */ - FILE_DESTROYED: 18, - - /** - * File was populated from local data and doesn't need an HTTP request. - * - * @name Phaser.Loader.FILE_POPULATED - * @type {number} - * @since 3.0.0 - */ - FILE_POPULATED: 19, - - /** - * File is pending being destroyed. - * - * @name Phaser.Loader.FILE_PENDING_DESTROY - * @type {number} - * @since 3.60.0 - */ - FILE_PENDING_DESTROY: 20 - -}; - -module.exports = FILE_CONST; - - -/***/ }), - -/***/ "../../../src/loader/events/ADD_EVENT.js": -/*!***********************************************!*\ - !*** ../../../src/loader/events/ADD_EVENT.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Add File Event. - * - * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. - * - * Listen to it from a Scene using: `this.load.on('addfile', listener)`. - * - * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. - * - * @event Phaser.Loader.Events#ADD - * @since 3.0.0 - * - * @param {string} key - The unique key of the file that was added to the Loader. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader. - */ -module.exports = 'addfile'; - - -/***/ }), - -/***/ "../../../src/loader/events/COMPLETE_EVENT.js": -/*!****************************************************!*\ - !*** ../../../src/loader/events/COMPLETE_EVENT.js ***! - \****************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Complete Event. - * - * This event is dispatched when the Loader has fully processed everything in the load queue. - * By this point every loaded file will now be in its associated cache and ready for use. - * - * Listen to it from a Scene using: `this.load.on('complete', listener)`. - * - * @event Phaser.Loader.Events#COMPLETE - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - * @param {number} totalComplete - The total number of files that successfully loaded. - * @param {number} totalFailed - The total number of files that failed to load. - */ -module.exports = 'complete'; - - -/***/ }), - -/***/ "../../../src/loader/events/FILE_COMPLETE_EVENT.js": -/*!*********************************************************!*\ - !*** ../../../src/loader/events/FILE_COMPLETE_EVENT.js ***! - \*********************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. - * - * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. - * - * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. - * - * 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. - * - * @event Phaser.Loader.Events#FILE_COMPLETE - * @since 3.0.0 - * - * @param {string} key - The key of the file that just loaded and finished processing. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. - */ -module.exports = 'filecomplete'; - - -/***/ }), - -/***/ "../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js": -/*!*************************************************************!*\ - !*** ../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! - \*************************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * - * It uses a special dynamic event name constructed from the key and type of the file. - * - * For example, if you have loaded an `image` with a key of `monster`, you can listen for it - * using the following: - * - * ```javascript - * this.load.on('filecomplete-image-monster', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a texture `atlas` with a key of `Level1`: - * - * ```javascript - * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: - * - * ```javascript - * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. - * - * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. - * - * @event Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.0.0 - * - * @param {string} key - The key of the file that just loaded and finished processing. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. - */ -module.exports = 'filecomplete-'; - - -/***/ }), - -/***/ "../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js": -/*!***********************************************************!*\ - !*** ../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! - \***********************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Error Event. - * - * This event is dispatched by the Loader Plugin when a file fails to load. - * - * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. - * - * @event Phaser.Loader.Events#FILE_LOAD_ERROR - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which errored during load. - */ -module.exports = 'loaderror'; - - -/***/ }), - -/***/ "../../../src/loader/events/FILE_LOAD_EVENT.js": -/*!*****************************************************!*\ - !*** ../../../src/loader/events/FILE_LOAD_EVENT.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Event. - * - * This event is dispatched by the Loader Plugin when a file finishes loading, - * but _before_ it is processed and added to the internal Phaser caches. - * - * Listen to it from a Scene using: `this.load.on('load', listener)`. - * - * @event Phaser.Loader.Events#FILE_LOAD - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. - */ -module.exports = 'load'; - - -/***/ }), - -/***/ "../../../src/loader/events/FILE_PROGRESS_EVENT.js": -/*!*********************************************************!*\ - !*** ../../../src/loader/events/FILE_PROGRESS_EVENT.js ***! - \*********************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Progress Event. - * - * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and - * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. - * - * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. - * - * @event Phaser.Loader.Events#FILE_PROGRESS - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which errored during load. - * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. - */ -module.exports = 'fileprogress'; - - -/***/ }), - -/***/ "../../../src/loader/events/POST_PROCESS_EVENT.js": -/*!********************************************************!*\ - !*** ../../../src/loader/events/POST_PROCESS_EVENT.js ***! - \********************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Post Process Event. - * - * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. - * It is dispatched before the internal lists are cleared and each File is destroyed. - * - * Use this hook to perform any last minute processing of files that can only happen once the - * Loader has completed, but prior to it emitting the `complete` event. - * - * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. - * - * @event Phaser.Loader.Events#POST_PROCESS - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - */ -module.exports = 'postprocess'; - - -/***/ }), - -/***/ "../../../src/loader/events/PROGRESS_EVENT.js": -/*!****************************************************!*\ - !*** ../../../src/loader/events/PROGRESS_EVENT.js ***! - \****************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Progress Event. - * - * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. - * - * Listen to it from a Scene using: `this.load.on('progress', listener)`. - * - * @event Phaser.Loader.Events#PROGRESS - * @since 3.0.0 - * - * @param {number} progress - The current progress of the load. A value between 0 and 1. - */ -module.exports = 'progress'; - - -/***/ }), - -/***/ "../../../src/loader/events/START_EVENT.js": -/*!*************************************************!*\ - !*** ../../../src/loader/events/START_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Start Event. - * - * This event is dispatched when the Loader starts running. At this point load progress is zero. - * - * This event is dispatched even if there aren't any files in the load queue. - * - * Listen to it from a Scene using: `this.load.on('start', listener)`. - * - * @event Phaser.Loader.Events#START - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - */ -module.exports = 'start'; - - -/***/ }), - -/***/ "../../../src/loader/events/index.js": -/*!*******************************************!*\ - !*** ../../../src/loader/events/index.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Loader.Events - */ - -module.exports = { - - ADD: __webpack_require__(/*! ./ADD_EVENT */ "../../../src/loader/events/ADD_EVENT.js"), - COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "../../../src/loader/events/COMPLETE_EVENT.js"), - FILE_COMPLETE: __webpack_require__(/*! ./FILE_COMPLETE_EVENT */ "../../../src/loader/events/FILE_COMPLETE_EVENT.js"), - FILE_KEY_COMPLETE: __webpack_require__(/*! ./FILE_KEY_COMPLETE_EVENT */ "../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js"), - FILE_LOAD_ERROR: __webpack_require__(/*! ./FILE_LOAD_ERROR_EVENT */ "../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js"), - FILE_LOAD: __webpack_require__(/*! ./FILE_LOAD_EVENT */ "../../../src/loader/events/FILE_LOAD_EVENT.js"), - FILE_PROGRESS: __webpack_require__(/*! ./FILE_PROGRESS_EVENT */ "../../../src/loader/events/FILE_PROGRESS_EVENT.js"), - POST_PROCESS: __webpack_require__(/*! ./POST_PROCESS_EVENT */ "../../../src/loader/events/POST_PROCESS_EVENT.js"), - PROGRESS: __webpack_require__(/*! ./PROGRESS_EVENT */ "../../../src/loader/events/PROGRESS_EVENT.js"), - START: __webpack_require__(/*! ./START_EVENT */ "../../../src/loader/events/START_EVENT.js") - -}; - - -/***/ }), - -/***/ "../../../src/loader/filetypes/ImageFile.js": -/*!**************************************************!*\ - !*** ../../../src/loader/filetypes/ImageFile.js ***! - \**************************************************/ -/***/ ((module, __unused_webpack_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 CONST = __webpack_require__(/*! ../const */ "../../../src/loader/const.js"); -var File = __webpack_require__(/*! ../File */ "../../../src/loader/File.js"); -var FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "../../../src/loader/FileTypesManager.js"); -var GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); -var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); -var GetURL = __webpack_require__(/*! ../GetURL */ "../../../src/loader/GetURL.js"); - -/** - * @classdesc - * 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 - * @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.ImageFileConfig)} key - The key to use for this file, or a file configuration object. - * @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] - Extra XHR Settings specifically for this file. - * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets. - */ -var ImageFile = new Class({ - - Extends: File, - - initialize: - - function ImageFile (loader, key, url, xhrSettings, frameConfig) - { - var extension = 'png'; - var normalMapURL; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - normalMapURL = GetFastValue(config, 'normalMap'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - frameConfig = GetFastValue(config, 'frameConfig'); - } - - if (Array.isArray(url)) - { - normalMapURL = url[1]; - url = url[0]; - } - - var fileConfig = { - type: 'image', - cache: loader.textureManager, - extension: extension, - responseType: 'blob', - key: key, - url: url, - xhrSettings: xhrSettings, - config: frameConfig - }; - - File.call(this, loader, fileConfig); - - // Do we have a normal map to load as well? - if (normalMapURL) - { - var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig); - - normalMap.type = 'normalMap'; - - this.setLink(normalMap); - - loader.addFile(normalMap); - } - - this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; - - if (this.useImageElementLoad) - { - this.load = this.loadImage; - this.onProcess = this.onProcessImage; - } - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.ImageFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.data = new Image(); - - this.data.crossOrigin = this.crossOrigin; - - var _this = this; - - this.data.onload = function () - { - File.revokeObjectURL(_this.data); - - _this.onProcessComplete(); - }; - - this.data.onerror = function () - { - File.revokeObjectURL(_this.data); - - _this.onProcessError(); - }; - - File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); - }, - - /** - * Handles image load processing. - * - * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage - * @private - * @since 3.60.0 - */ - onProcessImage: function () - { - var result = this.state; - - this.state = CONST.FILE_PROCESSING; - - if (result === CONST.FILE_LOADED) - { - this.onProcessComplete(); - } - else - { - this.onProcessError(); - } - }, - - /** - * Loads the image using either XHR or an Image tag. - * - * @method Phaser.Loader.FileTypes.ImageFile#loadImage - * @private - * @since 3.60.0 - */ - loadImage: function () - { - this.state = CONST.FILE_LOADING; - - this.src = GetURL(this, this.loader.baseURL); - - if (this.src.indexOf('data:') === 0) - { - console.warn('Local data URIs are not supported: ' + this.key); - } - else - { - this.data = new Image(); - - this.data.crossOrigin = this.crossOrigin; - - var _this = this; - - this.data.onload = function () - { - _this.state = CONST.FILE_LOADED; - - _this.loader.nextFile(_this, true); - }; - - this.data.onerror = function () - { - _this.loader.nextFile(_this, false); - }; - - this.data.src = this.src; - } - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * - * @method Phaser.Loader.FileTypes.ImageFile#addToCache - * @since 3.7.0 - */ - addToCache: function () - { - var linkFile = this.linkFile; - - if (linkFile && linkFile.state === CONST.FILE_COMPLETE) - { - if (this.type === 'image') - { - this.cache.addImage(this.key, this.data, linkFile.data); - } - else - { - this.cache.addImage(linkFile.key, linkFile.data, this.data); - } - } - else if (!linkFile) - { - this.cache.addImage(this.key, this.data); - } - } - -}); - -/** - * 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 () - * { - * this.load.image('logo', 'images/phaserLogo.png'); - * } - * ``` - * - * 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. - * - * 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. - * - * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. - * 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 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', - * url: 'images/AtariLogo.png' - * }); - * ``` - * - * 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 ... - * this.add.image(x, y, 'logo'); - * ``` - * - * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the image from the Texture Manager. - * - * 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 "alien" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * 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', - * url: 'images/AtariLogo.png', - * normalMap: 'images/AtariLogo-n.png' - * }); - * ``` - * - * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. - * Normal maps are a WebGL only feature. - * - * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. - * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images - * via the Image tag instead. - * - * Note: The ability to load this type of file will only be available if the Image 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#image - * @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 {this} The Loader instance. - */ -FileTypesManager.register('image', function (key, url, 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 ImageFile(this, key[i])); - } - } - else - { - this.addFile(new ImageFile(this, key, url, xhrSettings)); - } - - return this; -}); - -module.exports = ImageFile; - - -/***/ }), - -/***/ "../../../src/loader/filetypes/JSONFile.js": -/*!*************************************************!*\ - !*** ../../../src/loader/filetypes/JSONFile.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_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 CONST = __webpack_require__(/*! ../const */ "../../../src/loader/const.js"); -var File = __webpack_require__(/*! ../File */ "../../../src/loader/File.js"); -var FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "../../../src/loader/FileTypesManager.js"); -var GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); -var GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ "../../../src/utils/object/GetValue.js"); -var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); - -/** - * @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; - - try - { - var json = JSON.parse(this.xhrLoader.responseText); - } - catch (e) - { - this.onProcessError(); - - throw e; - } - - 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; - - -/***/ }), - -/***/ "../../../src/loader/filetypes/TextFile.js": -/*!*************************************************!*\ - !*** ../../../src/loader/filetypes/TextFile.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_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 CONST = __webpack_require__(/*! ../const */ "../../../src/loader/const.js"); -var File = __webpack_require__(/*! ../File */ "../../../src/loader/File.js"); -var FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "../../../src/loader/FileTypesManager.js"); -var GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); -var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); - -/** - * @classdesc - * A single Text File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. - * - * @class TextFile - * @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.TextFileConfig)} 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 `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - */ -var TextFile = new Class({ - - Extends: File, - - initialize: - - function TextFile (loader, key, url, xhrSettings) - { - var type = 'text'; - var extension = 'txt'; - var cache = loader.cacheManager.text; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - type = GetFastValue(config, 'type', type); - cache = GetFastValue(config, 'cache', cache); - } - - var fileConfig = { - type: type, - cache: cache, - extension: extension, - responseType: 'text', - key: key, - url: url, - xhrSettings: xhrSettings - }; - - File.call(this, loader, fileConfig); - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.TextFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.data = this.xhrLoader.responseText; - - this.onProcessComplete(); - } - -}); - -/** - * Adds a Text file, or array of Text 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.text('story', 'files/IntroStory.txt'); - * } - * ``` - * - * 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 Text Cache upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Text 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 Text Cache first, before loading a new one. - * - * Instead of passing arguments you can pass a configuration object, such as: - * - * ```javascript - * this.load.text({ - * key: 'story', - * url: 'files/IntroStory.txt' - * }); - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details. - * - * Once the file has finished loading you can access it from its Cache using its key: - * - * ```javascript - * this.load.text('story', 'files/IntroStory.txt'); - * // and later in your game ... - * var data = this.cache.text.get('story'); - * ``` - * - * 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 `Story` the final key will be `LEVEL1.Story` and - * this is what you would use to retrieve the text from the Text 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 "story" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * Note: The ability to load this type of file will only be available if the Text 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#text - * @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 {this} The Loader instance. - */ -FileTypesManager.register('text', function (key, url, 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 TextFile(this, key[i])); - } - } - else - { - this.addFile(new TextFile(this, key, url, xhrSettings)); - } - - return this; -}); - -module.exports = TextFile; - - -/***/ }), - -/***/ "../../../src/math/Average.js": -/*!************************************!*\ - !*** ../../../src/math/Average.js ***! - \************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/Bernstein.js": -/*!**************************************!*\ - !*** ../../../src/math/Bernstein.js ***! - \**************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Factorial = __webpack_require__(/*! ./Factorial */ "../../../src/math/Factorial.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/Between.js": -/*!************************************!*\ - !*** ../../../src/math/Between.js ***! - \************************************/ -/***/ ((module) => { - -/** - * @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 {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The random integer. - */ -var Between = function (min, max) -{ - return Math.floor(Math.random() * (max - min + 1) + min); -}; - -module.exports = Between; - - -/***/ }), - -/***/ "../../../src/math/CatmullRom.js": -/*!***************************************!*\ - !*** ../../../src/math/CatmullRom.js ***! - \***************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/CeilTo.js": -/*!***********************************!*\ - !*** ../../../src/math/CeilTo.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ "../../../src/math/Clamp.js": -/*!**********************************!*\ - !*** ../../../src/math/Clamp.js ***! - \**********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/DegToRad.js": -/*!*************************************!*\ - !*** ../../../src/math/DegToRad.js ***! - \*************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(/*! ./const */ "../../../src/math/const.js"); - -/** - * Convert the given angle from degrees, to the equivalent angle in radians. - * - * @function Phaser.Math.DegToRad - * @since 3.0.0 - * - * @param {number} 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; - - -/***/ }), - -/***/ "../../../src/math/Difference.js": -/*!***************************************!*\ - !*** ../../../src/math/Difference.js ***! - \***************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/Euler.js": -/*!**********************************!*\ - !*** ../../../src/math/Euler.js ***! - \**********************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(/*! ./Clamp */ "../../../src/math/Clamp.js"); -var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); -var Matrix4 = __webpack_require__(/*! ./Matrix4 */ "../../../src/math/Matrix4.js"); -var NOOP = __webpack_require__(/*! ../utils/NOOP */ "../../../src/utils/NOOP.js"); - -var tempMatrix = new Matrix4(); - -/** - * @classdesc - * - * @class Euler - * @memberof Phaser.Math - * @constructor - * @since 3.50.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - */ -var Euler = new Class({ - - initialize: - - function Euler (x, y, z, order) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (z === undefined) { z = 0; } - if (order === undefined) { order = Euler.DefaultOrder; } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this.onChangeCallback = NOOP; - }, - - x: { - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - - this.onChangeCallback(this); - } - }, - - y: { - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - - this.onChangeCallback(this); - } - }, - - z: { - get: function () - { - return this._z; - }, - - set: function (value) - { - this._z = value; - - this.onChangeCallback(this); - } - }, - - order: { - get: function () - { - return this._order; - }, - - set: function (value) - { - this._order = value; - - this.onChangeCallback(this); - } - }, - - set: function (x, y, z, order) - { - if (order === undefined) { order = this._order; } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this.onChangeCallback(this); - - return this; - }, - - copy: function (euler) - { - return this.set(euler.x, euler.y, euler.z, euler.order); - }, - - setFromQuaternion: function (quaternion, order, update) - { - if (order === undefined) { order = this._order; } - if (update === undefined) { update = false; } - - tempMatrix.fromQuat(quaternion); - - return this.setFromRotationMatrix(tempMatrix, order, update); - }, - - setFromRotationMatrix: function (matrix, order, update) - { - if (order === undefined) { order = this._order; } - if (update === undefined) { update = false; } - - var elements = matrix.val; - - // Upper 3x3 of matrix is un-scaled rotation matrix - var m11 = elements[0]; - var m12 = elements[4]; - var m13 = elements[8]; - var m21 = elements[1]; - var m22 = elements[5]; - var m23 = elements[9]; - var m31 = elements[2]; - var m32 = elements[6]; - var m33 = elements[10]; - - var x = 0; - var y = 0; - var z = 0; - var epsilon = 0.99999; - - switch (order) - { - case 'XYZ': - { - y = Math.asin(Clamp(m13, -1, 1)); - - if (Math.abs(m13) < epsilon) - { - x = Math.atan2(-m23, m33); - z = Math.atan2(-m12, m11); - } - else - { - x = Math.atan2(m32, m22); - } - - break; - } - - case 'YXZ': - { - x = Math.asin(-Clamp(m23, -1, 1)); - - if (Math.abs(m23) < epsilon) - { - y = Math.atan2(m13, m33); - z = Math.atan2(m21, m22); - } - else - { - y = Math.atan2(-m31, m11); - } - - break; - } - - case 'ZXY': - { - x = Math.asin(Clamp(m32, -1, 1)); - - if (Math.abs(m32) < epsilon) - { - y = Math.atan2(-m31, m33); - z = Math.atan2(-m12, m22); - } - else - { - z = Math.atan2(m21, m11); - } - - break; - } - - case 'ZYX': - { - y = Math.asin(-Clamp(m31, -1, 1)); - - if (Math.abs(m31) < epsilon) - { - x = Math.atan2(m32, m33); - z = Math.atan2(m21, m11); - } - else - { - z = Math.atan2(-m12, m22); - } - - break; - } - - case 'YZX': - { - z = Math.asin(Clamp(m21, -1, 1)); - - if (Math.abs(m21) < epsilon) - { - x = Math.atan2(-m23, m22); - y = Math.atan2(-m31, m11); - } - else - { - y = Math.atan2(m13, m33); - } - - break; - } - - case 'XZY': - { - z = Math.asin(-Clamp(m12, -1, 1)); - - if (Math.abs(m12) < epsilon) - { - x = Math.atan2(m32, m22); - y = Math.atan2(m13, m11); - } - else - { - x = Math.atan2(-m23, m33); - } - - break; - } - } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - if (update) - { - this.onChangeCallback(this); - } - - return this; - } - -}); - -Euler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ]; - -Euler.DefaultOrder = 'XYZ'; - -module.exports = Euler; - - -/***/ }), - -/***/ "../../../src/math/Factorial.js": -/*!**************************************!*\ - !*** ../../../src/math/Factorial.js ***! - \**************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/FloatBetween.js": -/*!*****************************************!*\ - !*** ../../../src/math/FloatBetween.js ***! - \*****************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/FloorTo.js": -/*!************************************!*\ - !*** ../../../src/math/FloorTo.js ***! - \************************************/ -/***/ ((module) => { - -/** - * @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 {number} [place=0] - The place to round to. - * @param {number} [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; - - -/***/ }), - -/***/ "../../../src/math/FromPercent.js": -/*!****************************************!*\ - !*** ../../../src/math/FromPercent.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(/*! ./Clamp */ "../../../src/math/Clamp.js"); - -/** - * 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 + min; -}; - -module.exports = FromPercent; - - -/***/ }), - -/***/ "../../../src/math/GetSpeed.js": -/*!*************************************!*\ - !*** ../../../src/math/GetSpeed.js ***! - \*************************************/ -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ "../../../src/math/IsEven.js": -/*!***********************************!*\ - !*** ../../../src/math/IsEven.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/IsEvenStrict.js": -/*!*****************************************!*\ - !*** ../../../src/math/IsEvenStrict.js ***! - \*****************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/Linear.js": -/*!***********************************!*\ - !*** ../../../src/math/Linear.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/LinearXY.js": -/*!*************************************!*\ - !*** ../../../src/math/LinearXY.js ***! - \*************************************/ -/***/ ((module) => { - -/** - * @author Greg McLean - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Interpolates two given Vectors and returns a new Vector between them. - * - * Does not modify either of the passed Vectors. - * - * @function Phaser.Math.LinearXY - * @since 3.60.0 - * - * @param {Phaser.Math.Vector2} vector1 - Starting vector - * @param {Phaser.Math.Vector2} vector2 - Ending vector - * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. - * - * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. - */ -var LinearXY = function (vector1, vector2, t) -{ - if (t === undefined) { t = 0; } - - return vector1.clone().lerp(vector2, t); -}; - -module.exports = LinearXY; - - -/***/ }), - -/***/ "../../../src/math/Matrix3.js": -/*!************************************!*\ - !*** ../../../src/math/Matrix3.js ***! - \************************************/ -/***/ ((module, __unused_webpack_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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/Matrix4.js": -/*!************************************!*\ - !*** ../../../src/math/Matrix4.js ***! - \************************************/ -/***/ ((module, __unused_webpack_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 Vector3 = __webpack_require__(/*! ./Vector3 */ "../../../src/math/Vector3.js"); - -/** - * @ignore - */ -var EPSILON = 0.000001; - -/** - * @classdesc - * A four-dimensional matrix. - * - * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji - * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl - * - * @class Matrix4 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from. - */ -var Matrix4 = new Class({ - - initialize: - - function Matrix4 (m) - { - /** - * The matrix values. - * - * @name Phaser.Math.Matrix4#val - * @type {Float32Array} - * @since 3.0.0 - */ - this.val = new Float32Array(16); - - if (m) - { - // Assume Matrix4 with val: - this.copy(m); - } - else - { - // Default to identity - this.identity(); - } - }, - - /** - * Make a clone of this Matrix4. - * - * @method Phaser.Math.Matrix4#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix4} A clone of this Matrix4. - */ - clone: function () - { - return new Matrix4(this); - }, - - /** - * This method is an alias for `Matrix4.copy`. - * - * @method Phaser.Math.Matrix4#set - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from. - * - * @return {this} This Matrix4. - */ - set: function (src) - { - return this.copy(src); - }, - - /** - * Sets all values of this Matrix4. - * - * @method Phaser.Math.Matrix4#setValues - * @since 3.50.0 - * - * @param {number} m00 - The m00 value. - * @param {number} m01 - The m01 value. - * @param {number} m02 - The m02 value. - * @param {number} m03 - The m03 value. - * @param {number} m10 - The m10 value. - * @param {number} m11 - The m11 value. - * @param {number} m12 - The m12 value. - * @param {number} m13 - The m13 value. - * @param {number} m20 - The m20 value. - * @param {number} m21 - The m21 value. - * @param {number} m22 - The m22 value. - * @param {number} m23 - The m23 value. - * @param {number} m30 - The m30 value. - * @param {number} m31 - The m31 value. - * @param {number} m32 - The m32 value. - * @param {number} m33 - The m33 value. - * - * @return {this} This Matrix4 instance. - */ - setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) - { - var out = this.val; - - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - - return this; - }, - - /** - * Copy the values of a given Matrix into this Matrix. - * - * @method Phaser.Math.Matrix4#copy - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from. - * - * @return {this} This Matrix4. - */ - copy: function (src) - { - var a = src.val; - - return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - }, - - /** - * Set the values of this Matrix from the given array. - * - * @method Phaser.Math.Matrix4#fromArray - * @since 3.0.0 - * - * @param {number[]} a - The array to copy the values from. Must have at least 16 elements. - * - * @return {this} This Matrix4. - */ - fromArray: function (a) - { - return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - }, - - /** - * Reset this Matrix. - * - * Sets all values to `0`. - * - * @method Phaser.Math.Matrix4#zero - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix4} This Matrix4. - */ - zero: function () - { - return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - }, - - /** - * Generates a transform matrix based on the given position, scale and rotation. - * - * @method Phaser.Math.Matrix4#transform - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} position - The position vector. - * @param {Phaser.Math.Vector3} scale - The scale vector. - * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion. - * - * @return {this} This Matrix4. - */ - transform: function (position, scale, rotation) - { - var rotMatrix = _tempMat1.fromQuat(rotation); - - var rm = rotMatrix.val; - - var sx = scale.x; - var sy = scale.y; - var sz = scale.z; - - return this.setValues( - rm[0] * sx, - rm[1] * sx, - rm[2] * sx, - 0, - - rm[4] * sy, - rm[5] * sy, - rm[6] * sy, - 0, - - rm[8] * sz, - rm[9] * sz, - rm[10] * sz, - 0, - - position.x, - position.y, - position.z, - 1 - ); - }, - - /** - * Set the `x`, `y` and `z` values of this Matrix. - * - * @method Phaser.Math.Matrix4#xyz - * @since 3.0.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {number} z - The z value. - * - * @return {this} This Matrix4. - */ - xyz: function (x, y, z) - { - this.identity(); - - var out = this.val; - - out[12] = x; - out[13] = y; - out[14] = z; - - return this; - }, - - /** - * Set the scaling values of this Matrix. - * - * @method Phaser.Math.Matrix4#scaling - * @since 3.0.0 - * - * @param {number} x - The x scaling value. - * @param {number} y - The y scaling value. - * @param {number} z - The z scaling value. - * - * @return {this} This Matrix4. - */ - scaling: function (x, y, z) - { - this.zero(); - - var out = this.val; - - out[0] = x; - out[5] = y; - out[10] = z; - out[15] = 1; - - return this; - }, - - /** - * Reset this Matrix to an identity (default) matrix. - * - * @method Phaser.Math.Matrix4#identity - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - identity: function () - { - return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - }, - - /** - * Transpose this Matrix. - * - * @method Phaser.Math.Matrix4#transpose - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - transpose: function () - { - var a = this.val; - - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a12 = a[6]; - var a13 = a[7]; - var a23 = a[11]; - - a[1] = a[4]; - a[2] = a[8]; - a[3] = a[12]; - a[4] = a01; - a[6] = a[9]; - a[7] = a[13]; - a[8] = a02; - a[9] = a12; - a[11] = a[14]; - a[12] = a03; - a[13] = a13; - a[14] = a23; - - return this; - }, - - /** - * Copies the given Matrix4 into this Matrix and then inverses it. - * - * @method Phaser.Math.Matrix4#getInverse - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4. - * - * @return {this} This Matrix4. - */ - getInverse: function (m) - { - this.copy(m); - - return this.invert(); - }, - - /** - * Invert this Matrix. - * - * @method Phaser.Math.Matrix4#invert - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - invert: function () - { - var a = 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 this; - } - - det = 1 / det; - - return this.setValues( - (a11 * b11 - a12 * b10 + a13 * b09) * det, - (a02 * b10 - a01 * b11 - a03 * b09) * det, - (a31 * b05 - a32 * b04 + a33 * b03) * det, - (a22 * b04 - a21 * b05 - a23 * b03) * det, - (a12 * b08 - a10 * b11 - a13 * b07) * det, - (a00 * b11 - a02 * b08 + a03 * b07) * det, - (a32 * b02 - a30 * b05 - a33 * b01) * det, - (a20 * b05 - a22 * b02 + a23 * b01) * det, - (a10 * b10 - a11 * b08 + a13 * b06) * det, - (a01 * b08 - a00 * b10 - a03 * b06) * det, - (a30 * b04 - a31 * b02 + a33 * b00) * det, - (a21 * b02 - a20 * b04 - a23 * b00) * det, - (a11 * b07 - a10 * b09 - a12 * b06) * det, - (a00 * b09 - a01 * b07 + a02 * b06) * det, - (a31 * b01 - a30 * b03 - a32 * b00) * det, - (a20 * b03 - a21 * b01 + a22 * b00) * det - ); - }, - - /** - * Calculate the adjoint, or adjugate, of this Matrix. - * - * @method Phaser.Math.Matrix4#adjoint - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - adjoint: function () - { - var a = 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]; - - return this.setValues( - (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)), - -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)), - (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)), - -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)), - -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)), - (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)), - -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)), - (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)), - (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)), - -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)), - (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)), - -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)), - -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)), - (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)), - -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)), - (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)) - ); - }, - - /** - * Calculate the determinant of this Matrix. - * - * @method Phaser.Math.Matrix4#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 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 - return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * @method Phaser.Math.Matrix4#multiply - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by. - * - * @return {this} This Matrix4. - */ - multiply: function (src) - { - var a = 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 b = src.val; - - // Cache only the current line of the second matrix - var b0 = b[0]; - var b1 = b[1]; - var b2 = b[2]; - var b3 = b[3]; - - a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[4]; - b1 = b[5]; - b2 = b[6]; - b3 = b[7]; - - a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[8]; - b1 = b[9]; - b2 = b[10]; - b3 = b[11]; - - a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[12]; - b1 = b[13]; - b2 = b[14]; - b3 = b[15]; - - a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - return this; - }, - - /** - * 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 - The source Matrix4 that this Matrix4 is multiplied by. - * - * @return {this} This Matrix4. - */ - multiplyLocal: function (src) - { - var a = this.val; - var b = src.val; - - return this.setValues( - a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12], - a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13], - a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14], - a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15], - - a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12], - a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13], - a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14], - a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15], - - a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12], - a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13], - a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14], - a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15], - - a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12], - a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13], - a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14], - a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15] - ); - }, - - /** - * Multiplies the given Matrix4 object with this Matrix. - * - * This is the same as calling `multiplyMatrices(m, this)`. - * - * @method Phaser.Math.Matrix4#premultiply - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one. - * - * @return {this} This Matrix4. - */ - premultiply: function (m) - { - return this.multiplyMatrices(m, this); - }, - - /** - * Multiplies the two given Matrix4 objects and stores the results in this Matrix. - * - * @method Phaser.Math.Matrix4#multiplyMatrices - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply. - * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply. - * - * @return {this} This Matrix4. - */ - multiplyMatrices: function (a, b) - { - var am = a.val; - var bm = b.val; - - var a11 = am[0]; - var a12 = am[4]; - var a13 = am[8]; - var a14 = am[12]; - var a21 = am[1]; - var a22 = am[5]; - var a23 = am[9]; - var a24 = am[13]; - var a31 = am[2]; - var a32 = am[6]; - var a33 = am[10]; - var a34 = am[14]; - var a41 = am[3]; - var a42 = am[7]; - var a43 = am[11]; - var a44 = am[15]; - - var b11 = bm[0]; - var b12 = bm[4]; - var b13 = bm[8]; - var b14 = bm[12]; - var b21 = bm[1]; - var b22 = bm[5]; - var b23 = bm[9]; - var b24 = bm[13]; - var b31 = bm[2]; - var b32 = bm[6]; - var b33 = bm[10]; - var b34 = bm[14]; - var b41 = bm[3]; - var b42 = bm[7]; - var b43 = bm[11]; - var b44 = bm[15]; - - return this.setValues( - a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41, - a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41, - a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41, - a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41, - a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42, - a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42, - a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42, - a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42, - a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43, - a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43, - a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43, - a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43, - a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44, - a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44, - a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44, - a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44 - ); - }, - - /** - * Translate this Matrix using the given Vector. - * - * @method Phaser.Math.Matrix4#translate - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. - * - * @return {this} This Matrix4. - */ - translate: function (v) - { - return this.translateXYZ(v.x, v.y, v.z); - }, - - /** - * 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 {this} 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. - * - * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. - * - * @method Phaser.Math.Matrix4#scale - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. - * - * @return {this} This Matrix4. - */ - scale: function (v) - { - return this.scaleXYZ(v.x, v.y, v.z); - }, - - /** - * 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 {this} 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. - * - * @method Phaser.Math.Matrix4#makeRotationAxis - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis. - * @param {number} angle - The rotation angle in radians. - * - * @return {this} This Matrix4. - */ - makeRotationAxis: function (axis, angle) - { - // Based on http://www.gamedev.net/reference/articles/article1199.asp - - var c = Math.cos(angle); - var s = Math.sin(angle); - var t = 1 - c; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var tx = t * x; - var ty = t * y; - - return this.setValues( - tx * x + c, tx * y - s * z, tx * z + s * y, 0, - tx * y + s * z, ty * y + c, ty * z - s * x, 0, - tx * z - s * y, ty * z + s * x, t * z * z + c, 0, - 0, 0, 0, 1 - ); - }, - - /** - * Apply a rotation transformation to this Matrix. - * - * @method Phaser.Math.Matrix4#rotate - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * @param {Phaser.Math.Vector3} axis - The axis to rotate upon. - * - * @return {this} This Matrix4. - */ - rotate: function (rad, axis) - { - var a = this.val; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var len = Math.sqrt(x * x + y * y + z * z); - - if (Math.abs(len) < EPSILON) - { - return this; - } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - - var s = Math.sin(rad); - var c = Math.cos(rad); - var t = 1 - c; - - 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]; - - // Construct the elements of the rotation matrix - var b00 = x * x * t + c; - var b01 = y * x * t + z * s; - var b02 = z * x * t - y * s; - - var b10 = x * y * t - z * s; - var b11 = y * y * t + c; - var b12 = z * y * t + x * s; - - var b20 = x * z * t + y * s; - var b21 = y * z * t - x * s; - var b22 = z * z * t + c; - - // Perform rotation-specific matrix multiplication - return this.setValues( - a00 * b00 + a10 * b01 + a20 * b02, - a01 * b00 + a11 * b01 + a21 * b02, - a02 * b00 + a12 * b01 + a22 * b02, - a03 * b00 + a13 * b01 + a23 * b02, - a00 * b10 + a10 * b11 + a20 * b12, - a01 * b10 + a11 * b11 + a21 * b12, - a02 * b10 + a12 * b11 + a22 * b12, - a03 * b10 + a13 * b11 + a23 * b12, - a00 * b20 + a10 * b21 + a20 * b22, - a01 * b20 + a11 * b21 + a21 * b22, - a02 * b20 + a12 * b21 + a22 * b22, - a03 * b20 + a13 * b21 + a23 * b22, - a30, a31, a32, a33 - ); - }, - - /** - * Rotate this matrix on its X axis. - * - * @method Phaser.Math.Matrix4#rotateX - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * - * @return {this} This Matrix4. - */ - rotateX: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - 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]; - - // Perform axis-specific matrix multiplication - a[4] = a10 * c + a20 * s; - a[5] = a11 * c + a21 * s; - a[6] = a12 * c + a22 * s; - a[7] = a13 * c + a23 * s; - a[8] = a20 * c - a10 * s; - a[9] = a21 * c - a11 * s; - a[10] = a22 * c - a12 * s; - a[11] = a23 * c - a13 * s; - - return this; - }, - - /** - * Rotate this matrix on its Y axis. - * - * @method Phaser.Math.Matrix4#rotateY - * @since 3.0.0 - * - * @param {number} rad - The angle to rotate by, in radians. - * - * @return {this} This Matrix4. - */ - rotateY: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - // Perform axis-specific matrix multiplication - a[0] = a00 * c - a20 * s; - a[1] = a01 * c - a21 * s; - a[2] = a02 * c - a22 * s; - a[3] = a03 * c - a23 * s; - a[8] = a00 * s + a20 * c; - a[9] = a01 * s + a21 * c; - a[10] = a02 * s + a22 * c; - a[11] = a03 * s + a23 * c; - - return this; - }, - - /** - * Rotate this matrix on its Z axis. - * - * @method Phaser.Math.Matrix4#rotateZ - * @since 3.0.0 - * - * @param {number} rad - The angle to rotate by, in radians. - * - * @return {this} This Matrix4. - */ - rotateZ: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - 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]; - - // Perform axis-specific matrix multiplication - a[0] = a00 * c + a10 * s; - a[1] = a01 * c + a11 * s; - a[2] = a02 * c + a12 * s; - a[3] = a03 * c + a13 * s; - a[4] = a10 * c - a00 * s; - a[5] = a11 * c - a01 * s; - a[6] = a12 * c - a02 * s; - a[7] = a13 * c - a03 * s; - - return this; - }, - - /** - * Set the values of this Matrix from the given rotation Quaternion and translation Vector. - * - * @method Phaser.Math.Matrix4#fromRotationTranslation - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from. - * @param {Phaser.Math.Vector3} v - The Vector to set translation from. - * - * @return {this} This Matrix4. - */ - fromRotationTranslation: function (q, v) - { - // Quaternion math - 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; - - return this.setValues( - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - v.x, - v.y, - v.z, - 1 - ); - }, - - /** - * Set the values of this Matrix from the given Quaternion. - * - * @method Phaser.Math.Matrix4#fromQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. - * - * @return {this} This Matrix4. - */ - 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; - - return this.setValues( - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - 0, - 0, - 0, - 1 - ); - }, - - /** - * Generate a frustum matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#frustum - * @since 3.0.0 - * - * @param {number} left - The left bound of the frustum. - * @param {number} right - The right bound of the frustum. - * @param {number} bottom - The bottom bound of the frustum. - * @param {number} top - The top bound of the frustum. - * @param {number} near - The near bound of the frustum. - * @param {number} far - The far bound of the frustum. - * - * @return {this} This Matrix4. - */ - frustum: function (left, right, bottom, top, near, far) - { - var rl = 1 / (right - left); - var tb = 1 / (top - bottom); - var nf = 1 / (near - far); - - return this.setValues( - (near * 2) * rl, - 0, - 0, - 0, - - 0, - (near * 2) * tb, - 0, - 0, - - (right + left) * rl, - (top + bottom) * tb, - (far + near) * nf, - -1, - - 0, - 0, - (far * near * 2) * nf, - 0 - ); - }, - - /** - * Generate a perspective projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#perspective - * @since 3.0.0 - * - * @param {number} fovy - Vertical field of view in radians - * @param {number} aspect - Aspect ratio. Typically viewport width /height. - * @param {number} near - Near bound of the frustum. - * @param {number} far - Far bound of the frustum. - * - * @return {this} This Matrix4. - */ - perspective: function (fovy, aspect, near, far) - { - var f = 1.0 / Math.tan(fovy / 2); - var nf = 1 / (near - far); - - return this.setValues( - f / aspect, - 0, - 0, - 0, - - 0, - f, - 0, - 0, - - 0, - 0, - (far + near) * nf, - -1, - - 0, - 0, - (2 * far * near) * nf, - 0 - ); - }, - - /** - * Generate a perspective projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#perspectiveLH - * @since 3.0.0 - * - * @param {number} width - The width of the frustum. - * @param {number} height - The height of the frustum. - * @param {number} near - Near bound of the frustum. - * @param {number} far - Far bound of the frustum. - * - * @return {this} This Matrix4. - */ - perspectiveLH: function (width, height, near, far) - { - return this.setValues( - (2 * near) / width, - 0, - 0, - 0, - - 0, - (2 * near) / height, - 0, - 0, - - 0, - 0, - -far / (near - far), - 1, - - 0, - 0, - (near * far) / (near - far), - 0 - ); - }, - - /** - * Generate an orthogonal projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#ortho - * @since 3.0.0 - * - * @param {number} left - The left bound of the frustum. - * @param {number} right - The right bound of the frustum. - * @param {number} bottom - The bottom bound of the frustum. - * @param {number} top - The top bound of the frustum. - * @param {number} near - The near bound of the frustum. - * @param {number} far - The far bound of the frustum. - * - * @return {this} This Matrix4. - */ - ortho: function (left, right, bottom, top, near, far) - { - var lr = left - right; - var bt = bottom - top; - var nf = near - far; - - // Avoid division by zero - lr = (lr === 0) ? lr : 1 / lr; - bt = (bt === 0) ? bt : 1 / bt; - nf = (nf === 0) ? nf : 1 / nf; - - return this.setValues( - -2 * lr, - 0, - 0, - 0, - - 0, - -2 * bt, - 0, - 0, - - 0, - 0, - 2 * nf, - 0, - - (left + right) * lr, - (top + bottom) * bt, - (far + near) * nf, - 1 - ); - }, - - /** - * Generate a right-handed look-at matrix with the given eye position, target and up axis. - * - * @method Phaser.Math.Matrix4#lookAtRH - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} eye - Position of the viewer. - * @param {Phaser.Math.Vector3} target - Point the viewer is looking at. - * @param {Phaser.Math.Vector3} up - vec3 pointing up. - * - * @return {this} This Matrix4. - */ - lookAtRH: function (eye, target, up) - { - var m = this.val; - - _z.subVectors(eye, target); - - if (_z.getLengthSquared() === 0) - { - // eye and target are in the same position - _z.z = 1; - } - - _z.normalize(); - _x.crossVectors(up, _z); - - if (_x.getLengthSquared() === 0) - { - // up and z are parallel - - if (Math.abs(up.z) === 1) - { - _z.x += 0.0001; - } - else - { - _z.z += 0.0001; - } - - _z.normalize(); - _x.crossVectors(up, _z); - } - - _x.normalize(); - _y.crossVectors(_z, _x); - - m[0] = _x.x; - m[1] = _x.y; - m[2] = _x.z; - m[4] = _y.x; - m[5] = _y.y; - m[6] = _y.z; - m[8] = _z.x; - m[9] = _z.y; - m[10] = _z.z; - - return this; - }, - - /** - * Generate a look-at matrix with the given eye position, focal point, and up axis. - * - * @method Phaser.Math.Matrix4#lookAt - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} eye - Position of the viewer - * @param {Phaser.Math.Vector3} center - Point the viewer is looking at - * @param {Phaser.Math.Vector3} up - vec3 pointing up. - * - * @return {this} This Matrix4. - */ - lookAt: function (eye, center, up) - { - var eyex = eye.x; - var eyey = eye.y; - var eyez = eye.z; - - var upx = up.x; - var upy = up.y; - var upz = up.z; - - var centerx = center.x; - var centery = center.y; - var centerz = center.z; - - if (Math.abs(eyex - centerx) < EPSILON && - Math.abs(eyey - centery) < EPSILON && - Math.abs(eyez - centerz) < EPSILON) - { - return this.identity(); - } - - var z0 = eyex - centerx; - var z1 = eyey - centery; - var z2 = eyez - centerz; - - var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); - - z0 *= len; - z1 *= len; - z2 *= len; - - var x0 = upy * z2 - upz * z1; - var x1 = upz * z0 - upx * z2; - var x2 = upx * z1 - upy * z0; - - len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); - - if (!len) - { - x0 = 0; - x1 = 0; - x2 = 0; - } - else - { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; - } - - var y0 = z1 * x2 - z2 * x1; - var y1 = z2 * x0 - z0 * x2; - var y2 = z0 * x1 - z1 * x0; - - len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); - - if (!len) - { - y0 = 0; - y1 = 0; - y2 = 0; - } - else - { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; - } - - return this.setValues( - x0, - y0, - z0, - 0, - - x1, - y1, - z1, - 0, - - x2, - y2, - z2, - 0, - - -(x0 * eyex + x1 * eyey + x2 * eyez), - -(y0 * eyex + y1 * eyey + y2 * eyez), - -(z0 * eyex + z1 * eyey + z2 * eyez), - 1 - ); - }, - - /** - * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. - * - * @method Phaser.Math.Matrix4#yawPitchRoll - * @since 3.0.0 - * - * @param {number} yaw - The yaw value. - * @param {number} pitch - The pitch value. - * @param {number} roll - The roll value. - * - * @return {this} This Matrix4. - */ - yawPitchRoll: function (yaw, pitch, roll) - { - this.zero(); - _tempMat1.zero(); - _tempMat2.zero(); - - var m0 = this.val; - var m1 = _tempMat1.val; - var m2 = _tempMat2.val; - - // Rotate Z - var s = Math.sin(roll); - var c = Math.cos(roll); - - m0[10] = 1; - m0[15] = 1; - m0[0] = c; - m0[1] = s; - m0[4] = -s; - m0[5] = c; - - // Rotate X - s = Math.sin(pitch); - c = Math.cos(pitch); - - m1[0] = 1; - m1[15] = 1; - m1[5] = c; - m1[10] = c; - m1[9] = -s; - m1[6] = s; - - // Rotate Y - s = Math.sin(yaw); - c = Math.cos(yaw); - - m2[5] = 1; - m2[15] = 1; - m2[0] = c; - m2[2] = -s; - m2[8] = s; - m2[10] = c; - - this.multiplyLocal(_tempMat1); - this.multiplyLocal(_tempMat2); - - return this; - }, - - /** - * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. - * - * @method Phaser.Math.Matrix4#setWorldMatrix - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix. - * @param {Phaser.Math.Vector3} position - The position of the world matrix. - * @param {Phaser.Math.Vector3} scale - The scale of the world matrix. - * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix. - * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix. - * - * @return {this} This Matrix4. - */ - setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix) - { - this.yawPitchRoll(rotation.y, rotation.x, rotation.z); - - _tempMat1.scaling(scale.x, scale.y, scale.z); - _tempMat2.xyz(position.x, position.y, position.z); - - this.multiplyLocal(_tempMat1); - this.multiplyLocal(_tempMat2); - - if (viewMatrix) - { - this.multiplyLocal(viewMatrix); - } - - if (projectionMatrix) - { - this.multiplyLocal(projectionMatrix); - } - - return this; - }, - - /** - * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4. - * - * @method Phaser.Math.Matrix4#multiplyToMat4 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one. - * @param {Phaser.Math.Matrix4} out - The receiving Matrix. - * - * @return {Phaser.Math.Matrix4} This `out` Matrix4. - */ - multiplyToMat4: function (src, out) - { - var a = this.val; - var b = src.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 = b[0]; - var b01 = b[1]; - var b02 = b[2]; - var b03 = b[3]; - var b10 = b[4]; - var b11 = b[5]; - var b12 = b[6]; - var b13 = b[7]; - var b20 = b[8]; - var b21 = b[9]; - var b22 = b[10]; - var b23 = b[11]; - var b30 = b[12]; - var b31 = b[13]; - var b32 = b[14]; - var b33 = b[15]; - - return out.setValues( - b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, - b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31, - b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32, - b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33, - - b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, - b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, - b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, - b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, - - b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, - b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, - b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, - b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, - - b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, - b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, - b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, - b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 - ); - }, - - /** - * Takes the rotation and position vectors and builds this Matrix4 from them. - * - * @method Phaser.Math.Matrix4#fromRotationXYTranslation - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} rotation - The rotation vector. - * @param {Phaser.Math.Vector3} position - The position vector. - * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`) - * - * @return {this} This Matrix4. - */ - fromRotationXYTranslation: function (rotation, position, translateFirst) - { - var x = position.x; - var y = position.y; - var z = position.z; - - var sx = Math.sin(rotation.x); - var cx = Math.cos(rotation.x); - - var sy = Math.sin(rotation.y); - var cy = Math.cos(rotation.y); - - var a30 = x; - var a31 = y; - var a32 = z; - - // Rotate X - - var b21 = -sx; - - // Rotate Y - - var c01 = 0 - b21 * sy; - - var c02 = 0 - cx * sy; - - var c21 = b21 * cy; - - var c22 = cx * cy; - - // Translate - if (!translateFirst) - { - // a30 = cy * x + 0 * y + sy * z; - a30 = cy * x + sy * z; - a31 = c01 * x + cx * y + c21 * z; - a32 = c02 * x + sx * y + c22 * z; - } - - return this.setValues( - cy, - c01, - c02, - 0, - 0, - cx, - sx, - 0, - sy, - c21, - c22, - 0, - a30, - a31, - a32, - 1 - ); - }, - - /** - * Returns the maximum axis scale from this Matrix4. - * - * @method Phaser.Math.Matrix4#getMaxScaleOnAxis - * @since 3.50.0 - * - * @return {number} The maximum axis scale. - */ - getMaxScaleOnAxis: function () - { - var m = this.val; - - var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2]; - var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6]; - var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10]; - - return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); - } - -}); - -/** - * @ignore - */ -var _tempMat1 = new Matrix4(); - -/** - * @ignore - */ -var _tempMat2 = new Matrix4(); - -/** - * @ignore - */ -var _x = new Vector3(); - -/** - * @ignore - */ -var _y = new Vector3(); - -/** - * @ignore - */ -var _z = new Vector3(); - -module.exports = Matrix4; - - -/***/ }), - -/***/ "../../../src/math/MaxAdd.js": -/*!***********************************!*\ - !*** ../../../src/math/MaxAdd.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/Median.js": -/*!***********************************!*\ - !*** ../../../src/math/Median.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @author Vladislav Forsh - * @copyright 2021 RoboWhale - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate the median of the given values. The values are sorted and the middle value is returned. - * In case of an even number of values, the average of the two middle values is returned. - * - * @function Phaser.Math.Median - * @since 3.54.0 - * - * @param {number[]} values - The values to average. - * - * @return {number} The median value. - */ -var Median = function (values) -{ - var valuesNum = values.length; - if (valuesNum === 0) - { - return 0; - } - - values.sort(function (a, b) { return a - b; }); - - var halfIndex = Math.floor(valuesNum / 2); - - return valuesNum % 2 === 0 - ? (values[halfIndex] + values[halfIndex - 1]) / 2 - : values[halfIndex]; -}; - -module.exports = Median; - - -/***/ }), - -/***/ "../../../src/math/MinSub.js": -/*!***********************************!*\ - !*** ../../../src/math/MinSub.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/Percent.js": -/*!************************************!*\ - !*** ../../../src/math/Percent.js ***! - \************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/Quaternion.js": -/*!***************************************!*\ - !*** ../../../src/math/Quaternion.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); -var Matrix3 = __webpack_require__(/*! ./Matrix3 */ "../../../src/math/Matrix3.js"); -var NOOP = __webpack_require__(/*! ../utils/NOOP */ "../../../src/utils/NOOP.js"); -var Vector3 = __webpack_require__(/*! ./Vector3 */ "../../../src/math/Vector3.js"); - -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=0] - The x component. - * @param {number} [y=0] - The y component. - * @param {number} [z=0] - The z component. - * @param {number} [w=1] - 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 - * @private - * @since 3.50.0 - */ - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_y - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_z - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_w - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * This callback is invoked, if set, each time a value in this quaternion is changed. - * The callback is passed one argument, a reference to this quaternion. - * - * @name Phaser.Math.Quaternion#onChangeCallback - * @type {function} - * @since 3.50.0 - */ - this.onChangeCallback = NOOP; - - this.set(x, y, z, w); - }, - - /** - * The x component of this Quaternion. - * - * @name Phaser.Math.Quaternion#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - x: { - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - - this.onChangeCallback(this); - } - }, - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - y: { - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - - this.onChangeCallback(this); - } - }, - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - z: { - get: function () - { - return this._z; - }, - - set: function (value) - { - this._z = value; - - this.onChangeCallback(this); - } - }, - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - w: { - get: function () - { - return this._w; - }, - - set: function (value) - { - this._w = value; - - this.onChangeCallback(this); - } - }, - - /** - * 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) - { - return this.set(src); - }, - - /** - * Set the components of this Quaternion and optionally call the `onChangeCallback`. - * - * @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. - * @param {boolean} [update=true] - Call the `onChangeCallback`? - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - set: function (x, y, z, w, update) - { - if (update === undefined) { update = true; } - - 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; - } - - if (update) - { - this.onChangeCallback(this); - } - - 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; - - this.onChangeCallback(this); - - 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; - - this.onChangeCallback(this); - - 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; - - this.onChangeCallback(this); - - 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; - } - - this.onChangeCallback(this); - - 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; - - return this.set( - ax + t * (v.x - ax), - ay + t * (v.y - ay), - az + t * (v.z - az), - aw + t * (v.w - aw) - ); - }, - - /** - * 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) - { - return this.set(0, 0, 0, 1); - } - 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 () - { - return this.set(0, 0, 0, 1); - }, - - /** - * 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); - - return this.set( - s * axis.x, - s * axis.y, - s * axis.z, - Math.cos(rad) - ); - }, - - /** - * 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; - - return this.set( - ax * bw + aw * bx + ay * bz - az * by, - ay * bw + aw * by + az * bx - ax * bz, - az * bw + aw * bz + ax * by - ay * bx, - aw * bw - ax * bx - ay * by - az * bz - ); - }, - - /** - * 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 - return this.set( - scale0 * ax + scale1 * bx, - scale0 * ay + scale1 * by, - scale0 * az + scale1 * bz, - scale0 * aw + scale1 * bw - ); - }, - - /** - * 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; - - return this.set( - -a0 * invDot, - -a1 * invDot, - -a2 * invDot, - a3 * invDot - ); - }, - - /** - * 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; - - this.onChangeCallback(this); - - 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); - - return this.set( - ax * bw + aw * bx, - ay * bw + az * bx, - az * bw - ay * bx, - aw * bw - ax * bx - ); - }, - - /** - * 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); - - return this.set( - ax * bw - az * by, - ay * bw + aw * by, - az * bw + ax * by, - aw * bw - ay * by - ); - }, - - /** - * 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); - - return this.set( - ax * bw + ay * bz, - ay * bw - ax * bz, - az * bw + aw * bz, - aw * bw - az * bz - ); - }, - - /** - * 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; - }, - - /** - * Set this Quaternion from the given Euler, based on Euler order. - * - * @method Phaser.Math.Quaternion#setFromEuler - * @since 3.50.0 - * - * @param {Phaser.Math.Euler} euler - The Euler to convert from. - * @param {boolean} [update=true] - Run the `onChangeCallback`? - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setFromEuler: function (euler, update) - { - var x = euler.x / 2; - var y = euler.y / 2; - var z = euler.z / 2; - - var c1 = Math.cos(x); - var c2 = Math.cos(y); - var c3 = Math.cos(z); - - var s1 = Math.sin(x); - var s2 = Math.sin(y); - var s3 = Math.sin(z); - - switch (euler.order) - { - case 'XYZ': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'YXZ': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - - case 'ZXY': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'ZYX': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - - case 'YZX': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'XZY': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - } - - return this; - }, - - /** - * Sets the rotation of this Quaternion from the given Matrix4. - * - * @method Phaser.Math.Quaternion#setFromRotationMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setFromRotationMatrix: function (mat4) - { - var m = mat4.val; - - var m11 = m[0]; - var m12 = m[4]; - var m13 = m[8]; - var m21 = m[1]; - var m22 = m[5]; - var m23 = m[9]; - var m31 = m[2]; - var m32 = m[6]; - var m33 = m[10]; - - var trace = m11 + m22 + m33; - var s; - - if (trace > 0) - { - s = 0.5 / Math.sqrt(trace + 1.0); - - this.set( - (m32 - m23) * s, - (m13 - m31) * s, - (m21 - m12) * s, - 0.25 / s - ); - } - else if (m11 > m22 && m11 > m33) - { - s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); - - this.set( - 0.25 * s, - (m12 + m21) / s, - (m13 + m31) / s, - (m32 - m23) / s - ); - } - else if (m22 > m33) - { - s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); - - this.set( - (m12 + m21) / s, - 0.25 * s, - (m23 + m32) / s, - (m13 - m31) / s - ); - } - else - { - s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); - - this.set( - (m13 + m31) / s, - (m23 + m32) / s, - 0.25 * s, - (m21 - m12) / s - ); - } - - 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; - } - - this.onChangeCallback(this); - - return this; - } - -}); - -module.exports = Quaternion; - - -/***/ }), - -/***/ "../../../src/math/RadToDeg.js": -/*!*************************************!*\ - !*** ../../../src/math/RadToDeg.js ***! - \*************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(/*! ./const */ "../../../src/math/const.js"); - -/** - * 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 {number} The given angle converted to degrees. - */ -var RadToDeg = function (radians) -{ - return radians * CONST.RAD_TO_DEG; -}; - -module.exports = RadToDeg; - - -/***/ }), - -/***/ "../../../src/math/RandomXY.js": -/*!*************************************!*\ - !*** ../../../src/math/RandomXY.js ***! - \*************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/RandomXYZ.js": -/*!**************************************!*\ - !*** ../../../src/math/RandomXYZ.js ***! - \**************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/RandomXYZW.js": -/*!***************************************!*\ - !*** ../../../src/math/RandomXYZW.js ***! - \***************************************/ -/***/ ((module) => { - -/** - * @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; } - - 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; - - -/***/ }), - -/***/ "../../../src/math/Rotate.js": -/*!***********************************!*\ - !*** ../../../src/math/Rotate.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/RotateAround.js": -/*!*****************************************!*\ - !*** ../../../src/math/RotateAround.js ***! - \*****************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/RotateAroundDistance.js": -/*!*************************************************!*\ - !*** ../../../src/math/RotateAroundDistance.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/RotateTo.js": -/*!*************************************!*\ - !*** ../../../src/math/RotateTo.js ***! - \*************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***************************************!*\ - !*** ../../../src/math/RotateVec3.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector3 = __webpack_require__(/*! ../math/Vector3 */ "../../../src/math/Vector3.js"); -var Matrix4 = __webpack_require__(/*! ../math/Matrix4 */ "../../../src/math/Matrix4.js"); -var Quaternion = __webpack_require__(/*! ../math/Quaternion */ "../../../src/math/Quaternion.js"); - -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; - - -/***/ }), - -/***/ "../../../src/math/RoundAwayFromZero.js": -/*!**********************************************!*\ - !*** ../../../src/math/RoundAwayFromZero.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/RoundTo.js": -/*!************************************!*\ - !*** ../../../src/math/RoundTo.js ***! - \************************************/ -/***/ ((module) => { - -/** - * @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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. - * @param {number} [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; - - -/***/ }), - -/***/ "../../../src/math/SinCosTableGenerator.js": -/*!*************************************************!*\ - !*** ../../../src/math/SinCosTableGenerator.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/SmoothStep.js": -/*!***************************************!*\ - !*** ../../../src/math/SmoothStep.js ***! - \***************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/SmootherStep.js": -/*!*****************************************!*\ - !*** ../../../src/math/SmootherStep.js ***! - \*****************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/ToXY.js": -/*!*********************************!*\ - !*** ../../../src/math/ToXY.js ***! - \*********************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @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 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 {number} index - The position within the grid to get the x/y value for. - * @param {number} width - The width of the grid. - * @param {number} 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; - } - } - - return out.set(x, y); -}; - -module.exports = ToXY; - - -/***/ }), - -/***/ "../../../src/math/TransformXY.js": -/*!****************************************!*\ - !*** ../../../src/math/TransformXY.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(/*! ./Vector2 */ "../../../src/math/Vector2.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/Vector2.js": -/*!************************************!*\ - !*** ../../../src/math/Vector2.js ***! - \************************************/ -/***/ ((module, __unused_webpack_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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); -var FuzzyEqual = __webpack_require__(/*! ../math/fuzzy/Equal */ "../../../src/math/fuzzy/Equal.js"); - -/** - * @classdesc - * A representation of a vector in 2D space. - * - * A two-component vector. - * - * @class Vector2 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. - * @param {number} [y=x] - The y component. - */ -var Vector2 = new Class({ - - initialize: - - function Vector2 (x, y) - { - /** - * The x component of this Vector. - * - * @name Phaser.Math.Vector2#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = 0; - - /** - * The y component of this Vector. - * - * @name Phaser.Math.Vector2#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; - } - }, - - /** - * Make a clone of this Vector2. - * - * @method Phaser.Math.Vector2#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Vector2} A clone of this Vector2. - */ - 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.Types.Math.Vector2Like} 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 (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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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); - } - -}); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/Vector3.js": -/*!************************************!*\ - !*** ../../../src/math/Vector3.js ***! - \************************************/ -/***/ ((module, __unused_webpack_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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); - -/** - * @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; - }, - - /** - * Sets the components of this Vector to be the `Math.min` result from the given vector. - * - * @method Phaser.Math.Vector3#min - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - min: function (v) - { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - - return this; - }, - - /** - * Sets the components of this Vector to be the `Math.max` result from the given vector. - * - * @method Phaser.Math.Vector3#max - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - max: function (v) - { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - - 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); - }, - - /** - * Adds the two given Vector3s and sets the results into this Vector3. - * - * @method Phaser.Math.Vector3#addVectors - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} a - The first Vector to add. - * @param {Phaser.Math.Vector3} b - The second Vector to add. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addVectors: function (a, b) - { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - - return this; - }, - - /** - * 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; - }, - - /** - * Sets the components of this Vector3 from the position of the given Matrix4. - * - * @method Phaser.Math.Vector3#setFromMatrixPosition - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - setFromMatrixPosition: function (m) - { - return this.fromArray(m.val, 12); - }, - - /** - * Sets the components of this Vector3 from the Matrix4 column specified. - * - * @method Phaser.Math.Vector3#setFromMatrixColumn - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from. - * @param {number} index - The column index. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - setFromMatrixColumn: function (mat4, index) - { - return this.fromArray(mat4.val, index * 4); - }, - - /** - * Sets the components of this Vector3 from the given array, based on the offset. - * - * Vector3.x = array[offset] - * Vector3.y = array[offset + 1] - * Vector3.z = array[offset + 2] - * - * @method Phaser.Math.Vector3#fromArray - * @since 3.50.0 - * - * @param {number[]} array - The array of values to get this Vector from. - * @param {number} [offset=0] - The offset index into the array. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - fromArray: function (array, offset) - { - if (offset === undefined) { offset = 0; } - - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - - 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; - }, - - /** - * Add the given value to each component of this Vector. - * - * @method Phaser.Math.Vector3#addScalar - * @since 3.50.0 - * - * @param {number} s - The amount to add to this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addScalar: function (s) - { - this.x += s; - this.y += s; - this.z += s; - - return this; - }, - - /** - * Add and scale a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector3#addScale - * @since 3.50.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. - * @param {number} scale - The amount to scale `v` by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addScale: function (v, scale) - { - this.x += v.x * scale; - this.y += v.y * scale; - this.z += v.z * scale || 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; - }, - - /** - * Takes a Matrix3 and applies it to this Vector3. - * - * @method Phaser.Math.Vector3#applyMatrix3 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - applyMatrix3: function (mat3) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat3.val; - - this.x = m[0] * x + m[3] * y + m[6] * z; - this.y = m[1] * x + m[4] * y + m[7] * z; - this.z = m[2] * x + m[5] * y + m[8] * z; - - return this; - }, - - /** - * Takes a Matrix4 and applies it to this Vector3. - * - * @method Phaser.Math.Vector3#applyMatrix4 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - applyMatrix4: function (mat4) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat4.val; - - var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]); - - 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; - - 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 Matrix4. - * - * @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; - }, - - /** - * Multiplies this Vector3 by the given view and projection matrices. - * - * @method Phaser.Math.Vector3#projectViewMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix. - * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - projectViewMatrix: function (viewMatrix, projectionMatrix) - { - return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix); - }, - - /** - * Multiplies this Vector3 by the given inversed projection matrix and world matrix. - * - * @method Phaser.Math.Vector3#unprojectViewMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix. - * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - unprojectViewMatrix: function (projectionMatrix, worldMatrix) - { - return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix); - }, - - /** - * 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; - - -/***/ }), - -/***/ "../../../src/math/Vector4.js": -/*!************************************!*\ - !*** ../../../src/math/Vector4.js ***! - \************************************/ -/***/ ((module, __unused_webpack_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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); - -/** - * @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) - { - 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; - } - -}); - -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; - - -/***/ }), - -/***/ "../../../src/math/Within.js": -/*!***********************************!*\ - !*** ../../../src/math/Within.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/Wrap.js": -/*!*********************************!*\ - !*** ../../../src/math/Wrap.js ***! - \*********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/angle/Between.js": -/*!******************************************!*\ - !*** ../../../src/math/angle/Between.js ***! - \******************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/angle/BetweenPoints.js": -/*!************************************************!*\ - !*** ../../../src/math/angle/BetweenPoints.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/angle/BetweenPointsY.js": -/*!*************************************************!*\ - !*** ../../../src/math/angle/BetweenPointsY.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/angle/BetweenY.js": -/*!*******************************************!*\ - !*** ../../../src/math/angle/BetweenY.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/angle/CounterClockwise.js": -/*!***************************************************!*\ - !*** ../../../src/math/angle/CounterClockwise.js ***! - \***************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(/*! ../const */ "../../../src/math/const.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/angle/Normalize.js": -/*!********************************************!*\ - !*** ../../../src/math/angle/Normalize.js ***! - \********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/angle/Random.js": -/*!*****************************************!*\ - !*** ../../../src/math/angle/Random.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_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": -/*!************************************************!*\ - !*** ../../../src/math/angle/RandomDegrees.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_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": -/*!******************************************!*\ - !*** ../../../src/math/angle/Reverse.js ***! - \******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Normalize = __webpack_require__(/*! ./Normalize */ "../../../src/math/angle/Normalize.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/angle/RotateTo.js": -/*!*******************************************!*\ - !*** ../../../src/math/angle/RotateTo.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_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__(/*! ../const */ "../../../src/math/const.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/angle/ShortestBetween.js": -/*!**************************************************!*\ - !*** ../../../src/math/angle/ShortestBetween.js ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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. - * - * @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; - - -/***/ }), - -/***/ "../../../src/math/angle/Wrap.js": -/*!***************************************!*\ - !*** ../../../src/math/angle/Wrap.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MathWrap = __webpack_require__(/*! ../Wrap */ "../../../src/math/Wrap.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/angle/WrapDegrees.js": -/*!**********************************************!*\ - !*** ../../../src/math/angle/WrapDegrees.js ***! - \**********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Wrap = __webpack_require__(/*! ../Wrap */ "../../../src/math/Wrap.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/angle/index.js": -/*!****************************************!*\ - !*** ../../../src/math/angle/index.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./Between */ "../../../src/math/angle/Between.js"), - BetweenPoints: __webpack_require__(/*! ./BetweenPoints */ "../../../src/math/angle/BetweenPoints.js"), - BetweenPointsY: __webpack_require__(/*! ./BetweenPointsY */ "../../../src/math/angle/BetweenPointsY.js"), - 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"), - Wrap: __webpack_require__(/*! ./Wrap */ "../../../src/math/angle/Wrap.js"), - WrapDegrees: __webpack_require__(/*! ./WrapDegrees */ "../../../src/math/angle/WrapDegrees.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/const.js": -/*!**********************************!*\ - !*** ../../../src/math/const.js ***! - \**********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/distance/DistanceBetween.js": -/*!*****************************************************!*\ - !*** ../../../src/math/distance/DistanceBetween.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/distance/DistanceBetweenPoints.js": -/*!***********************************************************!*\ - !*** ../../../src/math/distance/DistanceBetweenPoints.js ***! - \***********************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!******************************************************************!*\ - !*** ../../../src/math/distance/DistanceBetweenPointsSquared.js ***! - \******************************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!*******************************************************!*\ - !*** ../../../src/math/distance/DistanceChebyshev.js ***! - \*******************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***************************************************!*\ - !*** ../../../src/math/distance/DistancePower.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/distance/DistanceSnake.js": -/*!***************************************************!*\ - !*** ../../../src/math/distance/DistanceSnake.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!*****************************************************!*\ - !*** ../../../src/math/distance/DistanceSquared.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/distance/index.js": -/*!*******************************************!*\ - !*** ../../../src/math/distance/index.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./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") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/back/In.js": -/*!*******************************************!*\ - !*** ../../../src/math/easing/back/In.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/back/InOut.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/back/InOut.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/back/Out.js": -/*!********************************************!*\ - !*** ../../../src/math/easing/back/Out.js ***! - \********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/back/index.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/back/index.js ***! - \**********************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/back/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/back/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/back/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/bounce/In.js": -/*!*********************************************!*\ - !*** ../../../src/math/easing/bounce/In.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/bounce/InOut.js": -/*!************************************************!*\ - !*** ../../../src/math/easing/bounce/InOut.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/bounce/Out.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/bounce/Out.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/bounce/index.js": -/*!************************************************!*\ - !*** ../../../src/math/easing/bounce/index.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/bounce/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/bounce/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/bounce/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/circular/In.js": -/*!***********************************************!*\ - !*** ../../../src/math/easing/circular/In.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/circular/InOut.js": -/*!**************************************************!*\ - !*** ../../../src/math/easing/circular/InOut.js ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/circular/Out.js": -/*!************************************************!*\ - !*** ../../../src/math/easing/circular/Out.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/circular/index.js": -/*!**************************************************!*\ - !*** ../../../src/math/easing/circular/index.js ***! - \**************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/circular/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/circular/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/circular/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/cubic/In.js": -/*!********************************************!*\ - !*** ../../../src/math/easing/cubic/In.js ***! - \********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/cubic/InOut.js": -/*!***********************************************!*\ - !*** ../../../src/math/easing/cubic/InOut.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/cubic/Out.js": -/*!*********************************************!*\ - !*** ../../../src/math/easing/cubic/Out.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/cubic/index.js": -/*!***********************************************!*\ - !*** ../../../src/math/easing/cubic/index.js ***! - \***********************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/cubic/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/cubic/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/cubic/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/elastic/In.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/elastic/In.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/elastic/InOut.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/elastic/InOut.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/elastic/Out.js": -/*!***********************************************!*\ - !*** ../../../src/math/easing/elastic/Out.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/elastic/index.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/elastic/index.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/elastic/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/elastic/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/elastic/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/expo/In.js": -/*!*******************************************!*\ - !*** ../../../src/math/easing/expo/In.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/expo/InOut.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/expo/InOut.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/expo/Out.js": -/*!********************************************!*\ - !*** ../../../src/math/easing/expo/Out.js ***! - \********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/expo/index.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/expo/index.js ***! - \**********************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/expo/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/expo/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/expo/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/index.js": -/*!*****************************************!*\ - !*** ../../../src/math/easing/index.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./back */ "../../../src/math/easing/back/index.js"), - Bounce: __webpack_require__(/*! ./bounce */ "../../../src/math/easing/bounce/index.js"), - Circular: __webpack_require__(/*! ./circular */ "../../../src/math/easing/circular/index.js"), - Cubic: __webpack_require__(/*! ./cubic */ "../../../src/math/easing/cubic/index.js"), - Elastic: __webpack_require__(/*! ./elastic */ "../../../src/math/easing/elastic/index.js"), - Expo: __webpack_require__(/*! ./expo */ "../../../src/math/easing/expo/index.js"), - Linear: __webpack_require__(/*! ./linear */ "../../../src/math/easing/linear/index.js"), - Quadratic: __webpack_require__(/*! ./quadratic */ "../../../src/math/easing/quadratic/index.js"), - Quartic: __webpack_require__(/*! ./quartic */ "../../../src/math/easing/quartic/index.js"), - Quintic: __webpack_require__(/*! ./quintic */ "../../../src/math/easing/quintic/index.js"), - Sine: __webpack_require__(/*! ./sine */ "../../../src/math/easing/sine/index.js"), - Stepped: __webpack_require__(/*! ./stepped */ "../../../src/math/easing/stepped/index.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/linear/Linear.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/linear/Linear.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/linear/index.js": -/*!************************************************!*\ - !*** ../../../src/math/easing/linear/index.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -module.exports = __webpack_require__(/*! ./Linear */ "../../../src/math/easing/linear/Linear.js"); - - -/***/ }), - -/***/ "../../../src/math/easing/quadratic/In.js": -/*!************************************************!*\ - !*** ../../../src/math/easing/quadratic/In.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quadratic/InOut.js": -/*!***************************************************!*\ - !*** ../../../src/math/easing/quadratic/InOut.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quadratic/Out.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/quadratic/Out.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quadratic/index.js": -/*!***************************************************!*\ - !*** ../../../src/math/easing/quadratic/index.js ***! - \***************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/quadratic/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/quadratic/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/quadratic/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/quartic/In.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/quartic/In.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quartic/InOut.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/quartic/InOut.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quartic/Out.js": -/*!***********************************************!*\ - !*** ../../../src/math/easing/quartic/Out.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quartic/index.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/quartic/index.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/quartic/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/quartic/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/quartic/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/quintic/In.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/quintic/In.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quintic/InOut.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/quintic/InOut.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quintic/Out.js": -/*!***********************************************!*\ - !*** ../../../src/math/easing/quintic/Out.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/quintic/index.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/quintic/index.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/quintic/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/quintic/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/quintic/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/sine/In.js": -/*!*******************************************!*\ - !*** ../../../src/math/easing/sine/In.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/sine/InOut.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/sine/InOut.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/sine/Out.js": -/*!********************************************!*\ - !*** ../../../src/math/easing/sine/Out.js ***! - \********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/sine/index.js": -/*!**********************************************!*\ - !*** ../../../src/math/easing/sine/index.js ***! - \**********************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./In */ "../../../src/math/easing/sine/In.js"), - Out: __webpack_require__(/*! ./Out */ "../../../src/math/easing/sine/Out.js"), - InOut: __webpack_require__(/*! ./InOut */ "../../../src/math/easing/sine/InOut.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/easing/stepped/Stepped.js": -/*!***************************************************!*\ - !*** ../../../src/math/easing/stepped/Stepped.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/easing/stepped/index.js": -/*!*************************************************!*\ - !*** ../../../src/math/easing/stepped/index.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./Stepped */ "../../../src/math/easing/stepped/Stepped.js"); - - -/***/ }), - -/***/ "../../../src/math/fuzzy/Ceil.js": -/*!***************************************!*\ - !*** ../../../src/math/fuzzy/Ceil.js ***! - \***************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/fuzzy/Equal.js": -/*!****************************************!*\ - !*** ../../../src/math/fuzzy/Equal.js ***! - \****************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/fuzzy/Floor.js": -/*!****************************************!*\ - !*** ../../../src/math/fuzzy/Floor.js ***! - \****************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/fuzzy/GreaterThan.js": -/*!**********************************************!*\ - !*** ../../../src/math/fuzzy/GreaterThan.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/fuzzy/LessThan.js": -/*!*******************************************!*\ - !*** ../../../src/math/fuzzy/LessThan.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/fuzzy/index.js": -/*!****************************************!*\ - !*** ../../../src/math/fuzzy/index.js ***! - \****************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./Ceil */ "../../../src/math/fuzzy/Ceil.js"), - Equal: __webpack_require__(/*! ./Equal */ "../../../src/math/fuzzy/Equal.js"), - Floor: __webpack_require__(/*! ./Floor */ "../../../src/math/fuzzy/Floor.js"), - GreaterThan: __webpack_require__(/*! ./GreaterThan */ "../../../src/math/fuzzy/GreaterThan.js"), - LessThan: __webpack_require__(/*! ./LessThan */ "../../../src/math/fuzzy/LessThan.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/index.js": -/*!**********************************!*\ - !*** ../../../src/math/index.js ***! - \**********************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(/*! ./const */ "../../../src/math/const.js"); -var Extend = __webpack_require__(/*! ../utils/object/Extend */ "../../../src/utils/object/Extend.js"); - -/** - * @namespace Phaser.Math - */ - -var PhaserMath = { - - // Collections of functions - Angle: __webpack_require__(/*! ./angle/ */ "../../../src/math/angle/index.js"), - Distance: __webpack_require__(/*! ./distance/ */ "../../../src/math/distance/index.js"), - Easing: __webpack_require__(/*! ./easing/ */ "../../../src/math/easing/index.js"), - Fuzzy: __webpack_require__(/*! ./fuzzy/ */ "../../../src/math/fuzzy/index.js"), - Interpolation: __webpack_require__(/*! ./interpolation/ */ "../../../src/math/interpolation/index.js"), - Pow2: __webpack_require__(/*! ./pow2/ */ "../../../src/math/pow2/index.js"), - Snap: __webpack_require__(/*! ./snap/ */ "../../../src/math/snap/index.js"), - - // Expose the RNG Class - RandomDataGenerator: __webpack_require__(/*! ./random-data-generator/RandomDataGenerator */ "../../../src/math/random-data-generator/RandomDataGenerator.js"), - - // Single functions - Average: __webpack_require__(/*! ./Average */ "../../../src/math/Average.js"), - Bernstein: __webpack_require__(/*! ./Bernstein */ "../../../src/math/Bernstein.js"), - Between: __webpack_require__(/*! ./Between */ "../../../src/math/Between.js"), - CatmullRom: __webpack_require__(/*! ./CatmullRom */ "../../../src/math/CatmullRom.js"), - CeilTo: __webpack_require__(/*! ./CeilTo */ "../../../src/math/CeilTo.js"), - Clamp: __webpack_require__(/*! ./Clamp */ "../../../src/math/Clamp.js"), - DegToRad: __webpack_require__(/*! ./DegToRad */ "../../../src/math/DegToRad.js"), - Difference: __webpack_require__(/*! ./Difference */ "../../../src/math/Difference.js"), - Euler: __webpack_require__(/*! ./Euler */ "../../../src/math/Euler.js"), - Factorial: __webpack_require__(/*! ./Factorial */ "../../../src/math/Factorial.js"), - FloatBetween: __webpack_require__(/*! ./FloatBetween */ "../../../src/math/FloatBetween.js"), - FloorTo: __webpack_require__(/*! ./FloorTo */ "../../../src/math/FloorTo.js"), - FromPercent: __webpack_require__(/*! ./FromPercent */ "../../../src/math/FromPercent.js"), - GetSpeed: __webpack_require__(/*! ./GetSpeed */ "../../../src/math/GetSpeed.js"), - IsEven: __webpack_require__(/*! ./IsEven */ "../../../src/math/IsEven.js"), - IsEvenStrict: __webpack_require__(/*! ./IsEvenStrict */ "../../../src/math/IsEvenStrict.js"), - Linear: __webpack_require__(/*! ./Linear */ "../../../src/math/Linear.js"), - LinearXY: __webpack_require__(/*! ./LinearXY */ "../../../src/math/LinearXY.js"), - MaxAdd: __webpack_require__(/*! ./MaxAdd */ "../../../src/math/MaxAdd.js"), - Median: __webpack_require__(/*! ./Median */ "../../../src/math/Median.js"), - MinSub: __webpack_require__(/*! ./MinSub */ "../../../src/math/MinSub.js"), - Percent: __webpack_require__(/*! ./Percent */ "../../../src/math/Percent.js"), - RadToDeg: __webpack_require__(/*! ./RadToDeg */ "../../../src/math/RadToDeg.js"), - RandomXY: __webpack_require__(/*! ./RandomXY */ "../../../src/math/RandomXY.js"), - RandomXYZ: __webpack_require__(/*! ./RandomXYZ */ "../../../src/math/RandomXYZ.js"), - RandomXYZW: __webpack_require__(/*! ./RandomXYZW */ "../../../src/math/RandomXYZW.js"), - 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"), - SmootherStep: __webpack_require__(/*! ./SmootherStep */ "../../../src/math/SmootherStep.js"), - SmoothStep: __webpack_require__(/*! ./SmoothStep */ "../../../src/math/SmoothStep.js"), - ToXY: __webpack_require__(/*! ./ToXY */ "../../../src/math/ToXY.js"), - TransformXY: __webpack_require__(/*! ./TransformXY */ "../../../src/math/TransformXY.js"), - Within: __webpack_require__(/*! ./Within */ "../../../src/math/Within.js"), - Wrap: __webpack_require__(/*! ./Wrap */ "../../../src/math/Wrap.js"), - - // Vector classes - Vector2: __webpack_require__(/*! ./Vector2 */ "../../../src/math/Vector2.js"), - Vector3: __webpack_require__(/*! ./Vector3 */ "../../../src/math/Vector3.js"), - Vector4: __webpack_require__(/*! ./Vector4 */ "../../../src/math/Vector4.js"), - Matrix3: __webpack_require__(/*! ./Matrix3 */ "../../../src/math/Matrix3.js"), - Matrix4: __webpack_require__(/*! ./Matrix4 */ "../../../src/math/Matrix4.js"), - Quaternion: __webpack_require__(/*! ./Quaternion */ "../../../src/math/Quaternion.js"), - RotateVec3: __webpack_require__(/*! ./RotateVec3 */ "../../../src/math/RotateVec3.js") - -}; - -// Merge in the consts - -PhaserMath = Extend(false, PhaserMath, CONST); - -// Export it - -module.exports = PhaserMath; - - -/***/ }), - -/***/ "../../../src/math/interpolation/BezierInterpolation.js": -/*!**************************************************************!*\ - !*** ../../../src/math/interpolation/BezierInterpolation.js ***! - \**************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bernstein = __webpack_require__(/*! ../Bernstein */ "../../../src/math/Bernstein.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/interpolation/CatmullRomInterpolation.js": -/*!******************************************************************!*\ - !*** ../../../src/math/interpolation/CatmullRomInterpolation.js ***! - \******************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CatmullRom = __webpack_require__(/*! ../CatmullRom */ "../../../src/math/CatmullRom.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/interpolation/CubicBezierInterpolation.js": -/*!*******************************************************************!*\ - !*** ../../../src/math/interpolation/CubicBezierInterpolation.js ***! - \*******************************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/interpolation/LinearInterpolation.js": -/*!**************************************************************!*\ - !*** ../../../src/math/interpolation/LinearInterpolation.js ***! - \**************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Linear = __webpack_require__(/*! ../Linear */ "../../../src/math/Linear.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/interpolation/QuadraticBezierInterpolation.js": -/*!***********************************************************************!*\ - !*** ../../../src/math/interpolation/QuadraticBezierInterpolation.js ***! - \***********************************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/interpolation/SmoothStepInterpolation.js": -/*!******************************************************************!*\ - !*** ../../../src/math/interpolation/SmoothStepInterpolation.js ***! - \******************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SmoothStep = __webpack_require__(/*! ../SmoothStep */ "../../../src/math/SmoothStep.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/interpolation/SmootherStepInterpolation.js": -/*!********************************************************************!*\ - !*** ../../../src/math/interpolation/SmootherStepInterpolation.js ***! - \********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SmootherStep = __webpack_require__(/*! ../SmootherStep */ "../../../src/math/SmootherStep.js"); - -/** - * 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; - - -/***/ }), - -/***/ "../../../src/math/interpolation/index.js": -/*!************************************************!*\ - !*** ../../../src/math/interpolation/index.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./BezierInterpolation */ "../../../src/math/interpolation/BezierInterpolation.js"), - CatmullRom: __webpack_require__(/*! ./CatmullRomInterpolation */ "../../../src/math/interpolation/CatmullRomInterpolation.js"), - CubicBezier: __webpack_require__(/*! ./CubicBezierInterpolation */ "../../../src/math/interpolation/CubicBezierInterpolation.js"), - Linear: __webpack_require__(/*! ./LinearInterpolation */ "../../../src/math/interpolation/LinearInterpolation.js"), - QuadraticBezier: __webpack_require__(/*! ./QuadraticBezierInterpolation */ "../../../src/math/interpolation/QuadraticBezierInterpolation.js"), - SmoothStep: __webpack_require__(/*! ./SmoothStepInterpolation */ "../../../src/math/interpolation/SmoothStepInterpolation.js"), - SmootherStep: __webpack_require__(/*! ./SmootherStepInterpolation */ "../../../src/math/interpolation/SmootherStepInterpolation.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/pow2/GetPowerOfTwo.js": -/*!***********************************************!*\ - !*** ../../../src/math/pow2/GetPowerOfTwo.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ "../../../src/math/pow2/IsSizePowerOfTwo.js": -/*!**************************************************!*\ - !*** ../../../src/math/pow2/IsSizePowerOfTwo.js ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/pow2/IsValuePowerOfTwo.js": -/*!***************************************************!*\ - !*** ../../../src/math/pow2/IsValuePowerOfTwo.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/pow2/index.js": -/*!***************************************!*\ - !*** ../../../src/math/pow2/index.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./GetPowerOfTwo */ "../../../src/math/pow2/GetPowerOfTwo.js"), - IsSize: __webpack_require__(/*! ./IsSizePowerOfTwo */ "../../../src/math/pow2/IsSizePowerOfTwo.js"), - IsValue: __webpack_require__(/*! ./IsValuePowerOfTwo */ "../../../src/math/pow2/IsValuePowerOfTwo.js") - -}; - - -/***/ }), - -/***/ "../../../src/math/random-data-generator/RandomDataGenerator.js": -/*!**********************************************************************!*\ - !*** ../../../src/math/random-data-generator/RandomDataGenerator.js ***! - \**********************************************************************/ -/***/ ((module, __unused_webpack_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 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; - - -/***/ }), - -/***/ "../../../src/math/snap/SnapCeil.js": -/*!******************************************!*\ - !*** ../../../src/math/snap/SnapCeil.js ***! - \******************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/snap/SnapFloor.js": -/*!*******************************************!*\ - !*** ../../../src/math/snap/SnapFloor.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/snap/SnapTo.js": -/*!****************************************!*\ - !*** ../../../src/math/snap/SnapTo.js ***! - \****************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/math/snap/index.js": -/*!***************************************!*\ - !*** ../../../src/math/snap/index.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./SnapCeil */ "../../../src/math/snap/SnapCeil.js"), - Floor: __webpack_require__(/*! ./SnapFloor */ "../../../src/math/snap/SnapFloor.js"), - To: __webpack_require__(/*! ./SnapTo */ "../../../src/math/snap/SnapTo.js") - -}; - - -/***/ }), - -/***/ "../../../src/plugins/BasePlugin.js": -/*!******************************************!*\ - !*** ../../../src/plugins/BasePlugin.js ***! - \******************************************/ -/***/ ((module, __unused_webpack_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__(/*! ../utils/Class */ "../../../src/utils/Class.js"); - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/plugins/ScenePlugin.js": -/*!*******************************************!*\ - !*** ../../../src/plugins/ScenePlugin.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./BasePlugin */ "../../../src/plugins/BasePlugin.js"); -var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); -var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene/events/index.js"); - -/** - * @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. - * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. - */ -var ScenePlugin = new Class({ - - Extends: BasePlugin, - - initialize: - - function ScenePlugin (scene, pluginManager, pluginKey) - { - 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; - - /** - * The key under which this plugin was installed into the Scene Systems. - * - * 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#pluginKey - * @type {string} - * @readonly - * @since 3.54.0 - */ - this.pluginKey = pluginKey; - - 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; - - -/***/ }), - -/***/ "../../../src/renderer/BlendModes.js": -/*!*******************************************!*\ - !*** ../../../src/renderer/BlendModes.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - DIFFERENCE: 11, - - /** - * Exclusion blend mode. For Canvas only. - * Like difference, but with lower contrast. - * - * @name Phaser.BlendModes.EXCLUSION - * @type {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - LUMINOSITY: 16, - - /** - * Alpha erase blend mode. For Canvas and WebGL. - * - * @name Phaser.BlendModes.ERASE - * @type {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - LIGHTER: 25, - - /** - * Copy blend mode. For Canvas only. - * Only the new shape is shown. - * - * @name Phaser.BlendModes.COPY - * @type {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - XOR: 27 - -}; - - -/***/ }), - -/***/ "../../../src/renderer/events/POST_RENDER_EVENT.js": -/*!*********************************************************!*\ - !*** ../../../src/renderer/events/POST_RENDER_EVENT.js ***! - \*********************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Post-Render Event. - * - * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes, - * has completed, but before any pending snap shots have been taken. - * - * @event Phaser.Renderer.Events#POST_RENDER - * @since 3.50.0 - */ -module.exports = 'postrender'; - - -/***/ }), - -/***/ "../../../src/renderer/events/PRE_RENDER_EVENT.js": -/*!********************************************************!*\ - !*** ../../../src/renderer/events/PRE_RENDER_EVENT.js ***! - \********************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Pre-Render Event. - * - * This event is dispatched by the Phaser Renderer. This happens right at the start of the render - * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been - * reset ready for the render. - * - * @event Phaser.Renderer.Events#PRE_RENDER - * @since 3.50.0 - */ -module.exports = 'prerender'; - - -/***/ }), - -/***/ "../../../src/renderer/events/RENDER_EVENT.js": -/*!****************************************************!*\ - !*** ../../../src/renderer/events/RENDER_EVENT.js ***! - \****************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Render Event. - * - * This event is dispatched by the Phaser Renderer for every camera in every Scene. - * - * It is dispatched before any of the children in the Scene have been rendered. - * - * @event Phaser.Renderer.Events#RENDER - * @since 3.50.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered. - */ -module.exports = 'render'; - - -/***/ }), - -/***/ "../../../src/renderer/events/RESIZE_EVENT.js": -/*!****************************************************!*\ - !*** ../../../src/renderer/events/RESIZE_EVENT.js ***! - \****************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Renderer Resize Event. - * - * This event is dispatched by the Phaser Renderer when it is resized, usually as a result - * of the Scale Manager resizing. - * - * @event Phaser.Renderer.Events#RESIZE - * @since 3.50.0 - * - * @param {number} width - The new width of the renderer. - * @param {number} height - The new height of the renderer. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ "../../../src/renderer/events/index.js": -/*!*********************************************!*\ - !*** ../../../src/renderer/events/index.js ***! - \*********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Renderer.Events - */ - -module.exports = { - - POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "../../../src/renderer/events/POST_RENDER_EVENT.js"), - PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "../../../src/renderer/events/PRE_RENDER_EVENT.js"), - RENDER: __webpack_require__(/*! ./RENDER_EVENT */ "../../../src/renderer/events/RENDER_EVENT.js"), - RESIZE: __webpack_require__(/*! ./RESIZE_EVENT */ "../../../src/renderer/events/RESIZE_EVENT.js") - -}; - - -/***/ }), - -/***/ "../../../src/renderer/webgl/pipelines/const.js": -/*!******************************************************!*\ - !*** ../../../src/renderer/webgl/pipelines/const.js ***! - \******************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var PIPELINE_CONST = { - - /** - * The Bitmap Mask Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', - - /** - * The Light 2D Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - LIGHT_PIPELINE: 'Light2D', - - /** - * The Point Light Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POINTLIGHT_PIPELINE: 'PointLightPipeline', - - /** - * The Single Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - SINGLE_PIPELINE: 'SinglePipeline', - - /** - * The Multi Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - MULTI_PIPELINE: 'MultiPipeline', - - /** - * The Rope Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - ROPE_PIPELINE: 'RopePipeline', - - /** - * The Graphics and Shapes Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - GRAPHICS_PIPELINE: 'GraphicsPipeline', - - /** - * The Post FX Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POSTFX_PIPELINE: 'PostFXPipeline', - - /** - * The Utility Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - UTILITY_PIPELINE: 'UtilityPipeline' - -}; - -module.exports = PIPELINE_CONST; - - -/***/ }), - -/***/ "../../../src/scale/events/RESIZE_EVENT.js": -/*!*************************************************!*\ - !*** ../../../src/scale/events/RESIZE_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Scale Manager Resize Event. - * - * This event is dispatched whenever the Scale Manager detects a resize event from the browser. - * It sends three parameters to the callback, each of them being Size components. You can read - * the `width`, `height`, `aspectRatio` and other properties of these components to help with - * scaling your own game content. - * - * @event Phaser.Scale.Events#RESIZE - * @since 3.16.1 - * - * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. - * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. - * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. - * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. - * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ "../../../src/scene/events/ADDED_TO_SCENE_EVENT.js": -/*!*********************************************************!*\ - !*** ../../../src/scene/events/ADDED_TO_SCENE_EVENT.js ***! - \*********************************************************/ -/***/ ((module) => { - -/** - * @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.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": -/*!***********************************************!*\ - !*** ../../../src/scene/events/BOOT_EVENT.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/CREATE_EVENT.js": -/*!*************************************************!*\ - !*** ../../../src/scene/events/CREATE_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/DESTROY_EVENT.js": -/*!**************************************************!*\ - !*** ../../../src/scene/events/DESTROY_EVENT.js ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/PAUSE_EVENT.js": -/*!************************************************!*\ - !*** ../../../src/scene/events/PAUSE_EVENT.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/POST_UPDATE_EVENT.js": -/*!******************************************************!*\ - !*** ../../../src/scene/events/POST_UPDATE_EVENT.js ***! - \******************************************************/ -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/PRE_RENDER_EVENT.js": -/*!*****************************************************!*\ - !*** ../../../src/scene/events/PRE_RENDER_EVENT.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @author samme - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to this event from a Scene using `this.events.on('prerender', listener)`. - * - * A Scene will only render if it is visible. - * - * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. - * - * @event Phaser.Scenes.Events#PRE_RENDER - * @since 3.53.0 - * - * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. - */ -module.exports = 'prerender'; - - -/***/ }), - -/***/ "../../../src/scene/events/PRE_UPDATE_EVENT.js": -/*!*****************************************************!*\ - !*** ../../../src/scene/events/PRE_UPDATE_EVENT.js ***! - \*****************************************************/ -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/READY_EVENT.js": -/*!************************************************!*\ - !*** ../../../src/scene/events/READY_EVENT.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js": -/*!*************************************************************!*\ - !*** ../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! - \*************************************************************/ -/***/ ((module) => { - -/** - * @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.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": -/*!*************************************************!*\ - !*** ../../../src/scene/events/RENDER_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.events.on('render', listener)`. - * - * A Scene will only render if it is visible. - * - * 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'; - - -/***/ }), - -/***/ "../../../src/scene/events/RESUME_EVENT.js": -/*!*************************************************!*\ - !*** ../../../src/scene/events/RESUME_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/SHUTDOWN_EVENT.js": -/*!***************************************************!*\ - !*** ../../../src/scene/events/SHUTDOWN_EVENT.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/SLEEP_EVENT.js": -/*!************************************************!*\ - !*** ../../../src/scene/events/SLEEP_EVENT.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/START_EVENT.js": -/*!************************************************!*\ - !*** ../../../src/scene/events/START_EVENT.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js": -/*!**************************************************************!*\ - !*** ../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! - \**************************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/TRANSITION_INIT_EVENT.js": -/*!**********************************************************!*\ - !*** ../../../src/scene/events/TRANSITION_INIT_EVENT.js ***! - \**********************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/TRANSITION_OUT_EVENT.js": -/*!*********************************************************!*\ - !*** ../../../src/scene/events/TRANSITION_OUT_EVENT.js ***! - \*********************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/TRANSITION_START_EVENT.js": -/*!***********************************************************!*\ - !*** ../../../src/scene/events/TRANSITION_START_EVENT.js ***! - \***********************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/TRANSITION_WAKE_EVENT.js": -/*!**********************************************************!*\ - !*** ../../../src/scene/events/TRANSITION_WAKE_EVENT.js ***! - \**********************************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/UPDATE_EVENT.js": -/*!*************************************************!*\ - !*** ../../../src/scene/events/UPDATE_EVENT.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/WAKE_EVENT.js": -/*!***********************************************!*\ - !*** ../../../src/scene/events/WAKE_EVENT.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ "../../../src/scene/events/index.js": -/*!******************************************!*\ - !*** ../../../src/scene/events/index.js ***! - \******************************************/ -/***/ ((module, __unused_webpack_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__(/*! ./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"), - PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "../../../src/scene/events/PAUSE_EVENT.js"), - POST_UPDATE: __webpack_require__(/*! ./POST_UPDATE_EVENT */ "../../../src/scene/events/POST_UPDATE_EVENT.js"), - PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "../../../src/scene/events/PRE_RENDER_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"), - SLEEP: __webpack_require__(/*! ./SLEEP_EVENT */ "../../../src/scene/events/SLEEP_EVENT.js"), - START: __webpack_require__(/*! ./START_EVENT */ "../../../src/scene/events/START_EVENT.js"), - TRANSITION_COMPLETE: __webpack_require__(/*! ./TRANSITION_COMPLETE_EVENT */ "../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js"), - TRANSITION_INIT: __webpack_require__(/*! ./TRANSITION_INIT_EVENT */ "../../../src/scene/events/TRANSITION_INIT_EVENT.js"), - TRANSITION_OUT: __webpack_require__(/*! ./TRANSITION_OUT_EVENT */ "../../../src/scene/events/TRANSITION_OUT_EVENT.js"), - TRANSITION_START: __webpack_require__(/*! ./TRANSITION_START_EVENT */ "../../../src/scene/events/TRANSITION_START_EVENT.js"), - TRANSITION_WAKE: __webpack_require__(/*! ./TRANSITION_WAKE_EVENT */ "../../../src/scene/events/TRANSITION_WAKE_EVENT.js"), - UPDATE: __webpack_require__(/*! ./UPDATE_EVENT */ "../../../src/scene/events/UPDATE_EVENT.js"), - WAKE: __webpack_require__(/*! ./WAKE_EVENT */ "../../../src/scene/events/WAKE_EVENT.js") - -}; - - -/***/ }), - -/***/ "../../../src/tweens/builders/GetBoolean.js": -/*!**************************************************!*\ - !*** ../../../src/tweens/builders/GetBoolean.js ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!******************************************!*\ - !*** ../../../src/tweens/tween/const.js ***! - \******************************************/ -/***/ ((module) => { - -/** - * @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 {number} - * @since 3.0.0 - */ - CREATED: 0, - - /** - * TweenData state. - * - * @name Phaser.Tweens.INIT - * @type {number} - * @since 3.0.0 - */ - INIT: 1, - - /** - * TweenData state. - * - * @name Phaser.Tweens.DELAY - * @type {number} - * @since 3.0.0 - */ - DELAY: 2, - - /** - * TweenData state. - * - * @name Phaser.Tweens.OFFSET_DELAY - * @type {number} - * @since 3.0.0 - */ - OFFSET_DELAY: 3, - - /** - * TweenData state. - * - * @name Phaser.Tweens.PENDING_RENDER - * @type {number} - * @since 3.0.0 - */ - PENDING_RENDER: 4, - - /** - * TweenData state. - * - * @name Phaser.Tweens.PLAYING_FORWARD - * @type {number} - * @since 3.0.0 - */ - PLAYING_FORWARD: 5, - - /** - * TweenData state. - * - * @name Phaser.Tweens.PLAYING_BACKWARD - * @type {number} - * @since 3.0.0 - */ - PLAYING_BACKWARD: 6, - - /** - * TweenData state. - * - * @name Phaser.Tweens.HOLD_DELAY - * @type {number} - * @since 3.0.0 - */ - HOLD_DELAY: 7, - - /** - * TweenData state. - * - * @name Phaser.Tweens.REPEAT_DELAY - * @type {number} - * @since 3.0.0 - */ - REPEAT_DELAY: 8, - - /** - * TweenData state. - * - * @name Phaser.Tweens.COMPLETE - * @type {number} - * @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 {number} - * @since 3.0.0 - */ - PENDING_ADD: 20, - - /** - * Tween state. - * - * @name Phaser.Tweens.PAUSED - * @type {number} - * @since 3.0.0 - */ - PAUSED: 21, - - /** - * Tween state. - * - * @name Phaser.Tweens.LOOP_DELAY - * @type {number} - * @since 3.0.0 - */ - LOOP_DELAY: 22, - - /** - * Tween state. - * - * @name Phaser.Tweens.ACTIVE - * @type {number} - * @since 3.0.0 - */ - ACTIVE: 23, - - /** - * Tween state. - * - * @name Phaser.Tweens.COMPLETE_DELAY - * @type {number} - * @since 3.0.0 - */ - COMPLETE_DELAY: 24, - - /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_REMOVE - * @type {number} - * @since 3.0.0 - */ - PENDING_REMOVE: 25, - - /** - * Tween state. - * - * @name Phaser.Tweens.REMOVED - * @type {number} - * @since 3.0.0 - */ - REMOVED: 26 - -}; - -module.exports = TWEEN_CONST; - - -/***/ }), - -/***/ "../../../src/utils/Class.js": -/*!***********************************!*\ - !*** ../../../src/utils/Class.js ***! - \***********************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Taken from klasse by mattdesl https://github.com/mattdesl/klasse - -function hasGetterOrSetter (def) -{ - return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); -} - -function getProperty (definition, k, isClassDescriptor) -{ - // This may be a lightweight object, OR it might be a property that was defined previously. - - // For simple class descriptors we can just assume its NOT previously defined. - var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); - - if (!isClassDescriptor && def.value && typeof def.value === 'object') - { - def = def.value; - } - - // This might be a regular property, or it may be a getter/setter the user defined in a class. - if (def && hasGetterOrSetter(def)) - { - if (typeof def.enumerable === 'undefined') - { - def.enumerable = true; - } - - if (typeof def.configurable === 'undefined') - { - def.configurable = true; - } - - return def; - } - else - { - return false; - } -} - -function hasNonConfigurable (obj, k) -{ - var prop = Object.getOwnPropertyDescriptor(obj, k); - - if (!prop) - { - return false; - } - - if (prop.value && typeof prop.value === 'object') - { - prop = prop.value; - } - - if (prop.configurable === false) - { - return true; - } - - return false; -} - -/** - * Extends the given `myClass` object's prototype with the properties of `definition`. - * - * @function extend - * @ignore - * @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) - { - if (!definition.hasOwnProperty(k)) - { - continue; - } - - var def = getProperty(definition, k, isClassDescriptor); - - if (def !== false) - { - // If Extends is used, we will check its prototype to see if the final variable exists. - - var parent = extend || ctor; - - if (hasNonConfigurable(parent.prototype, k)) - { - // Just skip the final property - if (Class.ignoreFinals) - { - continue; - } - - // We cannot re-define a property that is configurable=false. - // So we will consider them final and throw an error. This is by - // default so it is clear to the developer what is happening. - // You can set ignoreFinals to true if you need to extend a class - // which has configurable=false; it will simply not re-define final properties. - throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); - } - - Object.defineProperty(ctor.prototype, k, def); - } - else - { - ctor.prototype[k] = definition[k]; - } - } -} - -/** - * Applies the given `mixins` to the prototype of `myClass`. - * - * @function mixin - * @ignore - * @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) - { - return; - } - - if (!Array.isArray(mixins)) - { - mixins = [ mixins ]; - } - - for (var i = 0; i < mixins.length; i++) - { - extend(myClass, mixins[i].prototype || mixins[i]); - } -} - -/** - * Creates a new class with the given descriptor. - * The constructor, defined by the name `initialize`, - * is an optional function. If unspecified, an anonymous - * function will be used which calls the parent class (if - * one exists). - * - * You can also use `Extends` and `Mixins` to provide subclassing - * and inheritance. - * - * @class Phaser.Class - * @constructor - * @param {Object} definition a dictionary of functions for the class - * @example - * - * var MyClass = new Phaser.Class({ - * - * initialize: function() { - * this.foo = 2.0; - * }, - * - * bar: function() { - * return this.foo + 5; - * } - * }); - */ -function Class (definition) -{ - if (!definition) - { - definition = {}; - } - - // The variable name here dictates what we see in Chrome debugger - var initialize; - var Extends; - - if (definition.initialize) - { - if (typeof definition.initialize !== 'function') - { - throw new Error('initialize must be a function'); - } - - initialize = definition.initialize; - - // Usually we should avoid 'delete' in V8 at all costs. - // However, its unlikely to make any performance difference - // here since we only call this on class creation (i.e. not object creation). - delete definition.initialize; - } - else if (definition.Extends) - { - var base = definition.Extends; - - initialize = function () - { - base.apply(this, arguments); - }; - } - else - { - initialize = function () {}; - } - - if (definition.Extends) - { - initialize.prototype = Object.create(definition.Extends.prototype); - initialize.prototype.constructor = initialize; - - // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) - - Extends = definition.Extends; - - delete definition.Extends; - } - else - { - initialize.prototype.constructor = initialize; - } - - // Grab the mixins, if they are specified... - var mixins = null; - - if (definition.Mixins) - { - mixins = definition.Mixins; - delete definition.Mixins; - } - - // First, mixin if we can. - mixin(initialize, mixins); - - // Now we grab the actual definition which defines the overrides. - extend(initialize, definition, true, Extends); - - return initialize; -} - -Class.extend = extend; -Class.mixin = mixin; -Class.ignoreFinals = false; - -module.exports = Class; - - -/***/ }), - -/***/ "../../../src/utils/NOOP.js": -/*!**********************************!*\ - !*** ../../../src/utils/NOOP.js ***! - \**********************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/utils/array/Add.js": -/*!***************************************!*\ - !*** ../../../src/utils/array/Add.js ***! - \***************************************/ -/***/ ((module) => { - -/** - * @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 {number} [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": -/*!*****************************************!*\ - !*** ../../../src/utils/array/AddAt.js ***! - \*****************************************/ -/***/ ((module) => { - -/** - * @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 {number} [index=0] - The index in the array where the item will be inserted. - * @param {number} [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": -/*!**********************************************!*\ - !*** ../../../src/utils/array/BringToTop.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!****************************************************!*\ - !*** ../../../src/utils/array/CountAllMatching.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_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 {number} [startIndex] - An optional start index to search from. - * @param {number} [endIndex] - An optional end index to search to. - * - * @return {number} 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": -/*!****************************************!*\ - !*** ../../../src/utils/array/Each.js ***! - \****************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***********************************************!*\ - !*** ../../../src/utils/array/EachInRange.js ***! - \***********************************************/ -/***/ ((module, __unused_webpack_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 {number} startIndex - The start index to search from. - * @param {number} 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": -/*!*******************************************************!*\ - !*** ../../../src/utils/array/FindClosestInSorted.js ***! - \*******************************************************/ -/***/ ((module) => { - -/** - * @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": -/*!******************************************!*\ - !*** ../../../src/utils/array/GetAll.js ***! - \******************************************/ -/***/ ((module, __unused_webpack_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 {number} [startIndex] - An optional start index to search from. - * @param {number} [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": -/*!********************************************!*\ - !*** ../../../src/utils/array/GetFirst.js ***! - \********************************************/ -/***/ ((module, __unused_webpack_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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [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": -/*!*********************************************!*\ - !*** ../../../src/utils/array/GetRandom.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @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 {number} [startIndex=0] - An optional start index. - * @param {number} [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/MoveAbove.js": -/*!*********************************************!*\ - !*** ../../../src/utils/array/MoveAbove.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Moves the given array element above another one in the array. - * The array is modified in-place. - * - * @function Phaser.Utils.Array.MoveAbove - * @since 3.55.0 - * - * @param {array} array - The input array. - * @param {*} item1 - The element to move above base element. - * @param {*} item2 - The base element. - * - * - * @return {array} The input array. - */ -var MoveAbove = function (array, item1, item2) -{ - if (item1 === item2) - { - return array; - } - - var currentIndex = array.indexOf(item1); - var baseIndex = array.indexOf(item2); - - if (currentIndex < 0 || baseIndex < 0) - { - throw new Error('Supplied items must be elements of the same array'); - } - - if (currentIndex > baseIndex) - { - // item1 is already above item2 - return array; - } - - // Remove - array.splice(currentIndex, 1); - - // Add in new location - if (baseIndex === array.length - 1) - { - array.push(item1); - } - else - { - array.splice(baseIndex, 0, item1); - } - - return array; -}; - -module.exports = MoveAbove; - - -/***/ }), - -/***/ "../../../src/utils/array/MoveBelow.js": -/*!*********************************************!*\ - !*** ../../../src/utils/array/MoveBelow.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Moves the given array element below another one in the array. - * The array is modified in-place. - * - * @function Phaser.Utils.Array.MoveBelow - * @since 3.55.0 - * - * @param {array} array - The input array. - * @param {*} item1 - The element to move below base element. - * @param {*} item2 - The base element. - * - * - * @return {array} The input array. - */ -var MoveBelow = function (array, item1, item2) -{ - if (item1 === item2) - { - return array; - } - - var currentIndex = array.indexOf(item1); - var baseIndex = array.indexOf(item2); - - if (currentIndex < 0 || baseIndex < 0) - { - throw new Error('Supplied items must be elements of the same array'); - } - - if (currentIndex < baseIndex) - { - // item1 is already below item2 - return array; - } - - // Remove - array.splice(currentIndex, 1); - - // Add in new location - if (baseIndex === 0) - { - array.unshift(item1); - } - else - { - array.splice(baseIndex, 0, item1); - } - - return array; -}; - -module.exports = MoveBelow; - - -/***/ }), - -/***/ "../../../src/utils/array/MoveDown.js": -/*!********************************************!*\ - !*** ../../../src/utils/array/MoveDown.js ***! - \********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!******************************************!*\ - !*** ../../../src/utils/array/MoveTo.js ***! - \******************************************/ -/***/ ((module) => { - -/** - * @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 {number} 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": -/*!******************************************!*\ - !*** ../../../src/utils/array/MoveUp.js ***! - \******************************************/ -/***/ ((module) => { - -/** - * @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": -/*!***********************************************!*\ - !*** ../../../src/utils/array/NumberArray.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/utils/array/NumberArrayStep.js": -/*!***************************************************!*\ - !*** ../../../src/utils/array/NumberArrayStep.js ***! - \***************************************************/ -/***/ ((module, __unused_webpack_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": -/*!***********************************************!*\ - !*** ../../../src/utils/array/QuickSelect.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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 {number} k - The k-th element index. - * @param {number} [left=0] - The index of the left part of the range. - * @param {number} [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": -/*!*****************************************!*\ - !*** ../../../src/utils/array/Range.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_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": -/*!******************************************!*\ - !*** ../../../src/utils/array/Remove.js ***! - \******************************************/ -/***/ ((module, __unused_webpack_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; - var removed = []; - - while (itemLength >= 0) - { - var entry = item[itemLength]; - - index = array.indexOf(entry); - - if (index !== -1) - { - SpliceOne(array, index); - - removed.push(entry); - - if (callback) - { - callback.call(context, entry); - } - } - - itemLength--; - } - - return removed; -}; - -module.exports = Remove; - - -/***/ }), - -/***/ "../../../src/utils/array/RemoveAt.js": -/*!********************************************!*\ - !*** ../../../src/utils/array/RemoveAt.js ***! - \********************************************/ -/***/ ((module, __unused_webpack_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 {number} 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": -/*!*************************************************!*\ - !*** ../../../src/utils/array/RemoveBetween.js ***! - \*************************************************/ -/***/ ((module, __unused_webpack_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 {number} startIndex - The start index to remove from. - * @param {number} 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": -/*!*******************************************************!*\ - !*** ../../../src/utils/array/RemoveRandomElement.js ***! - \*******************************************************/ -/***/ ((module, __unused_webpack_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 {number} [start=0] - The array index to start the search from. - * @param {number} [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": -/*!*******************************************!*\ - !*** ../../../src/utils/array/Replace.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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": -/*!**********************************************!*\ - !*** ../../../src/utils/array/RotateLeft.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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 {number} [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": -/*!***********************************************!*\ - !*** ../../../src/utils/array/RotateRight.js ***! - \***********************************************/ -/***/ ((module) => { - -/** - * @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 {number} [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": -/*!*********************************************!*\ - !*** ../../../src/utils/array/SafeRange.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @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 {number} startIndex - The start index. - * @param {number} 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) - { - if (throwError) - { - throw new Error('Range Error: Values outside acceptable range'); - } - - return false; - } - else - { - return true; - } -}; - -module.exports = SafeRange; - - -/***/ }), - -/***/ "../../../src/utils/array/SendToBack.js": -/*!**********************************************!*\ - !*** ../../../src/utils/array/SendToBack.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @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": -/*!******************************************!*\ - !*** ../../../src/utils/array/SetAll.js ***! - \******************************************/ -/***/ ((module, __unused_webpack_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 {number} [startIndex] - An optional start index to search from. - * @param {number} [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": -/*!*******************************************!*\ - !*** ../../../src/utils/array/Shuffle.js ***! - \*******************************************/ -/***/ ((module) => { - -/** - * @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/SortByDigits.js": -/*!************************************************!*\ - !*** ../../../src/utils/array/SortByDigits.js ***! - \************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/utils/array/SpliceOne.js": -/*!*********************************************!*\ - !*** ../../../src/utils/array/SpliceOne.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @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 {number} 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": -/*!**********************************************!*\ - !*** ../../../src/utils/array/StableSort.js ***! - \**********************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @author Angry Bytes (and contributors) - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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); -} - -/** - * 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 = 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) - { - RunPass(array, compare, chk, buffer); - - var tmp = array; - - array = buffer; - - buffer = tmp; - } - - return array; -} - -/** - * 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) - { - 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++]; - } - } - else if (li < r) - { - // Nothing to compare, just flush what's left. - result[i++] = arr[li++]; - } - else if (ri < e) - { - result[i++] = arr[ri++]; - } - 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; -}; - -module.exports = StableSort; - - -/***/ }), - -/***/ "../../../src/utils/array/Swap.js": -/*!****************************************!*\ - !*** ../../../src/utils/array/Swap.js ***! - \****************************************/ -/***/ ((module) => { - -/** - * @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 array; - } - - 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": -/*!*****************************************!*\ - !*** ../../../src/utils/array/index.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_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"), - MoveAbove: __webpack_require__(/*! ./MoveAbove */ "../../../src/utils/array/MoveAbove.js"), - MoveBelow: __webpack_require__(/*! ./MoveBelow */ "../../../src/utils/array/MoveBelow.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"), - SortByDigits: __webpack_require__(/*! ./SortByDigits */ "../../../src/utils/array/SortByDigits.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": -/*!******************************************************!*\ - !*** ../../../src/utils/array/matrix/CheckMatrix.js ***! - \******************************************************/ -/***/ ((module) => { - -/** - * @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. This is an example matrix: - * - * ``` - * [ - * [ 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) || !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": -/*!*********************************************************!*\ - !*** ../../../src/utils/array/matrix/MatrixToString.js ***! - \*********************************************************/ -/***/ ((module, __unused_webpack_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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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": -/*!*********************************************************!*\ - !*** ../../../src/utils/array/matrix/ReverseColumns.js ***! - \*********************************************************/ -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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": -/*!******************************************************!*\ - !*** ../../../src/utils/array/matrix/ReverseRows.js ***! - \******************************************************/ -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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": -/*!****************************************************!*\ - !*** ../../../src/utils/array/matrix/Rotate180.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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": -/*!*****************************************************!*\ - !*** ../../../src/utils/array/matrix/RotateLeft.js ***! - \*****************************************************/ -/***/ ((module, __unused_webpack_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) - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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": -/*!*******************************************************!*\ - !*** ../../../src/utils/array/matrix/RotateMatrix.js ***! - \*******************************************************/ -/***/ ((module, __unused_webpack_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/}. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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": -/*!******************************************************!*\ - !*** ../../../src/utils/array/matrix/RotateRight.js ***! - \******************************************************/ -/***/ ((module, __unused_webpack_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) - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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/TranslateMatrix.js": -/*!**********************************************************!*\ - !*** ../../../src/utils/array/matrix/TranslateMatrix.js ***! - \**********************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateLeft = __webpack_require__(/*! ../RotateLeft */ "../../../src/utils/array/RotateLeft.js"); -var RotateRight = __webpack_require__(/*! ../RotateRight */ "../../../src/utils/array/RotateRight.js"); - -/** - * Translates the given Array Matrix by shifting each column and row the - * amount specified. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.Translate - * @since 3.50.0 - * - * @generic T - * @genericUse {T[][]} - [matrix,$return] - * - * @param {T[][]} [matrix] - The array matrix to translate. - * @param {number} [x=0] - The amount to horizontally translate the matrix by. - * @param {number} [y=0] - The amount to vertically translate the matrix by. - * - * @return {T[][]} The translated matrix. - */ -var TranslateMatrix = function (matrix, x, y) -{ - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - - // Vertical translation - - if (y !== 0) - { - if (y < 0) - { - // Shift Up - RotateLeft(matrix, Math.abs(y)); - } - else - { - // Shift Down - RotateRight(matrix, y); - } - } - - // Horizontal translation - - if (x !== 0) - { - for (var i = 0; i < matrix.length; i++) - { - var row = matrix[i]; - - if (x < 0) - { - RotateLeft(row, Math.abs(x)); - } - else - { - RotateRight(row, x); - } - } - } - - return matrix; -}; - -module.exports = TranslateMatrix; - - -/***/ }), - -/***/ "../../../src/utils/array/matrix/TransposeMatrix.js": -/*!**********************************************************!*\ - !*** ../../../src/utils/array/matrix/TransposeMatrix.js ***! - \**********************************************************/ -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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": -/*!************************************************!*\ - !*** ../../../src/utils/array/matrix/index.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_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"), - Translate: __webpack_require__(/*! ./TranslateMatrix */ "../../../src/utils/array/matrix/TranslateMatrix.js"), - TransposeMatrix: __webpack_require__(/*! ./TransposeMatrix */ "../../../src/utils/array/matrix/TransposeMatrix.js") - -}; - - -/***/ }), - -/***/ "../../../src/utils/object/DeepCopy.js": -/*!*********************************************!*\ - !*** ../../../src/utils/object/DeepCopy.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Deep Copy the given object or array. - * - * @function Phaser.Utils.Objects.DeepCopy - * @since 3.50.0 - * - * @param {object} obj - The object to deep copy. - * - * @return {object} A deep copy of the original object. - */ -var DeepCopy = function (inObject) -{ - var outObject; - var value; - var key; - - if (typeof inObject !== 'object' || inObject === null) - { - // inObject is not an object - return inObject; - } - - // Create an array or object to hold the values - outObject = Array.isArray(inObject) ? [] : {}; - - for (key in inObject) - { - value = inObject[key]; - - // Recursively (deep) copy for nested objects, including arrays - outObject[key] = DeepCopy(value); - } - - return outObject; -}; - -module.exports = DeepCopy; - - -/***/ }), - -/***/ "../../../src/utils/object/Extend.js": -/*!*******************************************!*\ - !*** ../../../src/utils/object/Extend.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var IsPlainObject = __webpack_require__(/*! ./IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); - -// @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; - - -/***/ }), - -/***/ "../../../src/utils/object/GetAdvancedValue.js": -/*!*****************************************************!*\ - !*** ../../../src/utils/object/GetAdvancedValue.js ***! - \*****************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH = __webpack_require__(/*! ../../math */ "../../../src/math/index.js"); -var GetValue = __webpack_require__(/*! ./GetValue */ "../../../src/utils/object/GetValue.js"); - -/** - * 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 - 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 GetAdvancedValue = function (source, key, defaultValue) -{ - var value = GetValue(source, key, null); - - if (value === null) - { - return defaultValue; - } - else if (Array.isArray(value)) - { - return MATH.RND.pick(value); - } - else if (typeof value === 'object') - { - if (value.hasOwnProperty('randInt')) - { - return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]); - } - else if (value.hasOwnProperty('randFloat')) - { - return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]); - } - } - else if (typeof value === 'function') - { - return value(key); - } - - return value; -}; - -module.exports = GetAdvancedValue; - - -/***/ }), - -/***/ "../../../src/utils/object/GetFastValue.js": -/*!*************************************************!*\ - !*** ../../../src/utils/object/GetFastValue.js ***! - \*************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/utils/object/GetValue.js": -/*!*********************************************!*\ - !*** ../../../src/utils/object/GetValue.js ***! - \*********************************************/ -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. - * - * The key is a string, which can be split based on the use of the period character. - * - * For example: - * - * ```javascript - * const source = { - * lives: 3, - * render: { - * screen: { - * width: 1024 - * } - * } - * } - * - * const lives = GetValue(source, 'lives', 1); - * const width = GetValue(source, 'render.screen.width', 800); - * const height = GetValue(source, 'render.screen.height', 600); - * ``` - * - * In the code above, `lives` will be 3 because it's defined at the top level of `source`. - * The `width` value will be 1024 because it can be found inside the `render.screen` object. - * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. - * - * @function Phaser.Utils.Objects.GetValue - * @since 3.0.0 - * - * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. - * @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. - * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. - * - * @return {*} The value of the requested key. - */ -var GetValue = function (source, key, defaultValue, altSource) -{ - if ((!source && !altSource) || typeof source === 'number') - { - return defaultValue; - } - else if (source && source.hasOwnProperty(key)) - { - return source[key]; - } - else if (altSource && altSource.hasOwnProperty(key)) - { - return altSource[key]; - } - else if (key.indexOf('.') !== -1) - { - var keys = key.split('.'); - var parentA = source; - var parentB = altSource; - var value = defaultValue; - - // Use for loop here so we can break early - for (var i = 0; i < keys.length; i++) - { - if (parentA && parentA.hasOwnProperty(keys[i])) - { - // Yes parentA has a key property, let's carry on down - value = parentA[keys[i]]; - - parentA = parentA[keys[i]]; - } - else if (parentB && parentB.hasOwnProperty(keys[i])) - { - // Yes parentB has a key property, let's carry on down - value = parentB[keys[i]]; - - parentB = parentB[keys[i]]; - } - else - { - // Can't go any further, so reset to default - value = defaultValue; - break; - } - } - - return value; - } - else - { - return defaultValue; - } -}; - -module.exports = GetValue; - - -/***/ }), - -/***/ "../../../src/utils/object/IsPlainObject.js": -/*!**************************************************!*\ - !*** ../../../src/utils/object/IsPlainObject.js ***! - \**************************************************/ -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ "../../../src/utils/string/Pad.js": -/*!****************************************!*\ - !*** ../../../src/utils/string/Pad.js ***! - \****************************************/ -/***/ ((module) => { - -/** - * @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 {number} [len=0] - The number of characters to be added. - * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). - * @param {number} [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; - - /***/ }) -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __webpack_require__("./SpinePlugin.js"); -/******/ window.SpinePlugin = __webpack_exports__; -/******/ -/******/ })() -; +/******/ }); //# sourceMappingURL=SpinePluginDebug.js.map \ No newline at end of file diff --git a/plugins/spine/dist/SpinePluginDebug.js.map b/plugins/spine/dist/SpinePluginDebug.js.map index 2b03e1dde..582985a40 100644 --- a/plugins/spine/dist/SpinePluginDebug.js.map +++ b/plugins/spine/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"file":"SpinePluginDebug.js","mappings":";;;;;;;;;;AAAa;;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,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;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,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;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,gCAAgC,qBAAqB;AACrD;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,4BAA4B,uBAAuB;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;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;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;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;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,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,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;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;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;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,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,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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;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,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AChtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;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,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,oBAAoB,qBAAqB;AACzC;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;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,oBAAoB,qBAAqB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;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;AACA;AACA,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;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,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,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;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;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;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,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;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,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;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,CAAC;AACD;AACA;;;;;;;;;;;ACxkDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;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;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;AACtC;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;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;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;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,kBAAkB,0DAA0D;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,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,yBAAyB;AACzC;AACA;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,eAAe,iBAAiB;AAChC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;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,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;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,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,mBAAmB,mBAAO,CAAC,oEAAuB;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,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;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,CAAC;AACD;AACA;;;;;;;;;;;ACvUA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;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,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qCAAqC;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACzTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;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,kBAAkB,cAAc,KAAK,UAAU;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;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;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,wBAAwB,0DAA0D;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,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;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,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;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,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;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,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;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,gBAAgB,MAAM;AACtB;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,gBAAgB,MAAM;AACtB;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,gBAAgB,MAAM;AACtB;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,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC33BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,4FAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;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;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;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,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;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,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;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,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;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,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,iCAAiC;AACjD;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,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;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,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;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;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,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;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;;;;;;;;;;;ACpaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,qBAAqB,mBAAO,CAAC,4FAAsC;AACnE,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,sCAAsC;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;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,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,gDAAgD;AAChD,uCAAuC;AACvC;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,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;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,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;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;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;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;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;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,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;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,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5lBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;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,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;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,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;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,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;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;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;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;AAClB;AACA;AACA;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;AAClB;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,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;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,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;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,eAAe,+BAA+B;AAC9C;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,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gDAAgD;AAC/D,eAAe,gDAAgD;AAC/D;AACA,gBAAgB,gDAAgD;AAChE;AACA;AACA;AACA,oCAAoC;AACpC;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,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;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,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;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,cAAc;AACd;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,cAAc;AACd;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,cAAc;AACd;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,CAAC;AACD;AACA;;;;;;;;;;;AC52CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;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,oBAAoB,qBAAqB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;AAC7C;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;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,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;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,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;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,KAAK;AACL;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;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,kCAAkC;AAClC;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5iBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;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,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;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;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;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;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,KAAK;AACL;AACA;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjVA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,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;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;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,gBAAgB,qBAAqB;AACrC;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,gBAAgB,qBAAqB;AACrC;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,gBAAgB,qBAAqB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;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,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;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,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;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,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;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,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;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;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;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,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;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,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;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;AACA;AACA;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,gBAAgB,wBAAwB;AACxC;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,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;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,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;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,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;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,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;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;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;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,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;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,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;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,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;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,KAAK;AACL;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,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;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;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,4EAAoB;AAC5C,YAAY,mBAAO,CAAC,oEAAgB;AACpC,YAAY,mBAAO,CAAC,oEAAgB;AACpC;AACA;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;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,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;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;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;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;AACA;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,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,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,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;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;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;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,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;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,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-both.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/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///../../../src/core/events/BLUR_EVENT.js","webpack:///../../../src/core/events/BOOT_EVENT.js","webpack:///../../../src/core/events/CONTEXT_LOST_EVENT.js","webpack:///../../../src/core/events/CONTEXT_RESTORED_EVENT.js","webpack:///../../../src/core/events/DESTROY_EVENT.js","webpack:///../../../src/core/events/FOCUS_EVENT.js","webpack:///../../../src/core/events/HIDDEN_EVENT.js","webpack:///../../../src/core/events/PAUSE_EVENT.js","webpack:///../../../src/core/events/POST_RENDER_EVENT.js","webpack:///../../../src/core/events/POST_STEP_EVENT.js","webpack:///../../../src/core/events/PRE_RENDER_EVENT.js","webpack:///../../../src/core/events/PRE_STEP_EVENT.js","webpack:///../../../src/core/events/READY_EVENT.js","webpack:///../../../src/core/events/RESUME_EVENT.js","webpack:///../../../src/core/events/STEP_EVENT.js","webpack:///../../../src/core/events/VISIBLE_EVENT.js","webpack:///../../../src/core/events/index.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GetCalcMatrix.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/events/POST_RENDER_EVENT.js","webpack:///../../../src/renderer/events/PRE_RENDER_EVENT.js","webpack:///../../../src/renderer/events/RENDER_EVENT.js","webpack:///../../../src/renderer/events/RESIZE_EVENT.js","webpack:///../../../src/renderer/events/index.js","webpack:///../../../src/renderer/webgl/pipelines/const.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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","var __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 if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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.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 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.setAttachment(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.setAttachment(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \".concat(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 \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(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 \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(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 \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(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 \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path, \": status \").concat(request.status, \", \").concat(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 \".concat(path, \": status \").concat(request.status, \", \").concat(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 isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n };\r\n img_1.src = 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 var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\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 (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\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 else {\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 };\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: \".concat(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: \".concat(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: \".concat(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: \".concat(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: \".concat(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 \".concat(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 \".concat(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(this.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(this.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(this.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(this.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 ctx.globalAlpha = color.a;\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 ctx.globalAlpha = color.a;\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 \".concat(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 \".concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_dark = \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) {\r\n this.setupCanvas(canvasOrContext, contextConfig);\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.setupCanvas = function (canvas, contextConfig) {\r\n var _this = this;\r\n this.gl = (canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas;\r\n canvas.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas.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 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","/**\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|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 * @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\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\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 + '!' + i,\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', file.src.match(/^.*\\//))[0];\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 = textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\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 var textureManager = this.loader.textureManager;\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.replace(/![\\d]$/, '');\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 if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\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 2020 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\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\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 * Find more details about Spine itself at http://esotericsoftware.com/.\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.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\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 * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\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 two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\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 preMultipliedAlpha 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 * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\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, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\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 this.game.events.once('destroy', this.gameDestroy, 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 // 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 var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = 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(atlasEntry.prefix + 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(atlasEntry.prefix + 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 preMultipliedAlpha 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#ADD\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} [preMultipliedAlpha=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.setViewport(viewportWidth, 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 if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\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 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.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\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 2020 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 Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.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 {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\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 * 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 {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, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\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, 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","/**\r\n * @author Richard Davey \r\n * @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 SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.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 {SpineContainer} container - The Game Object being rendered in this call.\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 SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\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 if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var rendererNextType = renderer.nextTypeMatch;\r\n\r\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\r\n renderer.nextTypeMatch = true;\r\n renderer.newType = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (child.willRender(camera, container))\r\n {\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.preRenderWebGL(renderer, child, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.postRenderWebGL(renderer, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n }\r\n }\r\n\r\n renderer.nextTypeMatch = rendererNextType;\r\n\r\n if (!rendererNextType)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\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 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","/**\r\n * @author Richard Davey \r\n * @copyright 2020 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 = -1;\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 * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\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 the animation specified by the track index 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(trackIndex);\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 if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\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 2020 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 {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, 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 camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n camera.addToRenderList(src);\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 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","/**\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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Directly 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#renderDirect\r\n * @since 3.50.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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\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 // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLDirect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\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 Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @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(Events.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 {number}\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 Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @since 3.50.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 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 DESTROY: require('./DESTROY_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 Class = require('../../utils/Class');\r\nvar GameEvents = require('../../core/events');\r\nvar RenderEvents = require('../../renderer/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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\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.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 masks 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 * 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.\r\n * 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 /**\r\n * The Scene which this Bitmap Mask will be used in.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.60.0\r\n */\r\n this.scene = scene;\r\n\r\n this.createMask();\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this);\r\n\r\n if (renderer)\r\n {\r\n renderer.on(RenderEvents.RESIZE, this.createMask, this);\r\n }\r\n },\r\n\r\n /**\r\n * Creates the WebGL Texture2D objects and Framebuffers required for this\r\n * mask. If this mask has already been created, then `clearMask` is called first.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#createMask\r\n * @since 3.50.0\r\n */\r\n createMask: function ()\r\n {\r\n var renderer = this.renderer;\r\n\r\n if (!renderer || !renderer.gl)\r\n {\r\n return;\r\n }\r\n\r\n if (this.mainTexture)\r\n {\r\n this.clearMask();\r\n }\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\r\n /**\r\n * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes\r\n * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references.\r\n *\r\n * This is called when this mask is destroyed, or if you try to creat a new\r\n * mask from this object when one is already set.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#clearMask\r\n * @since 3.50.0\r\n */\r\n clearMask: function ()\r\n {\r\n var renderer = this.renderer;\r\n\r\n if (!renderer || !renderer.gl || !this.mainTexture)\r\n {\r\n return;\r\n }\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 this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\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.BITMAPMASK_PIPELINE.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.BITMAPMASK_PIPELINE.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.clearMask();\r\n\r\n this.scene.sys.game.events.off(GameEvents.CONTEXT_RESTORED, this.createMask, this);\r\n\r\n if (this.renderer)\r\n {\r\n this.renderer.off(RenderEvents.RESIZE, this.createMask, this);\r\n }\r\n\r\n this.bitmapMask = 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 * This is a WebGL only feature.\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 *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\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 current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\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 current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.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, 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","/**\r\n * @author Richard 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 ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\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 change 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 {(number|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 {number}\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 {number}\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 Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * 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.\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 * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\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 {this} This GameObject.\r\n */\r\n incData: 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.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\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.\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 * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\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 {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\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 * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\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)} [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.\r\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.\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 (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, 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 this.scene.sys.input.disable(this);\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 * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || 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 {number[]} 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));\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 if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\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 (fromScene === undefined) { fromScene = false; }\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, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\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\r\n this.body = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\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 {number} 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 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TransformMatrix = require('./components/TransformMatrix');\r\n\r\nvar tempMatrix1 = new TransformMatrix();\r\nvar tempMatrix2 = new TransformMatrix();\r\nvar tempMatrix3 = new TransformMatrix();\r\n\r\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\r\n\r\n/**\r\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\r\n * the parent matrix if provided.\r\n *\r\n * Note that the object this results contains _references_ to the Transform Matrices,\r\n * not new instances of them. Therefore, you should use their values immediately, or\r\n * copy them to your own matrix, as they will be replaced as soon as another Game\r\n * Object is rendered.\r\n *\r\n * @function Phaser.GameObjects.GetCalcMatrix\r\n * @memberof Phaser.GameObjects\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\r\n *\r\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\r\n */\r\nvar GetCalcMatrix = function (src, camera, parentMatrix)\r\n{\r\n var camMatrix = tempMatrix1;\r\n var spriteMatrix = tempMatrix2;\r\n var calcMatrix = tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, 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 else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = GetCalcMatrix;\r\n","/**\r\n * @author Richard 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 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 {number}\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 {number}\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 if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\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 {number} 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 setting the FX values of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.FX\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar FX = {\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a SpriteFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shaddow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#fxPadding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n fxPadding: 0,\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a SpriteFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shaddow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setFXPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to the texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFXPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.fxPadding = padding;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @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 * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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 instanceof Phaser.GameObjects.Graphics || this instanceof Phaser.GameObjects.Shape))\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 {number}\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(tweenData.end, 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","/**\r\n * @author Richard 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 DeepCopy = require('../../utils/object/DeepCopy');\r\nvar PIPELINE_CONST = require('../../renderer/webgl/pipelines/const');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; }\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n this.postPipelines = [];\r\n this.pipelineData = {};\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * Both the pipeline and post pipelines share the same pipeline data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `pipelineData` property, if the parameter is given.\r\n *\r\n * Both the pipeline and post pipelines share the pipeline data object together.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * Both the pipeline and post pipelines share the pipeline data object together.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline)\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetPostPipelines, resetData)\r\n {\r\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetPostPipelines)\r\n {\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n }\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (typeof pipeline === 'string' && instance.name === pipeline) ||\r\n (typeof pipeline !== 'string' && instance instanceof pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @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|number)} [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|number)} 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|number)} [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|number)} 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\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\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","/**\r\n * @author Richard 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('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\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 *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\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 {number}\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, PI/2 is down, +-PI is left\r\n * and -PI/2 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 * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.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 * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\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 * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.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} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\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 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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} 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 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 FX: require('./FX'),\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","/**\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 ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\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.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\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 Container.\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.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\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 Container.\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.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.clearAlpha();\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} 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 output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.parentContainer = this;\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\r\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.\r\n *\r\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\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.Container#setScrollFactor\r\n * @since 3.4.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 * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\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 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 Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.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 {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\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 ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\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 var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; 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 childAlpha = child.alpha;\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 // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\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\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 {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, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n var childCount = children.length;\r\n\r\n if (childCount === 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 renderer.pipelines.preBatch(container);\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 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) ? (children[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, 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 renderer.pipelines.postBatch(container);\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 * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\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 {number} width - The width of the video.\r\n * @param {number} 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number} 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 {number}\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 {number} 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[])} [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 {number}\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 {number} 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 {number}\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 {number} 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","/**\r\n * @author Richard 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 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('Invalid Loader.' + this.type + ' key');\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\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 {number}\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.state = CONST.FILE_LOADING;\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 // On iOS, Capacitor often runs on a capacitor:// protocol, meaning local files are served from capacitor:// rather than file://\r\n // See: https://github.com/photonstorm/phaser/issues/5685\r\n\r\n var isLocalFile = xhr.responseURL && (xhr.responseURL.indexOf('file://') === 0 || xhr.responseURL.indexOf('capacitor://') === 0);\r\n\r\n var localFileOk = (isLocalFile && 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.state = CONST.FILE_LOADED;\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 // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 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:|capacitor:\\/\\/|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\nvar CONST = require('./const');\r\nvar Events = require('./events');\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 var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\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 {number}\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 = finalFiles;\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.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\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 {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.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 {number}\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 < finalFiles.length; i++)\r\n {\r\n finalFiles[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 // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\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);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\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 {number} [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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\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 {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\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\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\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 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 _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\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.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\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 this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n }\r\n else if (!linkFile)\r\n {\r\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\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","/**\r\n * @author Richard 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 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 {(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.\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 try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\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#ADD\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 {(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.\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 {this} 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 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 type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\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 {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} 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 {number} [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 {number} 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\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.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 Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @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 {number} [place=0] - The place to round to.\r\n * @param {number} [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 + min;\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 {number} 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 Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \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\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\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\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 /**\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 {this} 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 * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\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 {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\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 {this} 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 {this} 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 {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\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 {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\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 {this} 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 this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\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 {this} 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 return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\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 {this} 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 {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\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 {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 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 // 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 return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\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 return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\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 {this} This Matrix4.\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 return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\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 {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\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 return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\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 return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\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 {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\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 return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\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 {this} 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 {this} 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)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.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 var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\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 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 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\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 Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @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 Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\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=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - 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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\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 x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\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 return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\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 if (update)\r\n {\r\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\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 return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\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 return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\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 return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\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 this.onChangeCallback(this);\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 return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\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 return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\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 return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\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 this.onChangeCallback(this);\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 {number} 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 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [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 {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} 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\r\n return out.set(x, y);\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=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 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\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 * @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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\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 {number} 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\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, pluginKey)\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 /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\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#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 Post-Render Event.\r\n *\r\n * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes,\r\n * has completed, but before any pending snap shots have been taken.\r\n *\r\n * @event Phaser.Renderer.Events#POST_RENDER\r\n * @since 3.50.0\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 Pre-Render Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer. This happens right at the start of the render\r\n * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been\r\n * reset ready for the render.\r\n *\r\n * @event Phaser.Renderer.Events#PRE_RENDER\r\n * @since 3.50.0\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 Render Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer for every camera in every Scene.\r\n *\r\n * It is dispatched before any of the children in the Scene have been rendered.\r\n *\r\n * @event Phaser.Renderer.Events#RENDER\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered.\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 Renderer Resize Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer when it is resized, usually as a result\r\n * of the Scale Manager resizing.\r\n *\r\n * @event Phaser.Renderer.Events#RESIZE\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - The new width of the renderer.\r\n * @param {number} height - The new height of the renderer.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @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.Renderer.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n POST_RENDER: require('./POST_RENDER_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESIZE: require('./RESIZE_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 PIPELINE_CONST = {\r\n\r\n /**\r\n * The Bitmap Mask Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n BITMAPMASK_PIPELINE: 'BitmapMaskPipeline',\r\n\r\n /**\r\n * The Light 2D Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n LIGHT_PIPELINE: 'Light2D',\r\n\r\n /**\r\n * The Point Light Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n POINTLIGHT_PIPELINE: 'PointLightPipeline',\r\n\r\n /**\r\n * The Single Texture Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n SINGLE_PIPELINE: 'SinglePipeline',\r\n\r\n /**\r\n * The Multi Texture Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n MULTI_PIPELINE: 'MultiPipeline',\r\n\r\n /**\r\n * The Rope Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n ROPE_PIPELINE: 'RopePipeline',\r\n\r\n /**\r\n * The Graphics and Shapes Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n GRAPHICS_PIPELINE: 'GraphicsPipeline',\r\n\r\n /**\r\n * The Post FX Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n POSTFX_PIPELINE: 'PostFXPipeline',\r\n\r\n /**\r\n * The Utility Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n UTILITY_PIPELINE: 'UtilityPipeline'\r\n\r\n};\r\n\r\nmodule.exports = PIPELINE_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 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.\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} 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 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 Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @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.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.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.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.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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.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 samme\r\n * @copyright 2021 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-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @since 3.53.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 = '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 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.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.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 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 Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\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.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.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.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.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.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.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.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.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.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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.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.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 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.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\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_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_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 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 * @ignore\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 * @ignore\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 {number} [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 {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} 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 {number} startIndex - The start index to search from.\r\n * @param {number} 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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [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 {number} [startIndex=0] - An optional start index.\r\n * @param {number} [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 above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n * \r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @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 below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n * \r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @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 {number} 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","/**\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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard 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 {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [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 var removed = [];\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 removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\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 {number} 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 {number} startIndex - The start index to remove from.\r\n * @param {number} 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 {number} [start=0] - The array index to start the search from.\r\n * @param {number} [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 {number} [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 {number} [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 {number} startIndex - The start index.\r\n * @param {number} 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 {\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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [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","/**\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 array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @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 {number} 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 * @author Angry Bytes (and contributors)\r\n * @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 comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\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\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\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\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\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 {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @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 array;\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 MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\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)\r\n * have the same length. This is an example matrix:\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) || !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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 Translate: require('./TranslateMatrix'),\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\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard 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/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\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 (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n value = parentA[keys[i]];\r\n\r\n parentA = parentA[keys[i]];\r\n }\r\n else if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n value = parentB[keys[i]];\r\n\r\n parentB = parentB[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 {number} [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 {number} [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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GetCalcMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/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/SpineGameObjectWebGLDirect.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,4FAA8B;;AAE5D;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChEA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;;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;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;ACxtCA;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;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;;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvHA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1IA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;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,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,yGAAyG;AACzG;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;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;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,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,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,+EAA+E,mDAAmD,uDAAuD,sDAAsD,+BAA+B,mCAAmC,0BAA0B,gDAAgD,wDAAwD,wFAAwF,WAAW;AACthB,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,+EAA+E,mDAAmD,oDAAoD,uDAAuD,sDAAsD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,gDAAgD,gDAAgD,wDAAwD,wFAAwF,WAAW;AACxpB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,+EAA+E,mDAAmD,sDAAsD,+BAA+B,0BAA0B,gDAAgD,wFAAwF,WAAW;AACpY,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,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iEAAiE,OAAO;AACxE;AACA;AACA,iBAAiB;AACjB;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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TransformMatrix = require('./components/TransformMatrix');\n\nvar tempMatrix1 = new TransformMatrix();\nvar tempMatrix2 = new TransformMatrix();\nvar tempMatrix3 = new TransformMatrix();\n\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\n\n/**\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\n * the parent matrix if provided.\n *\n * Note that the object this results contains _references_ to the Transform Matrices,\n * not new instances of them. Therefore, you should use their values immediately, or\n * copy them to your own matrix, as they will be replaced as soon as another Game\n * Object is rendered.\n *\n * @function Phaser.GameObjects.GetCalcMatrix\n * @memberof Phaser.GameObjects\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\n *\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\n */\nvar GetCalcMatrix = function (src, camera, parentMatrix)\n{\n var camMatrix = tempMatrix1;\n var spriteMatrix = tempMatrix2;\n var calcMatrix = tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, 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 else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n }\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n return result;\n};\n\nmodule.exports = GetCalcMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\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, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\n\n var children = container.list;\n var childCount = children.length;\n\n if (childCount === 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 renderer.pipelines.preBatch(container);\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 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) ? (children[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, camera, transformMatrix, container);\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 renderer.pipelines.postBatch(container);\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 // 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n sceneRenderer.batcher.setBlendMode = setBlendMode;\n sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * \n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 {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, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\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, 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 2022 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 2022 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 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 {SpineContainer} container - The Game Object being rendered in this call.\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, 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.pipelines.rebind();\n }\n\n return;\n }\n\n camera.addToRenderList(container);\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 if (renderer.newType)\n {\n // flush + clear if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var rendererNextType = renderer.nextTypeMatch;\n\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\n renderer.nextTypeMatch = true;\n renderer.newType = false;\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (child.willRender(camera, container))\n {\n var mask = child.mask;\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.preRenderWebGL(renderer, child, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.postRenderWebGL(renderer, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n }\n }\n\n renderer.nextTypeMatch = rendererNextType;\n\n if (!rendererNextType)\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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 {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, 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 camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n camera.addToRenderList(src);\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 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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Directly 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#renderDirect\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 {SpineGameObject} src - The Game Object being rendered in this call.\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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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 // 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.pipelines.rebind();\n};\n\nmodule.exports = SpineGameObjectWebGLDirect;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (renderer.newType)\n {\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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.pipelines.rebind();\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 if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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.setAttachment(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.setAttachment(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.setAttachment(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path);\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \".concat(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 \".concat(path, \": \").concat(ex.message);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(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 \".concat(path, \": \").concat(ex.message);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\n _this.toLoad--;\n _this.loaded++;\n }\n }\n else {\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\n if (error)\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(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 \".concat(imagePath, \"} of atlas \").concat(path);\n if (error)\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path, \": status \").concat(request.status, \", \").concat(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 \".concat(path, \": status \").concat(request.status, \", \").concat(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 isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\n if (isWebWorker) {\n var options = { mode: \"cors\" };\n fetch(path, options).then(function (response) {\n if (!response.ok) {\n _this.errors[path] = \"Couldn't load image \" + path;\n }\n return response.blob();\n }).then(function (blob) {\n return createImageBitmap(blob, {\n premultiplyAlpha: 'none',\n colorSpaceConversion: 'none'\n });\n }).then(function (bitmap) {\n _this.rawAssets[path] = bitmap;\n });\n }\n else {\n var img_1 = new Image();\n img_1.crossOrigin = \"anonymous\";\n img_1.onload = function (ev) {\n _this.rawAssets[path] = img_1;\n };\n img_1.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \".concat(path);\n };\n img_1.src = path;\n }\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 var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\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 (isWebWorker) {\n if (rawAsset instanceof ImageBitmap) {\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\n }\n else {\n clientAssets.assets[path] = rawAsset;\n }\n }\n else {\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 };\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: \".concat(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: \".concat(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: \".concat(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: \".concat(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: \".concat(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 \".concat(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 \".concat(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(this.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(this.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(this.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(this.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 ctx.globalAlpha = color.a;\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 ctx.globalAlpha = color.a;\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 \".concat(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 \".concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_dark = \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\n this.restorables = new Array();\n if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) {\n this.setupCanvas(canvasOrContext, contextConfig);\n }\n else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n ManagedWebGLRenderingContext.prototype.setupCanvas = function (canvas, contextConfig) {\n var _this = this;\n this.gl = (canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig));\n this.canvas = canvas;\n canvas.addEventListener(\"webglcontextlost\", function (e) {\n var event = e;\n if (e) {\n e.preventDefault();\n }\n });\n canvas.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 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/dist/SpineWebGLPlugin.js b/plugins/spine/dist/SpineWebGLPlugin.js index 9d8152252..15c4664a3 100644 --- a/plugins/spine/dist/SpineWebGLPlugin.js +++ b/plugins/spine/dist/SpineWebGLPlugin.js @@ -1,352 +1,21865 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 4399: -/***/ ((module) => { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; +window["SpinePlugin"] = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ 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 ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 69); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { /** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Taken from klasse by mattdesl https://github.com/mattdesl/klasse + +function hasGetterOrSetter (def) +{ + return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); +} + +function getProperty (definition, k, isClassDescriptor) +{ + // This may be a lightweight object, OR it might be a property that was defined previously. + + // For simple class descriptors we can just assume its NOT previously defined. + var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); + + if (!isClassDescriptor && def.value && typeof def.value === 'object') + { + def = def.value; + } + + // This might be a regular property, or it may be a getter/setter the user defined in a class. + if (def && hasGetterOrSetter(def)) + { + if (typeof def.enumerable === 'undefined') + { + def.enumerable = true; + } + + if (typeof def.configurable === 'undefined') + { + def.configurable = true; + } + + return def; + } + else + { + return false; + } +} + +function hasNonConfigurable (obj, k) +{ + var prop = Object.getOwnPropertyDescriptor(obj, k); + + if (!prop) + { + return false; + } + + if (prop.value && typeof prop.value === 'object') + { + prop = prop.value; + } + + if (prop.configurable === false) + { + return true; + } + + return false; +} + +/** + * Extends the given `myClass` object's prototype with the properties of `definition`. * + * @function extend + * @ignore + * @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) + { + if (!definition.hasOwnProperty(k)) + { + continue; + } + + var def = getProperty(definition, k, isClassDescriptor); + + if (def !== false) + { + // If Extends is used, we will check its prototype to see if the final variable exists. + + var parent = extend || ctor; + + if (hasNonConfigurable(parent.prototype, k)) + { + // Just skip the final property + if (Class.ignoreFinals) + { + continue; + } + + // We cannot re-define a property that is configurable=false. + // So we will consider them final and throw an error. This is by + // default so it is clear to the developer what is happening. + // You can set ignoreFinals to true if you need to extend a class + // which has configurable=false; it will simply not re-define final properties. + throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); + } + + Object.defineProperty(ctor.prototype, k, def); + } + else + { + ctor.prototype[k] = definition[k]; + } + } +} + +/** + * Applies the given `mixins` to the prototype of `myClass`. + * + * @function mixin + * @ignore + * @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) + { + return; + } + + if (!Array.isArray(mixins)) + { + mixins = [ mixins ]; + } + + for (var i = 0; i < mixins.length; i++) + { + extend(myClass, mixins[i].prototype || mixins[i]); + } +} + +/** + * Creates a new class with the given descriptor. + * The constructor, defined by the name `initialize`, + * is an optional function. If unspecified, an anonymous + * function will be used which calls the parent class (if + * one exists). + * + * You can also use `Extends` and `Mixins` to provide subclassing + * and inheritance. + * + * @class Phaser.Class * @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 {Object} definition a dictionary of functions for the class + * @example * - * @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. + * var MyClass = new Phaser.Class({ * - * @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. + * initialize: function() { + * this.foo = 2.0; + * }, * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private + * bar: function() { + * return this.foo + 5; + * } + * }); */ -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; +function Class (definition) +{ + if (!definition) + { + definition = {}; } - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; + // The variable name here dictates what we see in Chrome debugger + var initialize; + var Extends; + + if (definition.initialize) + { + if (typeof definition.initialize !== 'function') + { + throw new Error('initialize must be a function'); + } + + initialize = definition.initialize; + + // Usually we should avoid 'delete' in V8 at all costs. + // However, its unlikely to make any performance difference + // here since we only call this on class creation (i.e. not object creation). + delete definition.initialize; + } + else if (definition.Extends) + { + var base = definition.Extends; + + initialize = function () + { + base.apply(this, arguments); + }; + } + else + { + initialize = function () {}; } - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; + if (definition.Extends) + { + initialize.prototype = Object.create(definition.Extends.prototype); + initialize.prototype.constructor = initialize; - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) - 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]; - } + Extends = definition.Extends; - listeners[i].fn.apply(listeners[i].context, args); - } + delete definition.Extends; } - } - - 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]); - } + else + { + initialize.prototype.constructor = initialize; } - // - // 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); - } + // Grab the mixins, if they are specified... + var mixins = null; - return this; -}; + if (definition.Mixins) + { + mixins = definition.Mixins; + delete definition.Mixins; + } -/** - * 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; + // First, mixin if we can. + mixin(initialize, mixins); - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } + // Now we grab the actual definition which defines the overrides. + extend(initialize, definition, true, Extends); - 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; + return initialize; } +Class.extend = extend; +Class.mixin = mixin; +Class.ignoreFinals = false; + +module.exports = Class; + /***/ }), +/* 1 */ +/***/ (function(module, exports) { -/***/ 6937: -/***/ ((module) => { +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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__(35); + +/** + * @classdesc + * A representation of a vector in 2D space. + * + * A two-component vector. + * + * @class Vector2 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. + * @param {number} [y=x] - The y component. + */ +var Vector2 = new Class({ + + initialize: + + function Vector2 (x, y) + { + /** + * The x component of this Vector. + * + * @name Phaser.Math.Vector2#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The y component of this Vector. + * + * @name Phaser.Math.Vector2#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; + } + }, + + /** + * Make a clone of this Vector2. + * + * @method Phaser.Math.Vector2#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} A clone of this Vector2. + */ + 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.Types.Math.Vector2Like} 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 (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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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); + }, + + /** + * Project this Vector onto another. + * + * @method Phaser.Math.Vector2#project + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} src - The vector to project onto. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + project: function (src) + { + var scalar = this.dot(src) / src.dot(src); + + return this.copy(src).scale(scalar); + } + +}); + +/** + * 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; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index. + * @param {number} 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) + { + 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 2013-2023 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 (!obj || 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; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. + * + * The key is a string, which can be split based on the use of the period character. + * + * For example: + * + * ```javascript + * const source = { + * lives: 3, + * render: { + * screen: { + * width: 1024 + * } + * } + * } + * + * const lives = GetValue(source, 'lives', 1); + * const width = GetValue(source, 'render.screen.width', 800); + * const height = GetValue(source, 'render.screen.height', 600); + * ``` + * + * In the code above, `lives` will be 3 because it's defined at the top level of `source`. + * The `width` value will be 1024 because it can be found inside the `render.screen` object. + * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. + * + * @function Phaser.Utils.Objects.GetValue + * @since 3.0.0 + * + * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. + * @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. + * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. + * + * @return {*} The value of the requested key. + */ +var GetValue = function (source, key, defaultValue, altSource) +{ + if ((!source && !altSource) || typeof source === 'number') + { + return defaultValue; + } + else if (source && source.hasOwnProperty(key)) + { + return source[key]; + } + else if (altSource && altSource.hasOwnProperty(key)) + { + return altSource[key]; + } + else if (key.indexOf('.') !== -1) + { + var keys = key.split('.'); + var parentA = source; + var parentB = altSource; + var valueA = defaultValue; + var valueB = defaultValue; + var valueAFound = true; + var valueBFound = true; + + // Use for loop here so we can break early + for (var i = 0; i < keys.length; i++) + { + if (parentA && parentA.hasOwnProperty(keys[i])) + { + // Yes parentA has a key property, let's carry on down + valueA = parentA[keys[i]]; + parentA = parentA[keys[i]]; + } + else + { + valueAFound = false; + } + + if (parentB && parentB.hasOwnProperty(keys[i])) + { + // Yes parentB has a key property, let's carry on down + valueB = parentB[keys[i]]; + parentB = parentB[keys[i]]; + } + else + { + valueBFound = false; + } + } + + if (valueAFound) + { + return valueA; + } + else if (valueBFound) + { + return valueB; + } + else + { + return defaultValue; + } + } + else + { + return defaultValue; + } +}; + +module.exports = GetValue; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FILE_CONST = { + + /** + * The Loader is idle. + * + * @name Phaser.Loader.LOADER_IDLE + * @type {number} + * @since 3.0.0 + */ + LOADER_IDLE: 0, + + /** + * The Loader is actively loading. + * + * @name Phaser.Loader.LOADER_LOADING + * @type {number} + * @since 3.0.0 + */ + LOADER_LOADING: 1, + + /** + * The Loader is processing files is has loaded. + * + * @name Phaser.Loader.LOADER_PROCESSING + * @type {number} + * @since 3.0.0 + */ + LOADER_PROCESSING: 2, + + /** + * The Loader has completed loading and processing. + * + * @name Phaser.Loader.LOADER_COMPLETE + * @type {number} + * @since 3.0.0 + */ + LOADER_COMPLETE: 3, + + /** + * The Loader is shutting down. + * + * @name Phaser.Loader.LOADER_SHUTDOWN + * @type {number} + * @since 3.0.0 + */ + LOADER_SHUTDOWN: 4, + + /** + * The Loader has been destroyed. + * + * @name Phaser.Loader.LOADER_DESTROYED + * @type {number} + * @since 3.0.0 + */ + LOADER_DESTROYED: 5, + + /** + * File is in the load queue but not yet started. + * + * @name Phaser.Loader.FILE_PENDING + * @type {number} + * @since 3.0.0 + */ + FILE_PENDING: 10, + + /** + * File has been started to load by the loader (onLoad called) + * + * @name Phaser.Loader.FILE_LOADING + * @type {number} + * @since 3.0.0 + */ + FILE_LOADING: 11, + + /** + * File has loaded successfully, awaiting processing. + * + * @name Phaser.Loader.FILE_LOADED + * @type {number} + * @since 3.0.0 + */ + FILE_LOADED: 12, + + /** + * File failed to load. + * + * @name Phaser.Loader.FILE_FAILED + * @type {number} + * @since 3.0.0 + */ + FILE_FAILED: 13, + + /** + * File is being processed (onProcess callback) + * + * @name Phaser.Loader.FILE_PROCESSING + * @type {number} + * @since 3.0.0 + */ + FILE_PROCESSING: 14, + + /** + * The File has errored somehow during processing. + * + * @name Phaser.Loader.FILE_ERRORED + * @type {number} + * @since 3.0.0 + */ + FILE_ERRORED: 16, + + /** + * File has finished processing. + * + * @name Phaser.Loader.FILE_COMPLETE + * @type {number} + * @since 3.0.0 + */ + FILE_COMPLETE: 17, + + /** + * File has been destroyed. + * + * @name Phaser.Loader.FILE_DESTROYED + * @type {number} + * @since 3.0.0 + */ + FILE_DESTROYED: 18, + + /** + * File was populated from local data and doesn't need an HTTP request. + * + * @name Phaser.Loader.FILE_POPULATED + * @type {number} + * @since 3.0.0 + */ + FILE_POPULATED: 19, + + /** + * File is pending being destroyed. + * + * @name Phaser.Loader.FILE_PENDING_DESTROY + * @type {number} + * @since 3.60.0 + */ + FILE_PENDING_DESTROY: 20 + +}; + +module.exports = FILE_CONST; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GEOM_CONST = __webpack_require__(30); + +/** + * @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 {number} + * @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; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + DIFFERENCE: 11, + + /** + * Exclusion blend mode. For Canvas only. + * Like difference, but with lower contrast. + * + * @name Phaser.BlendModes.EXCLUSION + * @type {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + LUMINOSITY: 16, + + /** + * Alpha erase blend mode. For Canvas and WebGL. + * + * @name Phaser.BlendModes.ERASE + * @type {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + LIGHTER: 25, + + /** + * Copy blend mode. For Canvas only. + * Only the new shape is shown. + * + * @name Phaser.BlendModes.COPY + * @type {number} + * @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 {number} + * @const + * @since 3.0.0 + */ + XOR: 27 + +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(4); + +/** + * 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; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + }, + + /** + * Sets the components of this Vector to be the `Math.min` result from the given vector. + * + * @method Phaser.Math.Vector3#min + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + min: function (v) + { + this.x = Math.min(this.x, v.x); + this.y = Math.min(this.y, v.y); + this.z = Math.min(this.z, v.z); + + return this; + }, + + /** + * Sets the components of this Vector to be the `Math.max` result from the given vector. + * + * @method Phaser.Math.Vector3#max + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + max: function (v) + { + this.x = Math.max(this.x, v.x); + this.y = Math.max(this.y, v.y); + this.z = Math.max(this.z, v.z); + + 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); + }, + + /** + * Adds the two given Vector3s and sets the results into this Vector3. + * + * @method Phaser.Math.Vector3#addVectors + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} a - The first Vector to add. + * @param {Phaser.Math.Vector3} b - The second Vector to add. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addVectors: function (a, b) + { + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + + return this; + }, + + /** + * 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; + }, + + /** + * Sets the components of this Vector3 from the position of the given Matrix4. + * + * @method Phaser.Math.Vector3#setFromMatrixPosition + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + setFromMatrixPosition: function (m) + { + return this.fromArray(m.val, 12); + }, + + /** + * Sets the components of this Vector3 from the Matrix4 column specified. + * + * @method Phaser.Math.Vector3#setFromMatrixColumn + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from. + * @param {number} index - The column index. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + setFromMatrixColumn: function (mat4, index) + { + return this.fromArray(mat4.val, index * 4); + }, + + /** + * Sets the components of this Vector3 from the given array, based on the offset. + * + * Vector3.x = array[offset] + * Vector3.y = array[offset + 1] + * Vector3.z = array[offset + 2] + * + * @method Phaser.Math.Vector3#fromArray + * @since 3.50.0 + * + * @param {number[]} array - The array of values to get this Vector from. + * @param {number} [offset=0] - The offset index into the array. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + fromArray: function (array, offset) + { + if (offset === undefined) { offset = 0; } + + this.x = array[offset]; + this.y = array[offset + 1]; + this.z = array[offset + 2]; + + 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; + }, + + /** + * Add the given value to each component of this Vector. + * + * @method Phaser.Math.Vector3#addScalar + * @since 3.50.0 + * + * @param {number} s - The amount to add to this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScalar: function (s) + { + this.x += s; + this.y += s; + this.z += s; + + return this; + }, + + /** + * Add and scale a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector3#addScale + * @since 3.50.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. + * @param {number} scale - The amount to scale `v` by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScale: function (v, scale) + { + this.x += v.x * scale; + this.y += v.y * scale; + this.z += v.z * scale || 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; + }, + + /** + * Takes a Matrix3 and applies it to this Vector3. + * + * @method Phaser.Math.Vector3#applyMatrix3 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + applyMatrix3: function (mat3) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat3.val; + + this.x = m[0] * x + m[3] * y + m[6] * z; + this.y = m[1] * x + m[4] * y + m[7] * z; + this.z = m[2] * x + m[5] * y + m[8] * z; + + return this; + }, + + /** + * Takes a Matrix4 and applies it to this Vector3. + * + * @method Phaser.Math.Vector3#applyMatrix4 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + applyMatrix4: function (mat4) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat4.val; + + var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]); + + 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; + + 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 Matrix4. + * + * @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; + }, + + /** + * Multiplies this Vector3 by the given view and projection matrices. + * + * @method Phaser.Math.Vector3#projectViewMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix. + * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + projectViewMatrix: function (viewMatrix, projectionMatrix) + { + return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix); + }, + + /** + * Multiplies this Vector3 by the given inversed projection matrix and world matrix. + * + * @method Phaser.Math.Vector3#unprojectViewMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix. + * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + unprojectViewMatrix: function (projectionMatrix, worldMatrix) + { + return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix); + }, + + /** + * 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; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(4); + +/** + * 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 {number} The given angle converted to degrees. + */ +var RadToDeg = function (radians) +{ + return radians * CONST.RAD_TO_DEG; +}; + +module.exports = RadToDeg; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CheckMatrix = __webpack_require__(27); +var TransposeMatrix = __webpack_require__(61); + +/** + * 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/}. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(28); + +/** + * Determines the browser type and version running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.browser` from within any Scene. + * + * @typedef {object} Phaser.Device.Browser + * @since 3.0.0 + * + * @property {boolean} chrome - Set to true if running in Chrome. + * @property {boolean} edge - Set to true if running in Microsoft Edge browser. + * @property {boolean} firefox - Set to true if running in Firefox. + * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge). + * @property {boolean} mobileSafari - Set to true if running in Mobile Safari. + * @property {boolean} opera - Set to true if running in Opera. + * @property {boolean} safari - Set to true if running in Safari. + * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle) + * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+) + * @property {number} chromeVersion - If running in Chrome this will contain the major version number. + * @property {number} firefoxVersion - If running in Firefox this will contain the major version number. + * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion. + * @property {number} safariVersion - If running in Safari this will contain the major version number. + * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx} + */ +var Browser = { + + chrome: false, + chromeVersion: 0, + edge: false, + firefox: false, + firefoxVersion: 0, + ie: false, + ieVersion: 0, + mobileSafari: false, + opera: false, + safari: false, + safariVersion: 0, + silk: false, + trident: false, + tridentVersion: 0, + es2019: false + +}; + +function init () +{ + var ua = navigator.userAgent; + + if ((/Edg\/\d+/).test(ua)) + { + Browser.edge = true; + Browser.es2019 = true; + } + else if ((/OPR/).test(ua)) { + Browser.opera = true; + Browser.es2019 = true; + } + else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) + { + Browser.chrome = true; + Browser.chromeVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.chromeVersion > 69); + } + else if ((/Firefox\D+(\d+)/).test(ua)) + { + Browser.firefox = true; + Browser.firefoxVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.firefoxVersion > 10); + } + else if ((/AppleWebKit/).test(ua) && OS.iOS) + { + Browser.mobileSafari = true; + } + else if ((/MSIE (\d+\.\d+);/).test(ua)) + { + Browser.ie = true; + Browser.ieVersion = parseInt(RegExp.$1, 10); + } + else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) + { + Browser.safari = true; + Browser.safariVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.safariVersion > 10); + } + else if ((/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/).test(ua)) + { + Browser.ie = true; + Browser.trident = true; + Browser.tridentVersion = parseInt(RegExp.$1, 10); + Browser.ieVersion = parseInt(RegExp.$3, 10); + } + + // Silk gets its own if clause because its ua also contains 'Safari' + if ((/Silk/).test(ua)) + { + Browser.silk = true; + } + + return Browser; +} + +module.exports = init(); + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(6); + +// @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; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(4); + +/** + * Convert the given angle from degrees, to the equivalent angle in radians. + * + * @function Phaser.Math.DegToRad + * @since 3.0.0 + * + * @param {number} 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; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Vector3 = __webpack_require__(15); + +/** + * @ignore + */ +var EPSILON = 0.000001; + +/** + * @classdesc + * A four-dimensional matrix. + * + * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji + * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + * + * @class Matrix4 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from. + */ +var Matrix4 = new Class({ + + initialize: + + function Matrix4 (m) + { + /** + * The matrix values. + * + * @name Phaser.Math.Matrix4#val + * @type {Float32Array} + * @since 3.0.0 + */ + this.val = new Float32Array(16); + + if (m) + { + // Assume Matrix4 with val: + this.copy(m); + } + else + { + // Default to identity + this.identity(); + } + }, + + /** + * Make a clone of this Matrix4. + * + * @method Phaser.Math.Matrix4#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix4} A clone of this Matrix4. + */ + clone: function () + { + return new Matrix4(this); + }, + + /** + * This method is an alias for `Matrix4.copy`. + * + * @method Phaser.Math.Matrix4#set + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from. + * + * @return {this} This Matrix4. + */ + set: function (src) + { + return this.copy(src); + }, + + /** + * Sets all values of this Matrix4. + * + * @method Phaser.Math.Matrix4#setValues + * @since 3.50.0 + * + * @param {number} m00 - The m00 value. + * @param {number} m01 - The m01 value. + * @param {number} m02 - The m02 value. + * @param {number} m03 - The m03 value. + * @param {number} m10 - The m10 value. + * @param {number} m11 - The m11 value. + * @param {number} m12 - The m12 value. + * @param {number} m13 - The m13 value. + * @param {number} m20 - The m20 value. + * @param {number} m21 - The m21 value. + * @param {number} m22 - The m22 value. + * @param {number} m23 - The m23 value. + * @param {number} m30 - The m30 value. + * @param {number} m31 - The m31 value. + * @param {number} m32 - The m32 value. + * @param {number} m33 - The m33 value. + * + * @return {this} This Matrix4 instance. + */ + setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) + { + var out = this.val; + + out[0] = m00; + out[1] = m01; + out[2] = m02; + out[3] = m03; + out[4] = m10; + out[5] = m11; + out[6] = m12; + out[7] = m13; + out[8] = m20; + out[9] = m21; + out[10] = m22; + out[11] = m23; + out[12] = m30; + out[13] = m31; + out[14] = m32; + out[15] = m33; + + return this; + }, + + /** + * Copy the values of a given Matrix into this Matrix. + * + * @method Phaser.Math.Matrix4#copy + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from. + * + * @return {this} This Matrix4. + */ + copy: function (src) + { + var a = src.val; + + return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + }, + + /** + * Set the values of this Matrix from the given array. + * + * @method Phaser.Math.Matrix4#fromArray + * @since 3.0.0 + * + * @param {number[]} a - The array to copy the values from. Must have at least 16 elements. + * + * @return {this} This Matrix4. + */ + fromArray: function (a) + { + return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); + }, + + /** + * Reset this Matrix. + * + * Sets all values to `0`. + * + * @method Phaser.Math.Matrix4#zero + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix4} This Matrix4. + */ + zero: function () + { + return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + }, + + /** + * Generates a transform matrix based on the given position, scale and rotation. + * + * @method Phaser.Math.Matrix4#transform + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} position - The position vector. + * @param {Phaser.Math.Vector3} scale - The scale vector. + * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion. + * + * @return {this} This Matrix4. + */ + transform: function (position, scale, rotation) + { + var rotMatrix = _tempMat1.fromQuat(rotation); + + var rm = rotMatrix.val; + + var sx = scale.x; + var sy = scale.y; + var sz = scale.z; + + return this.setValues( + rm[0] * sx, + rm[1] * sx, + rm[2] * sx, + 0, + + rm[4] * sy, + rm[5] * sy, + rm[6] * sy, + 0, + + rm[8] * sz, + rm[9] * sz, + rm[10] * sz, + 0, + + position.x, + position.y, + position.z, + 1 + ); + }, + + /** + * Set the `x`, `y` and `z` values of this Matrix. + * + * @method Phaser.Math.Matrix4#xyz + * @since 3.0.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} z - The z value. + * + * @return {this} This Matrix4. + */ + xyz: function (x, y, z) + { + this.identity(); + + var out = this.val; + + out[12] = x; + out[13] = y; + out[14] = z; + + return this; + }, + + /** + * Set the scaling values of this Matrix. + * + * @method Phaser.Math.Matrix4#scaling + * @since 3.0.0 + * + * @param {number} x - The x scaling value. + * @param {number} y - The y scaling value. + * @param {number} z - The z scaling value. + * + * @return {this} This Matrix4. + */ + scaling: function (x, y, z) + { + this.zero(); + + var out = this.val; + + out[0] = x; + out[5] = y; + out[10] = z; + out[15] = 1; + + return this; + }, + + /** + * Reset this Matrix to an identity (default) matrix. + * + * @method Phaser.Math.Matrix4#identity + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + identity: function () + { + return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + }, + + /** + * Transpose this Matrix. + * + * @method Phaser.Math.Matrix4#transpose + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + transpose: function () + { + var a = this.val; + + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + var a12 = a[6]; + var a13 = a[7]; + var a23 = a[11]; + + a[1] = a[4]; + a[2] = a[8]; + a[3] = a[12]; + a[4] = a01; + a[6] = a[9]; + a[7] = a[13]; + a[8] = a02; + a[9] = a12; + a[11] = a[14]; + a[12] = a03; + a[13] = a13; + a[14] = a23; + + return this; + }, + + /** + * Copies the given Matrix4 into this Matrix and then inverses it. + * + * @method Phaser.Math.Matrix4#getInverse + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4. + * + * @return {this} This Matrix4. + */ + getInverse: function (m) + { + this.copy(m); + + return this.invert(); + }, + + /** + * Invert this Matrix. + * + * @method Phaser.Math.Matrix4#invert + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + invert: function () + { + var a = 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 this; + } + + det = 1 / det; + + return this.setValues( + (a11 * b11 - a12 * b10 + a13 * b09) * det, + (a02 * b10 - a01 * b11 - a03 * b09) * det, + (a31 * b05 - a32 * b04 + a33 * b03) * det, + (a22 * b04 - a21 * b05 - a23 * b03) * det, + (a12 * b08 - a10 * b11 - a13 * b07) * det, + (a00 * b11 - a02 * b08 + a03 * b07) * det, + (a32 * b02 - a30 * b05 - a33 * b01) * det, + (a20 * b05 - a22 * b02 + a23 * b01) * det, + (a10 * b10 - a11 * b08 + a13 * b06) * det, + (a01 * b08 - a00 * b10 - a03 * b06) * det, + (a30 * b04 - a31 * b02 + a33 * b00) * det, + (a21 * b02 - a20 * b04 - a23 * b00) * det, + (a11 * b07 - a10 * b09 - a12 * b06) * det, + (a00 * b09 - a01 * b07 + a02 * b06) * det, + (a31 * b01 - a30 * b03 - a32 * b00) * det, + (a20 * b03 - a21 * b01 + a22 * b00) * det + ); + }, + + /** + * Calculate the adjoint, or adjugate, of this Matrix. + * + * @method Phaser.Math.Matrix4#adjoint + * @since 3.0.0 + * + * @return {this} This Matrix4. + */ + adjoint: function () + { + var a = 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]; + + return this.setValues( + (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)), + -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)), + (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)), + -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)), + -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)), + (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)), + -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)), + (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)), + (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)), + -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)), + (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)), + -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)), + -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)), + (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)), + -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)), + (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)) + ); + }, + + /** + * Calculate the determinant of this Matrix. + * + * @method Phaser.Math.Matrix4#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 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 + return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + }, + + /** + * Multiply this Matrix by the given Matrix. + * + * @method Phaser.Math.Matrix4#multiply + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by. + * + * @return {this} This Matrix4. + */ + multiply: function (src) + { + var a = 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 b = src.val; + + // Cache only the current line of the second matrix + var b0 = b[0]; + var b1 = b[1]; + var b2 = b[2]; + var b3 = b[3]; + + a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[4]; + b1 = b[5]; + b2 = b[6]; + b3 = b[7]; + + a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[8]; + b1 = b[9]; + b2 = b[10]; + b3 = b[11]; + + a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[12]; + b1 = b[13]; + b2 = b[14]; + b3 = b[15]; + + a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + return this; + }, + + /** + * 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 - The source Matrix4 that this Matrix4 is multiplied by. + * + * @return {this} This Matrix4. + */ + multiplyLocal: function (src) + { + var a = this.val; + var b = src.val; + + return this.setValues( + a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12], + a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13], + a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14], + a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15], + + a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12], + a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13], + a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14], + a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15], + + a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12], + a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13], + a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14], + a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15], + + a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12], + a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13], + a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14], + a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15] + ); + }, + + /** + * Multiplies the given Matrix4 object with this Matrix. + * + * This is the same as calling `multiplyMatrices(m, this)`. + * + * @method Phaser.Math.Matrix4#premultiply + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one. + * + * @return {this} This Matrix4. + */ + premultiply: function (m) + { + return this.multiplyMatrices(m, this); + }, + + /** + * Multiplies the two given Matrix4 objects and stores the results in this Matrix. + * + * @method Phaser.Math.Matrix4#multiplyMatrices + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply. + * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply. + * + * @return {this} This Matrix4. + */ + multiplyMatrices: function (a, b) + { + var am = a.val; + var bm = b.val; + + var a11 = am[0]; + var a12 = am[4]; + var a13 = am[8]; + var a14 = am[12]; + var a21 = am[1]; + var a22 = am[5]; + var a23 = am[9]; + var a24 = am[13]; + var a31 = am[2]; + var a32 = am[6]; + var a33 = am[10]; + var a34 = am[14]; + var a41 = am[3]; + var a42 = am[7]; + var a43 = am[11]; + var a44 = am[15]; + + var b11 = bm[0]; + var b12 = bm[4]; + var b13 = bm[8]; + var b14 = bm[12]; + var b21 = bm[1]; + var b22 = bm[5]; + var b23 = bm[9]; + var b24 = bm[13]; + var b31 = bm[2]; + var b32 = bm[6]; + var b33 = bm[10]; + var b34 = bm[14]; + var b41 = bm[3]; + var b42 = bm[7]; + var b43 = bm[11]; + var b44 = bm[15]; + + return this.setValues( + a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41, + a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41, + a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41, + a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41, + a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42, + a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42, + a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42, + a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42, + a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43, + a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43, + a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43, + a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43, + a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44, + a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44, + a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44, + a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44 + ); + }, + + /** + * Translate this Matrix using the given Vector. + * + * @method Phaser.Math.Matrix4#translate + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. + * + * @return {this} This Matrix4. + */ + translate: function (v) + { + return this.translateXYZ(v.x, v.y, v.z); + }, + + /** + * 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 {this} 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. + * + * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. + * + * @method Phaser.Math.Matrix4#scale + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. + * + * @return {this} This Matrix4. + */ + scale: function (v) + { + return this.scaleXYZ(v.x, v.y, v.z); + }, + + /** + * 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 {this} 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. + * + * @method Phaser.Math.Matrix4#makeRotationAxis + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis. + * @param {number} angle - The rotation angle in radians. + * + * @return {this} This Matrix4. + */ + makeRotationAxis: function (axis, angle) + { + // Based on http://www.gamedev.net/reference/articles/article1199.asp + + var c = Math.cos(angle); + var s = Math.sin(angle); + var t = 1 - c; + var x = axis.x; + var y = axis.y; + var z = axis.z; + var tx = t * x; + var ty = t * y; + + return this.setValues( + tx * x + c, tx * y - s * z, tx * z + s * y, 0, + tx * y + s * z, ty * y + c, ty * z - s * x, 0, + tx * z - s * y, ty * z + s * x, t * z * z + c, 0, + 0, 0, 0, 1 + ); + }, + + /** + * Apply a rotation transformation to this Matrix. + * + * @method Phaser.Math.Matrix4#rotate + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * @param {Phaser.Math.Vector3} axis - The axis to rotate upon. + * + * @return {this} This Matrix4. + */ + rotate: function (rad, axis) + { + var a = this.val; + var x = axis.x; + var y = axis.y; + var z = axis.z; + var len = Math.sqrt(x * x + y * y + z * z); + + if (Math.abs(len) < EPSILON) + { + return this; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + + var s = Math.sin(rad); + var c = Math.cos(rad); + var t = 1 - c; + + 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]; + + // Construct the elements of the rotation matrix + var b00 = x * x * t + c; + var b01 = y * x * t + z * s; + var b02 = z * x * t - y * s; + + var b10 = x * y * t - z * s; + var b11 = y * y * t + c; + var b12 = z * y * t + x * s; + + var b20 = x * z * t + y * s; + var b21 = y * z * t - x * s; + var b22 = z * z * t + c; + + // Perform rotation-specific matrix multiplication + return this.setValues( + a00 * b00 + a10 * b01 + a20 * b02, + a01 * b00 + a11 * b01 + a21 * b02, + a02 * b00 + a12 * b01 + a22 * b02, + a03 * b00 + a13 * b01 + a23 * b02, + a00 * b10 + a10 * b11 + a20 * b12, + a01 * b10 + a11 * b11 + a21 * b12, + a02 * b10 + a12 * b11 + a22 * b12, + a03 * b10 + a13 * b11 + a23 * b12, + a00 * b20 + a10 * b21 + a20 * b22, + a01 * b20 + a11 * b21 + a21 * b22, + a02 * b20 + a12 * b21 + a22 * b22, + a03 * b20 + a13 * b21 + a23 * b22, + a30, a31, a32, a33 + ); + }, + + /** + * Rotate this matrix on its X axis. + * + * @method Phaser.Math.Matrix4#rotateX + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * + * @return {this} This Matrix4. + */ + rotateX: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + 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]; + + // Perform axis-specific matrix multiplication + a[4] = a10 * c + a20 * s; + a[5] = a11 * c + a21 * s; + a[6] = a12 * c + a22 * s; + a[7] = a13 * c + a23 * s; + a[8] = a20 * c - a10 * s; + a[9] = a21 * c - a11 * s; + a[10] = a22 * c - a12 * s; + a[11] = a23 * c - a13 * s; + + return this; + }, + + /** + * Rotate this matrix on its Y axis. + * + * @method Phaser.Math.Matrix4#rotateY + * @since 3.0.0 + * + * @param {number} rad - The angle to rotate by, in radians. + * + * @return {this} This Matrix4. + */ + rotateY: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + + // Perform axis-specific matrix multiplication + a[0] = a00 * c - a20 * s; + a[1] = a01 * c - a21 * s; + a[2] = a02 * c - a22 * s; + a[3] = a03 * c - a23 * s; + a[8] = a00 * s + a20 * c; + a[9] = a01 * s + a21 * c; + a[10] = a02 * s + a22 * c; + a[11] = a03 * s + a23 * c; + + return this; + }, + + /** + * Rotate this matrix on its Z axis. + * + * @method Phaser.Math.Matrix4#rotateZ + * @since 3.0.0 + * + * @param {number} rad - The angle to rotate by, in radians. + * + * @return {this} This Matrix4. + */ + rotateZ: function (rad) + { + var a = this.val; + var s = Math.sin(rad); + var c = Math.cos(rad); + + 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]; + + // Perform axis-specific matrix multiplication + a[0] = a00 * c + a10 * s; + a[1] = a01 * c + a11 * s; + a[2] = a02 * c + a12 * s; + a[3] = a03 * c + a13 * s; + a[4] = a10 * c - a00 * s; + a[5] = a11 * c - a01 * s; + a[6] = a12 * c - a02 * s; + a[7] = a13 * c - a03 * s; + + return this; + }, + + /** + * Set the values of this Matrix from the given rotation Quaternion and translation Vector. + * + * @method Phaser.Math.Matrix4#fromRotationTranslation + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from. + * @param {Phaser.Math.Vector3} v - The Vector to set translation from. + * + * @return {this} This Matrix4. + */ + fromRotationTranslation: function (q, v) + { + // Quaternion math + 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; + + return this.setValues( + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + v.x, + v.y, + v.z, + 1 + ); + }, + + /** + * Set the values of this Matrix from the given Quaternion. + * + * @method Phaser.Math.Matrix4#fromQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. + * + * @return {this} This Matrix4. + */ + 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; + + return this.setValues( + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + 0, + 0, + 0, + 1 + ); + }, + + /** + * Generate a frustum matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#frustum + * @since 3.0.0 + * + * @param {number} left - The left bound of the frustum. + * @param {number} right - The right bound of the frustum. + * @param {number} bottom - The bottom bound of the frustum. + * @param {number} top - The top bound of the frustum. + * @param {number} near - The near bound of the frustum. + * @param {number} far - The far bound of the frustum. + * + * @return {this} This Matrix4. + */ + frustum: function (left, right, bottom, top, near, far) + { + var rl = 1 / (right - left); + var tb = 1 / (top - bottom); + var nf = 1 / (near - far); + + return this.setValues( + (near * 2) * rl, + 0, + 0, + 0, + + 0, + (near * 2) * tb, + 0, + 0, + + (right + left) * rl, + (top + bottom) * tb, + (far + near) * nf, + -1, + + 0, + 0, + (far * near * 2) * nf, + 0 + ); + }, + + /** + * Generate a perspective projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#perspective + * @since 3.0.0 + * + * @param {number} fovy - Vertical field of view in radians + * @param {number} aspect - Aspect ratio. Typically viewport width /height. + * @param {number} near - Near bound of the frustum. + * @param {number} far - Far bound of the frustum. + * + * @return {this} This Matrix4. + */ + perspective: function (fovy, aspect, near, far) + { + var f = 1.0 / Math.tan(fovy / 2); + var nf = 1 / (near - far); + + return this.setValues( + f / aspect, + 0, + 0, + 0, + + 0, + f, + 0, + 0, + + 0, + 0, + (far + near) * nf, + -1, + + 0, + 0, + (2 * far * near) * nf, + 0 + ); + }, + + /** + * Generate a perspective projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#perspectiveLH + * @since 3.0.0 + * + * @param {number} width - The width of the frustum. + * @param {number} height - The height of the frustum. + * @param {number} near - Near bound of the frustum. + * @param {number} far - Far bound of the frustum. + * + * @return {this} This Matrix4. + */ + perspectiveLH: function (width, height, near, far) + { + return this.setValues( + (2 * near) / width, + 0, + 0, + 0, + + 0, + (2 * near) / height, + 0, + 0, + + 0, + 0, + -far / (near - far), + 1, + + 0, + 0, + (near * far) / (near - far), + 0 + ); + }, + + /** + * Generate an orthogonal projection matrix with the given bounds. + * + * @method Phaser.Math.Matrix4#ortho + * @since 3.0.0 + * + * @param {number} left - The left bound of the frustum. + * @param {number} right - The right bound of the frustum. + * @param {number} bottom - The bottom bound of the frustum. + * @param {number} top - The top bound of the frustum. + * @param {number} near - The near bound of the frustum. + * @param {number} far - The far bound of the frustum. + * + * @return {this} This Matrix4. + */ + ortho: function (left, right, bottom, top, near, far) + { + var lr = left - right; + var bt = bottom - top; + var nf = near - far; + + // Avoid division by zero + lr = (lr === 0) ? lr : 1 / lr; + bt = (bt === 0) ? bt : 1 / bt; + nf = (nf === 0) ? nf : 1 / nf; + + return this.setValues( + -2 * lr, + 0, + 0, + 0, + + 0, + -2 * bt, + 0, + 0, + + 0, + 0, + 2 * nf, + 0, + + (left + right) * lr, + (top + bottom) * bt, + (far + near) * nf, + 1 + ); + }, + + /** + * Generate a right-handed look-at matrix with the given eye position, target and up axis. + * + * @method Phaser.Math.Matrix4#lookAtRH + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} eye - Position of the viewer. + * @param {Phaser.Math.Vector3} target - Point the viewer is looking at. + * @param {Phaser.Math.Vector3} up - vec3 pointing up. + * + * @return {this} This Matrix4. + */ + lookAtRH: function (eye, target, up) + { + var m = this.val; + + _z.subVectors(eye, target); + + if (_z.getLengthSquared() === 0) + { + // eye and target are in the same position + _z.z = 1; + } + + _z.normalize(); + _x.crossVectors(up, _z); + + if (_x.getLengthSquared() === 0) + { + // up and z are parallel + + if (Math.abs(up.z) === 1) + { + _z.x += 0.0001; + } + else + { + _z.z += 0.0001; + } + + _z.normalize(); + _x.crossVectors(up, _z); + } + + _x.normalize(); + _y.crossVectors(_z, _x); + + m[0] = _x.x; + m[1] = _x.y; + m[2] = _x.z; + m[4] = _y.x; + m[5] = _y.y; + m[6] = _y.z; + m[8] = _z.x; + m[9] = _z.y; + m[10] = _z.z; + + return this; + }, + + /** + * Generate a look-at matrix with the given eye position, focal point, and up axis. + * + * @method Phaser.Math.Matrix4#lookAt + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} eye - Position of the viewer + * @param {Phaser.Math.Vector3} center - Point the viewer is looking at + * @param {Phaser.Math.Vector3} up - vec3 pointing up. + * + * @return {this} This Matrix4. + */ + lookAt: function (eye, center, up) + { + var eyex = eye.x; + var eyey = eye.y; + var eyez = eye.z; + + var upx = up.x; + var upy = up.y; + var upz = up.z; + + var centerx = center.x; + var centery = center.y; + var centerz = center.z; + + if (Math.abs(eyex - centerx) < EPSILON && + Math.abs(eyey - centery) < EPSILON && + Math.abs(eyez - centerz) < EPSILON) + { + return this.identity(); + } + + var z0 = eyex - centerx; + var z1 = eyey - centery; + var z2 = eyez - centerz; + + var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); + + z0 *= len; + z1 *= len; + z2 *= len; + + var x0 = upy * z2 - upz * z1; + var x1 = upz * z0 - upx * z2; + var x2 = upx * z1 - upy * z0; + + len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); + + if (!len) + { + x0 = 0; + x1 = 0; + x2 = 0; + } + else + { + len = 1 / len; + x0 *= len; + x1 *= len; + x2 *= len; + } + + var y0 = z1 * x2 - z2 * x1; + var y1 = z2 * x0 - z0 * x2; + var y2 = z0 * x1 - z1 * x0; + + len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); + + if (!len) + { + y0 = 0; + y1 = 0; + y2 = 0; + } + else + { + len = 1 / len; + y0 *= len; + y1 *= len; + y2 *= len; + } + + return this.setValues( + x0, + y0, + z0, + 0, + + x1, + y1, + z1, + 0, + + x2, + y2, + z2, + 0, + + -(x0 * eyex + x1 * eyey + x2 * eyez), + -(y0 * eyex + y1 * eyey + y2 * eyez), + -(z0 * eyex + z1 * eyey + z2 * eyez), + 1 + ); + }, + + /** + * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. + * + * @method Phaser.Math.Matrix4#yawPitchRoll + * @since 3.0.0 + * + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. + * + * @return {this} This Matrix4. + */ + yawPitchRoll: function (yaw, pitch, roll) + { + this.zero(); + _tempMat1.zero(); + _tempMat2.zero(); + + var m0 = this.val; + var m1 = _tempMat1.val; + var m2 = _tempMat2.val; + + // Rotate Z + var s = Math.sin(roll); + var c = Math.cos(roll); + + m0[10] = 1; + m0[15] = 1; + m0[0] = c; + m0[1] = s; + m0[4] = -s; + m0[5] = c; + + // Rotate X + s = Math.sin(pitch); + c = Math.cos(pitch); + + m1[0] = 1; + m1[15] = 1; + m1[5] = c; + m1[10] = c; + m1[9] = -s; + m1[6] = s; + + // Rotate Y + s = Math.sin(yaw); + c = Math.cos(yaw); + + m2[5] = 1; + m2[15] = 1; + m2[0] = c; + m2[2] = -s; + m2[8] = s; + m2[10] = c; + + this.multiplyLocal(_tempMat1); + this.multiplyLocal(_tempMat2); + + return this; + }, + + /** + * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. + * + * @method Phaser.Math.Matrix4#setWorldMatrix + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix. + * @param {Phaser.Math.Vector3} position - The position of the world matrix. + * @param {Phaser.Math.Vector3} scale - The scale of the world matrix. + * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix. + * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix. + * + * @return {this} This Matrix4. + */ + setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix) + { + this.yawPitchRoll(rotation.y, rotation.x, rotation.z); + + _tempMat1.scaling(scale.x, scale.y, scale.z); + _tempMat2.xyz(position.x, position.y, position.z); + + this.multiplyLocal(_tempMat1); + this.multiplyLocal(_tempMat2); + + if (viewMatrix) + { + this.multiplyLocal(viewMatrix); + } + + if (projectionMatrix) + { + this.multiplyLocal(projectionMatrix); + } + + return this; + }, + + /** + * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4. + * + * @method Phaser.Math.Matrix4#multiplyToMat4 + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one. + * @param {Phaser.Math.Matrix4} out - The receiving Matrix. + * + * @return {Phaser.Math.Matrix4} This `out` Matrix4. + */ + multiplyToMat4: function (src, out) + { + var a = this.val; + var b = src.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 = b[0]; + var b01 = b[1]; + var b02 = b[2]; + var b03 = b[3]; + var b10 = b[4]; + var b11 = b[5]; + var b12 = b[6]; + var b13 = b[7]; + var b20 = b[8]; + var b21 = b[9]; + var b22 = b[10]; + var b23 = b[11]; + var b30 = b[12]; + var b31 = b[13]; + var b32 = b[14]; + var b33 = b[15]; + + return out.setValues( + b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, + b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31, + b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32, + b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33, + + b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, + b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, + b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, + b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, + + b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, + b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, + b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, + b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, + + b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, + b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, + b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, + b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 + ); + }, + + /** + * Takes the rotation and position vectors and builds this Matrix4 from them. + * + * @method Phaser.Math.Matrix4#fromRotationXYTranslation + * @since 3.50.0 + * + * @param {Phaser.Math.Vector3} rotation - The rotation vector. + * @param {Phaser.Math.Vector3} position - The position vector. + * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`) + * + * @return {this} This Matrix4. + */ + fromRotationXYTranslation: function (rotation, position, translateFirst) + { + var x = position.x; + var y = position.y; + var z = position.z; + + var sx = Math.sin(rotation.x); + var cx = Math.cos(rotation.x); + + var sy = Math.sin(rotation.y); + var cy = Math.cos(rotation.y); + + var a30 = x; + var a31 = y; + var a32 = z; + + // Rotate X + + var b21 = -sx; + + // Rotate Y + + var c01 = 0 - b21 * sy; + + var c02 = 0 - cx * sy; + + var c21 = b21 * cy; + + var c22 = cx * cy; + + // Translate + if (!translateFirst) + { + // a30 = cy * x + 0 * y + sy * z; + a30 = cy * x + sy * z; + a31 = c01 * x + cx * y + c21 * z; + a32 = c02 * x + sx * y + c22 * z; + } + + return this.setValues( + cy, + c01, + c02, + 0, + 0, + cx, + sx, + 0, + sy, + c21, + c22, + 0, + a30, + a31, + a32, + 1 + ); + }, + + /** + * Returns the maximum axis scale from this Matrix4. + * + * @method Phaser.Math.Matrix4#getMaxScaleOnAxis + * @since 3.50.0 + * + * @return {number} The maximum axis scale. + */ + getMaxScaleOnAxis: function () + { + var m = this.val; + + var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2]; + var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6]; + var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10]; + + return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); + } + +}); + +/** + * @ignore + */ +var _tempMat1 = new Matrix4(); + +/** + * @ignore + */ +var _tempMat2 = new Matrix4(); + +/** + * @ignore + */ +var _x = new Vector3(); + +/** + * @ignore + */ +var _y = new Vector3(); + +/** + * @ignore + */ +var _z = new Vector3(); + +module.exports = Matrix4; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Scenes.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(187), + BOOT: __webpack_require__(188), + CREATE: __webpack_require__(189), + DESTROY: __webpack_require__(190), + PAUSE: __webpack_require__(191), + POST_UPDATE: __webpack_require__(192), + PRE_RENDER: __webpack_require__(193), + PRE_UPDATE: __webpack_require__(194), + READY: __webpack_require__(195), + REMOVED_FROM_SCENE: __webpack_require__(196), + RENDER: __webpack_require__(197), + RESUME: __webpack_require__(198), + SHUTDOWN: __webpack_require__(199), + SLEEP: __webpack_require__(200), + START: __webpack_require__(201), + TRANSITION_COMPLETE: __webpack_require__(202), + TRANSITION_INIT: __webpack_require__(203), + TRANSITION_OUT: __webpack_require__(204), + TRANSITION_START: __webpack_require__(205), + TRANSITION_WAKE: __webpack_require__(206), + UPDATE: __webpack_require__(207), + WAKE: __webpack_require__(208) + +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(10); +var Events = __webpack_require__(47); +var GetFastValue = __webpack_require__(9); +var GetURL = __webpack_require__(48); +var MergeXHRSettings = __webpack_require__(49); +var XHRLoader = __webpack_require__(222); +var XHRSettings = __webpack_require__(50); + +/** + * @classdesc + * The base File class used by all File Types that the Loader can support. + * 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. + * + * @class File + * @memberof Phaser.Loader + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File. + * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type. + */ +var File = new Class({ + + initialize: + + function File (loader, fileConfig) + { + /** + * A reference to the Loader that is going to load this file. + * + * @name Phaser.Loader.File#loader + * @type {Phaser.Loader.LoaderPlugin} + * @since 3.0.0 + */ + this.loader = loader; + + /** + * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. + * + * @name Phaser.Loader.File#cache + * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)} + * @since 3.7.0 + */ + this.cache = GetFastValue(fileConfig, 'cache', false); + + /** + * The file type string (image, json, etc) for sorting within the Loader. + * + * @name Phaser.Loader.File#type + * @type {string} + * @since 3.0.0 + */ + this.type = GetFastValue(fileConfig, 'type', false); + + if (!this.type) + { + throw new Error('Invalid File type: ' + this.type); + } + + /** + * Unique cache key (unique within its file type) + * + * @name Phaser.Loader.File#key + * @type {string} + * @since 3.0.0 + */ + this.key = GetFastValue(fileConfig, 'key', false); + + var loadKey = this.key; + + if (loader.prefix && loader.prefix !== '') + { + this.key = loader.prefix + loadKey; + } + + if (!this.key) + { + throw new Error('Invalid File key: ' + this.key); + } + + var url = GetFastValue(fileConfig, 'url'); + + if (url === undefined) + { + url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); + } + else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) + { + url = loader.path + url; + } + + /** + * The URL of the file, not including baseURL. + * + * 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 {object|string} + * @since 3.0.0 + */ + this.url = url; + + /** + * The final URL this file will load from, including baseURL and path. + * Set automatically when the Loader calls 'load' on this file. + * + * @name Phaser.Loader.File#src + * @type {string} + * @since 3.0.0 + */ + this.src = ''; + + /** + * The merged XHRSettings for this file. + * + * @name Phaser.Loader.File#xhrSettings + * @type {Phaser.Types.Loader.XHRSettingsObject} + * @since 3.0.0 + */ + this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined)); + + if (GetFastValue(fileConfig, 'xhrSettings', false)) + { + this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {})); + } + + /** + * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. + * + * @name Phaser.Loader.File#xhrLoader + * @type {?XMLHttpRequest} + * @since 3.0.0 + */ + this.xhrLoader = null; + + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.File#state + * @type {number} + * @since 3.0.0 + */ + this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING; + + /** + * The total size of this file. + * Set by onProgress and only if loading via XHR. + * + * @name Phaser.Loader.File#bytesTotal + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.bytesTotal = 0; + + /** + * Updated as the file loads. + * Only set if loading via XHR. + * + * @name Phaser.Loader.File#bytesLoaded + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.bytesLoaded = -1; + + /** + * A percentage value between 0 and 1 indicating how much of this file has loaded. + * Only set if loading via XHR. + * + * @name Phaser.Loader.File#percentComplete + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.percentComplete = -1; + + /** + * For CORs based loading. + * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) + * + * @name Phaser.Loader.File#crossOrigin + * @type {(string|undefined)} + * @since 3.0.0 + */ + this.crossOrigin = undefined; + + /** + * The processed file data, stored here after the file has loaded. + * + * @name Phaser.Loader.File#data + * @type {*} + * @since 3.0.0 + */ + this.data = undefined; + + /** + * A config object that can be used by file types to store transitional data. + * + * @name Phaser.Loader.File#config + * @type {*} + * @since 3.0.0 + */ + this.config = GetFastValue(fileConfig, 'config', {}); + + /** + * If this is a multipart file, i.e. an atlas and its json together, then this is a reference + * to the parent MultiFile. Set and used internally by the Loader or specific file types. + * + * @name Phaser.Loader.File#multiFile + * @type {?Phaser.Loader.MultiFile} + * @since 3.7.0 + */ + this.multiFile; + + /** + * Does this file have an associated linked file? Such as an image and a normal map. + * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't + * actually bound by data, where-as a linkFile is. + * + * @name Phaser.Loader.File#linkFile + * @type {?Phaser.Loader.File} + * @since 3.7.0 + */ + this.linkFile; + }, + + /** + * Links this File with another, so they depend upon each other for loading and processing. + * + * @method Phaser.Loader.File#setLink + * @since 3.7.0 + * + * @param {Phaser.Loader.File} fileB - The file to link to this one. + */ + setLink: function (fileB) + { + this.linkFile = fileB; + + fileB.linkFile = this; + }, + + /** + * Resets the XHRLoader instance this file is using. + * + * @method Phaser.Loader.File#resetXHR + * @since 3.0.0 + */ + resetXHR: function () + { + if (this.xhrLoader) + { + this.xhrLoader.onload = undefined; + this.xhrLoader.onerror = undefined; + this.xhrLoader.onprogress = undefined; + } + }, + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + * + * @method Phaser.Loader.File#load + * @since 3.0.0 + */ + load: function () + { + if (this.state === CONST.FILE_POPULATED) + { + // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL + this.loader.nextFile(this, true); + } + else + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) + { + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + // 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 + + this.xhrLoader = XHRLoader(this, this.loader.xhr); + } + } + }, + + /** + * Called when the file finishes loading, is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onLoad + * @since 3.0.0 + * + * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. + * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load. + */ + onLoad: function (xhr, event) + { + var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme) + { + return xhr.responseURL.indexOf(scheme) === 0; + }); + + var localFileOk = (isLocalFile && event.target.status === 0); + + var success = !(event.target && event.target.status !== 200) || localFileOk; + + // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called. + if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) + { + success = false; + } + + this.state = CONST.FILE_LOADED; + + this.resetXHR(); + + this.loader.nextFile(this, success); + }, + + /** + * Called if the file errors while loading, is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onError + * @since 3.0.0 + * + * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. + * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. + */ + onError: function () + { + this.resetXHR(); + + this.loader.nextFile(this, false); + }, + + /** + * Called during the file load progress. Is sent a DOM ProgressEvent. + * + * @method Phaser.Loader.File#onProgress + * @fires Phaser.Loader.Events#FILE_PROGRESS + * @since 3.0.0 + * + * @param {ProgressEvent} event - The DOM ProgressEvent. + */ + onProgress: function (event) + { + if (event.lengthComputable) + { + this.bytesLoaded = event.loaded; + this.bytesTotal = event.total; + + this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1); + + this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete); + } + }, + + /** + * Usually overridden by the FileTypes and is called by Loader.nextFile. + * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. + * + * @method Phaser.Loader.File#onProcess + * @since 3.0.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.onProcessComplete(); + }, + + /** + * Called when the File has completed processing. + * Checks on the state of its multifile, if set. + * + * @method Phaser.Loader.File#onProcessComplete + * @since 3.7.0 + */ + onProcessComplete: function () + { + this.state = CONST.FILE_COMPLETE; + + if (this.multiFile) + { + this.multiFile.onFileComplete(this); + } + + this.loader.fileProcessComplete(this); + }, + + /** + * Called when the File has completed processing but it generated an error. + * Checks on the state of its multifile, if set. + * + * @method Phaser.Loader.File#onProcessError + * @since 3.7.0 + */ + onProcessError: function () + { + // eslint-disable-next-line no-console + console.error('Failed to process file: %s "%s"', this.type, this.key); + + this.state = CONST.FILE_ERRORED; + + if (this.multiFile) + { + this.multiFile.onFileFailed(this); + } + + this.loader.fileProcessComplete(this); + }, + + /** + * Checks if a key matching the one used by this file exists in the target Cache or not. + * This is called automatically by the LoaderPlugin to decide if the file can be safely + * loaded or will conflict. + * + * @method Phaser.Loader.File#hasCacheConflict + * @since 3.7.0 + * + * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`. + */ + hasCacheConflict: function () + { + return (this.cache && this.cache.exists(this.key)); + }, + + /** + * Adds this file to its target cache upon successful loading and processing. + * This method is often overridden by specific file types. + * + * @method Phaser.Loader.File#addToCache + * @since 3.7.0 + */ + addToCache: function () + { + if (this.cache && this.data) + { + this.cache.add(this.key, this.data); + } + }, + + /** + * Called once the file has been added to its cache and is now ready for deletion from the Loader. + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.File#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.7.0 + */ + pendingDestroy: function (data) + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + if (data === undefined) { data = this.data; } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type, data); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); + + this.loader.flagForRemoval(this); + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this File and any references it holds. + * + * @method Phaser.Loader.File#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.loader = null; + this.cache = null; + this.xhrSettings = null; + this.multiFile = null; + this.linkFile = null; + this.data = null; + } + +}); + +/** + * Static method for creating object URL using URL API and setting it as image 'src' attribute. + * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. + * + * @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. + */ +File.createObjectURL = function (image, blob, defaultType) +{ + if (typeof URL === 'function') + { + image.src = URL.createObjectURL(blob); + } + else + { + var reader = new FileReader(); + + reader.onload = function () + { + image.removeAttribute('crossOrigin'); + image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1]; + }; + + reader.onerror = image.onerror; + + reader.readAsDataURL(blob); + } +}; + +/** + * Static method for releasing an existing object URL which was previously created + * by calling {@link File#createObjectURL} method. + * + * @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) +{ + if (typeof URL === 'function') + { + URL.revokeObjectURL(image.src); + } +}; + +module.exports = File; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var types = {}; + +/** + * @namespace Phaser.Loader.FileTypesManager + */ + +var FileTypesManager = { + + /** + * Static method called when a LoaderPlugin is created. + * + * Loops through the local types object and injects all of them as + * properties into the LoaderPlugin instance. + * + * @method Phaser.Loader.FileTypesManager.install + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. + */ + install: function (loader) + { + for (var key in types) + { + loader[key] = types[key]; + } + }, + + /** + * Static method called directly by the File Types. + * + * The key is a reference to the function used to load the files via the Loader, i.e. `image`. + * + * @method Phaser.Loader.FileTypesManager.register + * @since 3.0.0 + * + * @param {string} key - The key that will be used as the method name in the LoaderPlugin. + * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. + */ + register: function (key, factoryFunction) + { + types[key] = factoryFunction; + }, + + /** + * Removed all associated file types. + * + * @method Phaser.Loader.FileTypesManager.destroy + * @since 3.0.0 + */ + destroy: function () + { + types = {}; + } + +}; + +module.exports = FileTypesManager; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var MATH_CONST = __webpack_require__(4); +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 temporary quad value cache. + * + * @name Phaser.GameObjects.Components.TransformMatrix#quad + * @type {Float32Array} + * @since 3.60.0 + */ + this.quad = new Float32Array(8); + }, + + /** + * 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) ? matrix : out.matrix; + + destinationMatrix[0] = (sourceA * localA) + (sourceB * localC); + destinationMatrix[1] = (sourceA * localB) + (sourceB * localD); + destinationMatrix[2] = (sourceC * localA) + (sourceD * localC); + destinationMatrix[3] = (sourceC * localB) + (sourceD * localD); + destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. + * + * @return {Phaser.Types.Math.Vector2Like} 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; + }, + + /** + * Performs the 8 calculations required to create the vertices of + * a quad based on this matrix and the given x/y/xw/yh values. + * + * The result is stored in `TransformMatrix.quad`, which is returned + * from this method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setQuad + * @since 3.60.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} xw - The xw value. + * @param {number} yh - The yh value. + * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. + * + * @return {Float32Array} The quad Float32Array. + */ + setQuad: function (x, y, xw, yh, roundPixels, quad) + { + if (quad === undefined) { quad = this.quad; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var e = matrix[4]; + var f = matrix[5]; + + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; + + if (roundPixels) + { + quad.forEach(function (value, index) + { + quad[index] = Math.round(value); + }); + } + + return quad; + }, + + /** + * 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.quad = null; + this.decomposedMatrix = null; + } + +}); + +module.exports = TransformMatrix; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. This is an example matrix: + * + * ``` + * [ + * [ 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) || !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; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the operating system of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.os` from within any Scene. + * + * @typedef {object} Phaser.Device.OS + * @since 3.0.0 + * + * @property {boolean} android - Is running on android? + * @property {boolean} chromeOS - Is running on chromeOS? + * @property {boolean} cordova - Is the game running under Apache Cordova? + * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK? + * @property {boolean} desktop - Is running on a desktop? + * @property {boolean} ejecta - Is the game running under Ejecta? + * @property {boolean} electron - Is the game running under GitHub Electron? + * @property {boolean} iOS - Is running on iOS? + * @property {boolean} iPad - Is running on iPad? + * @property {boolean} iPhone - Is running on iPhone? + * @property {boolean} kindle - Is running on an Amazon Kindle? + * @property {boolean} linux - Is running on linux? + * @property {boolean} macOS - Is running on macOS? + * @property {boolean} node - Is the game running under Node.js? + * @property {boolean} nodeWebkit - Is the game running under Node-Webkit? + * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView + * @property {boolean} windows - Is running on windows? + * @property {boolean} windowsPhone - Is running on a Windows Phone? + * @property {number} iOSVersion - If running in iOS this will contain the major version number. + * @property {number} pixelRatio - PixelRatio of the host device? + */ +var OS = { + + android: false, + chromeOS: false, + cordova: false, + crosswalk: false, + desktop: false, + ejecta: false, + electron: false, + iOS: false, + iOSVersion: 0, + iPad: false, + iPhone: false, + kindle: false, + linux: false, + macOS: false, + node: false, + nodeWebkit: false, + pixelRatio: 1, + webApp: false, + windows: false, + windowsPhone: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return OS; + } + + var ua = navigator.userAgent; + + if ((/Windows/).test(ua)) + { + OS.windows = true; + } + else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua))) + { + // Because iOS 13 identifies as Mac OS: + if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2) + { + OS.iOS = true; + OS.iPad = true; + + (navigator.appVersion).match(/Version\/(\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + } + else + { + OS.macOS = true; + } + } + else if ((/Android/).test(ua)) + { + OS.android = true; + } + else if ((/Linux/).test(ua)) + { + OS.linux = true; + } + else if ((/iP[ao]d|iPhone/i).test(ua)) + { + OS.iOS = true; + + (navigator.appVersion).match(/OS (\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + + OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1; + OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1; + } + else if ((/Kindle/).test(ua) || (/\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua)) + { + OS.kindle = true; + + // This will NOT detect early generations of Kindle Fire, I think there is no reliable way... + // E.g. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true" + } + else if ((/CrOS/).test(ua)) + { + OS.chromeOS = true; + } + + if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua)) + { + OS.android = false; + OS.iOS = false; + OS.macOS = false; + OS.windows = true; + OS.windowsPhone = true; + } + + var silk = (/Silk/).test(ua); + + if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS) + { + OS.desktop = true; + } + + // Windows Phone / Table reset + if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua)))) + { + OS.desktop = false; + } + + // WebApp mode in iOS + if (navigator.standalone) + { + OS.webApp = true; + } + + if (typeof importScripts !== 'function') + { + if (window.cordova !== undefined) + { + OS.cordova = true; + } + + if (window.ejecta !== undefined) + { + OS.ejecta = true; + } + } + + if (typeof process !== 'undefined' && process.versions && process.versions.node) + { + OS.node = true; + } + + if (OS.node && typeof process.versions === 'object') + { + OS.nodeWebkit = !!process.versions['node-webkit']; + + OS.electron = !!process.versions.electron; + } + + if ((/Crosswalk/).test(ua)) + { + OS.crosswalk = true; + } + + OS.pixelRatio = window['devicePixelRatio'] || 1; + + return OS; +} + +module.exports = init(); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(300))) + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Contains = __webpack_require__(318); +var GetPoint = __webpack_require__(66); +var GetPoints = __webpack_require__(319); +var GEOM_CONST = __webpack_require__(30); +var Line = __webpack_require__(320); +var Random = __webpack_require__(325); + +/** + * @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 {number} + * @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 {number} 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; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {number} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {number} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {number} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {number} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {number} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {number} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|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; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|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; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Factorial = __webpack_require__(37); + +/** + * 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; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 Matrix3 = __webpack_require__(45); +var NOOP = __webpack_require__(2); +var Vector3 = __webpack_require__(15); + +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=0] - The x component. + * @param {number} [y=0] - The y component. + * @param {number} [z=0] - The z component. + * @param {number} [w=1] - 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 + * @private + * @since 3.50.0 + */ + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_y + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_z + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#_w + * @type {number} + * @default 0 + * @private + * @since 3.50.0 + */ + + /** + * This callback is invoked, if set, each time a value in this quaternion is changed. + * The callback is passed one argument, a reference to this quaternion. + * + * @name Phaser.Math.Quaternion#onChangeCallback + * @type {function} + * @since 3.50.0 + */ + this.onChangeCallback = NOOP; + + this.set(x, y, z, w); + }, + + /** + * The x component of this Quaternion. + * + * @name Phaser.Math.Quaternion#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + x: { + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + + this.onChangeCallback(this); + } + }, + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + y: { + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + + this.onChangeCallback(this); + } + }, + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + z: { + get: function () + { + return this._z; + }, + + set: function (value) + { + this._z = value; + + this.onChangeCallback(this); + } + }, + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + w: { + get: function () + { + return this._w; + }, + + set: function (value) + { + this._w = value; + + this.onChangeCallback(this); + } + }, + + /** + * 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) + { + return this.set(src); + }, + + /** + * Set the components of this Quaternion and optionally call the `onChangeCallback`. + * + * @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. + * @param {boolean} [update=true] - Call the `onChangeCallback`? + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + set: function (x, y, z, w, update) + { + if (update === undefined) { update = true; } + + 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; + } + + if (update) + { + this.onChangeCallback(this); + } + + 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; + + this.onChangeCallback(this); + + 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; + + this.onChangeCallback(this); + + 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; + + this.onChangeCallback(this); + + 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; + } + + this.onChangeCallback(this); + + 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; + + return this.set( + ax + t * (v.x - ax), + ay + t * (v.y - ay), + az + t * (v.z - az), + aw + t * (v.w - aw) + ); + }, + + /** + * 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) + { + return this.set(0, 0, 0, 1); + } + 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 () + { + return this.set(0, 0, 0, 1); + }, + + /** + * 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); + + return this.set( + s * axis.x, + s * axis.y, + s * axis.z, + Math.cos(rad) + ); + }, + + /** + * 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; + + return this.set( + ax * bw + aw * bx + ay * bz - az * by, + ay * bw + aw * by + az * bx - ax * bz, + az * bw + aw * bz + ax * by - ay * bx, + aw * bw - ax * bx - ay * by - az * bz + ); + }, + + /** + * 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 + return this.set( + scale0 * ax + scale1 * bx, + scale0 * ay + scale1 * by, + scale0 * az + scale1 * bz, + scale0 * aw + scale1 * bw + ); + }, + + /** + * 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; + + return this.set( + -a0 * invDot, + -a1 * invDot, + -a2 * invDot, + a3 * invDot + ); + }, + + /** + * 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; + + this.onChangeCallback(this); + + 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); + + return this.set( + ax * bw + aw * bx, + ay * bw + az * bx, + az * bw - ay * bx, + aw * bw - ax * bx + ); + }, + + /** + * 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); + + return this.set( + ax * bw - az * by, + ay * bw + aw * by, + az * bw + ax * by, + aw * bw - ay * by + ); + }, + + /** + * 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); + + return this.set( + ax * bw + ay * bz, + ay * bw - ax * bz, + az * bw + aw * bz, + aw * bw - az * bz + ); + }, + + /** + * 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; + }, + + /** + * Set this Quaternion from the given Euler, based on Euler order. + * + * @method Phaser.Math.Quaternion#setFromEuler + * @since 3.50.0 + * + * @param {Phaser.Math.Euler} euler - The Euler to convert from. + * @param {boolean} [update=true] - Run the `onChangeCallback`? + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setFromEuler: function (euler, update) + { + var x = euler.x / 2; + var y = euler.y / 2; + var z = euler.z / 2; + + var c1 = Math.cos(x); + var c2 = Math.cos(y); + var c3 = Math.cos(z); + + var s1 = Math.sin(x); + var s2 = Math.sin(y); + var s3 = Math.sin(z); + + switch (euler.order) + { + case 'XYZ': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'YXZ': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + + case 'ZXY': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'ZYX': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + + case 'YZX': + { + this.set( + s1 * c2 * c3 + c1 * s2 * s3, + c1 * s2 * c3 + s1 * c2 * s3, + c1 * c2 * s3 - s1 * s2 * c3, + c1 * c2 * c3 - s1 * s2 * s3, + update + ); + + break; + } + + case 'XZY': + { + this.set( + s1 * c2 * c3 - c1 * s2 * s3, + c1 * s2 * c3 - s1 * c2 * s3, + c1 * c2 * s3 + s1 * s2 * c3, + c1 * c2 * c3 + s1 * s2 * s3, + update + ); + + break; + } + } + + return this; + }, + + /** + * Sets the rotation of this Quaternion from the given Matrix4. + * + * @method Phaser.Math.Quaternion#setFromRotationMatrix + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setFromRotationMatrix: function (mat4) + { + var m = mat4.val; + + var m11 = m[0]; + var m12 = m[4]; + var m13 = m[8]; + var m21 = m[1]; + var m22 = m[5]; + var m23 = m[9]; + var m31 = m[2]; + var m32 = m[6]; + var m33 = m[10]; + + var trace = m11 + m22 + m33; + var s; + + if (trace > 0) + { + s = 0.5 / Math.sqrt(trace + 1.0); + + this.set( + (m32 - m23) * s, + (m13 - m31) * s, + (m21 - m12) * s, + 0.25 / s + ); + } + else if (m11 > m22 && m11 > m33) + { + s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); + + this.set( + 0.25 * s, + (m12 + m21) / s, + (m13 + m31) / s, + (m32 - m23) / s + ); + } + else if (m22 > m33) + { + s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); + + this.set( + (m12 + m21) / s, + 0.25 * s, + (m23 + m32) / s, + (m13 - m31) / s + ); + } + else + { + s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); + + this.set( + (m13 + m31) / s, + (m23 + m32) / s, + 0.25 * s, + (m21 - m12) / s + ); + } + + 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; + } + + this.onChangeCallback(this); + + return this; + } + +}); + +module.exports = Quaternion; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Loader.Events + */ + +module.exports = { + + ADD: __webpack_require__(212), + COMPLETE: __webpack_require__(213), + FILE_COMPLETE: __webpack_require__(214), + FILE_KEY_COMPLETE: __webpack_require__(215), + FILE_LOAD_ERROR: __webpack_require__(216), + FILE_LOAD: __webpack_require__(217), + FILE_PROGRESS: __webpack_require__(218), + POST_PROCESS: __webpack_require__(219), + PROGRESS: __webpack_require__(220), + START: __webpack_require__(221) + +}; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a File and a baseURL value this returns the URL the File will use to download from. + * + * @function Phaser.Loader.GetURL + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - The File object. + * @param {string} baseURL - A default base URL. + * + * @return {string} The URL the File will use. + */ +var GetURL = function (file, baseURL) +{ + if (!file.url) + { + return false; + } + + if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) + { + return file.url; + } + else + { + return baseURL + file.url; + } +}; + +module.exports = GetURL; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Extend = __webpack_require__(19); +var XHRSettings = __webpack_require__(50); + +/** + * Takes two XHRSettings Objects and creates a new XHRSettings object from them. + * + * The new object is seeded by the values given in the global settings, but any setting in + * the local object overrides the global ones. + * + * @function Phaser.Loader.MergeXHRSettings + * @since 3.0.0 + * + * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object. + * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object. + * + * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object. + */ +var MergeXHRSettings = function (global, local) +{ + var output = (global === undefined) ? XHRSettings() : Extend({}, global); + + if (local) + { + for (var setting in local) + { + if (local[setting] !== undefined) + { + output[setting] = local[setting]; + } + } + } + + return output; +}; + +module.exports = MergeXHRSettings; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Creates an XHRSettings Object with default values. + * + * @function Phaser.Loader.XHRSettings + * @since 3.0.0 + * + * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'. + * @param {boolean} [async=true] - Should the XHR request use async or not? + * @param {string} [user=''] - Optional username for the XHR request. + * @param {string} [password=''] - Optional password for the XHR request. + * @param {number} [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, 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. + // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". + + return { + + // Ignored by the Loader, only used by File. + responseType: responseType, + + async: async, + + // credentials + user: user, + password: password, + + // timeout in ms (0 = no timeout) + timeout: timeout, + + // setRequestHeader + headers: undefined, + header: undefined, + headerValue: undefined, + requestedWith: false, + + // overrideMimeType + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials + + }; +}; + +module.exports = XHRSettings; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @private + * @default 0 + * @since 3.0.0 + */ + _depth: 0, + + /** + * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type. + * + * 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) + { + if (this.displayList) + { + this.displayList.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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type. + * + * @return {this} This Game Object instance. + */ + setDepth: function (value) + { + if (value === undefined) { value = 0; } + + this.depth = value; + + return this; + } + +}; + +module.exports = Depth; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(4); +var TransformMatrix = __webpack_require__(26); +var TransformXY = __webpack_require__(44); +var WrapAngle = __webpack_require__(33); +var WrapAngleDegrees = __webpack_require__(34); +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 = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Transform#hasTransformComponent + * @type {boolean} + * @readonly + * @default true + * @since 3.60.0 + */ + hasTransformComponent: true, + + /** + * 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 {number} + * @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; + }, + + /** + * Copies an object's coordinates to this Game Object's position. + * + * @method Phaser.GameObjects.Components.Transform#copyPosition + * @since 3.50.0 + * + * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. + * + * @return {this} This Game Object instance. + */ + copyPosition: function (source) + { + if (source.x !== undefined) { this.x = source.x; } + if (source.y !== undefined) { this.y = source.y; } + if (source.z !== undefined) { this.z = source.z; } + if (source.w !== undefined) { this.w = source.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; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var ComponentsToJSON = __webpack_require__(58); +var DataManager = __webpack_require__(227); +var EventEmitter = __webpack_require__(234); +var Events = __webpack_require__(59); +var SceneEvents = __webpack_require__(23); + +/** + * @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); + + /** + * A reference to the Scene to which this Game Object belongs. + * + * Game Objects can only belong to one Scene. + * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + * + * @name Phaser.GameObjects.GameObject#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene = scene; + + /** + * Holds a reference to the Display List that contains this Game Object. + * + * This is set automatically when this Game Object is added to a Scene or Layer. + * + * You should treat this property as being read-only. + * + * @name Phaser.GameObjects.GameObject#displayList + * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} + * @default null + * @since 3.50.0 + */ + this.displayList = null; + + /** + * 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 {(number|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 {number} + * @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 {number} + * @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; + + this.on(Events.ADDED_TO_SCENE, this.addedToScene, this); + this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this); + + // 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 {(number|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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 + * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * + * @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 () + { + this.scene.sys.input.disable(this); + + 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) + { + var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; + + return !(!listWillRender || 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 {number[]} 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)); + + child = parent; + + if (!parent.parentContainer) + { + break; + } + else + { + parent = parent.parentContainer; + } + } + + if (this.displayList) + { + indexes.unshift(this.displayList.getIndex(child)); + } + else + { + indexes.unshift(this.scene.sys.displayList.getIndex(child)); + } + + return indexes; + }, + + /** + * Adds this Game Object to the given Display List. + * + * If no Display List is specified, it will default to the Display List owned by the Scene to which + * this Game Object belongs. + * + * A Game Object can only exist on one Display List at any given time, but may move freely between them. + * + * If this Game Object is already on another Display List when this method is called, it will first + * be removed from it, before being added to the new list. + * + * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. + * + * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly + * disable it from rendering, consider using the `setVisible` method, instead. + * + * @method Phaser.GameObjects.GameObject#addToDisplayList + * @fires Phaser.Scenes.Events#ADDED_TO_SCENE + * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.53.0 + * + * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List. + * + * @return {this} This Game Object. + */ + addToDisplayList: function (displayList) + { + if (displayList === undefined) { displayList = this.scene.sys.displayList; } + + if (this.displayList && this.displayList !== displayList) + { + this.removeFromDisplayList(); + } + + // Don't repeat if it's already on this list + if (!displayList.exists(this)) + { + this.displayList = displayList; + + displayList.add(this, true); + + displayList.queueDepthSort(); + + this.emit(Events.ADDED_TO_SCENE, this, this.scene); + + displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene); + } + + return this; + }, + + /** + * Adds this Game Object to the Update List belonging to the Scene. + * + * When a Game Object is added to the Update List it will have its `preUpdate` method called + * every game frame. This method is passed two parameters: `delta` and `time`. + * + * If you wish to run your own logic within `preUpdate` then you should always call + * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, + * such as Sprite animations. + * + * @method Phaser.GameObjects.GameObject#addToUpdateList + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + addToUpdateList: function () + { + if (this.scene && this.preUpdate) + { + this.scene.sys.updateList.add(this); + } + + return this; + }, + + /** + * Removes this Game Object from the Display List it is currently on. + * + * A Game Object can only exist on one Display List at any given time, but may move freely removed + * and added back at a later stage. + * + * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. + * + * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly + * disable it from rendering, consider using the `setVisible` method, instead. + * + * @method Phaser.GameObjects.GameObject#removeFromDisplayList + * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + removeFromDisplayList: function () + { + var displayList = this.displayList || this.scene.sys.displayList; + + if (displayList && displayList.exists(this)) + { + displayList.remove(this, true); + + displayList.queueDepthSort(); + + this.displayList = null; + + this.emit(Events.REMOVED_FROM_SCENE, this, this.scene); + + displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene); + } + + return this; + }, + + /** + * Removes this Game Object from the Scene's Update List. + * + * When a Game Object is on the Update List, it will have its `preUpdate` method called + * every game frame. Calling this method will remove it from the list, preventing this. + * + * Removing a Game Object from the Update List will stop most internal functions working. + * For example, removing a Sprite from the Update List will prevent it from being able to + * run animations. + * + * @method Phaser.GameObjects.GameObject#removeFromUpdateList + * @since 3.53.0 + * + * @return {this} This Game Object. + */ + removeFromUpdateList: function () + { + if (this.scene && this.preUpdate) + { + this.scene.sys.updateList.remove(this); + } + + return this; + }, + + /** + * 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] - `True` if this Game Object is being destroyed by the Scene, `false` if not. + */ + destroy: function (fromScene) + { + // This Game Object has already been destroyed + if (!this.scene || this.ignoreDestroy) + { + return; + } + + if (fromScene === undefined) { fromScene = false; } + + if (this.preDestroy) + { + this.preDestroy.call(this); + } + + this.emit(Events.DESTROY, this, fromScene); + + this.removeAllListeners(); + + if (this.postPipelines) + { + this.resetPostPipeline(true); + } + + this.removeFromDisplayList(); + this.removeFromUpdateList(); + + if (this.input) + { + this.scene.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; + } + + this.active = false; + this.visible = false; + + this.scene = undefined; + this.parentContainer = undefined; + } + +}); + +/** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * + * @constant {number} RENDER_MASK + * @memberof Phaser.GameObjects.GameObject + * @default + */ +GameObject.RENDER_MASK = 15; + +module.exports = GameObject; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(235), + DESTROY: __webpack_require__(236), + REMOVED_FROM_SCENE: __webpack_require__(237), + VIDEO_COMPLETE: __webpack_require__(238), + VIDEO_CREATED: __webpack_require__(239), + VIDEO_ERROR: __webpack_require__(240), + VIDEO_LOOP: __webpack_require__(241), + VIDEO_PLAY: __webpack_require__(242), + VIDEO_SEEKED: __webpack_require__(243), + VIDEO_SEEKING: __webpack_require__(244), + VIDEO_STOP: __webpack_require__(245), + VIDEO_TIMEOUT: __webpack_require__(246), + VIDEO_UNLOCKED: __webpack_require__(247) + +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TransformMatrix = __webpack_require__(26); + +var tempMatrix1 = new TransformMatrix(); +var tempMatrix2 = new TransformMatrix(); +var tempMatrix3 = new TransformMatrix(); + +var result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 }; + +/** + * Calculates the Transform Matrix of the given Game Object and Camera, factoring in + * the parent matrix if provided. + * + * Note that the object this results contains _references_ to the Transform Matrices, + * not new instances of them. Therefore, you should use their values immediately, or + * copy them to your own matrix, as they will be replaced as soon as another Game + * Object is rendered. + * + * @function Phaser.GameObjects.GetCalcMatrix + * @memberof Phaser.GameObjects + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any. + * + * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices. + */ +var GetCalcMatrix = function (src, camera, parentMatrix) +{ + var camMatrix = tempMatrix1; + var spriteMatrix = tempMatrix2; + var calcMatrix = tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + + camMatrix.copyFrom(camera.matrix); + + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + } + else + { + spriteMatrix.e -= camera.scrollX * src.scrollFactorX; + spriteMatrix.f -= camera.scrollY * src.scrollFactorY; + } + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + + return result; +}; + +module.exports = GetCalcMatrix; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(302); +var Smoothing = __webpack_require__(304); + +// The pool into which the canvas elements are placed. +var pool = []; + +// Automatically apply smoothing(false) to created Canvas elements +var _disableContextSmoothing = false; + +/** + * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements. + * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, + * which is useless for some of the Phaser pipelines / renderer. + * + * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created. + * Which means all instances of Phaser Games on the same page can share the one single pool. + * + * @namespace Phaser.Display.Canvas.CanvasPool + * @since 3.0.0 + */ +var CanvasPool = function () +{ + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent? + * + * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool + */ + var create = function (parent, width, height, canvasType, selfParent) + { + if (width === undefined) { width = 1; } + if (height === undefined) { height = 1; } + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + if (selfParent === undefined) { selfParent = false; } + + var canvas; + var container = first(canvasType); + + if (container === null) + { + container = { + parent: parent, + canvas: document.createElement('canvas'), + type: canvasType + }; + + if (canvasType === CONST.CANVAS) + { + pool.push(container); + } + + canvas = container.canvas; + } + else + { + container.parent = parent; + + canvas = container.canvas; + } + + if (selfParent) + { + container.parent = canvas; + } + + canvas.width = width; + canvas.height = height; + + if (_disableContextSmoothing && canvasType === CONST.CANVAS) + { + Smoothing.disable(canvas.getContext('2d')); + } + + return canvas; + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create2D + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created canvas. + */ + var create2D = function (parent, width, height) + { + return create(parent, width, height, CONST.CANVAS); + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.createWebGL + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created WebGL canvas. + */ + var createWebGL = function (parent, width, height) + { + return create(parent, width, height, CONST.WEBGL); + }; + + /** + * Gets the first free canvas index from the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.first + * @since 3.0.0 + * + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * + * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases. + */ + var first = function (canvasType) + { + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + + if (canvasType === CONST.WEBGL) + { + return null; + } + + for (var i = 0; i < pool.length; i++) + { + var container = pool[i]; + + if (!container.parent && container.type === canvasType) + { + return container; + } + } + + return null; + }; + + /** + * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use. + * The canvas has its width and height set to 1, and its parent attribute nulled. + * + * @function Phaser.Display.Canvas.CanvasPool.remove + * @since 3.0.0 + * + * @param {*} parent - The canvas or the parent of the canvas to free. + */ + var remove = function (parent) + { + // Check to see if the parent is a canvas object + var isCanvas = parent instanceof HTMLCanvasElement; + + pool.forEach(function (container) + { + if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent)) + { + container.parent = null; + container.canvas.width = 1; + container.canvas.height = 1; + } + }); + }; + + /** + * Gets the total number of used canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.total + * @since 3.0.0 + * + * @return {number} The number of used canvases. + */ + var total = function () + { + var c = 0; + + pool.forEach(function (container) + { + if (container.parent) + { + c++; + } + }); + + return c; + }; + + /** + * Gets the total number of free canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.free + * @since 3.0.0 + * + * @return {number} The number of free canvases. + */ + var free = function () + { + return pool.length - total(); + }; + + /** + * Disable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing + * @since 3.0.0 + */ + var disableSmoothing = function () + { + _disableContextSmoothing = true; + }; + + /** + * Enable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing + * @since 3.0.0 + */ + var enableSmoothing = function () + { + _disableContextSmoothing = false; + }; + + return { + create2D: create2D, + create: create, + createWebGL: createWebGL, + disableSmoothing: disableSmoothing, + enableSmoothing: enableSmoothing, + first: first, + free: free, + pool: pool, + remove: remove, + total: total + }; +}; + +// If we export the called function here, it'll only be invoked once (not every time it's required). +module.exports = CanvasPool(); + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(67); +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; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Clamp = __webpack_require__(1); +var Extend = __webpack_require__(19); + +/** + * @classdesc + * A Frame is a section of a Texture. + * + * @class Frame + * @memberof Phaser.Textures + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of. + * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture. + * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of. + * @param {number} x - The x coordinate of the top-left of this Frame. + * @param {number} y - The y coordinate of the top-left of this Frame. + * @param {number} width - The width of this Frame. + * @param {number} height - The height of this Frame. + */ +var Frame = new Class({ + + initialize: + + function Frame (texture, name, sourceIndex, x, y, width, height) + { + /** + * The Texture this Frame is a part of. + * + * @name Phaser.Textures.Frame#texture + * @type {Phaser.Textures.Texture} + * @since 3.0.0 + */ + this.texture = texture; + + /** + * The name of this Frame. + * The name is unique within the Texture. + * + * @name Phaser.Textures.Frame#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The TextureSource this Frame is part of. + * + * @name Phaser.Textures.Frame#source + * @type {Phaser.Textures.TextureSource} + * @since 3.0.0 + */ + this.source = texture.source[sourceIndex]; + + /** + * The index of the TextureSource in the Texture sources array. + * + * @name Phaser.Textures.Frame#sourceIndex + * @type {number} + * @since 3.0.0 + */ + this.sourceIndex = sourceIndex; + + /** + * A reference to the Texture Source WebGL Texture that this Frame is using. + * + * @name Phaser.Textures.Frame#glTexture + * @type {?WebGLTexture} + * @default null + * @since 3.11.0 + */ + this.glTexture = this.source.glTexture; + + /** + * X position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutX + * @type {number} + * @since 3.0.0 + */ + this.cutX; + + /** + * Y position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutY + * @type {number} + * @since 3.0.0 + */ + this.cutY; + + /** + * The width of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutWidth + * @type {number} + * @since 3.0.0 + */ + this.cutWidth; + + /** + * The height of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutHeight + * @type {number} + * @since 3.0.0 + */ + this.cutHeight; + + /** + * The X rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The Y rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The rendering width of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#width + * @type {number} + * @since 3.0.0 + */ + this.width; + + /** + * The rendering height of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#height + * @type {number} + * @since 3.0.0 + */ + this.height; + + /** + * Half the width, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfWidth + * @type {number} + * @since 3.0.0 + */ + this.halfWidth; + + /** + * Half the height, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfHeight + * @type {number} + * @since 3.0.0 + */ + this.halfHeight; + + /** + * The x center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerX + * @type {number} + * @since 3.0.0 + */ + this.centerX; + + /** + * The y center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerY + * @type {number} + * @since 3.0.0 + */ + this.centerY; + + /** + * The horizontal pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotX = 0; + + /** + * The vertical pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotY = 0; + + /** + * Does this Frame have a custom pivot point? + * + * @name Phaser.Textures.Frame#customPivot + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.customPivot = false; + + /** + * **CURRENTLY UNSUPPORTED** + * + * Is this frame is rotated or not in the Texture? + * Rotation allows you to use rotated frames in texture atlas packing. + * It has nothing to do with Sprite rotation. + * + * @name Phaser.Textures.Frame#rotated + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.rotated = false; + + /** + * Over-rides the Renderer setting. + * -1 = use Renderer Setting + * 0 = No rounding + * 1 = Round + * + * @name Phaser.Textures.Frame#autoRound + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.autoRound = -1; + + /** + * Any Frame specific custom data can be stored here. + * + * @name Phaser.Textures.Frame#customData + * @type {object} + * @since 3.0.0 + */ + this.customData = {}; + + /** + * WebGL UV u0 value. + * + * @name Phaser.Textures.Frame#u0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u0 = 0; + + /** + * WebGL UV v0 value. + * + * @name Phaser.Textures.Frame#v0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v0 = 0; + + /** + * WebGL UV u1 value. + * + * @name Phaser.Textures.Frame#u1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u1 = 0; + + /** + * WebGL UV v1 value. + * + * @name Phaser.Textures.Frame#v1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v1 = 0; + + /** + * The un-modified source frame, trim and UV data. + * + * @name Phaser.Textures.Frame#data + * @type {object} + * @private + * @since 3.0.0 + */ + this.data = { + cut: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + trim: false, + sourceSize: { + w: 0, + h: 0 + }, + spriteSourceSize: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + radius: 0, + drawImage: { + x: 0, + y: 0, + width: 0, + height: 0 + } + }; + + this.setSize(width, height, x, y); + }, + + /** + * Sets the width, height, x and y of this Frame. + * + * This is called automatically by the constructor + * and should rarely be changed on-the-fly. + * + * @method Phaser.Textures.Frame#setSize + * @since 3.7.0 + * + * @param {number} width - The width of the frame before being trimmed. + * @param {number} height - The height of the frame before being trimmed. + * @param {number} [x=0] - The x coordinate of the top-left of this Frame. + * @param {number} [y=0] - The y coordinate of the top-left of this Frame. + * + * @return {this} This Frame object. + */ + setSize: function (width, height, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.cutX = x; + this.cutY = y; + this.cutWidth = width; + this.cutHeight = height; + + this.width = width; + this.height = height; + + this.halfWidth = Math.floor(width * 0.5); + this.halfHeight = Math.floor(height * 0.5); + + this.centerX = Math.floor(width / 2); + this.centerY = Math.floor(height / 2); + + var data = this.data; + var cut = data.cut; + + cut.x = x; + cut.y = y; + cut.w = width; + cut.h = height; + cut.r = x + width; + cut.b = y + height; + + data.sourceSize.w = width; + data.sourceSize.h = height; + + data.spriteSourceSize.w = width; + data.spriteSourceSize.h = height; + + data.radius = 0.5 * Math.sqrt(width * width + height * height); + + var drawImage = data.drawImage; + + drawImage.x = x; + drawImage.y = y; + drawImage.width = width; + drawImage.height = height; + + return this.updateUVs(); + }, + + /** + * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data. + * + * @method Phaser.Textures.Frame#setTrim + * @since 3.0.0 + * + * @param {number} actualWidth - The width of the frame before being trimmed. + * @param {number} actualHeight - The height of the frame before being trimmed. + * @param {number} destX - The destination X position of the trimmed frame for display. + * @param {number} destY - The destination Y position of the trimmed frame for display. + * @param {number} destWidth - The destination width of the trimmed frame for display. + * @param {number} destHeight - The destination height of the trimmed frame for display. + * + * @return {this} This Frame object. + */ + setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight) + { + var data = this.data; + var ss = data.spriteSourceSize; + + // Store actual values + + data.trim = true; + + data.sourceSize.w = actualWidth; + data.sourceSize.h = actualHeight; + + ss.x = destX; + ss.y = destY; + ss.w = destWidth; + ss.h = destHeight; + ss.r = destX + destWidth; + ss.b = destY + destHeight; + + // Adjust properties + this.x = destX; + this.y = destY; + + this.width = destWidth; + this.height = destHeight; + + this.halfWidth = destWidth * 0.5; + this.halfHeight = destHeight * 0.5; + + this.centerX = Math.floor(destWidth / 2); + this.centerY = Math.floor(destHeight / 2); + + return this.updateUVs(); + }, + + /** + * Takes a crop data object and, based on the rectangular region given, calculates the + * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. + * + * This is called directly by the Game Object Texture Components `setCrop` method. + * Please use that method to crop a Game Object. + * + * @method Phaser.Textures.Frame#setCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. + * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height. + * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width. + * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + setCropUVs: function (crop, x, y, width, height, flipX, flipY) + { + // Clamp the input values + + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + var rw = this.realWidth; + var rh = this.realHeight; + + x = Clamp(x, 0, rw); + y = Clamp(y, 0, rh); + + width = Clamp(width, 0, rw - x); + height = Clamp(height, 0, rh - y); + + var ox = cx + x; + var oy = cy + y; + var ow = width; + var oh = height; + + var data = this.data; + + if (data.trim) + { + var ss = data.spriteSourceSize; + + // Need to check for intersection between the cut area and the crop area + // If there is none, we set UV to be empty, otherwise set it to be the intersection area + + width = Clamp(width, 0, cw - x); + height = Clamp(height, 0, ch - y); + + var cropRight = x + width; + var cropBottom = y + height; + + var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom); + + if (intersects) + { + var ix = Math.max(ss.x, x); + var iy = Math.max(ss.y, y); + var iw = Math.min(ss.r, cropRight) - ix; + var ih = Math.min(ss.b, cropBottom) - iy; + + ow = iw; + oh = ih; + + if (flipX) + { + ox = cx + (cw - (ix - ss.x) - iw); + } + else + { + ox = cx + (ix - ss.x); + } + + if (flipY) + { + oy = cy + (ch - (iy - ss.y) - ih); + } + else + { + oy = cy + (iy - ss.y); + } + + x = ix; + y = iy; + + width = iw; + height = ih; + } + else + { + ox = 0; + oy = 0; + ow = 0; + oh = 0; + } + } + else + { + if (flipX) + { + ox = cx + (cw - x - width); + } + + if (flipY) + { + oy = cy + (ch - y - height); + } + } + + var tw = this.source.width; + var th = this.source.height; + + // Map the given coordinates into UV space, clamping to the 0-1 range. + + crop.u0 = Math.max(0, ox / tw); + crop.v0 = Math.max(0, oy / th); + crop.u1 = Math.min(1, (ox + ow) / tw); + crop.v1 = Math.min(1, (oy + oh) / th); + + crop.x = x; + crop.y = y; + + crop.cx = ox; + crop.cy = oy; + crop.cw = ow; + crop.ch = oh; + + crop.width = width; + crop.height = height; + + crop.flipX = flipX; + crop.flipY = flipY; + + return crop; + }, + + /** + * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object. + * Called automatically by `setFrame`. + * + * @method Phaser.Textures.Frame#updateCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + updateCropUVs: function (crop, flipX, flipY) + { + return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY); + }, + + /** + * Directly sets the canvas and WebGL UV data for this frame. + * + * Use this if you need to override the values that are generated automatically + * when the Frame is created. + * + * @method Phaser.Textures.Frame#setUVs + * @since 3.50.0 + * + * @param {number} width - Width of this frame for the Canvas data. + * @param {number} height - Height of this frame for the Canvas data. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * + * @return {this} This Frame object. + */ + setUVs: function (width, height, u0, v0, u1, v1) + { + // Canvas data + + var cd = this.data.drawImage; + + cd.width = width; + cd.height = height; + + // WebGL data + + this.u0 = u0; + this.v0 = v0; + + this.u1 = u1; + this.v1 = v1; + + return this; + }, + + /** + * Updates the internal WebGL UV cache and the drawImage cache. + * + * @method Phaser.Textures.Frame#updateUVs + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVs: function () + { + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + + // Canvas data + + var cd = this.data.drawImage; + + cd.width = cw; + cd.height = ch; + + // WebGL data + + var tw = this.source.width; + var th = this.source.height; + + this.u0 = cx / tw; + this.v0 = cy / th; + + this.u1 = (cx + cw) / tw; + this.v1 = (cy + ch) / th; + + return this; + }, + + /** + * Updates the internal WebGL UV cache. + * + * @method Phaser.Textures.Frame#updateUVsInverted + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVsInverted: function () + { + var tw = this.source.width; + var th = this.source.height; + + this.u0 = (this.cutX + this.cutHeight) / tw; + this.v0 = this.cutY / th; + + this.u1 = this.cutX / tw; + this.v1 = (this.cutY + this.cutWidth) / th; + + return this; + }, + + /** + * Clones this Frame into a new Frame object. + * + * @method Phaser.Textures.Frame#clone + * @since 3.0.0 + * + * @return {Phaser.Textures.Frame} A clone of this Frame. + */ + clone: function () + { + var clone = new Frame(this.texture, this.name, this.sourceIndex); + + clone.cutX = this.cutX; + clone.cutY = this.cutY; + clone.cutWidth = this.cutWidth; + clone.cutHeight = this.cutHeight; + + clone.x = this.x; + clone.y = this.y; + + clone.width = this.width; + clone.height = this.height; + + clone.halfWidth = this.halfWidth; + clone.halfHeight = this.halfHeight; + + clone.centerX = this.centerX; + clone.centerY = this.centerY; + + clone.rotated = this.rotated; + + clone.data = Extend(true, clone.data, this.data); + + clone.updateUVs(); + + return clone; + }, + + /** + * Destroys this Frame by nulling its reference to the parent Texture and and data objects. + * + * @method Phaser.Textures.Frame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.source = null; + this.texture = null; + this.glTexture = null; + this.customData = null; + this.data = null; + }, + + /** + * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realWidth + * @type {number} + * @readonly + * @since 3.0.0 + */ + realWidth: { + + get: function () + { + return this.data.sourceSize.w; + } + + }, + + /** + * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realHeight + * @type {number} + * @readonly + * @since 3.0.0 + */ + realHeight: { + + get: function () + { + return this.data.sourceSize.h; + } + + }, + + /** + * The radius of the Frame (derived from sqrt(w * w + h * h) / 2) + * + * @name Phaser.Textures.Frame#radius + * @type {number} + * @readonly + * @since 3.0.0 + */ + radius: { + + get: function () + { + return this.data.radius; + } + + }, + + /** + * Is the Frame trimmed or not? + * + * @name Phaser.Textures.Frame#trimmed + * @type {boolean} + * @readonly + * @since 3.0.0 + */ + trimmed: { + + get: function () + { + return this.data.trim; + } + + }, + + /** + * The Canvas drawImage data object. + * + * @name Phaser.Textures.Frame#canvasData + * @type {object} + * @readonly + * @since 3.0.0 + */ + canvasData: { + + get: function () + { + return this.data.drawImage; + } + + } + +}); + +module.exports = Frame; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BuildGameObject = __webpack_require__(70); +var Class = __webpack_require__(0); +var GetValue = __webpack_require__(8); +var ResizeEvent = __webpack_require__(184); +var ScenePlugin = __webpack_require__(185); +var Spine = __webpack_require__(209); +var SpineFile = __webpack_require__(210); +var SpineGameObject = __webpack_require__(226); +var SpineContainer = __webpack_require__(258); +var NOOP = __webpack_require__(2); + +/** + * @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.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: [ + * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } + * ] + * } + * ``` + * + * 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, + * create: create, + * pack: { + * files: [ + * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' } + * ] + * } + * } + * ``` + * + * 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. + * + * ## A note about inlined data: + * + * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader + * at all. Instead, call the functions directly as required: + * + * scene.cache.json.add + * scene.cache.custom.spine.add + * scene.textures.addBase64 + * + * ## Using the plugin + * + * 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 two Game Object Factory methods, allowing you to create Spine Game Objects + * and Spine Containers: + * + * ```javascript + * 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 + * 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 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. + * + * 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 + * @extends Phaser.Plugins.ScenePlugin + * @constructor + * @since 3.19.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. + * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + */ +var SpinePlugin = new Class({ + + Extends: ScenePlugin, + + initialize: + + function SpinePlugin (scene, pluginManager, pluginKey) + { + ScenePlugin.call(this, scene, pluginManager, pluginKey); + + var game = pluginManager.game; + + /** + * A read-only flag that indicates if the game is running under WebGL or Canvas. + * + * @name SpinePlugin#isWebGL + * @type {boolean} + * @readonly + * @since 3.19.0 + */ + this.isWebGL = (game.config.renderType === 2); + + /** + * 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. + * + * @name SpinePlugin#cache + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.cache = game.cache.addCustom('spine'); + + /** + * 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. + * + * @name SpinePlugin#spineTextures + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.spineTextures = game.cache.addCustom('spineTextures'); + + /** + * A reference to the global JSON Cache. + * + * @name SpinePlugin#json + * @type {Phaser.Cache.BaseCache} + * @since 3.19.0 + */ + this.json = game.cache.json; + + /** + * A reference to the global Texture Manager. + * + * @name SpinePlugin#textures + * @type {Phaser.Textures.TextureManager} + * @since 3.19.0 + */ + this.textures = game.textures; + + /** + * A flag that sets if the Skeleton Renderers will render debug information over the top + * of the skeleton or not. + * + * @name SpinePlugin#drawDebug + * @type {boolean} + * @since 3.19.0 + */ + this.drawDebug = false; + + /** + * The underlying WebGL context of the Phaser renderer. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#gl + * @type {WebGLRenderingContext} + * @since 3.19.0 + */ + this.gl; + + /** + * A reference to either the Canvas or WebGL Renderer that this Game is using. + * + * @name SpinePlugin#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.19.0 + */ + this.renderer; + + /** + * An instance of the Spine WebGL Scene Renderer. + * + * There is only one instance of the Scene Renderer shared across the whole plugin. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#sceneRenderer + * @type {spine.webgl.SceneRenderer} + * @since 3.19.0 + */ + this.sceneRenderer; + + /** + * An instance of the Spine Skeleton Renderer. + * + * @name SpinePlugin#skeletonRenderer + * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)} + * @since 3.19.0 + */ + this.skeletonRenderer; + + /** + * An instance of the Spine Skeleton Debug Renderer. + * + * Only set if running in WebGL mode. + * + * @name SpinePlugin#skeletonDebugRenderer + * @type {spine.webgl.skeletonDebugRenderer} + * @since 3.19.0 + */ + this.skeletonDebugRenderer; + + /** + * A reference to the Spine runtime. + * This is the runtime created by Esoteric Software. + * + * @name SpinePlugin#plugin + * @type {spine} + * @since 3.19.0 + */ + this.plugin = Spine; + + /** + * An internal vector3 used by the screen to world method. + * + * @name SpinePlugin#temp1 + * @private + * @type {spine.webgl.Vector3} + * @since 3.19.0 + */ + this.temp1; + + /** + * An internal vector3 used by the screen to world method. + * + * @name SpinePlugin#temp2 + * @private + * @type {spine.webgl.Vector3} + * @since 3.19.0 + */ + this.temp2; + + if (this.isWebGL) + { + this.runtime = Spine.webgl; + + this.renderer = game.renderer; + this.gl = game.renderer.gl; + + this.getAtlas = this.getAtlasWebGL; + } + else + { + this.runtime = Spine.canvas; + + this.renderer = game.renderer; + + 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 add = function (x, y, key, animationName, loop) + { + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 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(); + }; + + var addContainer = function (x, y, children) + { + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; + var container = new SpineContainer(this.scene, spinePlugin, 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); + }, + + /** + * Internal boot handler. + * + * @method SpinePlugin#boot + * @private + * @since 3.19.0 + */ + boot: function () + { + if (this.isWebGL) + { + this.bootWebGL(); + this.onResize(); + this.game.scale.on(ResizeEvent, this.onResize, this); + } + else + { + this.bootCanvas(); + } + + var eventEmitter = this.systems.events; + + eventEmitter.once('shutdown', this.shutdown, this); + eventEmitter.once('destroy', this.destroy, this); + + this.game.events.once('destroy', this.gameDestroy, this); + }, + + /** + * Internal boot handler for the Canvas Renderer. + * + * @method SpinePlugin#bootCanvas + * @private + * @since 3.19.0 + */ + bootCanvas: function () + { + this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context); + }, + + /** + * Internal boot handler for the WebGL Renderer. + * + * @method SpinePlugin#bootWebGL + * @private + * @since 3.19.0 + */ + bootWebGL: function () + { + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! + + var setBlendMode = function (srcBlend, dstBlend) + { + if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend) + { + var gl = this.context.gl; + + this.srcBlend = srcBlend; + this.dstBlend = dstBlend; + + if (this.isDrawing) + { + this.flush(); + gl.blendFunc(this.srcBlend, this.dstBlend); + } + } + }; + + var sceneRenderer = this.renderer.spineSceneRenderer; + + if (!sceneRenderer) + { + sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); + sceneRenderer.batcher.setBlendMode = setBlendMode; + sceneRenderer.shapes.setBlendMode = setBlendMode; + + this.renderer.spineSceneRenderer = sceneRenderer; + } + + // All scene share the same instance + this.sceneRenderer = sceneRenderer; + this.skeletonRenderer = sceneRenderer.skeletonRenderer; + this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; + + this.temp1 = new Spine.webgl.Vector3(0, 0, 0); + this.temp2 = new Spine.webgl.Vector3(0, 0, 0); + }, + + /** + * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, + * then returns it. You do not normally need to invoke this method directly. + * + * @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) + { + var atlasEntry = this.cache.get(key); + + if (!atlasEntry) + { + console.warn('No atlas data for: ' + key); + return; + } + + var atlas; + var spineTextures = this.spineTextures; + + if (spineTextures.has(key)) + { + atlas = spineTextures.get(key); + } + else + { + var textures = this.textures; + + atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) + { + return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); + }); + } + + return atlas; + }, + + /** + * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, + * then returns it. You do not normally need to invoke this method directly. + * + * @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) + { + var atlasEntry = this.cache.get(key); + + if (!atlasEntry) + { + console.warn('No atlas data for: ' + key); + return; + } + + var atlas; + var spineTextures = this.spineTextures; + + if (spineTextures.has(key)) + { + atlas = spineTextures.get(key); + } + else + { + var textures = this.textures; + + var gl = this.sceneRenderer.context.gl; + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); + + atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) + { + return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); + }); + } + + return atlas; + }, + + /** + * 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 () + * { + * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true); + * } + * ``` + * + * 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. + * + * 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 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', + * jsonURL: 'boy.json', + * atlasURL: 'boy.atlas', + * preMultipliedAlpha: true + * }); + * ``` + * + * If you need to load multiple Spine atlas files, provide them as an array: + * + * ```javascript + * function preload () + * { + * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true); + * } + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details. + * + * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the data from the Spine plugin. + * + * 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 "alien" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * 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#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} [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. + * @param {object} [settings] - An external Settings configuration object { prefix: '' } + * + * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + */ + spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings) + { + var multifile; + settings = settings || {}; + + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + multifile = new SpineFile(this, key[i]); + + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + + this.addFile(multifile.files); + } + } + else + { + multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); + + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + + 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) + { + var temp1 = this.temp1; + var temp2 = this.temp2; + var camera = this.sceneRenderer.camera; + + temp1.set(x + skeleton.x, y - skeleton.y, 0); + + var width = camera.viewportWidth; + var height = camera.viewportHeight; + + camera.screenToWorld(temp1, width, height); + + if (bone && bone.parent !== null) + { + bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0)); + + return new Spine.Vector2(temp2.x, temp2.y); + } + else if (bone) + { + return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y); + } + else + { + return new Spine.Vector2(temp1.x, temp1.y); + } + }, + + /** + * Returns a Spine Vector2 based on the given x and y values. + * + * @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) + { + return new Spine.Vector2(x, y); + }, + + /** + * 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) + { + return new Spine.webgl.Vector3(x, y, z); + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawBones = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawRegionAttachments = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawBoundingBoxes = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawMeshHull = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawMeshTriangles = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawPaths = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawSkeletonXY = value; + + return this; + }, + + /** + * 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) + { + if (value === undefined) { value = true; } + + this.skeletonDebugRenderer.drawClipping = value; + + return this; + }, + + /** + * 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) + { + this.sceneRenderer.skeletonRenderer.vertexEffect = effect; + + return this; + }, + + /** + * 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) + { + var atlasKey = key; + var jsonKey = key; + var split = (key.indexOf('.') !== -1); + + if (split) + { + var parts = key.split('.'); + + atlasKey = parts.shift(); + jsonKey = parts.join('.'); + } + + var atlasData = this.cache.get(atlasKey); + var atlas = this.getAtlas(atlasKey); + + if (!atlas) + { + return null; + } + + if (!this.spineTextures.has(atlasKey)) + { + this.spineTextures.add(atlasKey, atlas); + } + + var preMultipliedAlpha = atlasData.preMultipliedAlpha; + + var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); + + var skeletonJson = new Spine.SkeletonJson(atlasLoader); + + var data; + + if (skeletonJSON) + { + data = skeletonJSON; + } + else + { + var json = this.json.get(atlasKey); + + data = (split) ? GetValue(json, jsonKey) : json; + } + + if (data) + { + var skeletonData = skeletonJson.readSkeletonData(data); + + var skeleton = new Spine.Skeleton(skeletonData); + + return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; + } + else + { + return null; + } + }, + + /** + * 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) + { + var stateData = new Spine.AnimationStateData(skeleton.data); + + var state = new Spine.AnimationState(stateData); + + return { stateData: stateData, state: state }; + }, + + /** + * 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) + { + var offset = new Spine.Vector2(); + var size = new Spine.Vector2(); + + skeleton.getBounds(offset, size, []); + + return { offset: offset, size: size }; + }, + + /** + * Internal handler for when the renderer resizes. + * + * Only called if running in WebGL. + * + * @method SpinePlugin#onResize + * @since 3.19.0 + */ + onResize: function () + { + var renderer = this.renderer; + var sceneRenderer = this.sceneRenderer; + + var viewportWidth = renderer.width; + var viewportHeight = renderer.height; + + sceneRenderer.camera.position.x = viewportWidth / 2; + sceneRenderer.camera.position.y = viewportHeight / 2; + + sceneRenderer.camera.setViewport(viewportWidth, 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 + * @private + * @since 3.19.0 + */ + shutdown: function () + { + 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 + * @private + * @since 3.19.0 + */ + destroy: function () + { + this.shutdown(); + + this.game = null; + this.scene = null; + this.systems = null; + + this.cache = null; + this.spineTextures = null; + this.json = null; + this.textures = 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.pluginManager.removeGameObject('spine', true, true); + this.pluginManager.removeGameObject('spineContainer', true, true); + + this.pluginManager = null; + + var sceneRenderer = this.renderer.spineSceneRenderer; + + if (sceneRenderer) + { + sceneRenderer.dispose(); + } + + this.renderer.spineSceneRenderer = null; + this.sceneRenderer = null; + } + +}); + +SpinePlugin.SpineGameObject = SpineGameObject; +SpinePlugin.SpineContainer = SpineContainer; + +/** + * 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. + * @param {string} [animationName] - The name of the animation to set on this Skeleton. + * @param {boolean} [loop=false] - Should the animation playback be looped or not? + * + * @return {SpineGameObject} The Game Object that was created. + */ + +/** + * 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', + * scale: 1.5, + * skinName: 'square_Green', + * animationName: 'jelly-idle', loop: true, + * slotName: 'hat', attachmentName: 'images/La_14' + * }); + * ``` + * + * @method SpinePlugin#make + * @since 3.19.0 + * + * @param {any} config - The configuration object this Game Object will use to create itself. + * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + * + * @return {SpineGameObject} The Game Object that was created. + */ + +module.exports = SpinePlugin; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(13); +var GetAdvancedValue = __webpack_require__(71); + +/** + * 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; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH = __webpack_require__(72); +var GetValue = __webpack_require__(8); + +/** + * 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 - 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 GetAdvancedValue = function (source, key, defaultValue) +{ + var value = GetValue(source, key, null); + + if (value === null) + { + return defaultValue; + } + else if (Array.isArray(value)) + { + return MATH.RND.pick(value); + } + else if (typeof value === 'object') + { + if (value.hasOwnProperty('randInt')) + { + return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]); + } + else if (value.hasOwnProperty('randFloat')) + { + return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]); + } + } + else if (typeof value === 'function') + { + return value(key); + } + + return value; +}; + +module.exports = GetAdvancedValue; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(4); +var Extend = __webpack_require__(19); + +/** + * @namespace Phaser.Math + */ + +var PhaserMath = { + + // Collections of functions + Angle: __webpack_require__(73), + Distance: __webpack_require__(82), + Easing: __webpack_require__(90), + Fuzzy: __webpack_require__(135), + Interpolation: __webpack_require__(140), + Pow2: __webpack_require__(148), + Snap: __webpack_require__(152), + + // Expose the RNG Class + RandomDataGenerator: __webpack_require__(156), + + // Single functions + Average: __webpack_require__(157), + Bernstein: __webpack_require__(36), + Between: __webpack_require__(158), + CatmullRom: __webpack_require__(38), + CeilTo: __webpack_require__(159), + Clamp: __webpack_require__(1), + DegToRad: __webpack_require__(21), + Difference: __webpack_require__(160), + Euler: __webpack_require__(161), + Factorial: __webpack_require__(37), + FloatBetween: __webpack_require__(20), + FloorTo: __webpack_require__(162), + FromPercent: __webpack_require__(163), + GetSpeed: __webpack_require__(164), + IsEven: __webpack_require__(165), + IsEvenStrict: __webpack_require__(166), + Linear: __webpack_require__(39), + LinearXY: __webpack_require__(167), + MaxAdd: __webpack_require__(168), + Median: __webpack_require__(169), + MinSub: __webpack_require__(170), + Percent: __webpack_require__(171), + RadToDeg: __webpack_require__(16), + RandomXY: __webpack_require__(172), + RandomXYZ: __webpack_require__(173), + RandomXYZW: __webpack_require__(174), + Rotate: __webpack_require__(175), + RotateAround: __webpack_require__(42), + RotateAroundDistance: __webpack_require__(176), + RotateTo: __webpack_require__(177), + RoundAwayFromZero: __webpack_require__(43), + RoundTo: __webpack_require__(178), + SinCosTableGenerator: __webpack_require__(179), + SmootherStep: __webpack_require__(41), + SmoothStep: __webpack_require__(40), + ToXY: __webpack_require__(180), + TransformXY: __webpack_require__(44), + Within: __webpack_require__(181), + Wrap: __webpack_require__(7), + + // Vector classes + Vector2: __webpack_require__(3), + Vector3: __webpack_require__(15), + Vector4: __webpack_require__(182), + Matrix3: __webpack_require__(45), + Matrix4: __webpack_require__(22), + Quaternion: __webpack_require__(46), + RotateVec3: __webpack_require__(183) + +}; + +// Merge in the consts + +PhaserMath = Extend(false, PhaserMath, CONST); + +// Export it + +module.exports = PhaserMath; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Angle + */ + +module.exports = { + + Between: __webpack_require__(31), + BetweenPoints: __webpack_require__(74), + BetweenPointsY: __webpack_require__(75), + BetweenY: __webpack_require__(76), + CounterClockwise: __webpack_require__(14), + Normalize: __webpack_require__(32), + Random: __webpack_require__(77), + RandomDegrees: __webpack_require__(78), + Reverse: __webpack_require__(79), + RotateTo: __webpack_require__(80), + ShortestBetween: __webpack_require__(81), + Wrap: __webpack_require__(33), + WrapDegrees: __webpack_require__(34) + +}; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(20); + +/** + * 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; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(20); + +/** + * 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; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Normalize = __webpack_require__(32); + +/** + * 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; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(4); + +/** + * 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; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. + * + * @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; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Distance + */ + +module.exports = { + + Between: __webpack_require__(83), + BetweenPoints: __webpack_require__(84), + BetweenPointsSquared: __webpack_require__(85), + Chebyshev: __webpack_require__(86), + Power: __webpack_require__(87), + Snake: __webpack_require__(88), + Squared: __webpack_require__(89) + +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing + */ + +module.exports = { + + Back: __webpack_require__(91), + Bounce: __webpack_require__(95), + Circular: __webpack_require__(99), + Cubic: __webpack_require__(103), + Elastic: __webpack_require__(107), + Expo: __webpack_require__(111), + Linear: __webpack_require__(115), + Quadratic: __webpack_require__(117), + Quartic: __webpack_require__(121), + Quintic: __webpack_require__(125), + Sine: __webpack_require__(129), + Stepped: __webpack_require__(133) + +}; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Back + */ + +module.exports = { + + In: __webpack_require__(92), + Out: __webpack_require__(93), + InOut: __webpack_require__(94) + +}; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Bounce + */ + +module.exports = { + + In: __webpack_require__(96), + Out: __webpack_require__(97), + InOut: __webpack_require__(98) + +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Circular + */ + +module.exports = { + + In: __webpack_require__(100), + Out: __webpack_require__(101), + InOut: __webpack_require__(102) + +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Cubic + */ + +module.exports = { + + In: __webpack_require__(104), + Out: __webpack_require__(105), + InOut: __webpack_require__(106) + +}; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(108), + Out: __webpack_require__(109), + InOut: __webpack_require__(110) + +}; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(112), + Out: __webpack_require__(113), + InOut: __webpack_require__(114) + +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 113 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(116); + + +/***/ }), +/* 116 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(118), + Out: __webpack_require__(119), + InOut: __webpack_require__(120) + +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(122), + Out: __webpack_require__(123), + InOut: __webpack_require__(124) + +}; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(126), + Out: __webpack_require__(127), + InOut: __webpack_require__(128) + +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(130), + Out: __webpack_require__(131), + InOut: __webpack_require__(132) + +}; + + +/***/ }), +/* 130 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 131 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(134); + + +/***/ }), +/* 134 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Fuzzy + */ + +module.exports = { + + Ceil: __webpack_require__(136), + Equal: __webpack_require__(35), + Floor: __webpack_require__(137), + GreaterThan: __webpack_require__(138), + LessThan: __webpack_require__(139) + +}; + + +/***/ }), +/* 136 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 137 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 138 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 139 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Interpolation + */ + +module.exports = { + + Bezier: __webpack_require__(141), + CatmullRom: __webpack_require__(142), + CubicBezier: __webpack_require__(143), + Linear: __webpack_require__(144), + QuadraticBezier: __webpack_require__(145), + SmoothStep: __webpack_require__(146), + SmootherStep: __webpack_require__(147) + +}; + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bernstein = __webpack_require__(36); + +/** + * 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; + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CatmullRom = __webpack_require__(38); + +/** + * 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; + + +/***/ }), +/* 143 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Linear = __webpack_require__(39); + +/** + * 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; + + +/***/ }), +/* 145 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmoothStep = __webpack_require__(40); + +/** + * 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; + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmootherStep = __webpack_require__(41); + +/** + * 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; + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Pow2 + */ + +module.exports = { + + GetNext: __webpack_require__(149), + IsSize: __webpack_require__(150), + IsValue: __webpack_require__(151) + +}; + + +/***/ }), +/* 149 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 150 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 151 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Snap + */ + +module.exports = { + + Ceil: __webpack_require__(153), + Floor: __webpack_require__(154), + To: __webpack_require__(155) + +}; + + +/***/ }), +/* 153 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 154 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 155 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(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; + + +/***/ }), +/* 157 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 158 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The random integer. + */ +var Between = function (min, max) +{ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +module.exports = Between; + + +/***/ }), +/* 159 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [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; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(1); +var Class = __webpack_require__(0); +var Matrix4 = __webpack_require__(22); +var NOOP = __webpack_require__(2); + +var tempMatrix = new Matrix4(); + +/** + * @classdesc + * + * @class Euler + * @memberof Phaser.Math + * @constructor + * @since 3.50.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + */ +var Euler = new Class({ + + initialize: + + function Euler (x, y, z, order) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (z === undefined) { z = 0; } + if (order === undefined) { order = Euler.DefaultOrder; } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this.onChangeCallback = NOOP; + }, + + x: { + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + + this.onChangeCallback(this); + } + }, + + y: { + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + + this.onChangeCallback(this); + } + }, + + z: { + get: function () + { + return this._z; + }, + + set: function (value) + { + this._z = value; + + this.onChangeCallback(this); + } + }, + + order: { + get: function () + { + return this._order; + }, + + set: function (value) + { + this._order = value; + + this.onChangeCallback(this); + } + }, + + set: function (x, y, z, order) + { + if (order === undefined) { order = this._order; } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this.onChangeCallback(this); + + return this; + }, + + copy: function (euler) + { + return this.set(euler.x, euler.y, euler.z, euler.order); + }, + + setFromQuaternion: function (quaternion, order, update) + { + if (order === undefined) { order = this._order; } + if (update === undefined) { update = false; } + + tempMatrix.fromQuat(quaternion); + + return this.setFromRotationMatrix(tempMatrix, order, update); + }, + + setFromRotationMatrix: function (matrix, order, update) + { + if (order === undefined) { order = this._order; } + if (update === undefined) { update = false; } + + var elements = matrix.val; + + // Upper 3x3 of matrix is un-scaled rotation matrix + var m11 = elements[0]; + var m12 = elements[4]; + var m13 = elements[8]; + var m21 = elements[1]; + var m22 = elements[5]; + var m23 = elements[9]; + var m31 = elements[2]; + var m32 = elements[6]; + var m33 = elements[10]; + + var x = 0; + var y = 0; + var z = 0; + var epsilon = 0.99999; + + switch (order) + { + case 'XYZ': + { + y = Math.asin(Clamp(m13, -1, 1)); + + if (Math.abs(m13) < epsilon) + { + x = Math.atan2(-m23, m33); + z = Math.atan2(-m12, m11); + } + else + { + x = Math.atan2(m32, m22); + } + + break; + } + + case 'YXZ': + { + x = Math.asin(-Clamp(m23, -1, 1)); + + if (Math.abs(m23) < epsilon) + { + y = Math.atan2(m13, m33); + z = Math.atan2(m21, m22); + } + else + { + y = Math.atan2(-m31, m11); + } + + break; + } + + case 'ZXY': + { + x = Math.asin(Clamp(m32, -1, 1)); + + if (Math.abs(m32) < epsilon) + { + y = Math.atan2(-m31, m33); + z = Math.atan2(-m12, m22); + } + else + { + z = Math.atan2(m21, m11); + } + + break; + } + + case 'ZYX': + { + y = Math.asin(-Clamp(m31, -1, 1)); + + if (Math.abs(m31) < epsilon) + { + x = Math.atan2(m32, m33); + z = Math.atan2(m21, m11); + } + else + { + z = Math.atan2(-m12, m22); + } + + break; + } + + case 'YZX': + { + z = Math.asin(Clamp(m21, -1, 1)); + + if (Math.abs(m21) < epsilon) + { + x = Math.atan2(-m23, m22); + y = Math.atan2(-m31, m11); + } + else + { + y = Math.atan2(m13, m33); + } + + break; + } + + case 'XZY': + { + z = Math.asin(-Clamp(m12, -1, 1)); + + if (Math.abs(m12) < epsilon) + { + x = Math.atan2(m32, m22); + y = Math.atan2(m13, m11); + } + else + { + x = Math.atan2(-m23, m33); + } + + break; + } + } + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + if (update) + { + this.onChangeCallback(this); + } + + return this; + } + +}); + +Euler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ]; + +Euler.DefaultOrder = 'XYZ'; + +module.exports = Euler; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [place=0] - The place to round to. + * @param {number} [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; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(1); + +/** + * 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 + min; +}; + +module.exports = FromPercent; + + +/***/ }), +/* 164 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 166 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports) { + +/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Interpolates two given Vectors and returns a new Vector between them. + * + * Does not modify either of the passed Vectors. + * + * @function Phaser.Math.LinearXY + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} vector1 - Starting vector + * @param {Phaser.Math.Vector2} vector2 - Ending vector + * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * + * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + */ +var LinearXY = function (vector1, vector2, t) +{ + if (t === undefined) { t = 0; } + + return vector1.clone().lerp(vector2, t); +}; + +module.exports = LinearXY; + + +/***/ }), +/* 168 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports) { + +/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the median of the given values. The values are sorted and the middle value is returned. + * In case of an even number of values, the average of the two middle values is returned. + * + * @function Phaser.Math.Median + * @since 3.54.0 + * + * @param {number[]} values - The values to average. + * + * @return {number} The median value. + */ +var Median = function (values) +{ + var valuesNum = values.length; + if (valuesNum === 0) + { + return 0; + } + + values.sort(function (a, b) { return a - b; }); + + var halfIndex = Math.floor(valuesNum / 2); + + return valuesNum % 2 === 0 + ? (values[halfIndex] + values[halfIndex - 1]) / 2 + : values[halfIndex]; +}; + +module.exports = Median; + + +/***/ }), +/* 170 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 171 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 172 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 173 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 174 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; } + + 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; + + +/***/ }), +/* 175 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 176 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 177 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2013-2023 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; + + +/***/ }), +/* 178 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. + * @param {number} [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; + + +/***/ }), +/* 179 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(3); + +/** + * 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 {number} index - The position within the grid to get the x/y value for. + * @param {number} width - The width of the grid. + * @param {number} 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; + } + } + + return out.set(x, y); +}; + +module.exports = ToXY; + + +/***/ }), +/* 181 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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) + { + 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; + } + +}); + +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; + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(15); +var Matrix4 = __webpack_require__(22); +var Quaternion = __webpack_require__(46); + +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; + + +/***/ }), +/* 184 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scale Manager Resize Event. + * + * This event is dispatched whenever the Scale Manager detects a resize event from the browser. + * It sends three parameters to the callback, each of them being Size components. You can read + * the `width`, `height`, `aspectRatio` and other properties of these components to help with + * scaling your own game content. + * + * @event Phaser.Scale.Events#RESIZE + * @type {string} + * @since 3.16.1 + * + * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. + * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. + * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. + * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. + * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. + */ +module.exports = 'resize'; + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +var BasePlugin = __webpack_require__(186); +var Class = __webpack_require__(0); +var SceneEvents = __webpack_require__(23); + +/** + * @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. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + */ +var ScenePlugin = new Class({ + + Extends: BasePlugin, + + initialize: + + function ScenePlugin (scene, pluginManager, pluginKey) + { + 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; + + /** + * The key under which this plugin was installed into the Scene Systems. + * + * 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#pluginKey + * @type {string} + * @readonly + * @since 3.54.0 + */ + this.pluginKey = pluginKey; + + 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; + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2013-2023 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; + + +/***/ }), +/* 187 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @type {string} + * @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'; + + +/***/ }), +/* 188 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('boot', listener)`. + * + * @event Phaser.Scenes.Events#BOOT + * @type {string} + * @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'; + + +/***/ }), +/* 189 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('create', listener)`. + * + * @event Phaser.Scenes.Events#CREATE + * @type {string} + * @since 3.17.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. + */ +module.exports = 'create'; + + +/***/ }), +/* 190 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 191 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('pause', listener)`. + * + * @event Phaser.Scenes.Events#PAUSE + * @type {string} + * @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'; + + +/***/ }), +/* 192 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('postupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#POST_UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 193 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to this event from a Scene using `this.events.on('prerender', listener)`. + * + * A Scene will only render if it is visible. + * + * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. + * + * @event Phaser.Scenes.Events#PRE_RENDER + * @type {string} + * @since 3.53.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'prerender'; + + +/***/ }), +/* 194 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('preupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#PRE_UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 195 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('ready', listener)`. + * + * @event Phaser.Scenes.Events#READY + * @type {string} + * @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'; + + +/***/ }), +/* 196 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @type {string} + * @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'; + + +/***/ }), +/* 197 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('render', listener)`. + * + * A Scene will only render if it is visible. + * + * By the time this event is dispatched, the Scene will have already been rendered. + * + * @event Phaser.Scenes.Events#RENDER + * @type {string} + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'render'; + + +/***/ }), +/* 198 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('resume', listener)`. + * + * @event Phaser.Scenes.Events#RESUME + * @type {string} + * @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'; + + +/***/ }), +/* 199 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 200 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('sleep', listener)`. + * + * @event Phaser.Scenes.Events#SLEEP + * @type {string} + * @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'; + + +/***/ }), +/* 201 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('start', listener)`. + * + * @event Phaser.Scenes.Events#START + * @type {string} + * @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'; + + +/***/ }), +/* 202 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @since 3.5.0 + * + * @param {Phaser.Scene} scene -The Scene on which the transitioned completed. + */ +module.exports = 'transitioncomplete'; + + +/***/ }), +/* 203 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 204 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 205 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 206 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.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 + * @type {string} + * @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'; + + +/***/ }), +/* 207 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped. + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} + * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.events.on('update', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#UPDATE + * @type {string} + * @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'; + + +/***/ }), +/* 208 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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.events.on('wake', listener)`. + * + * @event Phaser.Scenes.Events#WAKE + * @type {string} + * @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'; + + +/***/ }), +/* 209 */ +/***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ @@ -1051,7 +22564,7 @@ var spine; .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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; return AttachmentTimeline; }()); @@ -1851,7 +23364,7 @@ var spine; var slot = slots[i]; if (slot.attachmentState == setupState) { var attachmentName = slot.data.attachmentName; - slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); } } this.unkeyedState += 2; @@ -1964,7 +23477,7 @@ var spine; 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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; }; @@ -10827,7 +32340,7 @@ var spine; function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) { if (contextConfig === void 0) { contextConfig = { alpha: "true" }; } this.restorables = new Array(); - if (canvasOrContext instanceof HTMLCanvasElement || canvasOrContext instanceof EventTarget) { + if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) { this.setupCanvas(canvasOrContext, contextConfig); } else { @@ -10906,23 +32419,22 @@ module.exports = spine; /***/ }), - -/***/ 3524: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Class = __webpack_require__(7473); -var GetFastValue = __webpack_require__(4597); -var ImageFile = __webpack_require__(6732); -var IsPlainObject = __webpack_require__(2482); -var JSONFile = __webpack_require__(704); -var MultiFile = __webpack_require__(3137); -var TextFile = __webpack_require__(1192); +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(9); +var ImageFile = __webpack_require__(211); +var IsPlainObject = __webpack_require__(6); +var JSONFile = __webpack_require__(223); +var MultiFile = __webpack_require__(224); +var TextFile = __webpack_require__(225); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig @@ -11167,1667 +32679,1506 @@ module.exports = SpineFile; /***/ }), - -/***/ 4513: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 211 */ +/***/ (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} + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(2494); -var Class = __webpack_require__(7473); -var GetValue = __webpack_require__(5851); -var ResizeEvent = __webpack_require__(3527); -var ScenePlugin = __webpack_require__(5722); -var Spine = __webpack_require__(6937); -var SpineFile = __webpack_require__(3524); -var SpineGameObject = __webpack_require__(8332); -var SpineContainer = __webpack_require__(5782); -var NOOP = __webpack_require__(1984); +var Class = __webpack_require__(0); +var CONST = __webpack_require__(10); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(9); +var IsPlainObject = __webpack_require__(6); +var GetURL = __webpack_require__(48); /** * @classdesc - * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. + * A single Image File suitable for loading by the Loader. * - * Find more details about Spine itself at http://esotericsoftware.com/. + * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. * - * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin - * 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. + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. * - * 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: [ - * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } - * ] - * } - * ``` - * - * 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, - * create: create, - * pack: { - * files: [ - * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' } - * ] - * } - * } - * ``` - * - * 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 two Game Object Factory methods, allowing you to create Spine Game Objects - * and Spine Containers: - * - * ```javascript - * 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 - * 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 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. - * - * 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 - * @extends Phaser.Plugins.ScenePlugin + * @class ImageFile + * @extends Phaser.Loader.File + * @memberof Phaser.Loader.FileTypes * @constructor - * @since 3.19.0 + * @since 3.0.0 * - * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. - * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. - * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object. + * @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] - Extra XHR Settings specifically for this file. + * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets. */ -var SpinePlugin = new Class({ +var ImageFile = new Class({ - Extends: ScenePlugin, + Extends: File, initialize: - function SpinePlugin (scene, pluginManager, pluginKey) + function ImageFile (loader, key, url, xhrSettings, frameConfig) { - ScenePlugin.call(this, scene, pluginManager, pluginKey); + var extension = 'png'; + var normalMapURL; - var game = pluginManager.game; - - /** - * A read-only flag that indicates if the game is running under WebGL or Canvas. - * - * @name SpinePlugin#isWebGL - * @type {boolean} - * @readonly - * @since 3.19.0 - */ - this.isWebGL = (game.config.renderType === 2); - - /** - * 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. - * - * @name SpinePlugin#cache - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.cache = game.cache.addCustom('spine'); - - /** - * 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. - * - * @name SpinePlugin#spineTextures - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.spineTextures = game.cache.addCustom('spineTextures'); - - /** - * A reference to the global JSON Cache. - * - * @name SpinePlugin#json - * @type {Phaser.Cache.BaseCache} - * @since 3.19.0 - */ - this.json = game.cache.json; - - /** - * A reference to the global Texture Manager. - * - * @name SpinePlugin#textures - * @type {Phaser.Textures.TextureManager} - * @since 3.19.0 - */ - this.textures = game.textures; - - /** - * A flag that sets if the Skeleton Renderers will render debug information over the top - * of the skeleton or not. - * - * @name SpinePlugin#drawDebug - * @type {boolean} - * @since 3.19.0 - */ - this.drawDebug = false; - - /** - * The underlying WebGL context of the Phaser renderer. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#gl - * @type {WebGLRenderingContext} - * @since 3.19.0 - */ - this.gl; - - /** - * A reference to either the Canvas or WebGL Renderer that this Game is using. - * - * @name SpinePlugin#renderer - * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} - * @since 3.19.0 - */ - this.renderer; - - /** - * An instance of the Spine WebGL Scene Renderer. - * - * There is only one instance of the Scene Renderer shared across the whole plugin. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#sceneRenderer - * @type {spine.webgl.SceneRenderer} - * @since 3.19.0 - */ - this.sceneRenderer; - - /** - * An instance of the Spine Skeleton Renderer. - * - * @name SpinePlugin#skeletonRenderer - * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)} - * @since 3.19.0 - */ - this.skeletonRenderer; - - /** - * An instance of the Spine Skeleton Debug Renderer. - * - * Only set if running in WebGL mode. - * - * @name SpinePlugin#skeletonDebugRenderer - * @type {spine.webgl.skeletonDebugRenderer} - * @since 3.19.0 - */ - this.skeletonDebugRenderer; - - /** - * A reference to the Spine runtime. - * This is the runtime created by Esoteric Software. - * - * @name SpinePlugin#plugin - * @type {spine} - * @since 3.19.0 - */ - this.plugin = Spine; - - /** - * An internal vector3 used by the screen to world method. - * - * @name SpinePlugin#temp1 - * @private - * @type {spine.webgl.Vector3} - * @since 3.19.0 - */ - this.temp1; - - /** - * An internal vector3 used by the screen to world method. - * - * @name SpinePlugin#temp2 - * @private - * @type {spine.webgl.Vector3} - * @since 3.19.0 - */ - this.temp2; - - if (this.isWebGL) + if (IsPlainObject(key)) { - this.runtime = Spine.webgl; + var config = key; - this.renderer = game.renderer; - this.gl = game.renderer.gl; + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + normalMapURL = GetFastValue(config, 'normalMap'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + frameConfig = GetFastValue(config, 'frameConfig'); + } - this.getAtlas = this.getAtlasWebGL; + if (Array.isArray(url)) + { + normalMapURL = url[1]; + url = url[0]; + } + + var fileConfig = { + type: 'image', + cache: loader.textureManager, + extension: extension, + responseType: 'blob', + key: key, + url: url, + xhrSettings: xhrSettings, + config: frameConfig + }; + + File.call(this, loader, fileConfig); + + // Do we have a normal map to load as well? + if (normalMapURL) + { + var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig); + + normalMap.type = 'normalMap'; + + this.setLink(normalMap); + + loader.addFile(normalMap); + } + + this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; + + if (this.useImageElementLoad) + { + this.load = this.loadImage; + this.onProcess = this.onProcessImage; + } + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + File.revokeObjectURL(_this.data); + + _this.onProcessComplete(); + }; + + this.data.onerror = function () + { + File.revokeObjectURL(_this.data); + + _this.onProcessError(); + }; + + File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); + }, + + /** + * Handles image load processing. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage + * @private + * @since 3.60.0 + */ + onProcessImage: function () + { + var result = this.state; + + this.state = CONST.FILE_PROCESSING; + + if (result === CONST.FILE_LOADED) + { + this.onProcessComplete(); } else { - this.runtime = Spine.canvas; - - this.renderer = game.renderer; - - this.getAtlas = this.getAtlasCanvas; + this.onProcessError(); } + }, - // Headless mode? - if (!this.renderer) + /** + * Loads the image using either XHR or an Image tag. + * + * @method Phaser.Loader.FileTypes.ImageFile#loadImage + * @private + * @since 3.60.0 + */ + loadImage: function () + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) { - this.renderer = { - width: game.scale.width, - height: game.scale.height, - preRender: NOOP, - postRender: NOOP, - render: NOOP, - destroy: NOOP + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + _this.state = CONST.FILE_LOADED; + + _this.loader.nextFile(_this, true); }; + + this.data.onerror = function () + { + _this.loader.nextFile(_this, false); + }; + + this.data.src = this.src; } - - var add = function (x, y, key, animationName, loop) - { - var spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineGameObject(this.scene, spinePlugin, 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(); - }; - - var addContainer = function (x, y, children) - { - var spinePlugin = this.scene.sys[pluginKey]; - var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey]; - var container = new SpineContainer(this.scene, spinePlugin, 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); }, /** - * Internal boot handler. + * Adds this file to its target cache upon successful loading and processing. * - * @method SpinePlugin#boot - * @private - * @since 3.19.0 + * @method Phaser.Loader.FileTypes.ImageFile#addToCache + * @since 3.7.0 */ - boot: function () + addToCache: function () { - if (this.isWebGL) + // Check if we have a linked normal map + var linkFile = this.linkFile; + + if (linkFile) { - this.bootWebGL(); - this.onResize(); - this.game.scale.on(ResizeEvent, this.onResize, this); - } - else - { - this.bootCanvas(); - } - - var eventEmitter = this.systems.events; - - eventEmitter.once('shutdown', this.shutdown, this); - eventEmitter.once('destroy', this.destroy, this); - - this.game.events.once('destroy', this.gameDestroy, this); - }, - - /** - * Internal boot handler for the Canvas Renderer. - * - * @method SpinePlugin#bootCanvas - * @private - * @since 3.19.0 - */ - bootCanvas: function () - { - this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context); - }, - - /** - * Internal boot handler for the WebGL Renderer. - * - * @method SpinePlugin#bootWebGL - * @private - * @since 3.19.0 - */ - bootWebGL: function () - { - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! - - var setBlendMode = function (srcBlend, dstBlend) - { - if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend) + // We do, but has it loaded? + if (linkFile.state >= CONST.FILE_COMPLETE) { - var gl = this.context.gl; - - this.srcBlend = srcBlend; - this.dstBlend = dstBlend; - - if (this.isDrawing) + // Both files have loaded + if (this.type === 'normalMap') { - this.flush(); - gl.blendFunc(this.srcBlend, this.dstBlend); + // linkFile.data = Image + // this.data = Normal Map + this.cache.addImage(this.key, linkFile.data, this.data); + } + else + { + // linkFile.data = Normal Map + // this.data = Image + this.cache.addImage(this.key, this.data, linkFile.data); } } - }; - var sceneRenderer = this.renderer.spineSceneRenderer; - - if (!sceneRenderer) - { - sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - sceneRenderer.batcher.setBlendMode = setBlendMode; - sceneRenderer.shapes.setBlendMode = setBlendMode; - - this.renderer.spineSceneRenderer = sceneRenderer; - } - - // All scene share the same instance - this.sceneRenderer = sceneRenderer; - this.skeletonRenderer = sceneRenderer.skeletonRenderer; - this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; - - this.temp1 = new Spine.webgl.Vector3(0, 0, 0); - this.temp2 = new Spine.webgl.Vector3(0, 0, 0); - }, - - /** - * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, - * then returns it. You do not normally need to invoke this method directly. - * - * @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) - { - var atlasEntry = this.cache.get(key); - - if (!atlasEntry) - { - console.warn('No atlas data for: ' + key); - return; - } - - var atlas; - var spineTextures = this.spineTextures; - - if (spineTextures.has(key)) - { - atlas = spineTextures.get(key); + // Nothing to do here, we'll use the linkFile `addToCache` call + // to process this pair } else { - var textures = this.textures; - - atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) - { - return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); - }); + this.cache.addImage(this.key, this.data); } - - return atlas; - }, - - /** - * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas, - * then returns it. You do not normally need to invoke this method directly. - * - * @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) - { - var atlasEntry = this.cache.get(key); - - if (!atlasEntry) - { - console.warn('No atlas data for: ' + key); - return; - } - - var atlas; - var spineTextures = this.spineTextures; - - if (spineTextures.has(key)) - { - atlas = spineTextures.get(key); - } - else - { - var textures = this.textures; - - var gl = this.sceneRenderer.context.gl; - - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - - atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) - { - return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); - }); - } - - return atlas; - }, - - /** - * 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 () - * { - * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true); - * } - * ``` - * - * 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. - * - * 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 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', - * jsonURL: 'boy.json', - * atlasURL: 'boy.atlas', - * preMultipliedAlpha: true - * }); - * ``` - * - * If you need to load multiple Spine atlas files, provide them as an array: - * - * ```javascript - * function preload () - * { - * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true); - * } - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details. - * - * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the data from the Spine plugin. - * - * 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 "alien" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * 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#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} [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. - * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. - */ - 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); - } - } - else - { - multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); - - 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) - { - var temp1 = this.temp1; - var temp2 = this.temp2; - var camera = this.sceneRenderer.camera; - - temp1.set(x + skeleton.x, y - skeleton.y, 0); - - var width = camera.viewportWidth; - var height = camera.viewportHeight; - - camera.screenToWorld(temp1, width, height); - - if (bone && bone.parent !== null) - { - bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0)); - - return new Spine.Vector2(temp2.x, temp2.y); - } - else if (bone) - { - return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y); - } - else - { - return new Spine.Vector2(temp1.x, temp1.y); - } - }, - - /** - * Returns a Spine Vector2 based on the given x and y values. - * - * @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) - { - return new Spine.Vector2(x, y); - }, - - /** - * 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) - { - return new Spine.webgl.Vector3(x, y, z); - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawBones = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawRegionAttachments = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawBoundingBoxes = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawMeshHull = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawMeshTriangles = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawPaths = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawSkeletonXY = value; - - return this; - }, - - /** - * 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) - { - if (value === undefined) { value = true; } - - this.skeletonDebugRenderer.drawClipping = value; - - return this; - }, - - /** - * 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) - { - this.sceneRenderer.skeletonRenderer.vertexEffect = effect; - - return this; - }, - - /** - * 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) - { - var atlasKey = key; - var jsonKey = key; - var split = (key.indexOf('.') !== -1); - - if (split) - { - var parts = key.split('.'); - - atlasKey = parts.shift(); - jsonKey = parts.join('.'); - } - - var atlasData = this.cache.get(atlasKey); - var atlas = this.getAtlas(atlasKey); - - if (!atlas) - { - return null; - } - - if (!this.spineTextures.has(atlasKey)) - { - this.spineTextures.add(atlasKey, atlas); - } - - var preMultipliedAlpha = atlasData.preMultipliedAlpha; - - var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); - - var skeletonJson = new Spine.SkeletonJson(atlasLoader); - - var data; - - if (skeletonJSON) - { - data = skeletonJSON; - } - else - { - var json = this.json.get(atlasKey); - - data = (split) ? GetValue(json, jsonKey) : json; - } - - if (data) - { - var skeletonData = skeletonJson.readSkeletonData(data); - - var skeleton = new Spine.Skeleton(skeletonData); - - return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; - } - else - { - return null; - } - }, - - /** - * 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) - { - var stateData = new Spine.AnimationStateData(skeleton.data); - - var state = new Spine.AnimationState(stateData); - - return { stateData: stateData, state: state }; - }, - - /** - * 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) - { - var offset = new Spine.Vector2(); - var size = new Spine.Vector2(); - - skeleton.getBounds(offset, size, []); - - return { offset: offset, size: size }; - }, - - /** - * Internal handler for when the renderer resizes. - * - * Only called if running in WebGL. - * - * @method SpinePlugin#onResize - * @since 3.19.0 - */ - onResize: function () - { - var renderer = this.renderer; - var sceneRenderer = this.sceneRenderer; - - var viewportWidth = renderer.width; - var viewportHeight = renderer.height; - - sceneRenderer.camera.position.x = viewportWidth / 2; - sceneRenderer.camera.position.y = viewportHeight / 2; - - sceneRenderer.camera.setViewport(viewportWidth, 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 - * @private - * @since 3.19.0 - */ - shutdown: function () - { - 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 - * @private - * @since 3.19.0 - */ - destroy: function () - { - this.shutdown(); - - this.game = null; - this.scene = null; - this.systems = null; - - this.cache = null; - this.spineTextures = null; - this.json = null; - this.textures = 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.pluginManager.removeGameObject('spine', true, true); - this.pluginManager.removeGameObject('spineContainer', true, true); - - this.pluginManager = null; - - var sceneRenderer = this.renderer.spineSceneRenderer; - - if (sceneRenderer) - { - sceneRenderer.dispose(); - } - - this.renderer.spineSceneRenderer = null; - this.sceneRenderer = null; } }); -SpinePlugin.SpineGameObject = SpineGameObject; -SpinePlugin.SpineContainer = SpineContainer; - /** - * Creates a new Spine Game Object and adds it to the Scene. + * Adds an Image, or array of Images, to the current load queue. * - * 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. + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: * * ```javascript - * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); + * function preload () + * { + * this.load.image('logo', 'images/phaserLogo.png'); + * } * ``` * - * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it. + * 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 animation name is also optional and can be set later via `SpineGameObject.setAnimation`. + * 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. * - * Should you wish for more control over the object creation, such as setting a slot attachment or skin - * name, then use `SpinePlugin.make` instead. + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * 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 Texture Manager first, before loading a new one. * - * @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. - * @param {string} [animationName] - The name of the animation to set on this Skeleton. - * @param {boolean} [loop=false] - Should the animation playback be looped or not? - * - * @return {SpineGameObject} The Game Object that was created. - */ - -/** - * 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. + * Instead of passing arguments you can pass a configuration object, such as: * * ```javascript - * let jelly = this.make.spine({ - * x: 500, y: 500, key: 'jelly', - * scale: 1.5, - * skinName: 'square_Green', - * animationName: 'jelly-idle', loop: true, - * slotName: 'hat', attachmentName: 'images/La_14' + * this.load.image({ + * key: 'logo', + * url: 'images/AtariLogo.png' * }); * ``` * - * @method SpinePlugin#make - * @since 3.19.0 + * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details. * - * @param {any} config - The configuration object this Game Object will use to create itself. - * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. - * - * @return {SpineGameObject} The Game Object that was created. - */ - -module.exports = SpinePlugin; - - -/***/ }), - -/***/ 5782: -/***/ ((module, __unused_webpack_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__(7473); -var Container = __webpack_require__(7361); -var SpineContainerRender = __webpack_require__(2437); - -/** - * @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 must only add ever Spine Game Objects, or other Spine Containers, 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: + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: * * ```javascript - * this.add.spineContainer(); + * this.load.image('logo', 'images/AtariLogo.png'); + * // and later in your game ... + * this.add.image(x, y, 'logo'); * ``` * - * or + * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * 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 "alien" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * 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.make.spineContainer(); + * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * - * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the - * container children. You can, however, mask children of Spine Containers if they are embedded within other - * Spine Containers. In short, if you need masking, don't mix and match the types. + * Or, if you are using a config object use the `normalMap` property: * - * See the Container documentation for further details about what Containers can do. + * ```javascript + * this.load.image({ + * key: 'logo', + * url: 'images/AtariLogo.png', + * normalMap: 'images/AtariLogo-n.png' + * }); + * ``` * - * @class SpineContainer - * @extends Phaser.GameObjects.Container - * @constructor - * @since 3.50.0 + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. * - * @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. + * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. + * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images + * via the Image tag instead. + * + * Note: The ability to load this type of file will only be available if the Image 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#image + * @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 {this} The Loader instance. */ -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 SpineContainer#plugin - * @type {SpinePlugin} - * @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; - } - -}); - -module.exports = SpineContainer; - - -/***/ }), - -/***/ 2437: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var renderWebGL = __webpack_require__(1984); -var renderCanvas = __webpack_require__(1984); - -if (true) +FileTypesManager.register('image', function (key, url, xhrSettings) { - renderWebGL = __webpack_require__(434); -} - -if (false) -{} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas - -}; - - -/***/ }), - -/***/ 434: -/***/ ((module) => { - -/** - * @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 SpineContainerWebGLRenderer#renderWebGL - * @since 3.50.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineContainer} container - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix) -{ - var plugin = container.plugin; - var sceneRenderer = plugin.sceneRenderer; - var children = container.list; - - if (children.length === 0) + if (Array.isArray(key)) { - if (sceneRenderer.batcher.isDrawing && renderer.finalType) + for (var i = 0; i < key.length; i++) { - sceneRenderer.end(); - - renderer.pipelines.rebind(); + // 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 ImageFile(this, key[i])); } - - return; - } - - camera.addToRenderList(container); - - 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); + this.addFile(new ImageFile(this, key, url, xhrSettings)); } - if (renderer.newType) - { - // flush + clear if this is a new type - renderer.pipelines.clear(); + return this; +}); - sceneRenderer.begin(); - } - - var rendererNextType = renderer.nextTypeMatch; - - // Force these to avoid batch flushing during SpineGameObject.renderWebGL - renderer.nextTypeMatch = true; - renderer.newType = false; - - for (var i = 0; i < children.length; i++) - { - var child = children[i]; - - if (child.willRender(camera, container)) - { - var mask = child.mask; - - if (mask) - { - sceneRenderer.end(); - - renderer.pipelines.rebind(); - - mask.preRenderWebGL(renderer, child, camera); - - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - - child.renderWebGL(renderer, child, camera, transformMatrix, container); - - if (mask) - { - sceneRenderer.end(); - - renderer.pipelines.rebind(); - - mask.postRenderWebGL(renderer, camera); - - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - } - } - - renderer.nextTypeMatch = rendererNextType; - - if (!rendererNextType) - { - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch - sceneRenderer.end(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); - } -}; - -module.exports = SpineContainerWebGLRenderer; +module.exports = ImageFile; /***/ }), - -/***/ 6576: -/***/ ((module) => { +/* 212 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Complete Event. + * The Loader Plugin Add File Event. * - * @event SpinePluginEvents#COMPLETE - * @since 3.19.0 + * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. + * + * Listen to it from a Scene using: `this.load.on('addfile', listener)`. + * + * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. + * + * @event Phaser.Loader.Events#ADD + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The unique key of the file that was added to the Loader. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader. + */ +module.exports = 'addfile'; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Complete Event. + * + * This event is dispatched when the Loader has fully processed everything in the load queue. + * By this point every loaded file will now be in its associated cache and ready for use. + * + * Listen to it from a Scene using: `this.load.on('complete', listener)`. + * + * @event Phaser.Loader.Events#COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + * @param {number} totalComplete - The total number of files that successfully loaded. + * @param {number} totalFailed - The total number of files that failed to load. */ module.exports = 'complete'; /***/ }), - -/***/ 8621: -/***/ ((module) => { +/* 214 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Dispose Event. + * The File Load Complete Event. * - * @event SpinePluginEvents#DISPOSE - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. + * + * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. + * + * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. + * + * 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. + * + * @event Phaser.Loader.Events#FILE_COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The key of the file that just loaded and finished processing. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ -module.exports = 'dispose'; +module.exports = 'filecomplete'; /***/ }), - -/***/ 8944: -/***/ ((module) => { +/* 215 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The End Event. + * The File Load Complete Event. * - * @event SpinePluginEvents#END - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. + * + * It uses a special dynamic event name constructed from the key and type of the file. + * + * For example, if you have loaded an `image` with a key of `monster`, you can listen for it + * using the following: + * + * ```javascript + * this.load.on('filecomplete-image-monster', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a texture `atlas` with a key of `Level1`: + * + * ```javascript + * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: + * + * ```javascript + * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { + * // Your handler code + * }); + * ``` + * + * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. + * + * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. + * + * @event Phaser.Loader.Events#FILE_KEY_COMPLETE + * @type {string} + * @since 3.0.0 + * + * @param {string} key - The key of the file that just loaded and finished processing. + * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ -module.exports = 'end'; +module.exports = 'filecomplete-'; /***/ }), - -/***/ 7494: -/***/ ((module) => { +/* 216 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Custom Event Event. + * The File Load Error Event. * - * @event SpinePluginEvents#EVENT - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when a file fails to load. + * + * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. + * + * @event Phaser.Loader.Events#FILE_LOAD_ERROR + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which errored during load. */ -module.exports = 'event'; +module.exports = 'loaderror'; /***/ }), - -/***/ 1908: -/***/ ((module) => { +/* 217 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Interrupted Event. + * The File Load Event. * - * @event SpinePluginEvents#INTERRUPTED - * @since 3.19.0 + * This event is dispatched by the Loader Plugin when a file finishes loading, + * but _before_ it is processed and added to the internal Phaser caches. + * + * Listen to it from a Scene using: `this.load.on('load', listener)`. + * + * @event Phaser.Loader.Events#FILE_LOAD + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. */ -module.exports = 'interrupted'; +module.exports = 'load'; /***/ }), - -/***/ 5591: -/***/ ((module) => { +/* 218 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Start Event. + * The File Load Progress Event. * - * @event SpinePluginEvents#START - * @since 3.19.0 + * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and + * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. + * + * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. + * + * @event Phaser.Loader.Events#FILE_PROGRESS + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - A reference to the File which errored during load. + * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. + */ +module.exports = 'fileprogress'; + + +/***/ }), +/* 219 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Post Process Event. + * + * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. + * It is dispatched before the internal lists are cleared and each File is destroyed. + * + * Use this hook to perform any last minute processing of files that can only happen once the + * Loader has completed, but prior to it emitting the `complete` event. + * + * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. + * + * @event Phaser.Loader.Events#POST_PROCESS + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. + */ +module.exports = 'postprocess'; + + +/***/ }), +/* 220 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Progress Event. + * + * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. + * + * Listen to it from a Scene using: `this.load.on('progress', listener)`. + * + * @event Phaser.Loader.Events#PROGRESS + * @type {string} + * @since 3.0.0 + * + * @param {number} progress - The current progress of the load. A value between 0 and 1. + */ +module.exports = 'progress'; + + +/***/ }), +/* 221 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Loader Plugin Start Event. + * + * This event is dispatched when the Loader starts running. At this point load progress is zero. + * + * This event is dispatched even if there aren't any files in the load queue. + * + * Listen to it from a Scene using: `this.load.on('start', listener)`. + * + * @event Phaser.Loader.Events#START + * @type {string} + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. */ module.exports = 'start'; /***/ }), - -/***/ 5146: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var MergeXHRSettings = __webpack_require__(49); + /** - * @namespace SpinePluginEvents + * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings + * and starts the download of it. It uses the Files own XHRSettings and merges them + * with the global XHRSettings object to set the xhr values before download. + * + * @function Phaser.Loader.XHRLoader + * @since 3.0.0 + * + * @param {Phaser.Loader.File} file - The File to download. + * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object. + * + * @return {XMLHttpRequest} The XHR object. */ +var XHRLoader = function (file, globalXHRSettings) +{ + var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings); -module.exports = { + var xhr = new XMLHttpRequest(); - COMPLETE: __webpack_require__(6576), - DISPOSE: __webpack_require__(8621), - END: __webpack_require__(8944), - EVENT: __webpack_require__(7494), - INTERRUPTED: __webpack_require__(1908), - START: __webpack_require__(5591) + xhr.open('GET', file.src, config.async, config.user, config.password); + 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); + } + + if (config.requestedWith) + { + xhr.setRequestHeader('X-Requested-With', config.requestedWith); + } + + if (config.overrideMimeType) + { + 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); + xhr.onerror = file.onError.bind(file, xhr); + xhr.onprogress = file.onProgress.bind(file); + + // This is the only standard method, the ones above are browser additions (maybe not universal?) + // xhr.onreadystatechange + + xhr.send(); + + return xhr; }; +module.exports = XHRLoader; + /***/ }), - -/***/ 8332: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(10); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(9); +var GetValue = __webpack_require__(8); +var IsPlainObject = __webpack_require__(6); + +/** + * @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); + + // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it. + if (IsPlainObject(url)) + { + 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; + + try + { + var json = JSON.parse(this.xhrLoader.responseText); + } + catch (e) + { + this.onProcessError(); + + throw e; + } + + 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; + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(10); +var Events = __webpack_require__(47); + +/** + * @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) + { + var finalFiles = []; + + // Clean out any potential 'null' or 'undefined' file entries + files.forEach(function (file) + { + if (file) + { + finalFiles.push(file); + } + }); + + /** + * 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 {number} + * @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 = finalFiles; + + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.MultiFile#state + * @type {number} + * @since 3.60.0 + */ + this.state = CONST.FILE_PENDING; + + /** + * 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 {number} + * @since 3.7.0 + */ + + this.pending = finalFiles.length; + + /** + * The number of files that failed to load. + * + * @name Phaser.Loader.MultiFile#failed + * @type {number} + * @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 < finalFiles.length; i++) + { + finalFiles[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++; + + // eslint-disable-next-line no-console + console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); + } + }, + + /** + * Called once all children of this multi file have been added to their caches and is now + * ready for deletion from the Loader. + * + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.MultiFile#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.60.0 + */ + pendingDestroy: function () + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); + + this.loader.flagForRemoval(this); + + for (var i = 0; i < this.files.length; i++) + { + this.files[i].pendingDestroy(); + } + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this Multi File and any references it holds. + * + * @method Phaser.Loader.MultiFile#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.loader = null; + this.files = null; + this.config = null; + } + +}); + +module.exports = MultiFile; + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(10); +var File = __webpack_require__(24); +var FileTypesManager = __webpack_require__(25); +var GetFastValue = __webpack_require__(9); +var IsPlainObject = __webpack_require__(6); + +/** + * @classdesc + * A single Text File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. + * + * @class TextFile + * @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.TextFileConfig)} 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 `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + */ +var TextFile = new Class({ + + Extends: File, + + initialize: + + function TextFile (loader, key, url, xhrSettings) + { + var type = 'text'; + var extension = 'txt'; + var cache = loader.cacheManager.text; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + type = GetFastValue(config, 'type', type); + cache = GetFastValue(config, 'cache', cache); + } + + var fileConfig = { + type: type, + cache: cache, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings + }; + + File.call(this, loader, fileConfig); + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.TextFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = this.xhrLoader.responseText; + + this.onProcessComplete(); + } + +}); + +/** + * Adds a Text file, or array of Text 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.text('story', 'files/IntroStory.txt'); + * } + * ``` + * + * 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 Text Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Text 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 Text Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.text({ + * key: 'story', + * url: 'files/IntroStory.txt' + * }); + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.text('story', 'files/IntroStory.txt'); + * // and later in your game ... + * var data = this.cache.text.get('story'); + * ``` + * + * 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 `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the text from the Text 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 "story" + * 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 + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Text 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#text + * @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 {this} The Loader instance. + */ +FileTypesManager.register('text', function (key, url, 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 TextFile(this, key[i])); + } + } + else + { + this.addFile(new TextFile(this, key, url, xhrSettings)); + } + + return this; +}); + +module.exports = TextFile; + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(6412); -var Clamp = __webpack_require__(2915); -var Class = __webpack_require__(7473); -var ComponentsComputedSize = __webpack_require__(1991); -var ComponentsDepth = __webpack_require__(3131); -var ComponentsFlip = __webpack_require__(9660); -var ComponentsScrollFactor = __webpack_require__(4627); -var ComponentsTransform = __webpack_require__(3212); -var ComponentsVisible = __webpack_require__(8414); -var CounterClockwise = __webpack_require__(3426); -var DegToRad = __webpack_require__(7149); -var GameObject = __webpack_require__(2273); -var RadToDeg = __webpack_require__(4208); -var SpineEvents = __webpack_require__(5146); -var SpineGameObjectRender = __webpack_require__(2762); +var AngleBetween = __webpack_require__(31); +var Clamp = __webpack_require__(1); +var Class = __webpack_require__(0); +var ComponentsComputedSize = __webpack_require__(51); +var ComponentsDepth = __webpack_require__(52); +var ComponentsFlip = __webpack_require__(53); +var ComponentsScrollFactor = __webpack_require__(54); +var ComponentsTransform = __webpack_require__(55); +var ComponentsVisible = __webpack_require__(56); +var CounterClockwise = __webpack_require__(14); +var DegToRad = __webpack_require__(21); +var GameObject = __webpack_require__(57); +var RadToDeg = __webpack_require__(16); +var SpineEvents = __webpack_require__(248); +var SpineGameObjectRender = __webpack_require__(255); /** * @classdesc @@ -12875,9 +34226,10 @@ var SpineGameObjectRender = __webpack_require__(2762); * ``` * * 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. + * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup + * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable + * to get an accurate bounds. You can 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 @@ -12888,6 +34240,7 @@ var SpineGameObjectRender = __webpack_require__(2762); * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. * * @class SpineGameObject + * @extends Phaser.GameObjects.GameObject * @constructor * @since 3.19.0 * @@ -13321,9 +34674,9 @@ var SpineGameObject = new Class({ * @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. * @param {boolean} [loop=false] - Should the animation, if set, loop or not? + * @param {object} [skeletonJSON] - The JSON data for the Skeleton. * * @return {this} This Game Object. */ @@ -14419,766 +35772,17 @@ module.exports = SpineGameObject; /***/ }), - -/***/ 2762: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 227 */ +/***/ (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 renderWebGL = __webpack_require__(1984); -var renderCanvas = __webpack_require__(1984); -var renderDirect = __webpack_require__(1984); - -if (true) -{ - renderWebGL = __webpack_require__(4290); - renderDirect = __webpack_require__(780); -} - -if (false) -{} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas, - renderDirect: renderDirect - -}; - - -/***/ }), - -/***/ 780: -/***/ ((module, __unused_webpack_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 Clamp = __webpack_require__(2915); -var CounterClockwise = __webpack_require__(3426); -var GetCalcMatrix = __webpack_require__(2208); -var RadToDeg = __webpack_require__(4208); -var Wrap = __webpack_require__(8445); - -/** - * Directly 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 SpineGameObject#renderDirect - * @since 3.50.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. - */ -var SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container) -{ - var plugin = src.plugin; - var skeleton = src.skeleton; - var sceneRenderer = plugin.sceneRenderer; - - // flush + clear previous pipeline if this is a new type - renderer.pipelines.clear(); - - sceneRenderer.begin(); - - var scrollFactorX = src.scrollFactorX; - var scrollFactorY = src.scrollFactorY; - var alpha = skeleton.color.a; - - if (container) - { - src.scrollFactorX = container.scrollFactorX; - src.scrollFactorY = container.scrollFactorY; - - skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); - } - - camera.addToRenderList(src); - - var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - - 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; - - // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled - src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); - } - 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 (renderer.currentFramebuffer !== null) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - */ - - skeleton.updateWorldTransform(); - - // Draw the current skeleton - - sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); - - if (container) - { - src.scrollFactorX = scrollFactorX; - src.scrollFactorY = scrollFactorY; - skeleton.color.a = alpha; - } - - if (plugin.drawDebug || src.drawDebug) - { - // Because if we don't, the bones render positions are completely wrong (*sigh*) - var oldX = skeleton.x; - var oldY = skeleton.y; - - skeleton.x = 0; - skeleton.y = 0; - - sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); - - skeleton.x = oldX; - skeleton.y = oldY; - } - - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch - sceneRenderer.end(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); -}; - -module.exports = SpineGameObjectWebGLDirect; - - -/***/ }), - -/***/ 4290: -/***/ ((module, __unused_webpack_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 Clamp = __webpack_require__(2915); -var CounterClockwise = __webpack_require__(3426); -var GetCalcMatrix = __webpack_require__(2208); -var RadToDeg = __webpack_require__(4208); -var Wrap = __webpack_require__(8445); - -/** - * 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 SpineGameObject#renderWebGL - * @since 3.19.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {SpineGameObject} src - The Game Object being rendered in this call. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. - */ -var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container) -{ - var plugin = src.plugin; - var skeleton = src.skeleton; - var sceneRenderer = plugin.sceneRenderer; - - if (renderer.newType) - { - // flush + clear previous pipeline if this is a new type - renderer.pipelines.clear(); - - sceneRenderer.begin(); - } - - var scrollFactorX = src.scrollFactorX; - var scrollFactorY = src.scrollFactorY; - var alpha = skeleton.color.a; - - if (container) - { - src.scrollFactorX = container.scrollFactorX; - src.scrollFactorY = container.scrollFactorY; - - skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); - } - - camera.addToRenderList(src); - - var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - - 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; - - // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled - src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); - } - 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 (renderer.currentFramebuffer !== null) - { - skeleton.y = calcMatrix.ty; - skeleton.scaleY *= -1; - } - */ - - skeleton.updateWorldTransform(); - - // Draw the current skeleton - - sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); - - if (container) - { - src.scrollFactorX = scrollFactorX; - src.scrollFactorY = scrollFactorY; - skeleton.color.a = alpha; - } - - if (plugin.drawDebug || src.drawDebug) - { - // Because if we don't, the bones render positions are completely wrong (*sigh*) - var oldX = skeleton.x; - var oldY = skeleton.y; - - skeleton.x = 0; - skeleton.y = 0; - - sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); - - skeleton.x = oldX; - skeleton.y = oldY; - } - - 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(); - - // And rebind the previous pipeline - renderer.pipelines.rebind(); - } -}; - -module.exports = SpineGameObjectWebGLRenderer; - - -/***/ }), - -/***/ 8599: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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'; - - -/***/ }), - -/***/ 3570: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 7950: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5389: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4679: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 6903: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 9638: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2505: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8616: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 1868: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2075: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 918: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8136: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5113: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 2029: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 527: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5215: -/***/ ((module, __unused_webpack_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__(8599), - BOOT: __webpack_require__(3570), - CONTEXT_LOST: __webpack_require__(7950), - CONTEXT_RESTORED: __webpack_require__(5389), - DESTROY: __webpack_require__(4679), - FOCUS: __webpack_require__(6903), - HIDDEN: __webpack_require__(9638), - PAUSE: __webpack_require__(2505), - POST_RENDER: __webpack_require__(8616), - POST_STEP: __webpack_require__(1868), - PRE_RENDER: __webpack_require__(2075), - PRE_STEP: __webpack_require__(918), - READY: __webpack_require__(8136), - RESUME: __webpack_require__(5113), - STEP: __webpack_require__(2029), - VISIBLE: __webpack_require__(527) - -}; - - -/***/ }), - -/***/ 1081: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var Events = __webpack_require__(6748); +var Class = __webpack_require__(0); +var Events = __webpack_require__(228); /** * @callback DataEachCallback @@ -15425,6 +36029,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.0.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @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. * @@ -15463,6 +36070,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to increase the value for. * @param {*} [data] - The value to increase for the given key. * @@ -15502,6 +36112,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to toggle the value for. * * @return {Phaser.Data.DataManager} This DataManager object. @@ -15875,157 +36488,12 @@ module.exports = DataManager; /***/ }), - -/***/ 9044: -/***/ ((module) => { +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { /** * @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'; - - -/***/ }), - -/***/ 7801: -/***/ ((module) => { - -/** - * @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-'; - - -/***/ }), - -/***/ 4873: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Data Manager Destroy Event. - * - * The Data Manager will listen for the destroy event from its parent, and then close itself down. - * - * @event Phaser.Data.Events#DESTROY - * @since 3.50.0 - */ -module.exports = 'destroy'; - - -/***/ }), - -/***/ 9966: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4586: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 6748: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16035,7233 +36503,1448 @@ module.exports = 'setdata'; module.exports = { - CHANGE_DATA: __webpack_require__(9044), - CHANGE_DATA_KEY: __webpack_require__(7801), - DESTROY: __webpack_require__(4873), - REMOVE_DATA: __webpack_require__(9966), - SET_DATA: __webpack_require__(4586) + CHANGE_DATA: __webpack_require__(229), + CHANGE_DATA_KEY: __webpack_require__(230), + DESTROY: __webpack_require__(231), + REMOVE_DATA: __webpack_require__(232), + SET_DATA: __webpack_require__(233) }; /***/ }), - -/***/ 7499: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 229 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var GameEvents = __webpack_require__(5215); -var RenderEvents = __webpack_require__(8604); - /** - * @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. + * The Change Data Event. * - * 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. + * This event is dispatched by a Data Manager when an item in the data store is changed. * - * 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. + * 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.on('changedata', listener)`. * - * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, - * combine Geometry Masks and Blend Modes together. + * 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. * - * 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 + * @event Phaser.Data.Events#CHANGE_DATA + * @type {string} * @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. + * @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. */ -var BitmapMask = new Class({ - - initialize: - - function BitmapMask (scene, renderable) - { - var renderer = scene.sys.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 masks 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; - - /** - * 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; - - /** - * The Scene which this Bitmap Mask will be used in. - * - * @name Phaser.Display.Masks.BitmapMask#scene - * @type {Phaser.Scene} - * @since 3.60.0 - */ - this.scene = scene; - - this.createMask(); - - scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (renderer) - { - renderer.on(RenderEvents.RESIZE, this.createMask, this); - } - }, - - /** - * Creates the WebGL Texture2D objects and Framebuffers required for this - * mask. If this mask has already been created, then `clearMask` is called first. - * - * @method Phaser.Display.Masks.BitmapMask#createMask - * @since 3.50.0 - */ - createMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl) - { - return; - } - - if (this.mainTexture) - { - this.clearMask(); - } - - 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); - }, - - /** - * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes - * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references. - * - * This is called when this mask is destroyed, or if you try to creat a new - * mask from this object when one is already set. - * - * @method Phaser.Display.Masks.BitmapMask#clearMask - * @since 3.50.0 - */ - clearMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl || !this.mainTexture) - { - return; - } - - 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; - }, - - /** - * 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.BITMAPMASK_PIPELINE.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.BITMAPMASK_PIPELINE.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.clearMask(); - - this.scene.sys.game.events.off(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (this.renderer) - { - this.renderer.off(RenderEvents.RESIZE, this.createMask, this); - } - - this.bitmapMask = null; - this.prevFramebuffer = null; - this.renderer = null; - } - -}); - -module.exports = BitmapMask; +module.exports = 'changedata'; /***/ }), - -/***/ 6726: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 230 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); - /** - * @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). + * The Change Data Key Event. * - * 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. + * This event is dispatched by a Data Manager when an item in the data store is changed. * - * 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. + * 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.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.on('changedata-gold')`. * - * @class GeometryMask - * @memberof Phaser.Display.Masks - * @constructor - * @since 3.0.0 + * @event Phaser.Data.Events#CHANGE_DATA_KEY + * @type {string} + * @since 3.16.1 * - * @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. + * @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. */ -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. - * - * This is a WebGL only feature. - * - * @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. - * - * This is a WebGL only feature. - * - * @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, 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--; - - // Force flush before disabling stencil test - renderer.flush(); - - var current = renderer.currentMask; - - if (renderer.maskStack.length === 0) - { - // If this is the only mask in the stack, flush and disable - current.mask = null; - - gl.disable(gl.STENCIL_TEST); - } - else - { - var prev = renderer.maskStack[renderer.maskStack.length - 1]; - - prev.mask.applyStencil(renderer, prev.camera, false); - - if (renderer.currentCameraMask.mask !== prev.mask) - { - current.mask = prev.mask; - current.camera = prev.camera; - } - else - { - current.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, 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; +module.exports = 'changedata-'; /***/ }), - -/***/ 2494: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 231 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(8351); -var GetAdvancedValue = __webpack_require__(8361); +/** + * The Data Manager Destroy Event. + * + * The Data Manager will listen for the destroy event from its parent, and then close itself down. + * + * @event Phaser.Data.Events#DESTROY + * @type {string} + * @since 3.50.0 + */ +module.exports = 'destroy'; + + +/***/ }), +/* 232 */ +/***/ (function(module, exports) { /** - * Builds a Game Object using the provided configuration object. + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Data Event. * - * @function Phaser.GameObjects.BuildGameObject + * 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.on('removedata', listener)`. + * + * @event Phaser.Data.Events#REMOVE_DATA + * @type {string} * @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. + * @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. */ -var BuildGameObject = function (scene, gameObject, config) -{ - // Position +module.exports = 'removedata'; - gameObject.x = GetAdvancedValue(config, 'x', 0); - gameObject.y = GetAdvancedValue(config, 'y', 0); - gameObject.depth = GetAdvancedValue(config, 'depth', 0); - // Flip +/***/ }), +/* 233 */ +/***/ (function(module, exports) { - gameObject.flipX = GetAdvancedValue(config, 'flipX', false); - gameObject.flipY = GetAdvancedValue(config, 'flipY', false); +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ - // Scale - // Either: { scale: 2 } or { scale: { x: 2, y: 2 }} +/** + * 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.on('setdata', listener)`. + * + * @event Phaser.Data.Events#SET_DATA + * @type {string} + * @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'; - 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); - } +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { - // ScrollFactor - // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }} +"use strict"; - 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); - } +var has = Object.prototype.hasOwnProperty + , prefix = '~'; - // Rotation +/** + * 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() {} - gameObject.rotation = GetAdvancedValue(config, 'rotation', 0); +// +// 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); - var angle = GetAdvancedValue(config, 'angle', 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; +} - if (angle !== null) - { - gameObject.angle = angle; - } +/** + * 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; +} - // Alpha +/** + * 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'); + } - gameObject.alpha = GetAdvancedValue(config, 'alpha', 1); + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; - // Origin - // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }} + 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]; - var origin = GetAdvancedValue(config, 'origin', null); + return emitter; +} - 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); +/** + * 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]; +} - gameObject.setOrigin(ox, oy); - } +/** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ +function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; +} - // BlendMode +/** + * 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; - gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL); + if (this._eventsCount === 0) return names; - // Visible + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } - gameObject.visible = GetAdvancedValue(config, 'visible', true); + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } - // 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; + return names; }; -module.exports = BuildGameObject; +/** + * 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; + } -/***/ 2273: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + return ee; +}; /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} + * 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]; -var Class = __webpack_require__(7473); -var ComponentsToJSON = __webpack_require__(6125); -var DataManager = __webpack_require__(1081); -var EventEmitter = __webpack_require__(4399); -var Events = __webpack_require__(3389); -var SceneEvents = __webpack_require__(204); + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; +}; /** - * @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. + * Calls each of the listeners registered for a given event. * - * @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`. + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public */ -var GameObject = new Class({ - - Extends: EventEmitter, - - initialize: - - function GameObject (scene, type) - { - EventEmitter.call(this); - - /** - * A reference to the Scene to which this Game Object belongs. - * - * Game Objects can only belong to one Scene. - * - * You should consider this property as being read-only. You cannot move a - * Game Object to another Scene by simply changing it. - * - * @name Phaser.GameObjects.GameObject#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * Holds a reference to the Display List that contains this Game Object. - * - * This is set automatically when this Game Object is added to a Scene or Layer. - * - * You should treat this property as being read-only. - * - * @name Phaser.GameObjects.GameObject#displayList - * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} - * @default null - * @since 3.50.0 - */ - this.displayList = null; - - /** - * 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 {(number|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 {number} - * @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 {number} - * @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; - - this.on(Events.ADDED_TO_SCENE, this.addedToScene, this); - this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this); - - // 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 {(number|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 () - { - this.scene.sys.input.disable(this); - - 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) - { - var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; - - return !(!listWillRender || 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 {number[]} 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)); - - child = parent; - - if (!parent.parentContainer) - { - break; - } - else - { - parent = parent.parentContainer; - } - } - - if (this.displayList) - { - indexes.unshift(this.displayList.getIndex(child)); - } - else - { - indexes.unshift(this.scene.sys.displayList.getIndex(child)); - } - - return indexes; - }, - - /** - * Adds this Game Object to the given Display List. - * - * If no Display List is specified, it will default to the Display List owned by the Scene to which - * this Game Object belongs. - * - * A Game Object can only exist on one Display List at any given time, but may move freely between them. - * - * If this Game Object is already on another Display List when this method is called, it will first - * be removed from it, before being added to the new list. - * - * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. - * - * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly - * disable it from rendering, consider using the `setVisible` method, instead. - * - * @method Phaser.GameObjects.GameObject#addToDisplayList - * @fires Phaser.Scenes.Events#ADDED_TO_SCENE - * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE - * @since 3.53.0 - * - * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List. - * - * @return {this} This Game Object. - */ - addToDisplayList: function (displayList) - { - if (displayList === undefined) { displayList = this.scene.sys.displayList; } - - if (this.displayList && this.displayList !== displayList) - { - this.removeFromDisplayList(); - } - - // Don't repeat if it's already on this list - if (!displayList.exists(this)) - { - this.displayList = displayList; - - displayList.add(this, true); - - displayList.queueDepthSort(); - - this.emit(Events.ADDED_TO_SCENE, this, this.scene); - - displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene); - } - - return this; - }, - - /** - * Adds this Game Object to the Update List belonging to the Scene. - * - * When a Game Object is added to the Update List it will have its `preUpdate` method called - * every game frame. This method is passed two parameters: `delta` and `time`. - * - * If you wish to run your own logic within `preUpdate` then you should always call - * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, - * such as Sprite animations. - * - * @method Phaser.GameObjects.GameObject#addToUpdateList - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - addToUpdateList: function () - { - if (this.scene && this.preUpdate) - { - this.scene.sys.updateList.add(this); - } - - return this; - }, - - /** - * Removes this Game Object from the Display List it is currently on. - * - * A Game Object can only exist on one Display List at any given time, but may move freely removed - * and added back at a later stage. - * - * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property. - * - * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly - * disable it from rendering, consider using the `setVisible` method, instead. - * - * @method Phaser.GameObjects.GameObject#removeFromDisplayList - * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE - * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - removeFromDisplayList: function () - { - var displayList = this.displayList || this.scene.sys.displayList; - - if (displayList.exists(this)) - { - displayList.remove(this, true); - - displayList.queueDepthSort(); - - this.displayList = null; - - this.emit(Events.REMOVED_FROM_SCENE, this, this.scene); - - displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene); - } - - return this; - }, - - /** - * Removes this Game Object from the Scene's Update List. - * - * When a Game Object is on the Update List, it will have its `preUpdate` method called - * every game frame. Calling this method will remove it from the list, preventing this. - * - * Removing a Game Object from the Update List will stop most internal functions working. - * For example, removing a Sprite from the Update List will prevent it from being able to - * run animations. - * - * @method Phaser.GameObjects.GameObject#removeFromUpdateList - * @since 3.53.0 - * - * @return {this} This Game Object. - */ - removeFromUpdateList: function () - { - if (this.scene && this.preUpdate) - { - this.scene.sys.updateList.remove(this); - } - - return this; - }, - - /** - * 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] - `True` if this Game Object is being destroyed by the Scene, `false` if not. - */ - destroy: function (fromScene) - { - // This Game Object has already been destroyed - if (!this.scene || this.ignoreDestroy) - { - return; - } - - if (fromScene === undefined) { fromScene = false; } - - if (this.preDestroy) - { - this.preDestroy.call(this); - } - - this.emit(Events.DESTROY, this, fromScene); - - this.removeAllListeners(); - - if (this.postPipelines) - { - this.resetPostPipeline(true); - } - - this.removeFromDisplayList(); - this.removeFromUpdateList(); - - if (this.input) - { - this.scene.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; - } - - this.active = false; - this.visible = false; - - this.scene = undefined; - this.parentContainer = undefined; +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; +}; /** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * Add a listener for a given event. * - * @constant {number} RENDER_MASK - * @memberof Phaser.GameObjects.GameObject - * @default + * @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 */ -GameObject.RENDER_MASK = 15; +EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); +}; -module.exports = GameObject; +/** + * 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; +} /***/ }), - -/***/ 2208: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 235 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TransformMatrix = __webpack_require__(4227); - -var tempMatrix1 = new TransformMatrix(); -var tempMatrix2 = new TransformMatrix(); -var tempMatrix3 = new TransformMatrix(); - -var result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 }; - /** - * Calculates the Transform Matrix of the given Game Object and Camera, factoring in - * the parent matrix if provided. + * The Game Object Added to Scene Event. * - * Note that the object this results contains _references_ to the Transform Matrices, - * not new instances of them. Therefore, you should use their values immediately, or - * copy them to your own matrix, as they will be replaced as soon as another Game - * Object is rendered. + * This event is dispatched when a Game Object is added to a Scene. * - * @function Phaser.GameObjects.GetCalcMatrix - * @memberof Phaser.GameObjects + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @type {string} * @since 3.50.0 * - * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any. + * @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'; + + +/***/ }), +/* 236 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Destroy Event. * - * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices. - */ -var GetCalcMatrix = function (src, camera, parentMatrix) -{ - var camMatrix = tempMatrix1; - var spriteMatrix = tempMatrix2; - var calcMatrix = tempMatrix3; - - spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = src.x; - spriteMatrix.f = src.y; - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - - return result; -}; - -module.exports = GetCalcMatrix; - - -/***/ }), - -/***/ 4344: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -// 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. + * This event is dispatched when a Game Object instance is being destroyed. * - * @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; - - -/***/ }), - -/***/ 4518: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -// 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. + * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`. * - * @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; - - -/***/ }), - -/***/ 5173: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BlendModes = __webpack_require__(8351); - -/** - * 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 {number} - * @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; - - -/***/ }), - -/***/ 1991: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8305: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3131: -/***/ ((module) => { - -/** - * @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 {number} - * @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) - { - if (this.displayList) - { - this.displayList.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 {number} 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; - - -/***/ }), - -/***/ 1626: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for setting the FX values of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.FX - * @webglOnly - * @since 3.60.0 - */ - -var FX = { - - /** - * The amount of extra padding to be applied to this Game Object - * when it is being rendered by a SpriteFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shaddow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * @name Phaser.GameObjects.Components.FX#fxPadding - * @type {number} - * @default 0 - * @since 3.60.0 - */ - fxPadding: 0, - - /** - * Sets the amount of extra padding to be applied to this Game Object - * when it is being rendered by a SpriteFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shaddow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * @method Phaser.GameObjects.Components.FX#setFXPadding - * @webglOnly - * @since 3.60.0 - * - * @param {number} [padding=0] - The amount of padding to add to the texture. - * - * @return {this} This Game Object instance. - */ - setFXPadding: function (padding) - { - if (padding === undefined) { padding = 0; } - - this.fxPadding = padding; - - return this; - }, - - /** - * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. - * - * This happens when the pipeline uses its `copySprite` method. - * - * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFXCopy - * @webglOnly - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. - */ - onFXCopy: function () - { - }, - - /** - * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. - * - * This happens when the pipeline uses its `drawSprite` method. - * - * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFX - * @webglOnly - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. - */ - onFX: function () - { - } - -}; - -module.exports = FX; - - -/***/ }), - -/***/ 9660: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3671: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Rectangle = __webpack_require__(2150); -var RotateAround = __webpack_require__(9876); -var Vector2 = __webpack_require__(2529); - -/** - * 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; - - -/***/ }), - -/***/ 2246: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BitmapMask = __webpack_require__(7499); -var GeometryMask = __webpack_require__(6726); - -/** - * 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. - * - * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. - * - * 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|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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 instanceof Phaser.GameObjects.Graphics || this instanceof Phaser.GameObjects.Shape)) - { - // eslint-disable-next-line consistent-this - graphics = this; - } - - return new GeometryMask(this.scene, graphics); - } - -}; - -module.exports = Mask; - - -/***/ }), - -/***/ 5085: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 77: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var DegToRad = __webpack_require__(7149); -var GetBoolean = __webpack_require__(1864); -var GetValue = __webpack_require__(5851); -var TWEEN_CONST = __webpack_require__(3747); -var Vector2 = __webpack_require__(2529); - -/** - * 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 {number} - * @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(tweenData.end, 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; - - -/***/ }), - -/***/ 986: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var DeepCopy = __webpack_require__(3911); -var PIPELINE_CONST = __webpack_require__(5412); -var SpliceOne = __webpack_require__(8935); - -/** - * 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. - * - * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default. - * - * @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, - - /** - * Does this Game Object have any Post Pipelines set? - * - * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline - * @type {boolean} - * @webglOnly - * @since 3.50.0 - */ - hasPostPipeline: false, - - /** - * The WebGL Post FX Pipelines this Game Object uses for post-render effects. - * - * The pipelines are processed in the order in which they appear in this array. - * - * If you modify this array directly, be sure to set the - * `hasPostPipeline` property accordingly. - * - * @name Phaser.GameObjects.Components.Pipeline#postPipelines - * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} - * @webglOnly - * @since 3.50.0 - */ - postPipelines: null, - - /** - * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses. - * - * @name Phaser.GameObjects.Components.Pipeline#pipelineData - * @type {object} - * @webglOnly - * @since 3.50.0 - */ - pipelineData: null, - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * - * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`. - * - * @method Phaser.GameObjects.Components.Pipeline#initPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - initPipeline: function (pipeline) - { - if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; } - - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return false; - } - - var pipelines = renderer.pipelines; - - this.postPipelines = []; - this.pipelineData = {}; - - if (pipelines) - { - var instance = pipelines.get(pipeline); - - if (instance) - { - this.defaultPipeline = instance; - this.pipeline = instance; - - return true; - } - } - - return false; - }, - - /** - * Sets the main WebGL Pipeline of this Game Object. - * - * Also sets the `pipelineData` property, if the parameter is given. - * - * Both the pipeline and post pipelines share the same pipeline data object. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. - * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. - * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. - * - * @return {this} This Game Object instance. - */ - setPipeline: function (pipeline, pipelineData, copyData) - { - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return this; - } - - var pipelines = renderer.pipelines; - - if (pipelines) - { - var instance = pipelines.get(pipeline); - - if (instance) - { - this.pipeline = instance; - } - - if (pipelineData) - { - this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; - } - } - - return this; - }, - - /** - * Sets one, or more, Post Pipelines on this Game Object. - * - * Post Pipelines are invoked after this Game Object has rendered to its target and - * are commonly used for post-fx. - * - * The post pipelines are appended to the `postPipelines` array belonging to this - * Game Object. When the renderer processes this Game Object, it iterates through the post - * pipelines in the order in which they appear in the array. If you are stacking together - * multiple effects, be aware that the order is important. - * - * If you call this method multiple times, the new pipelines will be appended to any existing - * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. - * - * You can optionally also set the `pipelineData` property, if the parameter is given. - * - * Both the pipeline and post pipelines share the pipeline data object together. - * - * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them. - * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. - * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. - * - * @return {this} This Game Object instance. - */ - setPostPipeline: function (pipelines, pipelineData, copyData) - { - var renderer = this.scene.sys.renderer; - - if (!renderer) - { - return this; - } - - var pipelineManager = renderer.pipelines; - - if (pipelineManager) - { - if (!Array.isArray(pipelines)) - { - pipelines = [ pipelines ]; - } - - for (var i = 0; i < pipelines.length; i++) - { - var instance = pipelineManager.getPostPipeline(pipelines[i], this); - - if (instance) - { - this.postPipelines.push(instance); - } - } - - if (pipelineData) - { - this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; - } - } - - this.hasPostPipeline = (this.postPipelines.length > 0); - - return this; - }, - - /** - * Adds an entry to the `pipelineData` object belonging to this Game Object. - * - * If the 'key' already exists, its value is updated. If it doesn't exist, it is created. - * - * If `value` is undefined, and `key` exists, `key` is removed from the data object. - * - * Both the pipeline and post pipelines share the pipeline data object together. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipelineData - * @webglOnly - * @since 3.50.0 - * - * @param {string} key - The key of the pipeline data to set, update, or delete. - * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object. - * - * @return {this} This Game Object instance. - */ - setPipelineData: function (key, value) - { - var data = this.pipelineData; - - if (value === undefined) - { - delete data[key]; - } - else - { - data[key] = value; - } - - return this; - }, - - /** - * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it. - * - * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class. - * - * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array. - */ - getPostPipeline: function (pipeline) - { - var pipelines = this.postPipelines; - - var results = []; - - for (var i = 0; i < pipelines.length; i++) - { - var instance = pipelines[i]; - - if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline) - { - results.push(instance); - } - } - - return (results.length === 1) ? results[0] : results; - }, - - /** - * 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 - * - * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines? - * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? - * - * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`. - */ - resetPipeline: function (resetPostPipelines, resetData) - { - if (resetPostPipelines === undefined) { resetPostPipelines = false; } - if (resetData === undefined) { resetData = false; } - - this.pipeline = this.defaultPipeline; - - if (resetPostPipelines) - { - this.postPipelines = []; - this.hasPostPipeline = false; - } - - if (resetData) - { - this.pipelineData = {}; - } - - return (this.pipeline !== null); - }, - - /** - * Resets the WebGL Post Pipelines of this Game Object. It does this by calling - * the `destroy` method on each post pipeline and then clearing the local array. - * - * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? - */ - resetPostPipeline: function (resetData) - { - if (resetData === undefined) { resetData = false; } - - var pipelines = this.postPipelines; - - for (var i = 0; i < pipelines.length; i++) - { - pipelines[i].destroy(); - } - - this.postPipelines = []; - this.hasPostPipeline = false; - - if (resetData) - { - this.pipelineData = {}; - } - }, - - /** - * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them. - * - * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead. - * - * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline - * @webglOnly - * @since 3.50.0 - * - * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class. - * - * @return {this} This Game Object. - */ - removePostPipeline: function (pipeline) - { - var pipelines = this.postPipelines; - - for (var i = pipelines.length - 1; i >= 0; i--) - { - var instance = pipelines[i]; - - if ( - (typeof pipeline === 'string' && instance.name === pipeline) || - (typeof pipeline !== 'string' && instance instanceof pipeline)) - { - instance.destroy(); - - SpliceOne(pipelines, i); - } - } - - this.hasPostPipeline = (this.postPipelines.length > 0); - - return this; - }, - - /** - * 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; - - -/***/ }), - -/***/ 4627: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4759: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4976: -/***/ ((module) => { - -/** - * @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|number)} [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|number)} 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; - - -/***/ }), - -/***/ 9243: -/***/ ((module) => { - -/** - * @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|number)} [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|number)} 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; - - -/***/ }), - -/***/ 5693: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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 = { - - /** - * The tint value being applied to the top-left vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintTopLeft - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintTopLeft: 0xffffff, - - /** - * The tint value being applied to the top-right vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintTopRight - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintTopRight: 0xffffff, - - /** - * The tint value being applied to the bottom-left vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomLeft - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintBottomLeft: 0xffffff, - - /** - * The tint value being applied to the bottom-right vertice of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomRight - * @type {number} - * @default 0xffffff - * @since 3.0.0 - */ - tintBottomRight: 0xffffff, - - /** - * The tint fill mode. - * - * `false` = An additive tint (the default), where vertices colors are blended with the texture. - * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. - * - * @name Phaser.GameObjects.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); - - 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {number} [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.tintTopLeft = topLeft; - this.tintTopRight = topRight; - this.tintBottomLeft = bottomLeft; - this.tintBottomRight = bottomRight; - - 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {number} [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 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 {number} - * @webglOnly - * @since 3.0.0 - */ - tint: { - - set: function (value) - { - this.setTint(value, value, value, value); - } - }, - - /** - * Does this Game Object have a tint applied? - * - * It checks to see if the 4 tint properties are set to the value 0xffffff - * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. - * - * @name Phaser.GameObjects.Components.Tint#isTinted - * @type {boolean} - * @webglOnly - * @readonly - * @since 3.11.0 - */ - isTinted: { - - get: function () - { - var white = 0xffffff; - - return ( - this.tintFill || - this.tintTopLeft !== white || - this.tintTopRight !== white || - this.tintBottomLeft !== white || - this.tintBottomRight !== white - ); - } - - } - -}; - -module.exports = Tint; - - -/***/ }), - -/***/ 6125: -/***/ ((module) => { - -/** - * @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 + * @event Phaser.GameObjects.Events#DESTROY + * @type {string} * @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. + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. + * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. */ -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; +module.exports = 'destroy'; /***/ }), - -/***/ 3212: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 237 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = __webpack_require__(7425); -var TransformMatrix = __webpack_require__(4227); -var TransformXY = __webpack_require__(7556); -var WrapAngle = __webpack_require__(3692); -var WrapAngleDegrees = __webpack_require__(2820); -var Vector2 = __webpack_require__(2529); - -// 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 {number} - * @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; - }, - - /** - * Copies an object's coordinates to this Game Object's position. - * - * @method Phaser.GameObjects.Components.Transform#copyPosition - * @since 3.50.0 - * - * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. - * - * @return {this} This Game Object instance. - */ - copyPosition: function (source) - { - if (source.x !== undefined) { this.x = source.x; } - if (source.y !== undefined) { this.y = source.y; } - if (source.z !== undefined) { this.z = source.z; } - if (source.w !== undefined) { this.w = source.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; - - -/***/ }), - -/***/ 4227: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var MATH_CONST = __webpack_require__(7425); -var Vector2 = __webpack_require__(2529); - -/** - * @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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. - * - * @return {Phaser.Types.Math.Vector2Like} 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; - - -/***/ }), - -/***/ 8414: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4286: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.GameObjects.Components + * 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 + * @type {string} + * @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'; + + +/***/ }), +/* 238 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback. + */ +module.exports = 'complete'; + + +/***/ }), +/* 239 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + * @param {number} width - The width of the video. + * @param {number} height - The height of the video. + */ +module.exports = 'created'; + + +/***/ }), +/* 240 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @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'; + + +/***/ }), +/* 241 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped. + */ +module.exports = 'loop'; + + +/***/ }), +/* 242 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback. + */ +module.exports = 'play'; + + +/***/ }), +/* 243 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking. + */ +module.exports = 'seeked'; + + +/***/ }), +/* 244 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking. + */ +module.exports = 'seeking'; + + +/***/ }), +/* 245 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback. + */ +module.exports = 'stop'; + + +/***/ }), +/* 246 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out. + */ +module.exports = 'timeout'; + + +/***/ }), +/* 247 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 + * @type {string} + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + */ +module.exports = 'unlocked'; + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace SpinePluginEvents */ module.exports = { - Alpha: __webpack_require__(4344), - AlphaSingle: __webpack_require__(4518), - BlendMode: __webpack_require__(5173), - ComputedSize: __webpack_require__(1991), - Crop: __webpack_require__(8305), - Depth: __webpack_require__(3131), - Flip: __webpack_require__(9660), - FX: __webpack_require__(1626), - GetBounds: __webpack_require__(3671), - Mask: __webpack_require__(2246), - Origin: __webpack_require__(5085), - PathFollower: __webpack_require__(77), - Pipeline: __webpack_require__(986), - ScrollFactor: __webpack_require__(4627), - Size: __webpack_require__(4759), - Texture: __webpack_require__(4976), - TextureCrop: __webpack_require__(9243), - Tint: __webpack_require__(5693), - ToJSON: __webpack_require__(6125), - Transform: __webpack_require__(3212), - TransformMatrix: __webpack_require__(4227), - Visible: __webpack_require__(8414) + COMPLETE: __webpack_require__(249), + DISPOSE: __webpack_require__(250), + END: __webpack_require__(251), + EVENT: __webpack_require__(252), + INTERRUPTED: __webpack_require__(253), + START: __webpack_require__(254) }; /***/ }), +/* 249 */ +/***/ (function(module, exports) { -/***/ 7361: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Complete Event. + * + * @event SpinePluginEvents#COMPLETE + * @since 3.19.0 + */ +module.exports = 'complete'; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Dispose Event. + * + * @event SpinePluginEvents#DISPOSE + * @since 3.19.0 + */ +module.exports = 'dispose'; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The End Event. + * + * @event SpinePluginEvents#END + * @since 3.19.0 + */ +module.exports = 'end'; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Custom Event Event. + * + * @event SpinePluginEvents#EVENT + * @since 3.19.0 + */ +module.exports = 'event'; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Interrupted Event. + * + * @event SpinePluginEvents#INTERRUPTED + * @since 3.19.0 + */ +module.exports = 'interrupted'; + + +/***/ }), +/* 254 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Start Event. + * + * @event SpinePluginEvents#START + * @since 3.19.0 + */ +module.exports = 'start'; + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var renderWebGL = __webpack_require__(2); +var renderCanvas = __webpack_require__(2); +var renderDirect = __webpack_require__(2); + +if (true) +{ + renderWebGL = __webpack_require__(256); + renderDirect = __webpack_require__(257); +} + +if (false) +{} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas, + renderDirect: renderDirect + +}; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(1); +var CounterClockwise = __webpack_require__(14); +var GetCalcMatrix = __webpack_require__(60); +var RadToDeg = __webpack_require__(16); +var Wrap = __webpack_require__(7); + +/** + * 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 SpineGameObject#renderWebGL + * @since 3.19.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. + */ +var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container) +{ + var plugin = src.plugin; + var skeleton = src.skeleton; + var sceneRenderer = plugin.sceneRenderer; + + if (renderer.newType) + { + // flush + clear previous pipeline if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + var scrollFactorX = src.scrollFactorX; + var scrollFactorY = src.scrollFactorY; + var alpha = skeleton.color.a; + + if (container) + { + src.scrollFactorX = container.scrollFactorX; + src.scrollFactorY = container.scrollFactorY; + + skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); + } + + camera.addToRenderList(src); + + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; + + 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; + + // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled + src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); + } + 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 (renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + */ + + skeleton.updateWorldTransform(); + + // Draw the current skeleton + + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + if (container) + { + src.scrollFactorX = scrollFactorX; + src.scrollFactorY = scrollFactorY; + skeleton.color.a = alpha; + } + + if (plugin.drawDebug || src.drawDebug) + { + // Because if we don't, the bones render positions are completely wrong (*sigh*) + var oldX = skeleton.x; + var oldY = skeleton.y; + + skeleton.x = 0; + skeleton.y = 0; + + sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); + + skeleton.x = oldX; + skeleton.y = oldY; + } + + 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(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); + } +}; + +module.exports = SpineGameObjectWebGLRenderer; + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(1); +var CounterClockwise = __webpack_require__(14); +var GetCalcMatrix = __webpack_require__(60); +var RadToDeg = __webpack_require__(16); +var Wrap = __webpack_require__(7); + +/** + * Directly 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 SpineGameObject#renderDirect + * @since 3.50.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineGameObject} src - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it. + */ +var SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container) +{ + var plugin = src.plugin; + var skeleton = src.skeleton; + var sceneRenderer = plugin.sceneRenderer; + + // flush + clear previous pipeline if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + + var scrollFactorX = src.scrollFactorX; + var scrollFactorY = src.scrollFactorY; + var alpha = skeleton.color.a; + + if (container) + { + src.scrollFactorX = container.scrollFactorX; + src.scrollFactorY = container.scrollFactorY; + + skeleton.color.a = Clamp(alpha * container.alpha, 0, 1); + } + + camera.addToRenderList(src); + + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; + + 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; + + // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled + src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360); + } + 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 (renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + */ + + skeleton.updateWorldTransform(); + + // Draw the current skeleton + + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + if (container) + { + src.scrollFactorX = scrollFactorX; + src.scrollFactorY = scrollFactorY; + skeleton.color.a = alpha; + } + + if (plugin.drawDebug || src.drawDebug) + { + // Because if we don't, the bones render positions are completely wrong (*sigh*) + var oldX = skeleton.x; + var oldY = skeleton.y; + + skeleton.x = 0; + skeleton.y = 0; + + sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha); + + skeleton.x = oldX; + skeleton.y = oldY; + } + + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch + sceneRenderer.end(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); +}; + +module.exports = SpineGameObjectWebGLDirect; + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 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__(259); +var SpineContainerRender = __webpack_require__(344); + +/** + * @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 must only add ever Spine Game Objects, or other Spine Containers, 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: + * + * ```javascript + * this.add.spineContainer(); + * ``` + * + * or + * + * ```javascript + * this.make.spineContainer(); + * ``` + * + * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the + * container children. You can, however, mask children of Spine Containers if they are embedded within other + * Spine Containers. In short, if you need masking, don't mix and match the types. + * + * See the Container documentation for further details about what Containers can do. + * + * @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 SpineContainer#plugin + * @type {SpinePlugin} + * @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; + } + +}); + +module.exports = SpineContainer; + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(1953); -var BlendModes = __webpack_require__(8351); -var Class = __webpack_require__(7473); -var Components = __webpack_require__(4286); -var Events = __webpack_require__(3389); -var GameObject = __webpack_require__(2273); -var Rectangle = __webpack_require__(2150); -var Render = __webpack_require__(3232); -var Union = __webpack_require__(9422); -var Vector2 = __webpack_require__(2529); +var ArrayUtils = __webpack_require__(260); +var BlendModes = __webpack_require__(13); +var Class = __webpack_require__(0); +var Components = __webpack_require__(311); +var Events = __webpack_require__(59); +var GameObject = __webpack_require__(57); +var Rectangle = __webpack_require__(29); +var Render = __webpack_require__(341); +var Union = __webpack_require__(343); +var Vector2 = __webpack_require__(3); /** * @classdesc @@ -23696,9 +38379,11 @@ var Container = new Class({ gameObject.parentContainer.remove(gameObject); } + gameObject.parentContainer = this; + gameObject.removeFromDisplayList(); - gameObject.parentContainer = this; + gameObject.addedToScene(); } }, @@ -23713,12 +38398,14 @@ var Container = new Class({ */ removeHandler: function (gameObject) { - gameObject.off(Events.DESTROY, this.remove); + gameObject.off(Events.DESTROY, this.remove, this); if (this.exclusive) { gameObject.parentContainer = null; + gameObject.removedFromScene(); + gameObject.addToDisplayList(); } }, @@ -23730,10 +38417,10 @@ var Container = new Class({ * @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. + * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed. + * @param {Phaser.Types.Math.Vector2Like} [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. + * @return {Phaser.Types.Math.Vector2Like} The transformed point. */ pointToContainer: function (source, output) { @@ -23745,7 +38432,8 @@ var Container = new Class({ } else { - output = new Vector2(source.x, source.y); + output.x = source.x; + output.y = source.y; } var tempMatrix = this.tempTransformMatrix; @@ -23783,6 +38471,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#add * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. @@ -23804,6 +38495,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#addAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * @param {number} [index=0] - The position to insert the Game Object/s at. * @@ -23822,6 +38516,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} 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. @@ -23837,6 +38534,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getIndex * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. * * @return {number} The index of the Game Object in this Container, or -1 if not found. @@ -23885,6 +38585,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getByName * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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. @@ -23900,6 +38603,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getRandom * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} [startIndex=0] - An optional start index. * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from. * @@ -23923,6 +38629,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getFirst * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -23953,6 +38662,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAll * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T[]} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -23995,6 +38707,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#swap * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. * @@ -24018,6 +38733,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveTo * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. * @param {number} index - The new position of the Game Object in this Container. * @@ -24038,6 +38756,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveAbove * @since 3.55.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object. * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. * @@ -24058,6 +38779,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveBelow * @since 3.55.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object. * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. * @@ -24080,6 +38804,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#remove * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. * @@ -24173,14 +38900,25 @@ var Container = new Class({ */ removeAll: function (destroyChild) { - var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + var list = this.list; if (destroyChild) { - for (var i = 0; i < removed.length; i++) + for (var i = 0; i < list.length; i++) { - removed[i].destroy(); + if (list[i] && list[i].scene) + { + list[i].off(Events.DESTROY, this.remove, this); + + list[i].destroy(); + } } + + this.list = []; + } + else + { + ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this); } return this; @@ -24193,6 +38931,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#bringToTop * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. * * @return {this} This Container instance. @@ -24211,6 +38952,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#sendToBack * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. * * @return {this} This Container instance. @@ -24228,6 +38972,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveUp * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -24245,6 +38992,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveDown * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -24293,6 +39043,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#replace * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [oldChild,newChild] + * * @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. @@ -24325,6 +39078,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#exists * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @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. @@ -24636,769 +39392,5178 @@ module.exports = Container; /***/ }), - -/***/ 3232: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(1984); -var renderCanvas = __webpack_require__(1984); - -if (true) -{ - renderWebGL = __webpack_require__(4343); -} - -if (false) -{} +/** + * @namespace Phaser.Utils.Array + */ module.exports = { - renderWebGL: renderWebGL, - renderCanvas: renderCanvas + Matrix: __webpack_require__(261), + + Add: __webpack_require__(270), + AddAt: __webpack_require__(271), + BringToTop: __webpack_require__(272), + CountAllMatching: __webpack_require__(273), + Each: __webpack_require__(274), + EachInRange: __webpack_require__(275), + FindClosestInSorted: __webpack_require__(276), + Flatten: __webpack_require__(277), + GetAll: __webpack_require__(278), + GetFirst: __webpack_require__(279), + GetRandom: __webpack_require__(280), + MoveDown: __webpack_require__(281), + MoveTo: __webpack_require__(282), + MoveUp: __webpack_require__(283), + MoveAbove: __webpack_require__(284), + MoveBelow: __webpack_require__(285), + NumberArray: __webpack_require__(286), + NumberArrayStep: __webpack_require__(287), + QuickSelect: __webpack_require__(288), + Range: __webpack_require__(289), + Remove: __webpack_require__(290), + RemoveAt: __webpack_require__(291), + RemoveBetween: __webpack_require__(292), + RemoveRandomElement: __webpack_require__(293), + Replace: __webpack_require__(294), + RotateLeft: __webpack_require__(62), + RotateRight: __webpack_require__(63), + SafeRange: __webpack_require__(5), + SendToBack: __webpack_require__(295), + SetAll: __webpack_require__(296), + Shuffle: __webpack_require__(64), + SortByDigits: __webpack_require__(297), + SpliceOne: __webpack_require__(11), + StableSort: __webpack_require__(298), + Swap: __webpack_require__(310) }; /***/ }), - -/***/ 4343: -/***/ ((module) => { +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 {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 + * @namespace Phaser.Utils.Array.Matrix */ -var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix) + +module.exports = { + + CheckMatrix: __webpack_require__(27), + MatrixToString: __webpack_require__(262), + ReverseColumns: __webpack_require__(264), + ReverseRows: __webpack_require__(265), + Rotate180: __webpack_require__(266), + RotateLeft: __webpack_require__(267), + RotateMatrix: __webpack_require__(17), + RotateRight: __webpack_require__(268), + Translate: __webpack_require__(269), + TransposeMatrix: __webpack_require__(61) + +}; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Pad = __webpack_require__(263); +var CheckMatrix = __webpack_require__(27); + +/** + * Generates a string (which you can pass to console.log) from the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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) { - camera.addToRenderList(container); + var str = ''; - var children = container.list; - var childCount = children.length; - - if (childCount === 0) + if (!CheckMatrix(matrix)) { - return; + return str; } - var transformMatrix = container.localTransform; - - if (parentMatrix) + for (var r = 0; r < matrix.length; r++) { - 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); - } - - renderer.pipelines.preBatch(container); - - 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; - - for (var i = 0; i < childCount; i++) - { - var child = children[i]; - - if (!child.willRender(camera)) + for (var c = 0; c < matrix[r].length; c++) { - continue; + var cell = matrix[r][c].toString(); + + if (cell !== 'undefined') + { + str += Pad(cell, 2); + } + else + { + str += '?'; + } + + if (c < matrix[r].length - 1) + { + str += ' |'; + } } - var childAlphaTopLeft; - var childAlphaTopRight; - var childAlphaBottomLeft; - var childAlphaBottomRight; - - if (child.alphaTopLeft !== undefined) + if (r < matrix.length - 1) { - childAlphaTopLeft = child.alphaTopLeft; - childAlphaTopRight = child.alphaTopRight; - childAlphaBottomLeft = child.alphaBottomLeft; - childAlphaBottomRight = child.alphaBottomRight; + 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; + + +/***/ }), +/* 263 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {number} [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; + + +/***/ }), +/* 264 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the columns in the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 265 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the rows in the given Array 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(17); + +/** + * Rotates the array matrix 180 degrees. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(17); + +/** + * Rotates the array matrix to the left (or 90 degrees) + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(17); + +/** + * Rotates the array matrix to the left (or -90 degrees) + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.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; + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateLeft = __webpack_require__(62); +var RotateRight = __webpack_require__(63); + +/** + * Translates the given Array Matrix by shifting each column and row the + * amount specified. + * + * 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. This is an example matrix: + * + * ``` + * [ + * [ 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.Translate + * @since 3.50.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to translate. + * @param {number} [x=0] - The amount to horizontally translate the matrix by. + * @param {number} [y=0] - The amount to vertically translate the matrix by. + * + * @return {T[][]} The translated matrix. + */ +var TranslateMatrix = function (matrix, x, y) +{ + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + // Vertical translation + + if (y !== 0) + { + if (y < 0) + { + // Shift Up + RotateLeft(matrix, Math.abs(y)); } else { - var childAlpha = child.alpha; - - childAlphaTopLeft = childAlpha; - childAlphaTopRight = childAlpha; - childAlphaBottomLeft = childAlpha; - childAlphaBottomRight = childAlpha; + // Shift Down + RotateRight(matrix, y); } - - 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) ? (children[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, camera, transformMatrix); - - // Restore original values - - child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); - - child.setScrollFactor(childScrollFactorX, childScrollFactorY); - - if (mask) - { - mask.postRenderWebGL(renderer, camera); - } - - renderer.newType = false; } - renderer.pipelines.postBatch(container); + // Horizontal translation + + if (x !== 0) + { + for (var i = 0; i < matrix.length; i++) + { + var row = matrix[i]; + + if (x < 0) + { + RotateLeft(row, Math.abs(x)); + } + else + { + RotateRight(row, x); + } + } + } + + return matrix; }; -module.exports = ContainerWebGLRenderer; +module.exports = TranslateMatrix; /***/ }), - -/***/ 6608: -/***/ ((module) => { +/* 270 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Game Object Added to Scene Event. + * Adds the given item, or array of items, to the array. * - * This event is dispatched when a Game Object is added to a Scene. + * Each item must be unique within the array. * - * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * The array is modified in-place and returned. * - * @event Phaser.GameObjects.Events#ADDED_TO_SCENE - * @since 3.50.0 + * 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. * - * @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'; - - -/***/ }), - -/***/ 4265: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Game Object Destroy Event. + * You can optionally specify a callback to be invoked for each item successfully added to the array. * - * This event is dispatched when a Game Object instance is being destroyed. + * @function Phaser.Utils.Array.Add + * @since 3.4.0 * - * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`. + * @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 {number} [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. * - * @event Phaser.GameObjects.Events#DESTROY - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. - * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. + * @return {array} The input array. */ -module.exports = 'destroy'; - - -/***/ }), - -/***/ 8671: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3420: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 601: -/***/ ((module) => { - -/** - * @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 {number} width - The width of the video. - * @param {number} height - The height of the video. - */ -module.exports = 'created'; - - -/***/ }), - -/***/ 7919: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5241: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3356: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 7513: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5788: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 8118: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 5529: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 4287: -/***/ ((module) => { - -/** - * @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'; - - -/***/ }), - -/***/ 3389: -/***/ ((module, __unused_webpack_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__(6608), - DESTROY: __webpack_require__(4265), - REMOVED_FROM_SCENE: __webpack_require__(8671), - VIDEO_COMPLETE: __webpack_require__(3420), - VIDEO_CREATED: __webpack_require__(601), - VIDEO_ERROR: __webpack_require__(7919), - VIDEO_LOOP: __webpack_require__(5241), - VIDEO_PLAY: __webpack_require__(3356), - VIDEO_SEEKED: __webpack_require__(7513), - VIDEO_SEEKING: __webpack_require__(5788), - VIDEO_STOP: __webpack_require__(8118), - VIDEO_TIMEOUT: __webpack_require__(5529), - VIDEO_UNLOCKED: __webpack_require__(4287) - -}; - - -/***/ }), - -/***/ 1643: -/***/ ((module) => { - -/** - * @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 {number} - * @since 3.19.0 - */ - CIRCLE: 0, - - /** - * An Ellipse Geometry object type. - * - * @name Phaser.Geom.ELLIPSE - * @type {number} - * @since 3.19.0 - */ - ELLIPSE: 1, - - /** - * A Line Geometry object type. - * - * @name Phaser.Geom.LINE - * @type {number} - * @since 3.19.0 - */ - LINE: 2, - - /** - * A Point Geometry object type. - * - * @name Phaser.Geom.POINT - * @type {number} - * @since 3.19.0 - */ - POINT: 3, - - /** - * A Polygon Geometry object type. - * - * @name Phaser.Geom.POLYGON - * @type {number} - * @since 3.19.0 - */ - POLYGON: 4, - - /** - * A Rectangle Geometry object type. - * - * @name Phaser.Geom.RECTANGLE - * @type {number} - * @since 3.19.0 - */ - RECTANGLE: 5, - - /** - * A Triangle Geometry object type. - * - * @name Phaser.Geom.TRIANGLE - * @type {number} - * @since 3.19.0 - */ - TRIANGLE: 6 - -}; - -module.exports = GEOM_CONST; - - -/***/ }), - -/***/ 8881: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(7655); - -/** - * 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) +var Add = function (array, item, limit, callback, context) { - if (out === undefined) { out = new Point(); } + if (context === undefined) { context = array; } - out.x = line.x1 + (line.x2 - line.x1) * position; - out.y = line.y1 + (line.y2 - line.y1) * position; + 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; + + +/***/ }), +/* 271 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted. + * @param {number} [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; + + +/***/ }), +/* 272 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [endIndex] - An optional end index to search to. + * + * @return {number} 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; + + +/***/ }), +/* 274 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index to search from. + * @param {number} 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; + + +/***/ }), +/* 276 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 277 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes an array and flattens it, returning a shallow-copy flattened array. + * + * @function Phaser.Utils.Array.Flatten + * @since 3.60.0 + * + * @param {array} array - The array to flatten. + * @param {array} [output] - An array to hold the results in. + * + * @return {array} The flattened output array. + */ +var Flatten = function (array, output) +{ + if (output === undefined) { output = []; } + + for (var i = 0; i < array.length; i++) + { + if (Array.isArray(array[i])) + { + Flatten(array[i], output); + } + else + { + output.push(array[i]); + } + } + + return output; +}; + +module.exports = Flatten; + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex=0] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 280 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex=0] - An optional start index. + * @param {number} [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; + + +/***/ }), +/* 281 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 282 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} 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; + + +/***/ }), +/* 283 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 284 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element above another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveAbove + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move above base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveAbove = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex > baseIndex) + { + // item1 is already above item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === array.length - 1) + { + array.push(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveAbove; + + +/***/ }), +/* 285 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element below another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveBelow + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move below base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveBelow = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex < baseIndex) + { + // item1 is already below item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === 0) + { + array.unshift(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveBelow; + + +/***/ }), +/* 286 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RoundAwayFromZero = __webpack_require__(43); + +/** + * 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; + + +/***/ }), +/* 288 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} k - The k-th element index. + * @param {number} [left=0] - The index of the left part of the range. + * @param {number} [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; + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetValue = __webpack_require__(8); +var Shuffle = __webpack_require__(64); + +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; }; -module.exports = GetPoint; +/** + * 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; /***/ }), - -/***/ 4479: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(4771); -var Point = __webpack_require__(7655); +var SpliceOne = __webpack_require__(11); /** - * Get a number of points along a line's length. + * Removes the given item, or array of items, from the array. * - * Provide a `quantity` to get an exact number of points along the line. + * The array is modified in-place. * - * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when - * providing a `stepRate`. + * You can optionally specify a callback to be invoked for each item successfully removed from the array. * - * @function Phaser.Geom.Line.GetPoints + * @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; + var removed = []; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + removed.push(entry); + + if (callback) + { + callback.call(context, entry); + } + } + + itemLength--; + } + + return removed; +}; + +module.exports = Remove; + + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(11); + +/** + * 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 {number} 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; + + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} startIndex - The start index to remove from. + * @param {number} 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; + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(11); + +/** + * 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 {number} [start=0] - The array index to start the search from. + * @param {number} [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; + + +/***/ }), +/* 294 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 295 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from. + * @param {number} [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; + + +/***/ }), +/* 297 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Device = __webpack_require__(299); + +/** + * 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); +} + +/** + * 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 = 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) + { + RunPass(array, compare, chk, buffer); + + var tmp = array; + + array = buffer; + + buffer = tmp; + } + + return array; +} + +/** + * 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) + { + 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++]; + } + } + else if (li < r) + { + // Nothing to compare, just flush what's left. + result[i++] = arr[li++]; + } + else if (ri < e) + { + result[i++] = arr[ri++]; + } + 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; } + + // Short-circuit when there's nothing to sort. + if (!array || array.length < 2) + { + return array; + } + + if (Device.features.stableSort) + { + return array.sort(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; +}; + +module.exports = StableSort; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// This singleton is instantiated as soon as Phaser loads, +// before a Phaser.Game instance has even been created. +// Which means all instances of Phaser Games can share it, +// without having to re-poll the device all over again + +/** + * @namespace Phaser.Device + * @since 3.0.0 + */ + +/** + * @typedef {object} Phaser.DeviceConf + * + * @property {Phaser.Device.OS} os - The OS Device functions. + * @property {Phaser.Device.Browser} browser - The Browser Device functions. + * @property {Phaser.Device.Features} features - The Features Device functions. + * @property {Phaser.Device.Input} input - The Input Device functions. + * @property {Phaser.Device.Audio} audio - The Audio Device functions. + * @property {Phaser.Device.Video} video - The Video Device functions. + * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions. + * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions. + */ + +module.exports = { + + os: __webpack_require__(28), + browser: __webpack_require__(18), + features: __webpack_require__(301), + input: __webpack_require__(305), + audio: __webpack_require__(306), + video: __webpack_require__(307), + fullscreen: __webpack_require__(308), + canvasFeatures: __webpack_require__(309) + +}; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(28); +var Browser = __webpack_require__(18); +var CanvasPool = __webpack_require__(65); + +/** + * Determines the features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.features` from within any Scene. + * + * @typedef {object} Phaser.Device.Features + * @since 3.0.0 + * + * @property {boolean} canvas - Is canvas available? + * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap. + * @property {boolean} file - Is file available? + * @property {boolean} fileSystem - Is fileSystem available? + * @property {boolean} getUserMedia - Does the device support the getUserMedia API? + * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays) + * @property {boolean} localStorage - Is localStorage available? + * @property {boolean} pointerLock - Is Pointer Lock available? + * @property {boolean} stableSort - Is Array.sort stable? + * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views? + * @property {boolean} vibration - Does the device support the Vibration API? + * @property {boolean} webGL - Is webGL available? + * @property {boolean} worker - Is worker available? + */ +var Features = { + + canvas: false, + canvasBitBltShift: null, + file: false, + fileSystem: false, + getUserMedia: true, + littleEndian: false, + localStorage: false, + pointerLock: false, + stableSort: false, + support32bit: false, + vibration: false, + webGL: false, + worker: false + +}; + +// Check Little or Big Endian system. +// @author Matt DesLauriers (@mattdesl) +function checkIsLittleEndian () +{ + var a = new ArrayBuffer(4); + var b = new Uint8Array(a); + var c = new Uint32Array(a); + + b[0] = 0xa1; + b[1] = 0xb2; + b[2] = 0xc3; + b[3] = 0xd4; + + if (c[0] === 0xd4c3b2a1) + { + return true; + } + + if (c[0] === 0xa1b2c3d4) + { + return false; + } + else + { + // Could not determine endianness + return null; + } +} + +function init () +{ + if (typeof importScripts === 'function') + { + return Features; + } + + Features.canvas = !!window['CanvasRenderingContext2D']; + + try + { + Features.localStorage = !!localStorage.getItem; + } + catch (error) + { + Features.localStorage = false; + } + + Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; + Features.fileSystem = !!window['requestFileSystem']; + + var isUint8 = false; + + var testWebGL = function () + { + if (window['WebGLRenderingContext']) + { + try + { + var canvas = CanvasPool.createWebGL(this); + + var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); + + var canvas2D = CanvasPool.create2D(this); + + var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true }); + + // Can't be done on a webgl context + var image = ctx2D.createImageData(1, 1); + + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) + isUint8 = image.data instanceof Uint8ClampedArray; + + CanvasPool.remove(canvas); + CanvasPool.remove(canvas2D); + + return !!ctx; + } + catch (e) + { + return false; + } + } + + return false; + }; + + Features.webGL = testWebGL(); + + Features.worker = !!window['Worker']; + + Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document; + + navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia; + + window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL; + + Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL; + + // Older versions of firefox (< 21) apparently claim support but user media does not actually work + if (Browser.firefox && Browser.firefoxVersion < 21) + { + Features.getUserMedia = false; + } + + // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it + // is safer to not try and use the fast copy-over method. + if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome)) + { + Features.canvasBitBltShift = true; + } + + // Known not to work + if (Browser.safari || Browser.mobileSafari) + { + Features.canvasBitBltShift = false; + } + + navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; + + if (navigator.vibrate) + { + Features.vibration = true; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined') + { + Features.littleEndian = checkIsLittleEndian(); + } + + Features.support32bit = ( + typeof ArrayBuffer !== 'undefined' && + typeof Uint8ClampedArray !== 'undefined' && + typeof Int32Array !== 'undefined' && + Features.littleEndian !== null && + isUint8 + ); + + return Features; +} + +module.exports = init(); + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Global constants. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.60.0-beta.18', + + BlendModes: __webpack_require__(13), + + ScaleModes: __webpack_require__(303), + + /** + * This setting will auto-detect if the browser is capable of suppporting WebGL. + * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer. + * + * @name Phaser.AUTO + * @const + * @type {number} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports + * WebGL or not. + * + * @name Phaser.CANVAS + * @const + * @type {number} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is + * no fallback to Canvas with this setting, so you should trap it and display a suitable + * message to the user. + * + * @name Phaser.WEBGL + * @const + * @type {number} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still + * absolutely relies on the DOM being present and available. This mode is meant for unit testing, + * not for running Phaser on the server, which is something you really shouldn't do. + * + * @name Phaser.HEADLESS + * @const + * @type {number} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {number} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {number} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {number} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {number} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {number} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {number} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + +/***/ }), +/* 303 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Scale Modes. + * + * @namespace Phaser.ScaleModes + * @since 3.0.0 + */ + +var ScaleModes = { + + /** + * Default Scale Mode (Linear). + * + * @name Phaser.ScaleModes.DEFAULT + * @type {number} + * @readonly + * @since 3.0.0 + */ + DEFAULT: 0, + + /** + * Linear Scale Mode. + * + * @name Phaser.ScaleModes.LINEAR + * @type {number} + * @readonly + * @since 3.0.0 + */ + LINEAR: 0, + + /** + * Nearest Scale Mode. + * + * @name Phaser.ScaleModes.NEAREST + * @type {number} + * @readonly + * @since 3.0.0 + */ + NEAREST: 1 + +}; + +module.exports = ScaleModes; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Browser specific prefix, so not going to change between contexts, only between browsers +var prefix = ''; + +/** + * @namespace Phaser.Display.Canvas.Smoothing + * @since 3.0.0 + */ +var Smoothing = function () +{ + /** + * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set. + * + * @function Phaser.Display.Canvas.Smoothing.getPrefix + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check. + * + * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported. + */ + var getPrefix = function (context) + { + var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ]; + + for (var i = 0; i < vendors.length; i++) + { + var s = vendors[i] + 'mageSmoothingEnabled'; + + if (s in context) + { + return s; + } + } + + return null; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.enable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var enable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = true; + } + + return context; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.disable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var disable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = false; + } + + return context; + }; + + /** + * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`. + * Returns null if no smoothing prefix is available. + * + * @function Phaser.Display.Canvas.Smoothing.isEnabled + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check. + * + * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported. + */ + var isEnabled = function (context) + { + return (prefix !== null) ? context[prefix] : null; + }; + + return { + disable: disable, + enable: enable, + getPrefix: getPrefix, + isEnabled: isEnabled + }; + +}; + +module.exports = Smoothing(); + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(18); + +/** + * Determines the input support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.input` from within any Scene. + * + * @typedef {object} Phaser.Device.Input + * @since 3.0.0 + * + * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll' + * @property {boolean} gamepads - Is navigator.getGamepads available? + * @property {boolean} mspointer - Is mspointer available? + * @property {boolean} touch - Is touch available? + */ +var Input = { + + gamepads: false, + mspointer: false, + touch: false, + wheelEvent: null + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Input; + } + + if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1)) + { + Input.touch = true; + } + + if (navigator.msPointerEnabled || navigator.pointerEnabled) + { + Input.mspointer = true; + } + + if (navigator.getGamepads) + { + Input.gamepads = true; + } + + // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel + if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window)) + { + // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+ + Input.wheelEvent = 'wheel'; + } + else if ('onmousewheel' in window) + { + // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7. + Input.wheelEvent = 'mousewheel'; + } + else if (Browser.firefox && 'MouseScrollEvent' in window) + { + // FF prior to 17. This should probably be scrubbed. + Input.wheelEvent = 'DOMMouseScroll'; + } + + return Input; +} + +module.exports = init(); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(18); + +/** + * Determines the audio playback capabilities of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.audio` from within any Scene. + * + * @typedef {object} Phaser.Device.Audio + * @since 3.0.0 + * + * @property {boolean} audioData - Can this device play HTML Audio tags? + * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files? + * @property {boolean} m4a - Can this device can play m4a files. + * @property {boolean} aac - Can this device can play aac files. + * @property {boolean} flac - Can this device can play flac files. + * @property {boolean} mp3 - Can this device play mp3 files? + * @property {boolean} ogg - Can this device play ogg files? + * @property {boolean} opus - Can this device play opus files? + * @property {boolean} wav - Can this device play wav files? + * @property {boolean} webAudio - Does this device have the Web Audio API? + * @property {boolean} webm - Can this device play webm files? + */ +var Audio = { + + flac: false, + aac: false, + audioData: false, + dolby: false, + m4a: false, + mp3: false, + ogg: false, + opus: false, + wav: false, + webAudio: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Audio; + } + + Audio.audioData = !!(window['Audio']); + + Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']); + + var audioElement = document.createElement('audio'); + var result = !!audioElement.canPlayType; + + try + { + if (result) + { + var CanPlay = function (type1, type2) + { + var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, ''); + + if (type2) + { + return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, '')); + } + else + { + return Boolean(canPlayType1); + } + }; + + // wav Mimetypes accepted: + // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + + Audio.ogg = CanPlay('ogg; codecs="vorbis"'); + Audio.opus = CanPlay('ogg; codecs="opus"', 'opus'); + Audio.mp3 = CanPlay('mpeg'); + Audio.wav = CanPlay('wav'); + Audio.m4a = CanPlay('x-m4a'); + Audio.aac = CanPlay('aac'); + Audio.flac = CanPlay('flac', 'x-flac'); + Audio.webm = CanPlay('webm; codecs="vorbis"'); + + if (audioElement.canPlayType('audio/mp4; codecs="ec-3"') !== '') + { + if (Browser.edge) + { + Audio.dolby = true; + } + else if (Browser.safari && Browser.safariVersion >= 9) + { + if ((/Mac OS X (\d+)_(\d+)/).test(navigator.userAgent)) + { + var major = parseInt(RegExp.$1, 10); + var minor = parseInt(RegExp.$2, 10); + + if ((major === 10 && minor >= 11) || major > 10) + { + Audio.dolby = true; + } + } + } + } + } + } + catch (e) + { + // Nothing to do here + } + + return Audio; +} + +module.exports = init(); + + +/***/ }), +/* 307 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the video support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.video` from within any Scene. + * + * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix. + * + * @typedef {object} Phaser.Device.Video + * @since 3.0.0 + * + * @property {boolean} h264 - Can this device play h264 mp4 video files? + * @property {boolean} hls - Can this device play hls video files? + * @property {boolean} mp4 - Can this device play h264 mp4 video files? + * @property {boolean} m4v - Can this device play m4v (typically mp4) video files? + * @property {boolean} ogg - Can this device play ogg video files? + * @property {boolean} vp9 - Can this device play vp9 video files? + * @property {boolean} webm - Can this device play webm video files? + */ +var Video = { + + h264: false, + hls: false, + mp4: false, + m4v: false, + ogg: false, + vp9: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Video; + } + + var videoElement = document.createElement('video'); + var result = !!videoElement.canPlayType; + var no = /^no$/; + + try + { + if (result) + { + if (videoElement.canPlayType('video/ogg; codecs="theora"').replace(no, '')) + { + Video.ogg = true; + } + + if (videoElement.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(no, '')) + { + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + Video.h264 = true; + Video.mp4 = true; + } + + if (videoElement.canPlayType('video/x-m4v').replace(no, '')) + { + Video.m4v = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp8, vorbis"').replace(no, '')) + { + Video.webm = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp9"').replace(no, '')) + { + Video.vp9 = true; + } + + if (videoElement.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(no, '')) + { + Video.hls = true; + } + } + } + catch (e) + { + // Nothing to do + } + + return Video; +} + +module.exports = init(); + + +/***/ }), +/* 308 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the full screen support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.fullscreen` from within any Scene. + * + * @typedef {object} Phaser.Device.Fullscreen + * @since 3.0.0 + * + * @property {boolean} available - Does the browser support the Full Screen API? + * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode? + * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it. + * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it. + */ +var Fullscreen = { + + available: false, + cancel: '', + keyboard: false, + request: '' + +}; + +/** +* Checks for support of the Full Screen API. +* +* @ignore +*/ +function init () +{ + if (typeof importScripts === 'function') + { + return Fullscreen; + } + + var i; + + var suffix1 = 'Fullscreen'; + var suffix2 = 'FullScreen'; + + var fs = [ + 'request' + suffix1, + 'request' + suffix2, + 'webkitRequest' + suffix1, + 'webkitRequest' + suffix2, + 'msRequest' + suffix1, + 'msRequest' + suffix2, + 'mozRequest' + suffix2, + 'mozRequest' + suffix1 + ]; + + for (i = 0; i < fs.length; i++) + { + if (document.documentElement[fs[i]]) + { + Fullscreen.available = true; + Fullscreen.request = fs[i]; + break; + } + } + + var cfs = [ + 'cancel' + suffix2, + 'exit' + suffix1, + 'webkitCancel' + suffix2, + 'webkitExit' + suffix1, + 'msCancel' + suffix2, + 'msExit' + suffix1, + 'mozCancel' + suffix2, + 'mozExit' + suffix1 + ]; + + if (Fullscreen.available) + { + for (i = 0; i < cfs.length; i++) + { + if (document[cfs[i]]) + { + Fullscreen.cancel = cfs[i]; + break; + } + } + } + + // Keyboard Input? + // Safari 5.1 says it supports fullscreen keyboard, but is lying. + if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\/5\.1(?:\.\d+)? Safari\//).test(navigator.userAgent)) + { + Fullscreen.keyboard = true; + } + + Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } }); + + return Fullscreen; +} + +module.exports = init(); + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(65); + +/** + * Determines the canvas features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.canvasFeatures` from within any Scene. + * + * @typedef {object} Phaser.Device.CanvasFeatures + * @since 3.0.0 + * + * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha. + * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes. + */ +var CanvasFeatures = { + + supportInverseAlpha: false, + supportNewBlendModes: false + +}; + +function checkBlendMode () +{ + var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/'; + var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=='; + + var magenta = new Image(); + + magenta.onload = function () + { + var yellow = new Image(); + + yellow.onload = function () + { + var canvas = CanvasPool.create2D(yellow, 6); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.globalCompositeOperation = 'multiply'; + + context.drawImage(magenta, 0, 0); + context.drawImage(yellow, 2, 0); + + if (!context.getImageData(2, 0, 1, 1)) + { + return false; + } + + var data = context.getImageData(2, 0, 1, 1).data; + + CanvasPool.remove(yellow); + + CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0); + }; + + yellow.src = pngHead + '/wCKxvRF' + pngEnd; + }; + + magenta.src = pngHead + 'AP804Oa6' + pngEnd; + + return false; +} + +function checkInverseAlpha () +{ + var canvas = CanvasPool.create2D(this, 2); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.fillStyle = 'rgba(10, 20, 30, 0.5)'; + + // Draw a single pixel + context.fillRect(0, 0, 1, 1); + + // Get the color values + var s1 = context.getImageData(0, 0, 1, 1); + + if (s1 === null) + { + return false; + } + + // Plot them to x2 + context.putImageData(s1, 1, 0); + + // Get those values + var s2 = context.getImageData(1, 0, 1, 1); + + var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]); + + CanvasPool.remove(this); + + // Compare and return + return result; +} + +function init () +{ + if (typeof importScripts !== 'function' && document !== undefined) + { + CanvasFeatures.supportNewBlendModes = checkBlendMode(); + CanvasFeatures.supportInverseAlpha = checkInverseAlpha(); + } + + return CanvasFeatures; +} + +module.exports = init(); + + +/***/ }), +/* 310 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 array; + } + + 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; + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(312), + AlphaSingle: __webpack_require__(313), + BlendMode: __webpack_require__(314), + ComputedSize: __webpack_require__(51), + Crop: __webpack_require__(315), + Depth: __webpack_require__(52), + Flip: __webpack_require__(53), + FX: __webpack_require__(316), + GetBounds: __webpack_require__(317), + Mask: __webpack_require__(326), + Origin: __webpack_require__(331), + PathFollower: __webpack_require__(332), + Pipeline: __webpack_require__(335), + ScrollFactor: __webpack_require__(54), + Size: __webpack_require__(337), + Texture: __webpack_require__(338), + TextureCrop: __webpack_require__(339), + Tint: __webpack_require__(340), + ToJSON: __webpack_require__(58), + Transform: __webpack_require__(55), + TransformMatrix: __webpack_require__(26), + Visible: __webpack_require__(56) + +}; + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(1); + +// 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; + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(1); + +// 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; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 {number} + * @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: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string|number)} + * @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: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + +/***/ }), +/* 315 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 316 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the FX values of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.FX + * @webglOnly + * @since 3.60.0 + */ + +var FX = { + + /** + * The amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @name Phaser.GameObjects.Components.FX#fxPadding + * @type {number} + * @default 0 + * @since 3.60.0 + */ + fxPadding: 0, + + /** + * Sets the amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @method Phaser.GameObjects.Components.FX#setFXPadding + * @webglOnly + * @since 3.60.0 + * + * @param {number} [padding=0] - The amount of padding to add to the texture. + * + * @return {this} This Game Object instance. + */ + setFXPadding: function (padding) + { + if (padding === undefined) { padding = 0; } + + this.fxPadding = padding; + + return this; + }, + + /** + * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `copySprite` method. + * + * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFXCopy + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFXCopy: function () + { + }, + + /** + * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `drawSprite` method. + * + * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFX + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFX: function () + { + } + +}; + +module.exports = FX; + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(29); +var RotateAround = __webpack_require__(42); +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. + * + * @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; + + +/***/ }), +/* 318 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetPoint = __webpack_require__(66); +var Perimeter = __webpack_require__(67); + +/** + * 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.Line} line - The line. - * @param {number} 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. + * @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 {number} 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, or point-like objects, containing the coordinates of the points on the line. + * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle. */ -var GetPoints = function (line, quantity, stepRate, out) +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 = Length(line) / stepRate; + quantity = Perimeter(rectangle) / 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)); + out.push(GetPoint(rectangle, position)); } return out; @@ -25408,51 +44573,21 @@ module.exports = GetPoints; /***/ }), - -/***/ 4771: -/***/ ((module) => { +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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; - - -/***/ }), - -/***/ 284: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var GetPoint = __webpack_require__(8881); -var GetPoints = __webpack_require__(4479); -var GEOM_CONST = __webpack_require__(1643); -var Random = __webpack_require__(3915); -var Vector2 = __webpack_require__(2529); +var Class = __webpack_require__(0); +var GetPoint = __webpack_require__(321); +var GetPoints = __webpack_require__(322); +var GEOM_CONST = __webpack_require__(30); +var Random = __webpack_require__(324); +var Vector2 = __webpack_require__(3); /** * @classdesc @@ -25775,17 +44910,148 @@ module.exports = Line; /***/ }), - -/***/ 3915: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Point = __webpack_require__(7655); +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; + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(323); +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 {number} 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; + + +/***/ }), +/* 323 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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; + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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. @@ -25816,313 +45082,16 @@ module.exports = Random; /***/ }), - -/***/ 7655: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var GEOM_CONST = __webpack_require__(1643); - -/** - * @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 {number} - * @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; - - -/***/ }), - -/***/ 5956: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 716: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Perimeter = __webpack_require__(8073); -var Point = __webpack_require__(7655); - -/** - * 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; - - -/***/ }), - -/***/ 8151: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetPoint = __webpack_require__(716); -var Perimeter = __webpack_require__(8073); - -// 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 {number} 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; - - -/***/ }), - -/***/ 8073: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2161: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(7655); +var Point = __webpack_require__(12); /** * Returns a random point within a Rectangle. @@ -26151,16075 +45120,1809 @@ module.exports = Random; /***/ }), - -/***/ 2150: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var Contains = __webpack_require__(5956); -var GetPoint = __webpack_require__(716); -var GetPoints = __webpack_require__(8151); -var GEOM_CONST = __webpack_require__(1643); -var Line = __webpack_require__(284); -var Random = __webpack_require__(2161); +var BitmapMask = __webpack_require__(327); +var GeometryMask = __webpack_require__(330); /** - * @classdesc - * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + * Provides methods used for getting and setting the mask of a Game Object. * - * @class Rectangle - * @memberof Phaser.Geom - * @constructor + * @namespace Phaser.GameObjects.Components.Mask * @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 {number} - * @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; - }, +var Mask = { /** - * Checks if the given point is inside the Rectangle's bounds. + * The Mask this Game Object is using during render. * - * @method Phaser.Geom.Rectangle#contains + * @name Phaser.GameObjects.Components.Mask#mask + * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} * @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); - }, + mask: null, /** - * 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. + * Sets the mask that this Game Object will use to render with. * - * @method Phaser.Geom.Rectangle#getPoint - * @since 3.0.0 + * 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. * - * @generic {Phaser.Geom.Point} O - [output,$return] + * If a mask is already set on this Game Object it will be immediately replaced. * - * @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. + * 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. * - * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given. + * 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. */ - getPoint: function (position, output) + setMask: function (mask) { - 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 {number} 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; + this.mask = mask; return this; }, /** - * Resets the position, width, and height of the Rectangle to 0. + * Clears the mask that this Game Object was using. * - * @method Phaser.Geom.Rectangle#setEmpty - * @since 3.0.0 + * @method Phaser.GameObjects.Components.Mask#clearMask + * @since 3.6.2 * - * @return {this} This Rectangle object. + * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? + * + * @return {this} This Game Object instance. */ - setEmpty: function () + clearMask: function (destroyMask) { - return this.setTo(0, 0, 0, 0); - }, + if (destroyMask === undefined) { destroyMask = false; } - /** - * 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; } + if (destroyMask && this.mask) + { + this.mask.destroy(); + } - this.x = x; - this.y = y; + this.mask = null; return this; }, /** - * Sets the width and height of the Rectangle. + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one, or a Dynamic Texture. * - * @method Phaser.Geom.Rectangle#setSize - * @since 3.0.0 + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. * - * @param {number} width - The width to set the Rectangle to. - * @param {number} [height=width] - The height to set the Rectangle to. + * 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. * - * @return {this} This Rectangle object. + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable texture-based Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @generic {Phaser.GameObjects.GameObject} G + * @generic {Phaser.Textures.DynamicTexture} T + * @genericUse {(G|T|null)} [maskObject] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. */ - setSize: function (width, height) + createBitmapMask: function (maskObject, x, y, texture, frame) { - 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 () + if (maskObject === undefined && (this.texture || this.shader || this.geom)) { - return this.x; - }, - - set: function (value) - { - if (value >= this.right) - { - this.width = 0; - } - else - { - this.width = this.right - value; - } - - this.x = value; + // eslint-disable-next-line consistent-this + maskObject = this; } + return new BitmapMask(this.scene, maskObject, x, y, texture, frame); }, /** - * 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. + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. * - * @name Phaser.Geom.Rectangle#right - * @type {number} - * @since 3.0.0 + * 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 + * + * @generic {Phaser.GameObjects.Graphics} G + * @generic {Phaser.GameObjects.Shape} S + * @genericUse {(G|S)} [graphics] + * + * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask. + * + * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. */ - right: { - - get: function () + createGeometryMask: function (graphics) + { + if (graphics === undefined && (this.type === 'Graphics' || this.geom)) { - 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); + // eslint-disable-next-line consistent-this + graphics = this; } + return new GeometryMask(this.scene, graphics); } -}); - -module.exports = Rectangle; - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Rectangle = __webpack_require__(2150); - -/** - * 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; +module.exports = Mask; /***/ }), - -/***/ 1593: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var Events = __webpack_require__(1179); -var GetFastValue = __webpack_require__(4597); -var GetURL = __webpack_require__(5593); -var MergeXHRSettings = __webpack_require__(7410); -var XHRLoader = __webpack_require__(5874); -var XHRSettings = __webpack_require__(707); +var Class = __webpack_require__(0); +var GameObjectFactory = __webpack_require__(328); /** * @classdesc - * The base File class used by all File Types that the Loader can support. - * 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. + * 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. * - * @class File - * @memberof Phaser.Loader + * A Bitmap Mask can use any Game Object or Dynamic Texture 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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.Loader.LoaderPlugin} loader - The Loader that is going to load this File. - * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type. + * @param {Phaser.Scene} scene - The Scene to which this mask is being added. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. */ -var File = new Class({ +var BitmapMask = new Class({ initialize: - function File (loader, fileConfig) + function BitmapMask (scene, maskObject, x, y, texture, frame) { + if (!maskObject) + { + maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false }); + } + /** - * A reference to the Loader that is going to load this file. + * The Game Object that is used as the mask. Must use a texture, such as a Sprite. * - * @name Phaser.Loader.File#loader - * @type {Phaser.Loader.LoaderPlugin} + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} * @since 3.0.0 */ - this.loader = loader; + this.bitmapMask = maskObject; /** - * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. + * Whether to invert the masks alpha. * - * @name Phaser.Loader.File#cache - * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)} - * @since 3.7.0 - */ - this.cache = GetFastValue(fileConfig, 'cache', false); - - /** - * The file type string (image, json, etc) for sorting within the Loader. + * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. * - * @name Phaser.Loader.File#type - * @type {string} - * @since 3.0.0 - */ - this.type = GetFastValue(fileConfig, 'type', false); - - /** - * Unique cache key (unique within its file type) + * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible. * - * @name Phaser.Loader.File#key - * @type {string} - * @since 3.0.0 - */ - this.key = GetFastValue(fileConfig, 'key', false); - - var loadKey = this.key; - - if (loader.prefix && loader.prefix !== '') - { - this.key = loader.prefix + loadKey; - } - - if (!this.type || !this.key) - { - throw new Error('Invalid Loader.' + this.type + ' key'); - } - - var url = GetFastValue(fileConfig, 'url'); - - if (url === undefined) - { - url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); - } - else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) - { - url = loader.path + url; - } - - /** - * The URL of the file, not including baseURL. - * - * 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 {object|string} - * @since 3.0.0 - */ - this.url = url; - - /** - * The final URL this file will load from, including baseURL and path. - * Set automatically when the Loader calls 'load' on this file. - * - * @name Phaser.Loader.File#src - * @type {string} - * @since 3.0.0 - */ - this.src = ''; - - /** - * The merged XHRSettings for this file. - * - * @name Phaser.Loader.File#xhrSettings - * @type {Phaser.Types.Loader.XHRSettingsObject} - * @since 3.0.0 - */ - this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined)); - - if (GetFastValue(fileConfig, 'xhrSettings', false)) - { - this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {})); - } - - /** - * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. - * - * @name Phaser.Loader.File#xhrLoader - * @type {?XMLHttpRequest} - * @since 3.0.0 - */ - this.xhrLoader = null; - - /** - * The current state of the file. One of the FILE_CONST values. - * - * @name Phaser.Loader.File#state - * @type {number} - * @since 3.0.0 - */ - this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING; - - /** - * The total size of this file. - * Set by onProgress and only if loading via XHR. - * - * @name Phaser.Loader.File#bytesTotal - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.bytesTotal = 0; - - /** - * Updated as the file loads. - * Only set if loading via XHR. - * - * @name Phaser.Loader.File#bytesLoaded - * @type {number} - * @default -1 - * @since 3.0.0 - */ - this.bytesLoaded = -1; - - /** - * A percentage value between 0 and 1 indicating how much of this file has loaded. - * Only set if loading via XHR. - * - * @name Phaser.Loader.File#percentComplete - * @type {number} - * @default -1 - * @since 3.0.0 - */ - this.percentComplete = -1; - - /** - * For CORs based loading. - * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) - * - * @name Phaser.Loader.File#crossOrigin - * @type {(string|undefined)} - * @since 3.0.0 - */ - this.crossOrigin = undefined; - - /** - * The processed file data, stored here after the file has loaded. - * - * @name Phaser.Loader.File#data - * @type {*} - * @since 3.0.0 - */ - this.data = undefined; - - /** - * A config object that can be used by file types to store transitional data. - * - * @name Phaser.Loader.File#config - * @type {*} - * @since 3.0.0 - */ - this.config = GetFastValue(fileConfig, 'config', {}); - - /** - * If this is a multipart file, i.e. an atlas and its json together, then this is a reference - * to the parent MultiFile. Set and used internally by the Loader or specific file types. - * - * @name Phaser.Loader.File#multiFile - * @type {?Phaser.Loader.MultiFile} - * @since 3.7.0 - */ - this.multiFile; - - /** - * Does this file have an associated linked file? Such as an image and a normal map. - * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't - * actually bound by data, where-as a linkFile is. - * - * @name Phaser.Loader.File#linkFile - * @type {?Phaser.Loader.File} - * @since 3.7.0 - */ - this.linkFile; - }, - - /** - * Links this File with another, so they depend upon each other for loading and processing. - * - * @method Phaser.Loader.File#setLink - * @since 3.7.0 - * - * @param {Phaser.Loader.File} fileB - The file to link to this one. - */ - setLink: function (fileB) - { - this.linkFile = fileB; - - fileB.linkFile = this; - }, - - /** - * Resets the XHRLoader instance this file is using. - * - * @method Phaser.Loader.File#resetXHR - * @since 3.0.0 - */ - resetXHR: function () - { - if (this.xhrLoader) - { - this.xhrLoader.onload = undefined; - this.xhrLoader.onerror = undefined; - this.xhrLoader.onprogress = undefined; - } - }, - - /** - * Called by the Loader, starts the actual file downloading. - * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. - * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. - * - * @method Phaser.Loader.File#load - * @since 3.0.0 - */ - load: function () - { - if (this.state === CONST.FILE_POPULATED) - { - // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL - this.loader.nextFile(this, true); - } - else - { - this.state = CONST.FILE_LOADING; - - this.src = GetURL(this, this.loader.baseURL); - - if (this.src.indexOf('data:') === 0) - { - console.warn('Local data URIs are not supported: ' + this.key); - } - else - { - // 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 - - this.xhrLoader = XHRLoader(this, this.loader.xhr); - } - } - }, - - /** - * Called when the file finishes loading, is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onLoad - * @since 3.0.0 - * - * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. - * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load. - */ - onLoad: function (xhr, event) - { - // On iOS, Capacitor often runs on a capacitor:// protocol, meaning local files are served from capacitor:// rather than file:// - // See: https://github.com/photonstorm/phaser/issues/5685 - - var isLocalFile = xhr.responseURL && (xhr.responseURL.indexOf('file://') === 0 || xhr.responseURL.indexOf('capacitor://') === 0); - - var localFileOk = (isLocalFile && event.target.status === 0); - - var success = !(event.target && event.target.status !== 200) || localFileOk; - - // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called. - if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) - { - success = false; - } - - this.state = CONST.FILE_LOADED; - - this.resetXHR(); - - this.loader.nextFile(this, success); - }, - - /** - * Called if the file errors while loading, is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onError - * @since 3.0.0 - * - * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event. - * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. - */ - onError: function () - { - this.resetXHR(); - - this.loader.nextFile(this, false); - }, - - /** - * Called during the file load progress. Is sent a DOM ProgressEvent. - * - * @method Phaser.Loader.File#onProgress - * @fires Phaser.Loader.Events#FILE_PROGRESS - * @since 3.0.0 - * - * @param {ProgressEvent} event - The DOM ProgressEvent. - */ - onProgress: function (event) - { - if (event.lengthComputable) - { - this.bytesLoaded = event.loaded; - this.bytesTotal = event.total; - - this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1); - - this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete); - } - }, - - /** - * Usually overridden by the FileTypes and is called by Loader.nextFile. - * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. - * - * @method Phaser.Loader.File#onProcess - * @since 3.0.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.onProcessComplete(); - }, - - /** - * Called when the File has completed processing. - * Checks on the state of its multifile, if set. - * - * @method Phaser.Loader.File#onProcessComplete - * @since 3.7.0 - */ - onProcessComplete: function () - { - this.state = CONST.FILE_COMPLETE; - - if (this.multiFile) - { - this.multiFile.onFileComplete(this); - } - - this.loader.fileProcessComplete(this); - }, - - /** - * Called when the File has completed processing but it generated an error. - * Checks on the state of its multifile, if set. - * - * @method Phaser.Loader.File#onProcessError - * @since 3.7.0 - */ - onProcessError: function () - { - // eslint-disable-next-line no-console - console.error('Failed to process file: %s "%s"', this.type, this.key); - - this.state = CONST.FILE_ERRORED; - - if (this.multiFile) - { - this.multiFile.onFileFailed(this); - } - - this.loader.fileProcessComplete(this); - }, - - /** - * Checks if a key matching the one used by this file exists in the target Cache or not. - * This is called automatically by the LoaderPlugin to decide if the file can be safely - * loaded or will conflict. - * - * @method Phaser.Loader.File#hasCacheConflict - * @since 3.7.0 - * - * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`. - */ - hasCacheConflict: function () - { - return (this.cache && this.cache.exists(this.key)); - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * This method is often overridden by specific file types. - * - * @method Phaser.Loader.File#addToCache - * @since 3.7.0 - */ - addToCache: function () - { - if (this.cache && this.data) - { - this.cache.add(this.key, this.data); - } - }, - - /** - * Called once the file has been added to its cache and is now ready for deletion from the Loader. - * It will emit a `filecomplete` event from the LoaderPlugin. - * - * @method Phaser.Loader.File#pendingDestroy - * @fires Phaser.Loader.Events#FILE_COMPLETE - * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.7.0 - */ - pendingDestroy: function (data) - { - if (this.state === CONST.FILE_PENDING_DESTROY) - { - return; - } - - if (data === undefined) { data = this.data; } - - var key = this.key; - var type = this.type; - - this.loader.emit(Events.FILE_COMPLETE, key, type, data); - this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); - - this.loader.flagForRemoval(this); - - this.state = CONST.FILE_PENDING_DESTROY; - }, - - /** - * Destroy this File and any references it holds. - * - * @method Phaser.Loader.File#destroy - * @since 3.7.0 - */ - destroy: function () - { - this.loader = null; - this.cache = null; - this.xhrSettings = null; - this.multiFile = null; - this.linkFile = null; - this.data = null; - } - -}); - -/** - * Static method for creating object URL using URL API and setting it as image 'src' attribute. - * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. - * - * @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. - */ -File.createObjectURL = function (image, blob, defaultType) -{ - if (typeof URL === 'function') - { - image.src = URL.createObjectURL(blob); - } - else - { - var reader = new FileReader(); - - reader.onload = function () - { - image.removeAttribute('crossOrigin'); - image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1]; - }; - - reader.onerror = image.onerror; - - reader.readAsDataURL(blob); - } -}; - -/** - * Static method for releasing an existing object URL which was previously created - * by calling {@link File#createObjectURL} method. - * - * @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) -{ - if (typeof URL === 'function') - { - URL.revokeObjectURL(image.src); - } -}; - -module.exports = File; - - -/***/ }), - -/***/ 9845: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var types = {}; - -/** - * @namespace Phaser.Loader.FileTypesManager - */ - -var FileTypesManager = { - - /** - * Static method called when a LoaderPlugin is created. - * - * Loops through the local types object and injects all of them as - * properties into the LoaderPlugin instance. - * - * @method Phaser.Loader.FileTypesManager.install - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. - */ - install: function (loader) - { - for (var key in types) - { - loader[key] = types[key]; - } - }, - - /** - * Static method called directly by the File Types. - * - * The key is a reference to the function used to load the files via the Loader, i.e. `image`. - * - * @method Phaser.Loader.FileTypesManager.register - * @since 3.0.0 - * - * @param {string} key - The key that will be used as the method name in the LoaderPlugin. - * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. - */ - register: function (key, factoryFunction) - { - types[key] = factoryFunction; - }, - - /** - * Removed all associated file types. - * - * @method Phaser.Loader.FileTypesManager.destroy - * @since 3.0.0 - */ - destroy: function () - { - types = {}; - } - -}; - -module.exports = FileTypesManager; - - -/***/ }), - -/***/ 5593: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Given a File and a baseURL value this returns the URL the File will use to download from. - * - * @function Phaser.Loader.GetURL - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - The File object. - * @param {string} baseURL - A default base URL. - * - * @return {string} The URL the File will use. - */ -var GetURL = function (file, baseURL) -{ - if (!file.url) - { - return false; - } - - if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) - { - return file.url; - } - else - { - return baseURL + file.url; - } -}; - -module.exports = GetURL; - - -/***/ }), - -/***/ 7410: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Extend = __webpack_require__(1030); -var XHRSettings = __webpack_require__(707); - -/** - * Takes two XHRSettings Objects and creates a new XHRSettings object from them. - * - * The new object is seeded by the values given in the global settings, but any setting in - * the local object overrides the global ones. - * - * @function Phaser.Loader.MergeXHRSettings - * @since 3.0.0 - * - * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object. - * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object. - * - * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object. - */ -var MergeXHRSettings = function (global, local) -{ - var output = (global === undefined) ? XHRSettings() : Extend({}, global); - - if (local) - { - for (var setting in local) - { - if (local[setting] !== undefined) - { - output[setting] = local[setting]; - } - } - } - - return output; -}; - -module.exports = MergeXHRSettings; - - -/***/ }), - -/***/ 3137: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var Events = __webpack_require__(1179); - -/** - * @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) - { - var finalFiles = []; - - // Clean out any potential 'null' or 'undefined' file entries - files.forEach(function (file) - { - if (file) - { - finalFiles.push(file); - } - }); - - /** - * 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 {number} - * @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 = finalFiles; - - /** - * The current state of the file. One of the FILE_CONST values. - * - * @name Phaser.Loader.MultiFile#state - * @type {number} - * @since 3.60.0 - */ - this.state = CONST.FILE_PENDING; - - /** - * The completion status of this MultiFile. - * - * @name Phaser.Loader.MultiFile#complete + * @name Phaser.Display.Masks.BitmapMask#invertAlpha * @type {boolean} - * @default false - * @since 3.7.0 + * @since 3.1.2 */ - this.complete = false; + this.invertAlpha = false; /** - * The number of files to load. + * Is this mask a stencil mask? This is false by default and should not be changed. * - * @name Phaser.Loader.MultiFile#pending - * @type {number} - * @since 3.7.0 + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 */ - - this.pending = finalFiles.length; - - /** - * The number of files that failed to load. - * - * @name Phaser.Loader.MultiFile#failed - * @type {number} - * @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 < finalFiles.length; i++) - { - finalFiles[i].multiFile = this; - } + this.isStencil = false; }, /** - * Checks if this MultiFile is ready to process its children or not. + * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use. * - * @method Phaser.Loader.MultiFile#isReadyToProcess + * If a Game Object it must have a texture, such as a Sprite. + * + * You can update the source of the mask as often as you like. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite. + */ + setBitmap: function (maskObject) + { + this.bitmapMask = maskObject; + }, + + /** + * 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.BITMAPMASK_PIPELINE.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. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget. + */ + postRenderWebGL: function (renderer, camera, renderTarget) + { + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget); + }, + + /** + * 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 - * - * @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++; - - // eslint-disable-next-line no-console - console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); - } - }, - - /** - * Called once all children of this multi file have been added to their caches and is now - * ready for deletion from the Loader. - * - * It will emit a `filecomplete` event from the LoaderPlugin. - * - * @method Phaser.Loader.MultiFile#pendingDestroy - * @fires Phaser.Loader.Events#FILE_COMPLETE - * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.60.0 - */ - pendingDestroy: function () - { - if (this.state === CONST.FILE_PENDING_DESTROY) - { - return; - } - - var key = this.key; - var type = this.type; - - this.loader.emit(Events.FILE_COMPLETE, key, type); - this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); - - this.loader.flagForRemoval(this); - - for (var i = 0; i < this.files.length; i++) - { - this.files[i].pendingDestroy(); - } - - this.state = CONST.FILE_PENDING_DESTROY; - }, - - /** - * Destroy this Multi File and any references it holds. - * - * @method Phaser.Loader.MultiFile#destroy - * @since 3.60.0 */ destroy: function () { - this.loader = null; - this.files = null; - this.config = null; - } - -}); - -module.exports = MultiFile; - - -/***/ }), - -/***/ 5874: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MergeXHRSettings = __webpack_require__(7410); - -/** - * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings - * and starts the download of it. It uses the Files own XHRSettings and merges them - * with the global XHRSettings object to set the xhr values before download. - * - * @function Phaser.Loader.XHRLoader - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - The File to download. - * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object. - * - * @return {XMLHttpRequest} The XHR object. - */ -var XHRLoader = function (file, globalXHRSettings) -{ - var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings); - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', file.src, config.async, config.user, config.password); - - 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); - } - - if (config.requestedWith) - { - xhr.setRequestHeader('X-Requested-With', config.requestedWith); - } - - if (config.overrideMimeType) - { - 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); - xhr.onerror = file.onError.bind(file, xhr); - xhr.onprogress = file.onProgress.bind(file); - - // This is the only standard method, the ones above are browser additions (maybe not universal?) - // xhr.onreadystatechange - - xhr.send(); - - return xhr; -}; - -module.exports = XHRLoader; - - -/***/ }), - -/***/ 707: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Creates an XHRSettings Object with default values. - * - * @function Phaser.Loader.XHRSettings - * @since 3.0.0 - * - * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'. - * @param {boolean} [async=true] - Should the XHR request use async or not? - * @param {string} [user=''] - Optional username for the XHR request. - * @param {string} [password=''] - Optional password for the XHR request. - * @param {number} [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, 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. - // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". - - return { - - // Ignored by the Loader, only used by File. - responseType: responseType, - - async: async, - - // credentials - user: user, - password: password, - - // timeout in ms (0 = no timeout) - timeout: timeout, - - // setRequestHeader - headers: undefined, - header: undefined, - headerValue: undefined, - requestedWith: false, - - // overrideMimeType - overrideMimeType: undefined, - - // withCredentials - withCredentials: withCredentials - - }; -}; - -module.exports = XHRSettings; - - -/***/ }), - -/***/ 4359: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var FILE_CONST = { - - /** - * The Loader is idle. - * - * @name Phaser.Loader.LOADER_IDLE - * @type {number} - * @since 3.0.0 - */ - LOADER_IDLE: 0, - - /** - * The Loader is actively loading. - * - * @name Phaser.Loader.LOADER_LOADING - * @type {number} - * @since 3.0.0 - */ - LOADER_LOADING: 1, - - /** - * The Loader is processing files is has loaded. - * - * @name Phaser.Loader.LOADER_PROCESSING - * @type {number} - * @since 3.0.0 - */ - LOADER_PROCESSING: 2, - - /** - * The Loader has completed loading and processing. - * - * @name Phaser.Loader.LOADER_COMPLETE - * @type {number} - * @since 3.0.0 - */ - LOADER_COMPLETE: 3, - - /** - * The Loader is shutting down. - * - * @name Phaser.Loader.LOADER_SHUTDOWN - * @type {number} - * @since 3.0.0 - */ - LOADER_SHUTDOWN: 4, - - /** - * The Loader has been destroyed. - * - * @name Phaser.Loader.LOADER_DESTROYED - * @type {number} - * @since 3.0.0 - */ - LOADER_DESTROYED: 5, - - /** - * File is in the load queue but not yet started. - * - * @name Phaser.Loader.FILE_PENDING - * @type {number} - * @since 3.0.0 - */ - FILE_PENDING: 10, - - /** - * File has been started to load by the loader (onLoad called) - * - * @name Phaser.Loader.FILE_LOADING - * @type {number} - * @since 3.0.0 - */ - FILE_LOADING: 11, - - /** - * File has loaded successfully, awaiting processing. - * - * @name Phaser.Loader.FILE_LOADED - * @type {number} - * @since 3.0.0 - */ - FILE_LOADED: 12, - - /** - * File failed to load. - * - * @name Phaser.Loader.FILE_FAILED - * @type {number} - * @since 3.0.0 - */ - FILE_FAILED: 13, - - /** - * File is being processed (onProcess callback) - * - * @name Phaser.Loader.FILE_PROCESSING - * @type {number} - * @since 3.0.0 - */ - FILE_PROCESSING: 14, - - /** - * The File has errored somehow during processing. - * - * @name Phaser.Loader.FILE_ERRORED - * @type {number} - * @since 3.0.0 - */ - FILE_ERRORED: 16, - - /** - * File has finished processing. - * - * @name Phaser.Loader.FILE_COMPLETE - * @type {number} - * @since 3.0.0 - */ - FILE_COMPLETE: 17, - - /** - * File has been destroyed. - * - * @name Phaser.Loader.FILE_DESTROYED - * @type {number} - * @since 3.0.0 - */ - FILE_DESTROYED: 18, - - /** - * File was populated from local data and doesn't need an HTTP request. - * - * @name Phaser.Loader.FILE_POPULATED - * @type {number} - * @since 3.0.0 - */ - FILE_POPULATED: 19, - - /** - * File is pending being destroyed. - * - * @name Phaser.Loader.FILE_PENDING_DESTROY - * @type {number} - * @since 3.60.0 - */ - FILE_PENDING_DESTROY: 20 - -}; - -module.exports = FILE_CONST; - - -/***/ }), - -/***/ 462: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Add File Event. - * - * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. - * - * Listen to it from a Scene using: `this.load.on('addfile', listener)`. - * - * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. - * - * @event Phaser.Loader.Events#ADD - * @since 3.0.0 - * - * @param {string} key - The unique key of the file that was added to the Loader. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader. - */ -module.exports = 'addfile'; - - -/***/ }), - -/***/ 7297: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Complete Event. - * - * This event is dispatched when the Loader has fully processed everything in the load queue. - * By this point every loaded file will now be in its associated cache and ready for use. - * - * Listen to it from a Scene using: `this.load.on('complete', listener)`. - * - * @event Phaser.Loader.Events#COMPLETE - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - * @param {number} totalComplete - The total number of files that successfully loaded. - * @param {number} totalFailed - The total number of files that failed to load. - */ -module.exports = 'complete'; - - -/***/ }), - -/***/ 8660: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. - * - * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. - * - * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. - * - * 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. - * - * @event Phaser.Loader.Events#FILE_COMPLETE - * @since 3.0.0 - * - * @param {string} key - The key of the file that just loaded and finished processing. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. - */ -module.exports = 'filecomplete'; - - -/***/ }), - -/***/ 6484: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * - * It uses a special dynamic event name constructed from the key and type of the file. - * - * For example, if you have loaded an `image` with a key of `monster`, you can listen for it - * using the following: - * - * ```javascript - * this.load.on('filecomplete-image-monster', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a texture `atlas` with a key of `Level1`: - * - * ```javascript - * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: - * - * ```javascript - * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { - * // Your handler code - * }); - * ``` - * - * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. - * - * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. - * - * @event Phaser.Loader.Events#FILE_KEY_COMPLETE - * @since 3.0.0 - * - * @param {string} key - The key of the file that just loaded and finished processing. - * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. - */ -module.exports = 'filecomplete-'; - - -/***/ }), - -/***/ 7972: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Error Event. - * - * This event is dispatched by the Loader Plugin when a file fails to load. - * - * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. - * - * @event Phaser.Loader.Events#FILE_LOAD_ERROR - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which errored during load. - */ -module.exports = 'loaderror'; - - -/***/ }), - -/***/ 1906: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Event. - * - * This event is dispatched by the Loader Plugin when a file finishes loading, - * but _before_ it is processed and added to the internal Phaser caches. - * - * Listen to it from a Scene using: `this.load.on('load', listener)`. - * - * @event Phaser.Loader.Events#FILE_LOAD - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. - */ -module.exports = 'load'; - - -/***/ }), - -/***/ 1441: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The File Load Progress Event. - * - * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and - * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. - * - * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. - * - * @event Phaser.Loader.Events#FILE_PROGRESS - * @since 3.0.0 - * - * @param {Phaser.Loader.File} file - A reference to the File which errored during load. - * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. - */ -module.exports = 'fileprogress'; - - -/***/ }), - -/***/ 1072: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Post Process Event. - * - * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. - * It is dispatched before the internal lists are cleared and each File is destroyed. - * - * Use this hook to perform any last minute processing of files that can only happen once the - * Loader has completed, but prior to it emitting the `complete` event. - * - * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. - * - * @event Phaser.Loader.Events#POST_PROCESS - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - */ -module.exports = 'postprocess'; - - -/***/ }), - -/***/ 1927: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Progress Event. - * - * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. - * - * Listen to it from a Scene using: `this.load.on('progress', listener)`. - * - * @event Phaser.Loader.Events#PROGRESS - * @since 3.0.0 - * - * @param {number} progress - The current progress of the load. A value between 0 and 1. - */ -module.exports = 'progress'; - - -/***/ }), - -/***/ 6597: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Loader Plugin Start Event. - * - * This event is dispatched when the Loader starts running. At this point load progress is zero. - * - * This event is dispatched even if there aren't any files in the load queue. - * - * Listen to it from a Scene using: `this.load.on('start', listener)`. - * - * @event Phaser.Loader.Events#START - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. - */ -module.exports = 'start'; - - -/***/ }), - -/***/ 1179: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Loader.Events - */ - -module.exports = { - - ADD: __webpack_require__(462), - COMPLETE: __webpack_require__(7297), - FILE_COMPLETE: __webpack_require__(8660), - FILE_KEY_COMPLETE: __webpack_require__(6484), - FILE_LOAD_ERROR: __webpack_require__(7972), - FILE_LOAD: __webpack_require__(1906), - FILE_PROGRESS: __webpack_require__(1441), - POST_PROCESS: __webpack_require__(1072), - PROGRESS: __webpack_require__(1927), - START: __webpack_require__(6597) - -}; - - -/***/ }), - -/***/ 6732: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var IsPlainObject = __webpack_require__(2482); -var GetURL = __webpack_require__(5593); - -/** - * @classdesc - * 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 - * @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.ImageFileConfig)} key - The key to use for this file, or a file configuration object. - * @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] - Extra XHR Settings specifically for this file. - * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets. - */ -var ImageFile = new Class({ - - Extends: File, - - initialize: - - function ImageFile (loader, key, url, xhrSettings, frameConfig) - { - var extension = 'png'; - var normalMapURL; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - normalMapURL = GetFastValue(config, 'normalMap'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - frameConfig = GetFastValue(config, 'frameConfig'); - } - - if (Array.isArray(url)) - { - normalMapURL = url[1]; - url = url[0]; - } - - var fileConfig = { - type: 'image', - cache: loader.textureManager, - extension: extension, - responseType: 'blob', - key: key, - url: url, - xhrSettings: xhrSettings, - config: frameConfig - }; - - File.call(this, loader, fileConfig); - - // Do we have a normal map to load as well? - if (normalMapURL) - { - var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig); - - normalMap.type = 'normalMap'; - - this.setLink(normalMap); - - loader.addFile(normalMap); - } - - this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; - - if (this.useImageElementLoad) - { - this.load = this.loadImage; - this.onProcess = this.onProcessImage; - } - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.ImageFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.data = new Image(); - - this.data.crossOrigin = this.crossOrigin; - - var _this = this; - - this.data.onload = function () - { - File.revokeObjectURL(_this.data); - - _this.onProcessComplete(); - }; - - this.data.onerror = function () - { - File.revokeObjectURL(_this.data); - - _this.onProcessError(); - }; - - File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); - }, - - /** - * Handles image load processing. - * - * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage - * @private - * @since 3.60.0 - */ - onProcessImage: function () - { - var result = this.state; - - this.state = CONST.FILE_PROCESSING; - - if (result === CONST.FILE_LOADED) - { - this.onProcessComplete(); - } - else - { - this.onProcessError(); - } - }, - - /** - * Loads the image using either XHR or an Image tag. - * - * @method Phaser.Loader.FileTypes.ImageFile#loadImage - * @private - * @since 3.60.0 - */ - loadImage: function () - { - this.state = CONST.FILE_LOADING; - - this.src = GetURL(this, this.loader.baseURL); - - if (this.src.indexOf('data:') === 0) - { - console.warn('Local data URIs are not supported: ' + this.key); - } - else - { - this.data = new Image(); - - this.data.crossOrigin = this.crossOrigin; - - var _this = this; - - this.data.onload = function () - { - _this.state = CONST.FILE_LOADED; - - _this.loader.nextFile(_this, true); - }; - - this.data.onerror = function () - { - _this.loader.nextFile(_this, false); - }; - - this.data.src = this.src; - } - }, - - /** - * Adds this file to its target cache upon successful loading and processing. - * - * @method Phaser.Loader.FileTypes.ImageFile#addToCache - * @since 3.7.0 - */ - addToCache: function () - { - var linkFile = this.linkFile; - - if (linkFile && linkFile.state === CONST.FILE_COMPLETE) - { - if (this.type === 'image') - { - this.cache.addImage(this.key, this.data, linkFile.data); - } - else - { - this.cache.addImage(linkFile.key, linkFile.data, this.data); - } - } - else if (!linkFile) - { - this.cache.addImage(this.key, this.data); - } + this.bitmapMask = null; } }); /** - * 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 () - * { - * this.load.image('logo', 'images/phaserLogo.png'); - * } - * ``` - * - * 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. - * - * 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. - * - * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. - * 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 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', - * url: 'images/AtariLogo.png' - * }); - * ``` - * - * 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 ... - * this.add.image(x, y, 'logo'); - * ``` - * - * 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 `MENU.` and the key was `Background` the final key will be `MENU.Background` and - * this is what you would use to retrieve the image from the Texture Manager. - * - * 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 "alien" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * 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', - * url: 'images/AtariLogo.png', - * normalMap: 'images/AtariLogo-n.png' - * }); - * ``` - * - * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. - * Normal maps are a WebGL only feature. - * - * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. - * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images - * via the Image tag instead. - * - * Note: The ability to load this type of file will only be available if the Image 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#image - * @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 {this} The Loader instance. - */ -FileTypesManager.register('image', function (key, url, 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 ImageFile(this, key[i])); - } - } - else - { - this.addFile(new ImageFile(this, key, url, xhrSettings)); - } - - return this; -}); - -module.exports = ImageFile; - - -/***/ }), - -/***/ 704: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var GetValue = __webpack_require__(5851); -var IsPlainObject = __webpack_require__(2482); - -/** - * @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; - - try - { - var json = JSON.parse(this.xhrLoader.responseText); - } - catch (e) - { - this.onProcessError(); - - throw e; - } - - 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; - - -/***/ }), - -/***/ 1192: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); -var CONST = __webpack_require__(4359); -var File = __webpack_require__(1593); -var FileTypesManager = __webpack_require__(9845); -var GetFastValue = __webpack_require__(4597); -var IsPlainObject = __webpack_require__(2482); - -/** - * @classdesc - * A single Text File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. - * - * @class TextFile - * @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.TextFileConfig)} 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 `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". - * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - */ -var TextFile = new Class({ - - Extends: File, - - initialize: - - function TextFile (loader, key, url, xhrSettings) - { - var type = 'text'; - var extension = 'txt'; - var cache = loader.cacheManager.text; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - type = GetFastValue(config, 'type', type); - cache = GetFastValue(config, 'cache', cache); - } - - var fileConfig = { - type: type, - cache: cache, - extension: extension, - responseType: 'text', - key: key, - url: url, - xhrSettings: xhrSettings - }; - - File.call(this, loader, fileConfig); - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.TextFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - this.state = CONST.FILE_PROCESSING; - - this.data = this.xhrLoader.responseText; - - this.onProcessComplete(); - } - -}); - -/** - * Adds a Text file, or array of Text 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.text('story', 'files/IntroStory.txt'); - * } - * ``` - * - * 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 Text Cache upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the Text 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 Text Cache first, before loading a new one. - * - * Instead of passing arguments you can pass a configuration object, such as: - * - * ```javascript - * this.load.text({ - * key: 'story', - * url: 'files/IntroStory.txt' - * }); - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details. - * - * Once the file has finished loading you can access it from its Cache using its key: - * - * ```javascript - * this.load.text('story', 'files/IntroStory.txt'); - * // and later in your game ... - * var data = this.cache.text.get('story'); - * ``` - * - * 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 `Story` the final key will be `LEVEL1.Story` and - * this is what you would use to retrieve the text from the Text 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 "story" - * 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 - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * Note: The ability to load this type of file will only be available if the Text 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#text - * @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 {this} The Loader instance. - */ -FileTypesManager.register('text', function (key, url, 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 TextFile(this, key[i])); - } - } - else - { - this.addFile(new TextFile(this, key, url, xhrSettings)); - } - - return this; -}); - -module.exports = TextFile; - - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 785: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Factorial = __webpack_require__(3916); - -/** - * 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; - - -/***/ }), - -/***/ 7025: -/***/ ((module) => { - -/** - * @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 {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The random integer. - */ -var Between = function (min, max) -{ - return Math.floor(Math.random() * (max - min + 1) + min); -}; - -module.exports = Between; - - -/***/ }), - -/***/ 48: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5035: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2915: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7149: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * Convert the given angle from degrees, to the equivalent angle in radians. - * - * @function Phaser.Math.DegToRad - * @since 3.0.0 - * - * @param {number} 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; - - -/***/ }), - -/***/ 2975: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2107: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); -var Class = __webpack_require__(7473); -var Matrix4 = __webpack_require__(9652); -var NOOP = __webpack_require__(1984); - -var tempMatrix = new Matrix4(); - -/** - * @classdesc - * - * @class Euler - * @memberof Phaser.Math - * @constructor - * @since 3.50.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - */ -var Euler = new Class({ - - initialize: - - function Euler (x, y, z, order) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (z === undefined) { z = 0; } - if (order === undefined) { order = Euler.DefaultOrder; } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this.onChangeCallback = NOOP; - }, - - x: { - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - - this.onChangeCallback(this); - } - }, - - y: { - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - - this.onChangeCallback(this); - } - }, - - z: { - get: function () - { - return this._z; - }, - - set: function (value) - { - this._z = value; - - this.onChangeCallback(this); - } - }, - - order: { - get: function () - { - return this._order; - }, - - set: function (value) - { - this._order = value; - - this.onChangeCallback(this); - } - }, - - set: function (x, y, z, order) - { - if (order === undefined) { order = this._order; } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this.onChangeCallback(this); - - return this; - }, - - copy: function (euler) - { - return this.set(euler.x, euler.y, euler.z, euler.order); - }, - - setFromQuaternion: function (quaternion, order, update) - { - if (order === undefined) { order = this._order; } - if (update === undefined) { update = false; } - - tempMatrix.fromQuat(quaternion); - - return this.setFromRotationMatrix(tempMatrix, order, update); - }, - - setFromRotationMatrix: function (matrix, order, update) - { - if (order === undefined) { order = this._order; } - if (update === undefined) { update = false; } - - var elements = matrix.val; - - // Upper 3x3 of matrix is un-scaled rotation matrix - var m11 = elements[0]; - var m12 = elements[4]; - var m13 = elements[8]; - var m21 = elements[1]; - var m22 = elements[5]; - var m23 = elements[9]; - var m31 = elements[2]; - var m32 = elements[6]; - var m33 = elements[10]; - - var x = 0; - var y = 0; - var z = 0; - var epsilon = 0.99999; - - switch (order) - { - case 'XYZ': - { - y = Math.asin(Clamp(m13, -1, 1)); - - if (Math.abs(m13) < epsilon) - { - x = Math.atan2(-m23, m33); - z = Math.atan2(-m12, m11); - } - else - { - x = Math.atan2(m32, m22); - } - - break; - } - - case 'YXZ': - { - x = Math.asin(-Clamp(m23, -1, 1)); - - if (Math.abs(m23) < epsilon) - { - y = Math.atan2(m13, m33); - z = Math.atan2(m21, m22); - } - else - { - y = Math.atan2(-m31, m11); - } - - break; - } - - case 'ZXY': - { - x = Math.asin(Clamp(m32, -1, 1)); - - if (Math.abs(m32) < epsilon) - { - y = Math.atan2(-m31, m33); - z = Math.atan2(-m12, m22); - } - else - { - z = Math.atan2(m21, m11); - } - - break; - } - - case 'ZYX': - { - y = Math.asin(-Clamp(m31, -1, 1)); - - if (Math.abs(m31) < epsilon) - { - x = Math.atan2(m32, m33); - z = Math.atan2(m21, m11); - } - else - { - z = Math.atan2(-m12, m22); - } - - break; - } - - case 'YZX': - { - z = Math.asin(Clamp(m21, -1, 1)); - - if (Math.abs(m21) < epsilon) - { - x = Math.atan2(-m23, m22); - y = Math.atan2(-m31, m11); - } - else - { - y = Math.atan2(m13, m33); - } - - break; - } - - case 'XZY': - { - z = Math.asin(-Clamp(m12, -1, 1)); - - if (Math.abs(m12) < epsilon) - { - x = Math.atan2(m32, m22); - y = Math.atan2(m13, m11); - } - else - { - x = Math.atan2(-m23, m33); - } - - break; - } - } - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - if (update) - { - this.onChangeCallback(this); - } - - return this; - } - -}); - -Euler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ]; - -Euler.DefaultOrder = 'XYZ'; - -module.exports = Euler; - - -/***/ }), - -/***/ 3916: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 104: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4941: -/***/ ((module) => { - -/** - * @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 {number} [place=0] - The place to round to. - * @param {number} [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; - - -/***/ }), - -/***/ 1555: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(2915); - -/** - * 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 + min; -}; - -module.exports = FromPercent; - - -/***/ }), - -/***/ 5005: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 3702: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8820: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1743: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3416: -/***/ ((module) => { - -/** - * @author Greg McLean - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Interpolates two given Vectors and returns a new Vector between them. - * - * Does not modify either of the passed Vectors. - * - * @function Phaser.Math.LinearXY + * 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, or Dynamic Texture, 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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. + * + * @method Phaser.GameObjects.GameObjectFactory#bitmapMask * @since 3.60.0 * - * @param {Phaser.Math.Vector2} vector1 - Starting vector - * @param {Phaser.Math.Vector2} vector2 - Ending vector - * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. * - * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created. */ -var LinearXY = function (vector1, vector2, t) +GameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame) { - if (t === undefined) { t = 0; } - - return vector1.clone().lerp(vector2, t); -}; - -module.exports = LinearXY; - - -/***/ }), - -/***/ 2149: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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; - } - + return new BitmapMask(this.scene, maskObject, x, y, key, frame); }); -module.exports = Matrix3; +module.exports = BitmapMask; /***/ }), - -/***/ 9652: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(7473); -var Vector3 = __webpack_require__(5689); - -/** - * @ignore - */ -var EPSILON = 0.000001; +var Class = __webpack_require__(0); +var PluginCache = __webpack_require__(329); +var SceneEvents = __webpack_require__(23); /** * @classdesc - * A four-dimensional matrix. + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. * - * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji - * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. * - * @class Matrix4 - * @memberof Phaser.Math + * @class GameObjectFactory + * @memberof Phaser.GameObjects * @constructor * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from. + * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. */ -var Matrix4 = new Class({ +var GameObjectFactory = new Class({ initialize: - function Matrix4 (m) + function GameObjectFactory (scene) { /** - * The matrix values. + * The Scene to which this Game Object Factory belongs. * - * @name Phaser.Math.Matrix4#val - * @type {Float32Array} - * @since 3.0.0 - */ - this.val = new Float32Array(16); - - if (m) - { - // Assume Matrix4 with val: - this.copy(m); - } - else - { - // Default to identity - this.identity(); - } - }, - - /** - * Make a clone of this Matrix4. - * - * @method Phaser.Math.Matrix4#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix4} A clone of this Matrix4. - */ - clone: function () - { - return new Matrix4(this); - }, - - /** - * This method is an alias for `Matrix4.copy`. - * - * @method Phaser.Math.Matrix4#set - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from. - * - * @return {this} This Matrix4. - */ - set: function (src) - { - return this.copy(src); - }, - - /** - * Sets all values of this Matrix4. - * - * @method Phaser.Math.Matrix4#setValues - * @since 3.50.0 - * - * @param {number} m00 - The m00 value. - * @param {number} m01 - The m01 value. - * @param {number} m02 - The m02 value. - * @param {number} m03 - The m03 value. - * @param {number} m10 - The m10 value. - * @param {number} m11 - The m11 value. - * @param {number} m12 - The m12 value. - * @param {number} m13 - The m13 value. - * @param {number} m20 - The m20 value. - * @param {number} m21 - The m21 value. - * @param {number} m22 - The m22 value. - * @param {number} m23 - The m23 value. - * @param {number} m30 - The m30 value. - * @param {number} m31 - The m31 value. - * @param {number} m32 - The m32 value. - * @param {number} m33 - The m33 value. - * - * @return {this} This Matrix4 instance. - */ - setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) - { - var out = this.val; - - out[0] = m00; - out[1] = m01; - out[2] = m02; - out[3] = m03; - out[4] = m10; - out[5] = m11; - out[6] = m12; - out[7] = m13; - out[8] = m20; - out[9] = m21; - out[10] = m22; - out[11] = m23; - out[12] = m30; - out[13] = m31; - out[14] = m32; - out[15] = m33; - - return this; - }, - - /** - * Copy the values of a given Matrix into this Matrix. - * - * @method Phaser.Math.Matrix4#copy - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from. - * - * @return {this} This Matrix4. - */ - copy: function (src) - { - var a = src.val; - - return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - }, - - /** - * Set the values of this Matrix from the given array. - * - * @method Phaser.Math.Matrix4#fromArray - * @since 3.0.0 - * - * @param {number[]} a - The array to copy the values from. Must have at least 16 elements. - * - * @return {this} This Matrix4. - */ - fromArray: function (a) - { - return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]); - }, - - /** - * Reset this Matrix. - * - * Sets all values to `0`. - * - * @method Phaser.Math.Matrix4#zero - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix4} This Matrix4. - */ - zero: function () - { - return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - }, - - /** - * Generates a transform matrix based on the given position, scale and rotation. - * - * @method Phaser.Math.Matrix4#transform - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} position - The position vector. - * @param {Phaser.Math.Vector3} scale - The scale vector. - * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion. - * - * @return {this} This Matrix4. - */ - transform: function (position, scale, rotation) - { - var rotMatrix = _tempMat1.fromQuat(rotation); - - var rm = rotMatrix.val; - - var sx = scale.x; - var sy = scale.y; - var sz = scale.z; - - return this.setValues( - rm[0] * sx, - rm[1] * sx, - rm[2] * sx, - 0, - - rm[4] * sy, - rm[5] * sy, - rm[6] * sy, - 0, - - rm[8] * sz, - rm[9] * sz, - rm[10] * sz, - 0, - - position.x, - position.y, - position.z, - 1 - ); - }, - - /** - * Set the `x`, `y` and `z` values of this Matrix. - * - * @method Phaser.Math.Matrix4#xyz - * @since 3.0.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {number} z - The z value. - * - * @return {this} This Matrix4. - */ - xyz: function (x, y, z) - { - this.identity(); - - var out = this.val; - - out[12] = x; - out[13] = y; - out[14] = z; - - return this; - }, - - /** - * Set the scaling values of this Matrix. - * - * @method Phaser.Math.Matrix4#scaling - * @since 3.0.0 - * - * @param {number} x - The x scaling value. - * @param {number} y - The y scaling value. - * @param {number} z - The z scaling value. - * - * @return {this} This Matrix4. - */ - scaling: function (x, y, z) - { - this.zero(); - - var out = this.val; - - out[0] = x; - out[5] = y; - out[10] = z; - out[15] = 1; - - return this; - }, - - /** - * Reset this Matrix to an identity (default) matrix. - * - * @method Phaser.Math.Matrix4#identity - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - identity: function () - { - return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - }, - - /** - * Transpose this Matrix. - * - * @method Phaser.Math.Matrix4#transpose - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - transpose: function () - { - var a = this.val; - - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - var a12 = a[6]; - var a13 = a[7]; - var a23 = a[11]; - - a[1] = a[4]; - a[2] = a[8]; - a[3] = a[12]; - a[4] = a01; - a[6] = a[9]; - a[7] = a[13]; - a[8] = a02; - a[9] = a12; - a[11] = a[14]; - a[12] = a03; - a[13] = a13; - a[14] = a23; - - return this; - }, - - /** - * Copies the given Matrix4 into this Matrix and then inverses it. - * - * @method Phaser.Math.Matrix4#getInverse - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4. - * - * @return {this} This Matrix4. - */ - getInverse: function (m) - { - this.copy(m); - - return this.invert(); - }, - - /** - * Invert this Matrix. - * - * @method Phaser.Math.Matrix4#invert - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - invert: function () - { - var a = 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 this; - } - - det = 1 / det; - - return this.setValues( - (a11 * b11 - a12 * b10 + a13 * b09) * det, - (a02 * b10 - a01 * b11 - a03 * b09) * det, - (a31 * b05 - a32 * b04 + a33 * b03) * det, - (a22 * b04 - a21 * b05 - a23 * b03) * det, - (a12 * b08 - a10 * b11 - a13 * b07) * det, - (a00 * b11 - a02 * b08 + a03 * b07) * det, - (a32 * b02 - a30 * b05 - a33 * b01) * det, - (a20 * b05 - a22 * b02 + a23 * b01) * det, - (a10 * b10 - a11 * b08 + a13 * b06) * det, - (a01 * b08 - a00 * b10 - a03 * b06) * det, - (a30 * b04 - a31 * b02 + a33 * b00) * det, - (a21 * b02 - a20 * b04 - a23 * b00) * det, - (a11 * b07 - a10 * b09 - a12 * b06) * det, - (a00 * b09 - a01 * b07 + a02 * b06) * det, - (a31 * b01 - a30 * b03 - a32 * b00) * det, - (a20 * b03 - a21 * b01 + a22 * b00) * det - ); - }, - - /** - * Calculate the adjoint, or adjugate, of this Matrix. - * - * @method Phaser.Math.Matrix4#adjoint - * @since 3.0.0 - * - * @return {this} This Matrix4. - */ - adjoint: function () - { - var a = 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]; - - return this.setValues( - (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)), - -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)), - (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)), - -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)), - -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)), - (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)), - -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)), - (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)), - (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)), - -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)), - (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)), - -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)), - -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)), - (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)), - -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)), - (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)) - ); - }, - - /** - * Calculate the determinant of this Matrix. - * - * @method Phaser.Math.Matrix4#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 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 - return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * @method Phaser.Math.Matrix4#multiply - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by. - * - * @return {this} This Matrix4. - */ - multiply: function (src) - { - var a = 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 b = src.val; - - // Cache only the current line of the second matrix - var b0 = b[0]; - var b1 = b[1]; - var b2 = b[2]; - var b3 = b[3]; - - a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[4]; - b1 = b[5]; - b2 = b[6]; - b3 = b[7]; - - a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[8]; - b1 = b[9]; - b2 = b[10]; - b3 = b[11]; - - a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = b[12]; - b1 = b[13]; - b2 = b[14]; - b3 = b[15]; - - a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - return this; - }, - - /** - * 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 - The source Matrix4 that this Matrix4 is multiplied by. - * - * @return {this} This Matrix4. - */ - multiplyLocal: function (src) - { - var a = this.val; - var b = src.val; - - return this.setValues( - a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12], - a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13], - a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14], - a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15], - - a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12], - a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13], - a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14], - a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15], - - a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12], - a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13], - a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14], - a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15], - - a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12], - a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13], - a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14], - a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15] - ); - }, - - /** - * Multiplies the given Matrix4 object with this Matrix. - * - * This is the same as calling `multiplyMatrices(m, this)`. - * - * @method Phaser.Math.Matrix4#premultiply - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one. - * - * @return {this} This Matrix4. - */ - premultiply: function (m) - { - return this.multiplyMatrices(m, this); - }, - - /** - * Multiplies the two given Matrix4 objects and stores the results in this Matrix. - * - * @method Phaser.Math.Matrix4#multiplyMatrices - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply. - * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply. - * - * @return {this} This Matrix4. - */ - multiplyMatrices: function (a, b) - { - var am = a.val; - var bm = b.val; - - var a11 = am[0]; - var a12 = am[4]; - var a13 = am[8]; - var a14 = am[12]; - var a21 = am[1]; - var a22 = am[5]; - var a23 = am[9]; - var a24 = am[13]; - var a31 = am[2]; - var a32 = am[6]; - var a33 = am[10]; - var a34 = am[14]; - var a41 = am[3]; - var a42 = am[7]; - var a43 = am[11]; - var a44 = am[15]; - - var b11 = bm[0]; - var b12 = bm[4]; - var b13 = bm[8]; - var b14 = bm[12]; - var b21 = bm[1]; - var b22 = bm[5]; - var b23 = bm[9]; - var b24 = bm[13]; - var b31 = bm[2]; - var b32 = bm[6]; - var b33 = bm[10]; - var b34 = bm[14]; - var b41 = bm[3]; - var b42 = bm[7]; - var b43 = bm[11]; - var b44 = bm[15]; - - return this.setValues( - a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41, - a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41, - a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41, - a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41, - a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42, - a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42, - a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42, - a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42, - a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43, - a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43, - a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43, - a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43, - a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44, - a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44, - a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44, - a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44 - ); - }, - - /** - * Translate this Matrix using the given Vector. - * - * @method Phaser.Math.Matrix4#translate - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. - * - * @return {this} This Matrix4. - */ - translate: function (v) - { - return this.translateXYZ(v.x, v.y, v.z); - }, - - /** - * 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 {this} 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. - * - * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. - * - * @method Phaser.Math.Matrix4#scale - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. - * - * @return {this} This Matrix4. - */ - scale: function (v) - { - return this.scaleXYZ(v.x, v.y, v.z); - }, - - /** - * 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 {this} 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. - * - * @method Phaser.Math.Matrix4#makeRotationAxis - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis. - * @param {number} angle - The rotation angle in radians. - * - * @return {this} This Matrix4. - */ - makeRotationAxis: function (axis, angle) - { - // Based on http://www.gamedev.net/reference/articles/article1199.asp - - var c = Math.cos(angle); - var s = Math.sin(angle); - var t = 1 - c; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var tx = t * x; - var ty = t * y; - - return this.setValues( - tx * x + c, tx * y - s * z, tx * z + s * y, 0, - tx * y + s * z, ty * y + c, ty * z - s * x, 0, - tx * z - s * y, ty * z + s * x, t * z * z + c, 0, - 0, 0, 0, 1 - ); - }, - - /** - * Apply a rotation transformation to this Matrix. - * - * @method Phaser.Math.Matrix4#rotate - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * @param {Phaser.Math.Vector3} axis - The axis to rotate upon. - * - * @return {this} This Matrix4. - */ - rotate: function (rad, axis) - { - var a = this.val; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var len = Math.sqrt(x * x + y * y + z * z); - - if (Math.abs(len) < EPSILON) - { - return this; - } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - - var s = Math.sin(rad); - var c = Math.cos(rad); - var t = 1 - c; - - 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]; - - // Construct the elements of the rotation matrix - var b00 = x * x * t + c; - var b01 = y * x * t + z * s; - var b02 = z * x * t - y * s; - - var b10 = x * y * t - z * s; - var b11 = y * y * t + c; - var b12 = z * y * t + x * s; - - var b20 = x * z * t + y * s; - var b21 = y * z * t - x * s; - var b22 = z * z * t + c; - - // Perform rotation-specific matrix multiplication - return this.setValues( - a00 * b00 + a10 * b01 + a20 * b02, - a01 * b00 + a11 * b01 + a21 * b02, - a02 * b00 + a12 * b01 + a22 * b02, - a03 * b00 + a13 * b01 + a23 * b02, - a00 * b10 + a10 * b11 + a20 * b12, - a01 * b10 + a11 * b11 + a21 * b12, - a02 * b10 + a12 * b11 + a22 * b12, - a03 * b10 + a13 * b11 + a23 * b12, - a00 * b20 + a10 * b21 + a20 * b22, - a01 * b20 + a11 * b21 + a21 * b22, - a02 * b20 + a12 * b21 + a22 * b22, - a03 * b20 + a13 * b21 + a23 * b22, - a30, a31, a32, a33 - ); - }, - - /** - * Rotate this matrix on its X axis. - * - * @method Phaser.Math.Matrix4#rotateX - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * - * @return {this} This Matrix4. - */ - rotateX: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - 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]; - - // Perform axis-specific matrix multiplication - a[4] = a10 * c + a20 * s; - a[5] = a11 * c + a21 * s; - a[6] = a12 * c + a22 * s; - a[7] = a13 * c + a23 * s; - a[8] = a20 * c - a10 * s; - a[9] = a21 * c - a11 * s; - a[10] = a22 * c - a12 * s; - a[11] = a23 * c - a13 * s; - - return this; - }, - - /** - * Rotate this matrix on its Y axis. - * - * @method Phaser.Math.Matrix4#rotateY - * @since 3.0.0 - * - * @param {number} rad - The angle to rotate by, in radians. - * - * @return {this} This Matrix4. - */ - rotateY: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - // Perform axis-specific matrix multiplication - a[0] = a00 * c - a20 * s; - a[1] = a01 * c - a21 * s; - a[2] = a02 * c - a22 * s; - a[3] = a03 * c - a23 * s; - a[8] = a00 * s + a20 * c; - a[9] = a01 * s + a21 * c; - a[10] = a02 * s + a22 * c; - a[11] = a03 * s + a23 * c; - - return this; - }, - - /** - * Rotate this matrix on its Z axis. - * - * @method Phaser.Math.Matrix4#rotateZ - * @since 3.0.0 - * - * @param {number} rad - The angle to rotate by, in radians. - * - * @return {this} This Matrix4. - */ - rotateZ: function (rad) - { - var a = this.val; - var s = Math.sin(rad); - var c = Math.cos(rad); - - 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]; - - // Perform axis-specific matrix multiplication - a[0] = a00 * c + a10 * s; - a[1] = a01 * c + a11 * s; - a[2] = a02 * c + a12 * s; - a[3] = a03 * c + a13 * s; - a[4] = a10 * c - a00 * s; - a[5] = a11 * c - a01 * s; - a[6] = a12 * c - a02 * s; - a[7] = a13 * c - a03 * s; - - return this; - }, - - /** - * Set the values of this Matrix from the given rotation Quaternion and translation Vector. - * - * @method Phaser.Math.Matrix4#fromRotationTranslation - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from. - * @param {Phaser.Math.Vector3} v - The Vector to set translation from. - * - * @return {this} This Matrix4. - */ - fromRotationTranslation: function (q, v) - { - // Quaternion math - 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; - - return this.setValues( - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - v.x, - v.y, - v.z, - 1 - ); - }, - - /** - * Set the values of this Matrix from the given Quaternion. - * - * @method Phaser.Math.Matrix4#fromQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. - * - * @return {this} This Matrix4. - */ - 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; - - return this.setValues( - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - 0, - 0, - 0, - 1 - ); - }, - - /** - * Generate a frustum matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#frustum - * @since 3.0.0 - * - * @param {number} left - The left bound of the frustum. - * @param {number} right - The right bound of the frustum. - * @param {number} bottom - The bottom bound of the frustum. - * @param {number} top - The top bound of the frustum. - * @param {number} near - The near bound of the frustum. - * @param {number} far - The far bound of the frustum. - * - * @return {this} This Matrix4. - */ - frustum: function (left, right, bottom, top, near, far) - { - var rl = 1 / (right - left); - var tb = 1 / (top - bottom); - var nf = 1 / (near - far); - - return this.setValues( - (near * 2) * rl, - 0, - 0, - 0, - - 0, - (near * 2) * tb, - 0, - 0, - - (right + left) * rl, - (top + bottom) * tb, - (far + near) * nf, - -1, - - 0, - 0, - (far * near * 2) * nf, - 0 - ); - }, - - /** - * Generate a perspective projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#perspective - * @since 3.0.0 - * - * @param {number} fovy - Vertical field of view in radians - * @param {number} aspect - Aspect ratio. Typically viewport width /height. - * @param {number} near - Near bound of the frustum. - * @param {number} far - Far bound of the frustum. - * - * @return {this} This Matrix4. - */ - perspective: function (fovy, aspect, near, far) - { - var f = 1.0 / Math.tan(fovy / 2); - var nf = 1 / (near - far); - - return this.setValues( - f / aspect, - 0, - 0, - 0, - - 0, - f, - 0, - 0, - - 0, - 0, - (far + near) * nf, - -1, - - 0, - 0, - (2 * far * near) * nf, - 0 - ); - }, - - /** - * Generate a perspective projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#perspectiveLH - * @since 3.0.0 - * - * @param {number} width - The width of the frustum. - * @param {number} height - The height of the frustum. - * @param {number} near - Near bound of the frustum. - * @param {number} far - Far bound of the frustum. - * - * @return {this} This Matrix4. - */ - perspectiveLH: function (width, height, near, far) - { - return this.setValues( - (2 * near) / width, - 0, - 0, - 0, - - 0, - (2 * near) / height, - 0, - 0, - - 0, - 0, - -far / (near - far), - 1, - - 0, - 0, - (near * far) / (near - far), - 0 - ); - }, - - /** - * Generate an orthogonal projection matrix with the given bounds. - * - * @method Phaser.Math.Matrix4#ortho - * @since 3.0.0 - * - * @param {number} left - The left bound of the frustum. - * @param {number} right - The right bound of the frustum. - * @param {number} bottom - The bottom bound of the frustum. - * @param {number} top - The top bound of the frustum. - * @param {number} near - The near bound of the frustum. - * @param {number} far - The far bound of the frustum. - * - * @return {this} This Matrix4. - */ - ortho: function (left, right, bottom, top, near, far) - { - var lr = left - right; - var bt = bottom - top; - var nf = near - far; - - // Avoid division by zero - lr = (lr === 0) ? lr : 1 / lr; - bt = (bt === 0) ? bt : 1 / bt; - nf = (nf === 0) ? nf : 1 / nf; - - return this.setValues( - -2 * lr, - 0, - 0, - 0, - - 0, - -2 * bt, - 0, - 0, - - 0, - 0, - 2 * nf, - 0, - - (left + right) * lr, - (top + bottom) * bt, - (far + near) * nf, - 1 - ); - }, - - /** - * Generate a right-handed look-at matrix with the given eye position, target and up axis. - * - * @method Phaser.Math.Matrix4#lookAtRH - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} eye - Position of the viewer. - * @param {Phaser.Math.Vector3} target - Point the viewer is looking at. - * @param {Phaser.Math.Vector3} up - vec3 pointing up. - * - * @return {this} This Matrix4. - */ - lookAtRH: function (eye, target, up) - { - var m = this.val; - - _z.subVectors(eye, target); - - if (_z.getLengthSquared() === 0) - { - // eye and target are in the same position - _z.z = 1; - } - - _z.normalize(); - _x.crossVectors(up, _z); - - if (_x.getLengthSquared() === 0) - { - // up and z are parallel - - if (Math.abs(up.z) === 1) - { - _z.x += 0.0001; - } - else - { - _z.z += 0.0001; - } - - _z.normalize(); - _x.crossVectors(up, _z); - } - - _x.normalize(); - _y.crossVectors(_z, _x); - - m[0] = _x.x; - m[1] = _x.y; - m[2] = _x.z; - m[4] = _y.x; - m[5] = _y.y; - m[6] = _y.z; - m[8] = _z.x; - m[9] = _z.y; - m[10] = _z.z; - - return this; - }, - - /** - * Generate a look-at matrix with the given eye position, focal point, and up axis. - * - * @method Phaser.Math.Matrix4#lookAt - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} eye - Position of the viewer - * @param {Phaser.Math.Vector3} center - Point the viewer is looking at - * @param {Phaser.Math.Vector3} up - vec3 pointing up. - * - * @return {this} This Matrix4. - */ - lookAt: function (eye, center, up) - { - var eyex = eye.x; - var eyey = eye.y; - var eyez = eye.z; - - var upx = up.x; - var upy = up.y; - var upz = up.z; - - var centerx = center.x; - var centery = center.y; - var centerz = center.z; - - if (Math.abs(eyex - centerx) < EPSILON && - Math.abs(eyey - centery) < EPSILON && - Math.abs(eyez - centerz) < EPSILON) - { - return this.identity(); - } - - var z0 = eyex - centerx; - var z1 = eyey - centery; - var z2 = eyez - centerz; - - var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); - - z0 *= len; - z1 *= len; - z2 *= len; - - var x0 = upy * z2 - upz * z1; - var x1 = upz * z0 - upx * z2; - var x2 = upx * z1 - upy * z0; - - len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); - - if (!len) - { - x0 = 0; - x1 = 0; - x2 = 0; - } - else - { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; - } - - var y0 = z1 * x2 - z2 * x1; - var y1 = z2 * x0 - z0 * x2; - var y2 = z0 * x1 - z1 * x0; - - len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); - - if (!len) - { - y0 = 0; - y1 = 0; - y2 = 0; - } - else - { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; - } - - return this.setValues( - x0, - y0, - z0, - 0, - - x1, - y1, - z1, - 0, - - x2, - y2, - z2, - 0, - - -(x0 * eyex + x1 * eyey + x2 * eyez), - -(y0 * eyex + y1 * eyey + y2 * eyez), - -(z0 * eyex + z1 * eyey + z2 * eyez), - 1 - ); - }, - - /** - * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. - * - * @method Phaser.Math.Matrix4#yawPitchRoll - * @since 3.0.0 - * - * @param {number} yaw - The yaw value. - * @param {number} pitch - The pitch value. - * @param {number} roll - The roll value. - * - * @return {this} This Matrix4. - */ - yawPitchRoll: function (yaw, pitch, roll) - { - this.zero(); - _tempMat1.zero(); - _tempMat2.zero(); - - var m0 = this.val; - var m1 = _tempMat1.val; - var m2 = _tempMat2.val; - - // Rotate Z - var s = Math.sin(roll); - var c = Math.cos(roll); - - m0[10] = 1; - m0[15] = 1; - m0[0] = c; - m0[1] = s; - m0[4] = -s; - m0[5] = c; - - // Rotate X - s = Math.sin(pitch); - c = Math.cos(pitch); - - m1[0] = 1; - m1[15] = 1; - m1[5] = c; - m1[10] = c; - m1[9] = -s; - m1[6] = s; - - // Rotate Y - s = Math.sin(yaw); - c = Math.cos(yaw); - - m2[5] = 1; - m2[15] = 1; - m2[0] = c; - m2[2] = -s; - m2[8] = s; - m2[10] = c; - - this.multiplyLocal(_tempMat1); - this.multiplyLocal(_tempMat2); - - return this; - }, - - /** - * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. - * - * @method Phaser.Math.Matrix4#setWorldMatrix - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix. - * @param {Phaser.Math.Vector3} position - The position of the world matrix. - * @param {Phaser.Math.Vector3} scale - The scale of the world matrix. - * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix. - * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix. - * - * @return {this} This Matrix4. - */ - setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix) - { - this.yawPitchRoll(rotation.y, rotation.x, rotation.z); - - _tempMat1.scaling(scale.x, scale.y, scale.z); - _tempMat2.xyz(position.x, position.y, position.z); - - this.multiplyLocal(_tempMat1); - this.multiplyLocal(_tempMat2); - - if (viewMatrix) - { - this.multiplyLocal(viewMatrix); - } - - if (projectionMatrix) - { - this.multiplyLocal(projectionMatrix); - } - - return this; - }, - - /** - * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4. - * - * @method Phaser.Math.Matrix4#multiplyToMat4 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one. - * @param {Phaser.Math.Matrix4} out - The receiving Matrix. - * - * @return {Phaser.Math.Matrix4} This `out` Matrix4. - */ - multiplyToMat4: function (src, out) - { - var a = this.val; - var b = src.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 = b[0]; - var b01 = b[1]; - var b02 = b[2]; - var b03 = b[3]; - var b10 = b[4]; - var b11 = b[5]; - var b12 = b[6]; - var b13 = b[7]; - var b20 = b[8]; - var b21 = b[9]; - var b22 = b[10]; - var b23 = b[11]; - var b30 = b[12]; - var b31 = b[13]; - var b32 = b[14]; - var b33 = b[15]; - - return out.setValues( - b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, - b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31, - b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32, - b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33, - - b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, - b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, - b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, - b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, - - b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, - b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, - b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, - b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, - - b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, - b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, - b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, - b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 - ); - }, - - /** - * Takes the rotation and position vectors and builds this Matrix4 from them. - * - * @method Phaser.Math.Matrix4#fromRotationXYTranslation - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} rotation - The rotation vector. - * @param {Phaser.Math.Vector3} position - The position vector. - * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`) - * - * @return {this} This Matrix4. - */ - fromRotationXYTranslation: function (rotation, position, translateFirst) - { - var x = position.x; - var y = position.y; - var z = position.z; - - var sx = Math.sin(rotation.x); - var cx = Math.cos(rotation.x); - - var sy = Math.sin(rotation.y); - var cy = Math.cos(rotation.y); - - var a30 = x; - var a31 = y; - var a32 = z; - - // Rotate X - - var b21 = -sx; - - // Rotate Y - - var c01 = 0 - b21 * sy; - - var c02 = 0 - cx * sy; - - var c21 = b21 * cy; - - var c22 = cx * cy; - - // Translate - if (!translateFirst) - { - // a30 = cy * x + 0 * y + sy * z; - a30 = cy * x + sy * z; - a31 = c01 * x + cx * y + c21 * z; - a32 = c02 * x + sx * y + c22 * z; - } - - return this.setValues( - cy, - c01, - c02, - 0, - 0, - cx, - sx, - 0, - sy, - c21, - c22, - 0, - a30, - a31, - a32, - 1 - ); - }, - - /** - * Returns the maximum axis scale from this Matrix4. - * - * @method Phaser.Math.Matrix4#getMaxScaleOnAxis - * @since 3.50.0 - * - * @return {number} The maximum axis scale. - */ - getMaxScaleOnAxis: function () - { - var m = this.val; - - var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2]; - var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6]; - var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10]; - - return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); - } - -}); - -/** - * @ignore - */ -var _tempMat1 = new Matrix4(); - -/** - * @ignore - */ -var _tempMat2 = new Matrix4(); - -/** - * @ignore - */ -var _x = new Vector3(); - -/** - * @ignore - */ -var _y = new Vector3(); - -/** - * @ignore - */ -var _z = new Vector3(); - -module.exports = Matrix4; - - -/***/ }), - -/***/ 3733: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 44: -/***/ ((module) => { - -/** - * @author Vladislav Forsh - * @copyright 2021 RoboWhale - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate the median of the given values. The values are sorted and the middle value is returned. - * In case of an even number of values, the average of the two middle values is returned. - * - * @function Phaser.Math.Median - * @since 3.54.0 - * - * @param {number[]} values - The values to average. - * - * @return {number} The median value. - */ -var Median = function (values) -{ - var valuesNum = values.length; - if (valuesNum === 0) - { - return 0; - } - - values.sort(function (a, b) { return a - b; }); - - var halfIndex = Math.floor(valuesNum / 2); - - return valuesNum % 2 === 0 - ? (values[halfIndex] + values[halfIndex - 1]) / 2 - : values[halfIndex]; -}; - -module.exports = Median; - - -/***/ }), - -/***/ 5385: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8585: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 372: -/***/ ((module, __unused_webpack_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__(7473); -var Matrix3 = __webpack_require__(2149); -var NOOP = __webpack_require__(1984); -var Vector3 = __webpack_require__(5689); - -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=0] - The x component. - * @param {number} [y=0] - The y component. - * @param {number} [z=0] - The z component. - * @param {number} [w=1] - 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 - * @private - * @since 3.50.0 - */ - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_y - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_z - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#_w - * @type {number} - * @default 0 - * @private - * @since 3.50.0 - */ - - /** - * This callback is invoked, if set, each time a value in this quaternion is changed. - * The callback is passed one argument, a reference to this quaternion. - * - * @name Phaser.Math.Quaternion#onChangeCallback - * @type {function} - * @since 3.50.0 - */ - this.onChangeCallback = NOOP; - - this.set(x, y, z, w); - }, - - /** - * The x component of this Quaternion. - * - * @name Phaser.Math.Quaternion#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - x: { - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - - this.onChangeCallback(this); - } - }, - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - y: { - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - - this.onChangeCallback(this); - } - }, - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - z: { - get: function () - { - return this._z; - }, - - set: function (value) - { - this._z = value; - - this.onChangeCallback(this); - } - }, - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - w: { - get: function () - { - return this._w; - }, - - set: function (value) - { - this._w = value; - - this.onChangeCallback(this); - } - }, - - /** - * 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) - { - return this.set(src); - }, - - /** - * Set the components of this Quaternion and optionally call the `onChangeCallback`. - * - * @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. - * @param {boolean} [update=true] - Call the `onChangeCallback`? - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - set: function (x, y, z, w, update) - { - if (update === undefined) { update = true; } - - 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; - } - - if (update) - { - this.onChangeCallback(this); - } - - 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; - - this.onChangeCallback(this); - - 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; - - this.onChangeCallback(this); - - 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; - - this.onChangeCallback(this); - - 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; - } - - this.onChangeCallback(this); - - 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; - - return this.set( - ax + t * (v.x - ax), - ay + t * (v.y - ay), - az + t * (v.z - az), - aw + t * (v.w - aw) - ); - }, - - /** - * 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) - { - return this.set(0, 0, 0, 1); - } - 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 () - { - return this.set(0, 0, 0, 1); - }, - - /** - * 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); - - return this.set( - s * axis.x, - s * axis.y, - s * axis.z, - Math.cos(rad) - ); - }, - - /** - * 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; - - return this.set( - ax * bw + aw * bx + ay * bz - az * by, - ay * bw + aw * by + az * bx - ax * bz, - az * bw + aw * bz + ax * by - ay * bx, - aw * bw - ax * bx - ay * by - az * bz - ); - }, - - /** - * 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 - return this.set( - scale0 * ax + scale1 * bx, - scale0 * ay + scale1 * by, - scale0 * az + scale1 * bz, - scale0 * aw + scale1 * bw - ); - }, - - /** - * 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; - - return this.set( - -a0 * invDot, - -a1 * invDot, - -a2 * invDot, - a3 * invDot - ); - }, - - /** - * 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; - - this.onChangeCallback(this); - - 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); - - return this.set( - ax * bw + aw * bx, - ay * bw + az * bx, - az * bw - ay * bx, - aw * bw - ax * bx - ); - }, - - /** - * 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); - - return this.set( - ax * bw - az * by, - ay * bw + aw * by, - az * bw + ax * by, - aw * bw - ay * by - ); - }, - - /** - * 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); - - return this.set( - ax * bw + ay * bz, - ay * bw - ax * bz, - az * bw + aw * bz, - aw * bw - az * bz - ); - }, - - /** - * 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; - }, - - /** - * Set this Quaternion from the given Euler, based on Euler order. - * - * @method Phaser.Math.Quaternion#setFromEuler - * @since 3.50.0 - * - * @param {Phaser.Math.Euler} euler - The Euler to convert from. - * @param {boolean} [update=true] - Run the `onChangeCallback`? - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setFromEuler: function (euler, update) - { - var x = euler.x / 2; - var y = euler.y / 2; - var z = euler.z / 2; - - var c1 = Math.cos(x); - var c2 = Math.cos(y); - var c3 = Math.cos(z); - - var s1 = Math.sin(x); - var s2 = Math.sin(y); - var s3 = Math.sin(z); - - switch (euler.order) - { - case 'XYZ': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'YXZ': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - - case 'ZXY': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'ZYX': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - - case 'YZX': - { - this.set( - s1 * c2 * c3 + c1 * s2 * s3, - c1 * s2 * c3 + s1 * c2 * s3, - c1 * c2 * s3 - s1 * s2 * c3, - c1 * c2 * c3 - s1 * s2 * s3, - update - ); - - break; - } - - case 'XZY': - { - this.set( - s1 * c2 * c3 - c1 * s2 * s3, - c1 * s2 * c3 - s1 * c2 * s3, - c1 * c2 * s3 + s1 * s2 * c3, - c1 * c2 * c3 + s1 * s2 * s3, - update - ); - - break; - } - } - - return this; - }, - - /** - * Sets the rotation of this Quaternion from the given Matrix4. - * - * @method Phaser.Math.Quaternion#setFromRotationMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setFromRotationMatrix: function (mat4) - { - var m = mat4.val; - - var m11 = m[0]; - var m12 = m[4]; - var m13 = m[8]; - var m21 = m[1]; - var m22 = m[5]; - var m23 = m[9]; - var m31 = m[2]; - var m32 = m[6]; - var m33 = m[10]; - - var trace = m11 + m22 + m33; - var s; - - if (trace > 0) - { - s = 0.5 / Math.sqrt(trace + 1.0); - - this.set( - (m32 - m23) * s, - (m13 - m31) * s, - (m21 - m12) * s, - 0.25 / s - ); - } - else if (m11 > m22 && m11 > m33) - { - s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); - - this.set( - 0.25 * s, - (m12 + m21) / s, - (m13 + m31) / s, - (m32 - m23) / s - ); - } - else if (m22 > m33) - { - s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); - - this.set( - (m12 + m21) / s, - 0.25 * s, - (m23 + m32) / s, - (m13 - m31) / s - ); - } - else - { - s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); - - this.set( - (m13 + m31) / s, - (m23 + m32) / s, - 0.25 * s, - (m21 - m12) / s - ); - } - - 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; - } - - this.onChangeCallback(this); - - return this; - } - -}); - -module.exports = Quaternion; - - -/***/ }), - -/***/ 4208: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * 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 {number} The given angle converted to degrees. - */ -var RadToDeg = function (radians) -{ - return radians * CONST.RAD_TO_DEG; -}; - -module.exports = RadToDeg; - - -/***/ }), - -/***/ 1705: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6650: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2037: -/***/ ((module) => { - -/** - * @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; } - - 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; - - -/***/ }), - -/***/ 6283: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9876: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8348: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4497: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9640: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector3 = __webpack_require__(5689); -var Matrix4 = __webpack_require__(9652); -var Quaternion = __webpack_require__(372); - -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; - - -/***/ }), - -/***/ 4078: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 855: -/***/ ((module) => { - -/** - * @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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. - * @param {number} [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; - - -/***/ }), - -/***/ 4936: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2733: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 278: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 163: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(2529); - -/** - * 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 {number} index - The position within the grid to get the x/y value for. - * @param {number} width - The width of the grid. - * @param {number} 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; - } - } - - return out.set(x, y); -}; - -module.exports = ToXY; - - -/***/ }), - -/***/ 7556: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(2529); - -/** - * 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; - - -/***/ }), - -/***/ 2529: -/***/ ((module, __unused_webpack_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__(7473); -var FuzzyEqual = __webpack_require__(12); - -/** - * @classdesc - * A representation of a vector in 2D space. - * - * A two-component vector. - * - * @class Vector2 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. - * @param {number} [y=x] - The y component. - */ -var Vector2 = new Class({ - - initialize: - - function Vector2 (x, y) - { - /** - * The x component of this Vector. - * - * @name Phaser.Math.Vector2#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = 0; - - /** - * The y component of this Vector. - * - * @name Phaser.Math.Vector2#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; - } - }, - - /** - * Make a clone of this Vector2. - * - * @method Phaser.Math.Vector2#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Vector2} A clone of this Vector2. - */ - 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.Types.Math.Vector2Like} 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 (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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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); - } - -}); - -/** - * 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; - - -/***/ }), - -/***/ 5689: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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; - }, - - /** - * Sets the components of this Vector to be the `Math.min` result from the given vector. - * - * @method Phaser.Math.Vector3#min - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - min: function (v) - { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - - return this; - }, - - /** - * Sets the components of this Vector to be the `Math.max` result from the given vector. - * - * @method Phaser.Math.Vector3#max - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - max: function (v) - { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - - 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); - }, - - /** - * Adds the two given Vector3s and sets the results into this Vector3. - * - * @method Phaser.Math.Vector3#addVectors - * @since 3.50.0 - * - * @param {Phaser.Math.Vector3} a - The first Vector to add. - * @param {Phaser.Math.Vector3} b - The second Vector to add. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addVectors: function (a, b) - { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - - return this; - }, - - /** - * 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; - }, - - /** - * Sets the components of this Vector3 from the position of the given Matrix4. - * - * @method Phaser.Math.Vector3#setFromMatrixPosition - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - setFromMatrixPosition: function (m) - { - return this.fromArray(m.val, 12); - }, - - /** - * Sets the components of this Vector3 from the Matrix4 column specified. - * - * @method Phaser.Math.Vector3#setFromMatrixColumn - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from. - * @param {number} index - The column index. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - setFromMatrixColumn: function (mat4, index) - { - return this.fromArray(mat4.val, index * 4); - }, - - /** - * Sets the components of this Vector3 from the given array, based on the offset. - * - * Vector3.x = array[offset] - * Vector3.y = array[offset + 1] - * Vector3.z = array[offset + 2] - * - * @method Phaser.Math.Vector3#fromArray - * @since 3.50.0 - * - * @param {number[]} array - The array of values to get this Vector from. - * @param {number} [offset=0] - The offset index into the array. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - fromArray: function (array, offset) - { - if (offset === undefined) { offset = 0; } - - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - - 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; - }, - - /** - * Add the given value to each component of this Vector. - * - * @method Phaser.Math.Vector3#addScalar - * @since 3.50.0 - * - * @param {number} s - The amount to add to this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addScalar: function (s) - { - this.x += s; - this.y += s; - this.z += s; - - return this; - }, - - /** - * Add and scale a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector3#addScale - * @since 3.50.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. - * @param {number} scale - The amount to scale `v` by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - addScale: function (v, scale) - { - this.x += v.x * scale; - this.y += v.y * scale; - this.z += v.z * scale || 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; - }, - - /** - * Takes a Matrix3 and applies it to this Vector3. - * - * @method Phaser.Math.Vector3#applyMatrix3 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - applyMatrix3: function (mat3) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat3.val; - - this.x = m[0] * x + m[3] * y + m[6] * z; - this.y = m[1] * x + m[4] * y + m[7] * z; - this.z = m[2] * x + m[5] * y + m[8] * z; - - return this; - }, - - /** - * Takes a Matrix4 and applies it to this Vector3. - * - * @method Phaser.Math.Vector3#applyMatrix4 - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - applyMatrix4: function (mat4) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat4.val; - - var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]); - - 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; - - 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 Matrix4. - * - * @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; - }, - - /** - * Multiplies this Vector3 by the given view and projection matrices. - * - * @method Phaser.Math.Vector3#projectViewMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix. - * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - projectViewMatrix: function (viewMatrix, projectionMatrix) - { - return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix); - }, - - /** - * Multiplies this Vector3 by the given inversed projection matrix and world matrix. - * - * @method Phaser.Math.Vector3#unprojectViewMatrix - * @since 3.50.0 - * - * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix. - * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - unprojectViewMatrix: function (projectionMatrix, worldMatrix) - { - return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix); - }, - - /** - * 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; - - -/***/ }), - -/***/ 9279: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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) - { - 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; - } - -}); - -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; - - -/***/ }), - -/***/ 4119: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8445: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6412: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 760: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6909: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6947: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3426: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); - -/** - * 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; - - -/***/ }), - -/***/ 6906: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3270: -/***/ ((module, __unused_webpack_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__(104); - -/** - * 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; - - -/***/ }), - -/***/ 2748: -/***/ ((module, __unused_webpack_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__(104); - -/** - * 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; - - -/***/ }), - -/***/ 936: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Normalize = __webpack_require__(6906); - -/** - * 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; - - -/***/ }), - -/***/ 1935: -/***/ ((module, __unused_webpack_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__(7425); - -/** - * 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; - - -/***/ }), - -/***/ 5393: -/***/ ((module) => { - -/** - * @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. - * - * @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; - - -/***/ }), - -/***/ 3692: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MathWrap = __webpack_require__(8445); - -/** - * 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; - - -/***/ }), - -/***/ 2820: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Wrap = __webpack_require__(8445); - -/** - * 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; - - -/***/ }), - -/***/ 1833: -/***/ ((module, __unused_webpack_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__(6412), - BetweenPoints: __webpack_require__(760), - BetweenPointsY: __webpack_require__(6909), - BetweenY: __webpack_require__(6947), - CounterClockwise: __webpack_require__(3426), - Normalize: __webpack_require__(6906), - Random: __webpack_require__(3270), - RandomDegrees: __webpack_require__(2748), - Reverse: __webpack_require__(936), - RotateTo: __webpack_require__(1935), - ShortestBetween: __webpack_require__(5393), - Wrap: __webpack_require__(3692), - WrapDegrees: __webpack_require__(2820) - -}; - - -/***/ }), - -/***/ 7425: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1518: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5372: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4430: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4361: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7798: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8290: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3788: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6338: -/***/ ((module, __unused_webpack_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__(1518), - BetweenPoints: __webpack_require__(5372), - BetweenPointsSquared: __webpack_require__(4430), - Chebyshev: __webpack_require__(4361), - Power: __webpack_require__(7798), - Snake: __webpack_require__(8290), - Squared: __webpack_require__(3788) - -}; - - -/***/ }), - -/***/ 5751: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6203: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9103: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4938: -/***/ ((module, __unused_webpack_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__(5751), - Out: __webpack_require__(9103), - InOut: __webpack_require__(6203) - -}; - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4649: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 504: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8872: -/***/ ((module, __unused_webpack_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__(8677), - Out: __webpack_require__(504), - InOut: __webpack_require__(4649) - -}; - - -/***/ }), - -/***/ 3170: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2627: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1349: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5006: -/***/ ((module, __unused_webpack_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__(3170), - Out: __webpack_require__(1349), - InOut: __webpack_require__(2627) - -}; - - -/***/ }), - -/***/ 6046: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9531: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4836: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 875: -/***/ ((module, __unused_webpack_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__(6046), - Out: __webpack_require__(4836), - InOut: __webpack_require__(9531) - -}; - - -/***/ }), - -/***/ 7619: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7437: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8119: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2884: -/***/ ((module, __unused_webpack_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__(7619), - Out: __webpack_require__(8119), - InOut: __webpack_require__(7437) - -}; - - -/***/ }), - -/***/ 5456: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3461: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2711: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6287: -/***/ ((module, __unused_webpack_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__(5456), - Out: __webpack_require__(2711), - InOut: __webpack_require__(3461) - -}; - - -/***/ }), - -/***/ 8613: -/***/ ((module, __unused_webpack_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__(4938), - Bounce: __webpack_require__(8872), - Circular: __webpack_require__(5006), - Cubic: __webpack_require__(875), - Elastic: __webpack_require__(2884), - Expo: __webpack_require__(6287), - Linear: __webpack_require__(4233), - Quadratic: __webpack_require__(6341), - Quartic: __webpack_require__(762), - Quintic: __webpack_require__(345), - Sine: __webpack_require__(8698), - Stepped: __webpack_require__(7051) - -}; - - -/***/ }), - -/***/ 744: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4233: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -module.exports = __webpack_require__(744); - - -/***/ }), - -/***/ 9810: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8163: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6123: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6341: -/***/ ((module, __unused_webpack_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__(9810), - Out: __webpack_require__(6123), - InOut: __webpack_require__(8163) - -}; - - -/***/ }), - -/***/ 7337: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4878: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 9012: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 762: -/***/ ((module, __unused_webpack_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__(7337), - Out: __webpack_require__(9012), - InOut: __webpack_require__(4878) - -}; - - -/***/ }), - -/***/ 303: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 553: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1632: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 345: -/***/ ((module, __unused_webpack_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__(303), - Out: __webpack_require__(1632), - InOut: __webpack_require__(553) - -}; - - -/***/ }), - -/***/ 8455: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1844: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 990: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8698: -/***/ ((module, __unused_webpack_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__(8455), - Out: __webpack_require__(990), - InOut: __webpack_require__(1844) - -}; - - -/***/ }), - -/***/ 6745: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7051: -/***/ ((module, __unused_webpack_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__(6745); - - -/***/ }), - -/***/ 3158: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 12: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1326: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7373: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2622: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7927: -/***/ ((module, __unused_webpack_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__(3158), - Equal: __webpack_require__(12), - Floor: __webpack_require__(1326), - GreaterThan: __webpack_require__(7373), - LessThan: __webpack_require__(2622) - -}; - - -/***/ }), - -/***/ 4675: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(7425); -var Extend = __webpack_require__(1030); - -/** - * @namespace Phaser.Math - */ - -var PhaserMath = { - - // Collections of functions - Angle: __webpack_require__(1833), - Distance: __webpack_require__(6338), - Easing: __webpack_require__(8613), - Fuzzy: __webpack_require__(7927), - Interpolation: __webpack_require__(2140), - Pow2: __webpack_require__(7897), - Snap: __webpack_require__(3943), - - // Expose the RNG Class - RandomDataGenerator: __webpack_require__(6957), - - // Single functions - Average: __webpack_require__(3136), - Bernstein: __webpack_require__(785), - Between: __webpack_require__(7025), - CatmullRom: __webpack_require__(48), - CeilTo: __webpack_require__(5035), - Clamp: __webpack_require__(2915), - DegToRad: __webpack_require__(7149), - Difference: __webpack_require__(2975), - Euler: __webpack_require__(2107), - Factorial: __webpack_require__(3916), - FloatBetween: __webpack_require__(104), - FloorTo: __webpack_require__(4941), - FromPercent: __webpack_require__(1555), - GetSpeed: __webpack_require__(5005), - IsEven: __webpack_require__(3702), - IsEvenStrict: __webpack_require__(8820), - Linear: __webpack_require__(1743), - LinearXY: __webpack_require__(3416), - MaxAdd: __webpack_require__(3733), - Median: __webpack_require__(44), - MinSub: __webpack_require__(5385), - Percent: __webpack_require__(8585), - RadToDeg: __webpack_require__(4208), - RandomXY: __webpack_require__(1705), - RandomXYZ: __webpack_require__(6650), - RandomXYZW: __webpack_require__(2037), - Rotate: __webpack_require__(6283), - RotateAround: __webpack_require__(9876), - RotateAroundDistance: __webpack_require__(8348), - RotateTo: __webpack_require__(4497), - RoundAwayFromZero: __webpack_require__(4078), - RoundTo: __webpack_require__(855), - SinCosTableGenerator: __webpack_require__(4936), - SmootherStep: __webpack_require__(278), - SmoothStep: __webpack_require__(2733), - ToXY: __webpack_require__(163), - TransformXY: __webpack_require__(7556), - Within: __webpack_require__(4119), - Wrap: __webpack_require__(8445), - - // Vector classes - Vector2: __webpack_require__(2529), - Vector3: __webpack_require__(5689), - Vector4: __webpack_require__(9279), - Matrix3: __webpack_require__(2149), - Matrix4: __webpack_require__(9652), - Quaternion: __webpack_require__(372), - RotateVec3: __webpack_require__(9640) - -}; - -// Merge in the consts - -PhaserMath = Extend(false, PhaserMath, CONST); - -// Export it - -module.exports = PhaserMath; - - -/***/ }), - -/***/ 1640: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bernstein = __webpack_require__(785); - -/** - * 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; - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CatmullRom = __webpack_require__(48); - -/** - * 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; - - -/***/ }), - -/***/ 4002: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6765: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Linear = __webpack_require__(1743); - -/** - * 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; - - -/***/ }), - -/***/ 6388: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SmoothStep = __webpack_require__(2733); - -/** - * 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; - - -/***/ }), - -/***/ 8705: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SmootherStep = __webpack_require__(278); - -/** - * 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; - - -/***/ }), - -/***/ 2140: -/***/ ((module, __unused_webpack_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__(1640), - CatmullRom: __webpack_require__(6105), - CubicBezier: __webpack_require__(4002), - Linear: __webpack_require__(6765), - QuadraticBezier: __webpack_require__(6388), - SmoothStep: __webpack_require__(5735), - SmootherStep: __webpack_require__(8705) - -}; - - -/***/ }), - -/***/ 5443: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 725: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 167: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 7897: -/***/ ((module, __unused_webpack_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__(5443), - IsSize: __webpack_require__(725), - IsValue: __webpack_require__(167) - -}; - - -/***/ }), - -/***/ 6957: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(7473); - -/** - * @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; - - -/***/ }), - -/***/ 5659: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5461: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5131: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3943: -/***/ ((module, __unused_webpack_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__(5659), - Floor: __webpack_require__(5461), - To: __webpack_require__(5131) - -}; - - -/***/ }), - -/***/ 8666: -/***/ ((module, __unused_webpack_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__(7473); - -/** - * @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} + * @name Phaser.GameObjects.GameObjectFactory#scene + * @type {Phaser.Scene} * @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; - - -/***/ }), - -/***/ 5722: -/***/ ((module, __unused_webpack_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__(8666); -var Class = __webpack_require__(7473); -var SceneEvents = __webpack_require__(204); - -/** - * @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. - * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. - */ -var ScenePlugin = new Class({ - - Extends: BasePlugin, - - initialize: - - function ScenePlugin (scene, pluginManager, pluginKey) - { - 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 + * @since 3.0.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. + * A reference to the Scene.Systems. * - * @name Phaser.Plugins.ScenePlugin#systems - * @type {?Phaser.Scenes.Systems} + * @name Phaser.GameObjects.GameObjectFactory#systems + * @type {Phaser.Scenes.Systems} * @protected - * @since 3.8.0 + * @since 3.0.0 */ this.systems = scene.sys; /** - * The key under which this plugin was installed into the Scene Systems. + * A reference to the Scene Event Emitter. * - * 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#pluginKey - * @type {string} - * @readonly - * @since 3.54.0 + * @name Phaser.GameObjects.GameObjectFactory#events + * @type {Phaser.Events.EventEmitter} + * @protected + * @since 3.50.0 */ - this.pluginKey = pluginKey; + this.events = scene.sys.events; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.GameObjectFactory#displayList + * @type {Phaser.GameObjects.DisplayList} + * @protected + * @since 3.0.0 + */ + this.displayList; + + /** + * A reference to the Scene Update List. + * + * @name Phaser.GameObjects.GameObjectFactory#updateList + * @type {Phaser.GameObjects.UpdateList} + * @protected + * @since 3.0.0 + */ + this.updateList; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** - * This method is called when the Scene boots. It is only ever called once. + * This method is called automatically, only once, when the Scene is first created. + * Do not invoke it directly. * - * 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 + * @method Phaser.GameObjects.GameObjectFactory#boot + * @private + * @since 3.5.1 */ boot: function () { + this.displayList = this.systems.displayList; + this.updateList = this.systems.updateList; + + this.events.once(SceneEvents.DESTROY, this.destroy, this); }, /** - * Game instance has been destroyed. + * This method is called automatically by the Scene when it is starting up. + * It is responsible for creating local systems, properties and listening for Scene events. + * Do not invoke it directly. * - * You must release everything in here, all references, all objects, free it all up. + * @method Phaser.GameObjects.GameObjectFactory#start + * @private + * @since 3.5.0 + */ + start: function () + { + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * Adds an existing Game Object to this Scene. * - * @method Phaser.Plugins.ScenePlugin#destroy - * @since 3.8.0 + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * + * @method Phaser.GameObjects.GameObjectFactory#existing + * @since 3.0.0 + * + * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was added. + */ + existing: function (child) + { + if (child.renderCanvas || child.renderWebGL) + { + this.displayList.add(child); + } + + // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event: + // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway. + if (child.preUpdate) + { + this.updateList.add(child); + } + + return child; + }, + + /** + * 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.GameObjectFactory#shutdown + * @private + * @since 3.0.0 + */ + shutdown: function () + { + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + * + * @method Phaser.GameObjects.GameObjectFactory#destroy + * @private + * @since 3.0.0 */ destroy: function () { - this.pluginManager = null; - this.game = null; + this.shutdown(); + + this.events.off(SceneEvents.START, this.start, this); + this.scene = null; this.systems = null; + this.events = null; + + this.displayList = null; + this.updateList = null; } }); -module.exports = ScenePlugin; +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ +GameObjectFactory.register = function (factoryType, factoryFunction) +{ + if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + GameObjectFactory.prototype[factoryType] = factoryFunction; + } +}; + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ +GameObjectFactory.remove = function (factoryType) +{ + if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + delete GameObjectFactory.prototype[factoryType]; + } +}; + +PluginCache.register('GameObjectFactory', GameObjectFactory, 'add'); + +module.exports = GameObjectFactory; /***/ }), - -/***/ 8351: -/***/ ((module) => { +/* 329 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Contains the plugins that Phaser uses globally and locally. +// These are the source objects, not instantiated. +var corePlugins = {}; + +// Contains the plugins that the dev has loaded into their game +// These are the source objects, not instantiated. +var customPlugins = {}; + +var PluginCache = {}; + +/** + * @namespace Phaser.Plugins.PluginCache + */ + +/** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * + * @method Phaser.Plugins.PluginCache.register + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin? + */ +PluginCache.register = function (key, plugin, mapping, custom) +{ + if (custom === undefined) { custom = false; } + + corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom }; +}; + +/** + * Stores a custom plugin in the global plugin cache. + * The key must be unique, within the scope of the cache. + * + * @method Phaser.Plugins.PluginCache.registerCustom + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {?any} data - A value to be passed to the plugin's `init` method. + */ +PluginCache.registerCustom = function (key, plugin, mapping, data) +{ + customPlugins[key] = { plugin: plugin, mapping: mapping, data: data }; +}; + +/** + * Checks if the given key is already being used in the core plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCore + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`. + */ +PluginCache.hasCore = function (key) +{ + return corePlugins.hasOwnProperty(key); +}; + +/** + * Checks if the given key is already being used in the custom plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCustom + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`. + */ +PluginCache.hasCustom = function (key) +{ + return customPlugins.hasOwnProperty(key); +}; + +/** + * Returns the core plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCore + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to get. + * + * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object. + */ +PluginCache.getCore = function (key) +{ + return corePlugins[key]; +}; + +/** + * Returns the custom plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object. + */ +PluginCache.getCustom = function (key) +{ + return customPlugins[key]; +}; + +/** + * Returns an object from the custom cache based on the given key that can be instantiated. + * + * @method Phaser.Plugins.PluginCache.getCustomClass + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {function} The custom plugin object. + */ +PluginCache.getCustomClass = function (key) +{ + return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null; +}; + +/** + * Removes a core plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.remove + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to remove. + */ +PluginCache.remove = function (key) +{ + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } +}; + +/** + * Removes a custom plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.removeCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to remove. + */ +PluginCache.removeCustom = function (key) +{ + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } +}; + +/** + * Removes all Core Plugins. + * + * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. + * So be sure you only call this if you do not wish to run Phaser again. + * + * @method Phaser.Plugins.PluginCache.destroyCorePlugins + * @since 3.12.0 + */ +PluginCache.destroyCorePlugins = function () +{ + for (var key in corePlugins) + { + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } + } +}; + +/** + * Removes all Custom Plugins. + * + * @method Phaser.Plugins.PluginCache.destroyCustomPlugins + * @since 3.12.0 + */ +PluginCache.destroyCustomPlugins = function () +{ + for (var key in customPlugins) + { + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } + } +}; + +module.exports = PluginCache; + + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(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. + * + * This is a WebGL only feature. + * + * @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. + * + * This is a WebGL only feature. + * + * @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, 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--; + + // Force flush before disabling stencil test + renderer.flush(); + + var current = renderer.currentMask; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + current.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + current.mask = prev.mask; + current.camera = prev.camera; + } + else + { + current.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, 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; + + +/***/ }), +/* 331 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Phaser Blend Modes. - * - * @namespace Phaser.BlendModes + * 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 */ -module.exports = { +var Origin = { /** - * Skips the Blend Mode check in the renderer. - * - * @name Phaser.BlendModes.SKIP_CHECK - * @type {number} - * @const - * @since 3.0.0 + * 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 */ - SKIP_CHECK: -1, + _originComponent: true, /** - * 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 + * 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} - * @const + * @default 0.5 * @since 3.0.0 */ - NORMAL: 0, + originX: 0.5, /** - * Add blend mode. For Canvas and WebGL. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.ADD + * 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} - * @const + * @default 0.5 * @since 3.0.0 */ - ADD: 1, + originY: 0.5, + + // private + read only + _displayOriginX: 0, + _displayOriginY: 0, /** - * 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 + * 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} - * @const * @since 3.0.0 */ - MULTIPLY: 2, + displayOriginX: { + + get: function () + { + return this._displayOriginX; + }, + + set: function (value) + { + this._displayOriginX = value; + this.originX = value / this.width; + } + + }, /** - * 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 + * 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} - * @const * @since 3.0.0 */ - SCREEN: 3, + displayOriginY: { + + get: function () + { + return this._displayOriginY; + }, + + set: function (value) + { + this._displayOriginY = value; + this.originY = value / this.height; + } + + }, /** - * 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 {number} - * @const + * 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. */ - OVERLAY: 4, + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this.updateDisplayOrigin(); + }, /** - * Darken blend mode. For Canvas only. - * Retains the darkest pixels of both layers. - * - * @name Phaser.BlendModes.DARKEN - * @type {number} - * @const + * 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. */ - DARKEN: 5, + 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(); + }, /** - * Lighten blend mode. For Canvas only. - * Retains the lightest pixels of both layers. - * - * @name Phaser.BlendModes.LIGHTEN - * @type {number} - * @const + * 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. */ - LIGHTEN: 6, + setDisplayOrigin: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.displayOriginX = x; + this.displayOriginY = y; + + return this; + }, /** - * Color Dodge blend mode. For Canvas only. - * Divides the bottom layer by the inverted top layer. - * - * @name Phaser.BlendModes.COLOR_DODGE - * @type {number} - * @const + * 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. */ - COLOR_DODGE: 7, + updateDisplayOrigin: function () + { + this._displayOriginX = this.originX * this.width; + this._displayOriginY = this.originY * this.height; - /** - * 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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - DIFFERENCE: 11, - - /** - * Exclusion blend mode. For Canvas only. - * Like difference, but with lower contrast. - * - * @name Phaser.BlendModes.EXCLUSION - * @type {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - LUMINOSITY: 16, - - /** - * Alpha erase blend mode. For Canvas and WebGL. - * - * @name Phaser.BlendModes.ERASE - * @type {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - LIGHTER: 25, - - /** - * Copy blend mode. For Canvas only. - * Only the new shape is shown. - * - * @name Phaser.BlendModes.COPY - * @type {number} - * @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 {number} - * @const - * @since 3.0.0 - */ - XOR: 27 + return this; + } }; - -/***/ }), - -/***/ 387: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Post-Render Event. - * - * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes, - * has completed, but before any pending snap shots have been taken. - * - * @event Phaser.Renderer.Events#POST_RENDER - * @since 3.50.0 - */ -module.exports = 'postrender'; +module.exports = Origin; /***/ }), - -/***/ 7970: -/***/ ((module) => { +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -/** - * The Pre-Render Event. - * - * This event is dispatched by the Phaser Renderer. This happens right at the start of the render - * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been - * reset ready for the render. - * - * @event Phaser.Renderer.Events#PRE_RENDER - * @since 3.50.0 - */ -module.exports = 'prerender'; - - -/***/ }), - -/***/ 674: -/***/ ((module) => { +var DegToRad = __webpack_require__(21); +var GetBoolean = __webpack_require__(333); +var GetValue = __webpack_require__(8); +var TWEEN_CONST = __webpack_require__(334); +var Vector2 = __webpack_require__(3); /** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Render Event. + * Provides methods used for managing a Game Object following a Path. + * Should be applied as a mixin and not used directly. * - * This event is dispatched by the Phaser Renderer for every camera in every Scene. - * - * It is dispatched before any of the children in the Scene have been rendered. - * - * @event Phaser.Renderer.Events#RENDER - * @since 3.50.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered. - */ -module.exports = 'render'; - - -/***/ }), - -/***/ 9418: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Renderer Resize Event. - * - * This event is dispatched by the Phaser Renderer when it is resized, usually as a result - * of the Scale Manager resizing. - * - * @event Phaser.Renderer.Events#RESIZE - * @since 3.50.0 - * - * @param {number} width - The new width of the renderer. - * @param {number} height - The new height of the renderer. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ 8604: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Renderer.Events - */ - -module.exports = { - - POST_RENDER: __webpack_require__(387), - PRE_RENDER: __webpack_require__(7970), - RENDER: __webpack_require__(674), - RESIZE: __webpack_require__(9418) - -}; - - -/***/ }), - -/***/ 5412: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var PIPELINE_CONST = { - - /** - * The Bitmap Mask Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', - - /** - * The Light 2D Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - LIGHT_PIPELINE: 'Light2D', - - /** - * The Point Light Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POINTLIGHT_PIPELINE: 'PointLightPipeline', - - /** - * The Single Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - SINGLE_PIPELINE: 'SinglePipeline', - - /** - * The Multi Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - MULTI_PIPELINE: 'MultiPipeline', - - /** - * The Rope Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - ROPE_PIPELINE: 'RopePipeline', - - /** - * The Graphics and Shapes Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - GRAPHICS_PIPELINE: 'GraphicsPipeline', - - /** - * The Post FX Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POSTFX_PIPELINE: 'PostFXPipeline', - - /** - * The Utility Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - UTILITY_PIPELINE: 'UtilityPipeline' - -}; - -module.exports = PIPELINE_CONST; - - -/***/ }), - -/***/ 3527: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Scale Manager Resize Event. - * - * This event is dispatched whenever the Scale Manager detects a resize event from the browser. - * It sends three parameters to the callback, each of them being Size components. You can read - * the `width`, `height`, `aspectRatio` and other properties of these components to help with - * scaling your own game content. - * - * @event Phaser.Scale.Events#RESIZE - * @since 3.16.1 - * - * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. - * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. - * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. - * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. - * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ 8618: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 4328: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6099: -/***/ ((module) => { - -/** - * @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.events.on('create', listener)`. - * - * @event Phaser.Scenes.Events#CREATE + * @namespace Phaser.GameObjects.Components.PathFollower * @since 3.17.0 - * - * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. - */ -module.exports = 'create'; - - -/***/ }), - -/***/ 7645: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 2710: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 2547: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 8577: -/***/ ((module) => { - -/** - * @author samme - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to this event from a Scene using `this.events.on('prerender', listener)`. - * - * A Scene will only render if it is visible. - * - * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. - * - * @event Phaser.Scenes.Events#PRE_RENDER - * @since 3.53.0 - * - * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. - */ -module.exports = 'prerender'; - - -/***/ }), - -/***/ 8197: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 8997: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7604: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 8999: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.events.on('render', listener)`. - * - * A Scene will only render if it is visible. - * - * 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'; - - -/***/ }), - -/***/ 9742: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3667: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3468: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7840: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 9896: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 5103: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 3162: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 7841: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6454: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 6536: -/***/ ((module) => { - -/** - * @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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} - * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} - * - * Listen to it from a Scene using `this.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'; - - -/***/ }), - -/***/ 3875: -/***/ ((module) => { - -/** - * @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.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'; - - -/***/ }), - -/***/ 204: -/***/ ((module, __unused_webpack_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__(8618), - BOOT: __webpack_require__(4328), - CREATE: __webpack_require__(6099), - DESTROY: __webpack_require__(7645), - PAUSE: __webpack_require__(2710), - POST_UPDATE: __webpack_require__(2547), - PRE_RENDER: __webpack_require__(8577), - PRE_UPDATE: __webpack_require__(8197), - READY: __webpack_require__(8997), - REMOVED_FROM_SCENE: __webpack_require__(7604), - RENDER: __webpack_require__(8999), - RESUME: __webpack_require__(9742), - SHUTDOWN: __webpack_require__(3667), - SLEEP: __webpack_require__(3468), - START: __webpack_require__(7840), - TRANSITION_COMPLETE: __webpack_require__(9896), - TRANSITION_INIT: __webpack_require__(5103), - TRANSITION_OUT: __webpack_require__(3162), - TRANSITION_START: __webpack_require__(7841), - TRANSITION_WAKE: __webpack_require__(6454), - UPDATE: __webpack_require__(6536), - WAKE: __webpack_require__(3875) +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 {number} + * @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.setTargetValue(); + }; + } + + 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(); + + config.persist = true; + + 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(tweenData.end, 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; + /***/ }), - -/***/ 1864: -/***/ ((module) => { +/* 333 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -42231,9 +46934,9 @@ module.exports = { * * @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. + * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. * - * @return {*} The retrieved value. + * @return {boolean} The retrieved value. */ var GetBoolean = function (source, key, defaultValue) { @@ -42255,104 +46958,113 @@ module.exports = GetBoolean; /***/ }), - -/***/ 3747: -/***/ ((module) => { +/* 334 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +/** + * Phaser Tween States. + * + * @namespace Phaser.Tweens.States + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + +/** + * Phaser Tween state constants. + * + * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + var TWEEN_CONST = { /** * TweenData state. - * - * @name Phaser.Tweens.CREATED + * + * @name Phaser.Tweens.States.CREATED * @type {number} + * @const * @since 3.0.0 */ CREATED: 0, - /** - * TweenData state. - * - * @name Phaser.Tweens.INIT - * @type {number} - * @since 3.0.0 - */ - INIT: 1, + // 1 used to be INIT prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.DELAY + * + * @name Phaser.Tweens.States.DELAY * @type {number} + * @const * @since 3.0.0 */ DELAY: 2, - /** - * TweenData state. - * - * @name Phaser.Tweens.OFFSET_DELAY - * @type {number} - * @since 3.0.0 - */ - OFFSET_DELAY: 3, + // 3 used to be OFFSET_DELAY prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.PENDING_RENDER + * + * @name Phaser.Tweens.States.PENDING_RENDER * @type {number} + * @const * @since 3.0.0 */ PENDING_RENDER: 4, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_FORWARD + * + * @name Phaser.Tweens.States.PLAYING_FORWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_FORWARD: 5, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_BACKWARD + * + * @name Phaser.Tweens.States.PLAYING_BACKWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_BACKWARD: 6, /** * TweenData state. - * - * @name Phaser.Tweens.HOLD_DELAY + * + * @name Phaser.Tweens.States.HOLD_DELAY * @type {number} + * @const * @since 3.0.0 */ HOLD_DELAY: 7, /** * TweenData state. - * - * @name Phaser.Tweens.REPEAT_DELAY + * + * @name Phaser.Tweens.States.REPEAT_DELAY * @type {number} + * @const * @since 3.0.0 */ REPEAT_DELAY: 8, /** * TweenData state. - * - * @name Phaser.Tweens.COMPLETE + * + * @name Phaser.Tweens.States.COMPLETE * @type {number} + * @const * @since 3.0.0 */ COMPLETE: 9, @@ -42360,67 +47072,110 @@ var TWEEN_CONST = { // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_ADD + * Tween state. The Tween has been created but has not yet been added to the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING * @type {number} + * @const * @since 3.0.0 */ - PENDING_ADD: 20, + PENDING: 20, /** - * Tween state. - * - * @name Phaser.Tweens.PAUSED + * Tween state. The Tween is active within the Tween Manager. This means it is either playing, + * or was playing and is currently paused, but in both cases it's still being processed by + * the Tween Manager, so is considered 'active'. + * + * @name Phaser.Tweens.States.ACTIVE * @type {number} + * @const * @since 3.0.0 */ - PAUSED: 21, + ACTIVE: 21, /** - * Tween state. - * - * @name Phaser.Tweens.LOOP_DELAY + * Tween state. The Tween is waiting for a loop countdown to elapse. + * + * @name Phaser.Tweens.States.LOOP_DELAY * @type {number} + * @const * @since 3.0.0 */ LOOP_DELAY: 22, /** - * Tween state. - * - * @name Phaser.Tweens.ACTIVE + * Tween state. The Tween is waiting for a complete delay to elapse. + * + * @name Phaser.Tweens.States.COMPLETE_DELAY * @type {number} + * @const * @since 3.0.0 */ - ACTIVE: 23, + COMPLETE_DELAY: 23, /** - * Tween state. - * - * @name Phaser.Tweens.COMPLETE_DELAY + * Tween state. The Tween is waiting for a starting delay to elapse. + * + * @name Phaser.Tweens.States.START_DELAY * @type {number} + * @const * @since 3.0.0 */ - COMPLETE_DELAY: 24, + START_DELAY: 24, /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_REMOVE + * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING_REMOVE * @type {number} + * @const * @since 3.0.0 */ PENDING_REMOVE: 25, /** - * Tween state. - * - * @name Phaser.Tweens.REMOVED + * Tween state. The Tween has been removed from the Tween Manager. + * + * @name Phaser.Tweens.States.REMOVED * @type {number} + * @const * @since 3.0.0 */ - REMOVED: 26 + REMOVED: 26, + + /** + * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation, + * so will not be automatically removed by the Tween Manager. + * + * @name Phaser.Tweens.States.FINISHED + * @type {number} + * @const + * @since 3.60.0 + */ + FINISHED: 27, + + /** + * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager. + * + * @name Phaser.Tweens.States.DESTROYED + * @type {number} + * @const + * @since 3.60.0 + */ + DESTROYED: 28, + + /** + * A large integer value used for 'infinite' style countdowns. + * + * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not + * supported on IE. + * + * @name Phaser.Tweens.States.MAX + * @type {number} + * @const + * @since 3.60.0 + */ + MAX: 999999999999 }; @@ -42428,3276 +47183,439 @@ module.exports = TWEEN_CONST; /***/ }), - -/***/ 7473: -/***/ ((module) => { +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Taken from klasse by mattdesl https://github.com/mattdesl/klasse - -function hasGetterOrSetter (def) -{ - return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); -} - -function getProperty (definition, k, isClassDescriptor) -{ - // This may be a lightweight object, OR it might be a property that was defined previously. - - // For simple class descriptors we can just assume its NOT previously defined. - var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); - - if (!isClassDescriptor && def.value && typeof def.value === 'object') - { - def = def.value; - } - - // This might be a regular property, or it may be a getter/setter the user defined in a class. - if (def && hasGetterOrSetter(def)) - { - if (typeof def.enumerable === 'undefined') - { - def.enumerable = true; - } - - if (typeof def.configurable === 'undefined') - { - def.configurable = true; - } - - return def; - } - else - { - return false; - } -} - -function hasNonConfigurable (obj, k) -{ - var prop = Object.getOwnPropertyDescriptor(obj, k); - - if (!prop) - { - return false; - } - - if (prop.value && typeof prop.value === 'object') - { - prop = prop.value; - } - - if (prop.configurable === false) - { - return true; - } - - return false; -} +var DeepCopy = __webpack_require__(336); +var SpliceOne = __webpack_require__(11); /** - * Extends the given `myClass` object's prototype with the properties of `definition`. + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. * - * @function extend - * @ignore - * @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) - { - if (!definition.hasOwnProperty(k)) - { - continue; - } - - var def = getProperty(definition, k, isClassDescriptor); - - if (def !== false) - { - // If Extends is used, we will check its prototype to see if the final variable exists. - - var parent = extend || ctor; - - if (hasNonConfigurable(parent.prototype, k)) - { - // Just skip the final property - if (Class.ignoreFinals) - { - continue; - } - - // We cannot re-define a property that is configurable=false. - // So we will consider them final and throw an error. This is by - // default so it is clear to the developer what is happening. - // You can set ignoreFinals to true if you need to extend a class - // which has configurable=false; it will simply not re-define final properties. - throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); - } - - Object.defineProperty(ctor.prototype, k, def); - } - else - { - ctor.prototype[k] = definition[k]; - } - } -} - -/** - * Applies the given `mixins` to the prototype of `myClass`. - * - * @function mixin - * @ignore - * @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) - { - return; - } - - if (!Array.isArray(mixins)) - { - mixins = [ mixins ]; - } - - for (var i = 0; i < mixins.length; i++) - { - extend(myClass, mixins[i].prototype || mixins[i]); - } -} - -/** - * Creates a new class with the given descriptor. - * The constructor, defined by the name `initialize`, - * is an optional function. If unspecified, an anonymous - * function will be used which calls the parent class (if - * one exists). - * - * You can also use `Extends` and `Mixins` to provide subclassing - * and inheritance. - * - * @class Phaser.Class - * @constructor - * @param {Object} definition a dictionary of functions for the class - * @example - * - * var MyClass = new Phaser.Class({ - * - * initialize: function() { - * this.foo = 2.0; - * }, - * - * bar: function() { - * return this.foo + 5; - * } - * }); - */ -function Class (definition) -{ - if (!definition) - { - definition = {}; - } - - // The variable name here dictates what we see in Chrome debugger - var initialize; - var Extends; - - if (definition.initialize) - { - if (typeof definition.initialize !== 'function') - { - throw new Error('initialize must be a function'); - } - - initialize = definition.initialize; - - // Usually we should avoid 'delete' in V8 at all costs. - // However, its unlikely to make any performance difference - // here since we only call this on class creation (i.e. not object creation). - delete definition.initialize; - } - else if (definition.Extends) - { - var base = definition.Extends; - - initialize = function () - { - base.apply(this, arguments); - }; - } - else - { - initialize = function () {}; - } - - if (definition.Extends) - { - initialize.prototype = Object.create(definition.Extends.prototype); - initialize.prototype.constructor = initialize; - - // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) - - Extends = definition.Extends; - - delete definition.Extends; - } - else - { - initialize.prototype.constructor = initialize; - } - - // Grab the mixins, if they are specified... - var mixins = null; - - if (definition.Mixins) - { - mixins = definition.Mixins; - delete definition.Mixins; - } - - // First, mixin if we can. - mixin(initialize, mixins); - - // Now we grab the actual definition which defines the overrides. - extend(initialize, definition, true, Extends); - - return initialize; -} - -Class.extend = extend; -Class.mixin = mixin; -Class.ignoreFinals = false; - -module.exports = Class; - - -/***/ }), - -/***/ 1984: -/***/ ((module) => { - -/** - * @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 + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly * @since 3.0.0 */ -var NOOP = function () -{ - // NOOP -}; -module.exports = NOOP; - - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2280: -/***/ ((module) => { - -/** - * @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 {number} [index=0] - The index in the array where the item will be inserted. - * @param {number} [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; - - -/***/ }), - -/***/ 2513: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1771: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [endIndex] - An optional end index to search to. - * - * @return {number} 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; - - -/***/ }), - -/***/ 7883: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5856: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} startIndex - The start index to search from. - * @param {number} 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; - - -/***/ }), - -/***/ 3957: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 6245: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 1647: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex=0] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 5301: -/***/ ((module) => { - -/** - * @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 {number} [startIndex=0] - An optional start index. - * @param {number} [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; - - -/***/ }), - -/***/ 8683: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Moves the given array element above another one in the array. - * The array is modified in-place. - * - * @function Phaser.Utils.Array.MoveAbove - * @since 3.55.0 - * - * @param {array} array - The input array. - * @param {*} item1 - The element to move above base element. - * @param {*} item2 - The base element. - * - * - * @return {array} The input array. - */ -var MoveAbove = function (array, item1, item2) -{ - if (item1 === item2) - { - return array; - } - - var currentIndex = array.indexOf(item1); - var baseIndex = array.indexOf(item2); - - if (currentIndex < 0 || baseIndex < 0) - { - throw new Error('Supplied items must be elements of the same array'); - } - - if (currentIndex > baseIndex) - { - // item1 is already above item2 - return array; - } - - // Remove - array.splice(currentIndex, 1); - - // Add in new location - if (baseIndex === array.length - 1) - { - array.push(item1); - } - else - { - array.splice(baseIndex, 0, item1); - } - - return array; -}; - -module.exports = MoveAbove; - - -/***/ }), - -/***/ 546: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Moves the given array element below another one in the array. - * The array is modified in-place. - * - * @function Phaser.Utils.Array.MoveBelow - * @since 3.55.0 - * - * @param {array} array - The input array. - * @param {*} item1 - The element to move below base element. - * @param {*} item2 - The base element. - * - * - * @return {array} The input array. - */ -var MoveBelow = function (array, item1, item2) -{ - if (item1 === item2) - { - return array; - } - - var currentIndex = array.indexOf(item1); - var baseIndex = array.indexOf(item2); - - if (currentIndex < 0 || baseIndex < 0) - { - throw new Error('Supplied items must be elements of the same array'); - } - - if (currentIndex < baseIndex) - { - // item1 is already below item2 - return array; - } - - // Remove - array.splice(currentIndex, 1); - - // Add in new location - if (baseIndex === 0) - { - array.unshift(item1); - } - else - { - array.splice(baseIndex, 0, item1); - } - - return array; -}; - -module.exports = MoveBelow; - - -/***/ }), - -/***/ 1842: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1419: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 6512: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 4130: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1316: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RoundAwayFromZero = __webpack_require__(4078); - -/** - * 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; - - -/***/ }), - -/***/ 9465: -/***/ ((module) => { - -/** - * @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 {number} k - The k-th element index. - * @param {number} [left=0] - The index of the left part of the range. - * @param {number} [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; - - -/***/ }), - -/***/ 9703: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetValue = __webpack_require__(5851); -var Shuffle = __webpack_require__(4912); - -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; - - -/***/ }), - -/***/ 7161: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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; - var removed = []; - - while (itemLength >= 0) - { - var entry = item[itemLength]; - - index = array.indexOf(entry); - - if (index !== -1) - { - SpliceOne(array, index); - - removed.push(entry); - - if (callback) - { - callback.call(context, entry); - } - } - - itemLength--; - } - - return removed; -}; - -module.exports = Remove; - - -/***/ }), - -/***/ 4725: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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 {number} 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; - - -/***/ }), - -/***/ 8780: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} startIndex - The start index to remove from. - * @param {number} 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; - - -/***/ }), - -/***/ 5744: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(8935); - -/** - * 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 {number} [start=0] - The array index to start the search from. - * @param {number} [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; - - -/***/ }), - -/***/ 6960: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 1021: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 4027: -/***/ ((module) => { - -/** - * @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 {number} [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; - - -/***/ }), - -/***/ 2497: -/***/ ((module) => { - -/** - * @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 {number} startIndex - The start index. - * @param {number} 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; - - -/***/ }), - -/***/ 5361: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 3718: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(2497); - -/** - * 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 {number} [startIndex] - An optional start index to search from. - * @param {number} [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; - - -/***/ }), - -/***/ 4912: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 2071: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 8935: -/***/ ((module) => { - -/** - * @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 {number} 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; - - -/***/ }), - -/***/ 9992: -/***/ ((module) => { - -/** - * @author Richard Davey - * @author Angry Bytes (and contributors) - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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); -} - -/** - * 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 = 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) - { - RunPass(array, compare, chk, buffer); - - var tmp = array; - - array = buffer; - - buffer = tmp; - } - - return array; -} - -/** - * 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) - { - 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++]; - } - } - else if (li < r) - { - // Nothing to compare, just flush what's left. - result[i++] = arr[li++]; - } - else if (ri < e) - { - result[i++] = arr[ri++]; - } - 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; -}; - -module.exports = StableSort; - - -/***/ }), - -/***/ 2372: -/***/ ((module) => { - -/** - * @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 array; - } - - 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; - - -/***/ }), - -/***/ 1953: -/***/ ((module, __unused_webpack_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__(1237), - - Add: __webpack_require__(1792), - AddAt: __webpack_require__(2280), - BringToTop: __webpack_require__(2513), - CountAllMatching: __webpack_require__(1771), - Each: __webpack_require__(7883), - EachInRange: __webpack_require__(5856), - FindClosestInSorted: __webpack_require__(3957), - GetAll: __webpack_require__(6245), - GetFirst: __webpack_require__(1647), - GetRandom: __webpack_require__(5301), - MoveDown: __webpack_require__(1842), - MoveTo: __webpack_require__(1419), - MoveUp: __webpack_require__(6512), - MoveAbove: __webpack_require__(8683), - MoveBelow: __webpack_require__(546), - NumberArray: __webpack_require__(4130), - NumberArrayStep: __webpack_require__(1316), - QuickSelect: __webpack_require__(9465), - Range: __webpack_require__(9703), - Remove: __webpack_require__(7161), - RemoveAt: __webpack_require__(4725), - RemoveBetween: __webpack_require__(8780), - RemoveRandomElement: __webpack_require__(5744), - Replace: __webpack_require__(6960), - RotateLeft: __webpack_require__(1021), - RotateRight: __webpack_require__(4027), - SafeRange: __webpack_require__(2497), - SendToBack: __webpack_require__(5361), - SetAll: __webpack_require__(3718), - Shuffle: __webpack_require__(4912), - SortByDigits: __webpack_require__(2071), - SpliceOne: __webpack_require__(8935), - StableSort: __webpack_require__(9992), - Swap: __webpack_require__(2372) - -}; - - -/***/ }), - -/***/ 1816: -/***/ ((module) => { - -/** - * @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. This is an example matrix: - * - * ``` - * [ - * [ 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) || !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) +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default. + * + * @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, + + /** + * Does this Game Object have any Post Pipelines set? + * + * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline + * @type {boolean} + * @webglOnly + * @since 3.50.0 + */ + hasPostPipeline: false, + + /** + * The WebGL Post FX Pipelines this Game Object uses for post-render effects. + * + * The pipelines are processed in the order in which they appear in this array. + * + * If you modify this array directly, be sure to set the + * `hasPostPipeline` property accordingly. + * + * @name Phaser.GameObjects.Components.Pipeline#postPipelines + * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} + * @webglOnly + * @since 3.50.0 + */ + postPipelines: null, + + /** + * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses. + * + * @name Phaser.GameObjects.Components.Pipeline#pipelineData + * @type {object} + * @webglOnly + * @since 3.50.0 + */ + pipelineData: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipeline) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) { return false; } - } - return true; -}; + var pipelines = renderer.pipelines; -module.exports = CheckMatrix; + this.postPipelines = []; + this.pipelineData = {}; - -/***/ }), - -/***/ 6655: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Pad = __webpack_require__(7222); -var CheckMatrix = __webpack_require__(1816); - -/** - * Generates a string (which you can pass to console.log) from the given Array 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + if (pipelines) { - var cell = matrix[r][c].toString(); - - if (cell !== 'undefined') + if (pipeline === undefined) { - str += Pad(cell, 2); - } - else - { - str += '?'; + pipeline = pipelines.default; } - if (c < matrix[r].length - 1) + var instance = pipelines.get(pipeline); + + if (instance) { - str += ' |'; + this.defaultPipeline = instance; + this.pipeline = instance; + + return true; } } - if (r < matrix.length - 1) + return false; + }, + + /** + * Sets the main WebGL Pipeline of this Game Object. + * + * Also sets the `pipelineData` property, if the parameter is given. + * + * Both the pipeline and post pipelines share the same pipeline data object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. + * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. + * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipeline, pipelineData, copyData) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) { - str += '\n'; + return this; + } - for (var i = 0; i < matrix[r].length; i++) + var pipelines = renderer.pipelines; + + if (pipelines) + { + var instance = pipelines.get(pipeline); + + if (instance) { - str += '---'; + this.pipeline = instance; + } - if (i < matrix[r].length - 1) + if (pipelineData) + { + this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; + } + } + + return this; + }, + + /** + * Sets one, or more, Post Pipelines on this Game Object. + * + * Post Pipelines are invoked after this Game Object has rendered to its target and + * are commonly used for post-fx. + * + * The post pipelines are appended to the `postPipelines` array belonging to this + * Game Object. When the renderer processes this Game Object, it iterates through the post + * pipelines in the order in which they appear in the array. If you are stacking together + * multiple effects, be aware that the order is important. + * + * If you call this method multiple times, the new pipelines will be appended to any existing + * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. + * + * You can optionally also set the `pipelineData` property, if the parameter is given. + * + * Both the pipeline and post pipelines share the pipeline data object together. + * + * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them. + * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object. + * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead. + * + * @return {this} This Game Object instance. + */ + setPostPipeline: function (pipelines, pipelineData, copyData) + { + var renderer = this.scene.sys.renderer; + + if (!renderer) + { + return this; + } + + var pipelineManager = renderer.pipelines; + + if (pipelineManager) + { + if (!Array.isArray(pipelines)) + { + pipelines = [ pipelines ]; + } + + for (var i = 0; i < pipelines.length; i++) + { + var instance = pipelineManager.getPostPipeline(pipelines[i], this); + + if (instance) { - str += '+'; + this.postPipelines.push(instance); } } - str += '\n'; + if (pipelineData) + { + this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData; + } } - } + this.hasPostPipeline = (this.postPipelines.length > 0); - return str; -}; + return this; + }, -module.exports = MatrixToString; - - -/***/ }), - -/***/ 582: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 6063: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + /** + * Adds an entry to the `pipelineData` object belonging to this Game Object. + * + * If the 'key' already exists, its value is updated. If it doesn't exist, it is created. + * + * If `value` is undefined, and `key` exists, `key` is removed from the data object. + * + * Both the pipeline and post pipelines share the pipeline data object together. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipelineData + * @webglOnly + * @since 3.50.0 + * + * @param {string} key - The key of the pipeline data to set, update, or delete. + * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object. + * + * @return {this} This Game Object instance. + */ + setPipelineData: function (key, value) { - matrix[i].reverse(); - } + var data = this.pipelineData; - return matrix; -}; - -module.exports = ReverseRows; - - -/***/ }), - -/***/ 8321: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix 180 degrees. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 2597: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix to the left (or 90 degrees) - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 7116: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CheckMatrix = __webpack_require__(1816); -var TransposeMatrix = __webpack_require__(4780); - -/** - * 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/}. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + if (value === undefined) { - matrix[i].reverse(); - } - - matrix.reverse(); - } - - return matrix; -}; - -module.exports = RotateMatrix; - - -/***/ }), - -/***/ 6285: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateMatrix = __webpack_require__(7116); - -/** - * Rotates the array matrix to the left (or -90 degrees) - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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; - - -/***/ }), - -/***/ 7711: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var RotateLeft = __webpack_require__(1021); -var RotateRight = __webpack_require__(4027); - -/** - * Translates the given Array Matrix by shifting each column and row the - * amount specified. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.Translate - * @since 3.50.0 - * - * @generic T - * @genericUse {T[][]} - [matrix,$return] - * - * @param {T[][]} [matrix] - The array matrix to translate. - * @param {number} [x=0] - The amount to horizontally translate the matrix by. - * @param {number} [y=0] - The amount to vertically translate the matrix by. - * - * @return {T[][]} The translated matrix. - */ -var TranslateMatrix = function (matrix, x, y) -{ - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - - // Vertical translation - - if (y !== 0) - { - if (y < 0) - { - // Shift Up - RotateLeft(matrix, Math.abs(y)); + delete data[key]; } else { - // Shift Down - RotateRight(matrix, y); + data[key] = value; } - } - // Horizontal translation + return this; + }, - if (x !== 0) + /** + * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it. + * + * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class. + * + * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array. + */ + getPostPipeline: function (pipeline) { - for (var i = 0; i < matrix.length; i++) - { - var row = matrix[i]; + var isString = (typeof pipeline === 'string'); - if (x < 0) + var pipelines = this.postPipelines; + + var results = []; + + for (var i = 0; i < pipelines.length; i++) + { + var instance = pipelines[i]; + + if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline)) { - RotateLeft(row, Math.abs(x)); - } - else - { - RotateRight(row, x); + results.push(instance); } } - } - return matrix; -}; + return (results.length === 1) ? results[0] : results; + }, -module.exports = TranslateMatrix; - - -/***/ }), - -/***/ 4780: -/***/ ((module) => { - -/** - * @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. - * - * 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. This is an example matrix: - * - * ``` - * [ - * [ 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.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++) + /** + * 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 + * + * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines? + * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? + * + * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`. + */ + resetPipeline: function (resetPostPipelines, resetData) { - result[i] = new Array(sourceRowCount); + if (resetPostPipelines === undefined) { resetPostPipelines = false; } + if (resetData === undefined) { resetData = false; } - for (var j = sourceRowCount - 1; j > -1; j--) + this.pipeline = this.defaultPipeline; + + if (resetPostPipelines) { - result[i][j] = array[j][i]; + this.postPipelines = []; + this.hasPostPipeline = false; } + + if (resetData) + { + this.pipelineData = {}; + } + + return (this.pipeline !== null); + }, + + /** + * Resets the WebGL Post Pipelines of this Game Object. It does this by calling + * the `destroy` method on each post pipeline and then clearing the local array. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object? + */ + resetPostPipeline: function (resetData) + { + if (resetData === undefined) { resetData = false; } + + var pipelines = this.postPipelines; + + for (var i = 0; i < pipelines.length; i++) + { + pipelines[i].destroy(); + } + + this.postPipelines = []; + this.hasPostPipeline = false; + + if (resetData) + { + this.pipelineData = {}; + } + }, + + /** + * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them. + * + * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead. + * + * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline + * @webglOnly + * @since 3.50.0 + * + * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class. + * + * @return {this} This Game Object. + */ + removePostPipeline: function (pipeline) + { + var pipelines = this.postPipelines; + + for (var i = pipelines.length - 1; i >= 0; i--) + { + var instance = pipelines[i]; + + if ( + (typeof pipeline === 'string' && instance.name === pipeline) || + (typeof pipeline !== 'string' && instance instanceof pipeline)) + { + instance.destroy(); + + SpliceOne(pipelines, i); + } + } + + this.hasPostPipeline = (this.postPipelines.length > 0); + + return this; + }, + + /** + * 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 result; }; -module.exports = TransposeMatrix; +module.exports = Pipeline; /***/ }), - -/***/ 1237: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 336 */ +/***/ (function(module, exports) { /** * @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__(1816), - MatrixToString: __webpack_require__(6655), - ReverseColumns: __webpack_require__(582), - ReverseRows: __webpack_require__(6063), - Rotate180: __webpack_require__(8321), - RotateLeft: __webpack_require__(2597), - RotateMatrix: __webpack_require__(7116), - RotateRight: __webpack_require__(6285), - Translate: __webpack_require__(7711), - TransposeMatrix: __webpack_require__(4780) - -}; - - -/***/ }), - -/***/ 3911: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45741,512 +47659,1180 @@ module.exports = DeepCopy; /***/ }), - -/***/ 1030: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 337 */ +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsPlainObject = __webpack_require__(2482); - -// @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/ + * Provides methods used for getting and setting the size of a Game Object. * - * @function Phaser.Utils.Objects.Extend + * @namespace Phaser.GameObjects.Components.Size * @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] || {}; +var Size = { - // skip the boolean and the target - i = 2; - } + /** + * 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, - // extend Phaser if only one argument is passed - if (length === i) - { - target = this; - --i; - } + /** + * 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, - for (; i < length; i++) - { - // Only deal with non-null/undefined values - if ((options = arguments[i]) != null) + /** + * 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 () { - // Extend the base object - for (name in options) - { - src = target[name]; - copy = options[name]; + return Math.abs(this.scaleX * this.frame.realWidth); + }, - // 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; - } - } + 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; + + var input = this.input; + + if (input && !input.customHitArea) + { + input.hitArea.width = this.width; + input.hitArea.height = this.height; + } + + 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; } - // Return the modified object - return target; }; -module.exports = Extend; +module.exports = Size; /***/ }), - -/***/ 8361: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(4675); -var GetValue = __webpack_require__(5851); +var Frame = __webpack_require__(68); + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 /** - * Retrieves a value from an object. Allows for more advanced selection options, including: + * Provides methods used for getting and setting the texture of a Game Object. * - * 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 + * @namespace Phaser.GameObjects.Components.Texture * @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 GetAdvancedValue = function (source, key, defaultValue) -{ - var value = GetValue(source, key, null); - if (value === null) +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|number)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) { - return defaultValue; - } - else if (Array.isArray(value)) + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. + * @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) { - return MATH.RND.pick(value); - } - else if (typeof value === 'object') - { - if (value.hasOwnProperty('randInt')) + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + if (frame instanceof Frame) { - return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]); + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; } - else if (value.hasOwnProperty('randFloat')) + else { - return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]); + this.frame = this.texture.get(frame); } - } - else if (typeof value === 'function') - { - return value(key); - } - return value; -}; - -module.exports = GetAdvancedValue; - - -/***/ }), - -/***/ 4597: -/***/ ((module) => { - -/** - * @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; - - -/***/ }), - -/***/ 5851: -/***/ ((module) => { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. - * - * The key is a string, which can be split based on the use of the period character. - * - * For example: - * - * ```javascript - * const source = { - * lives: 3, - * render: { - * screen: { - * width: 1024 - * } - * } - * } - * - * const lives = GetValue(source, 'lives', 1); - * const width = GetValue(source, 'render.screen.width', 800); - * const height = GetValue(source, 'render.screen.height', 600); - * ``` - * - * In the code above, `lives` will be 3 because it's defined at the top level of `source`. - * The `width` value will be 1024 because it can be found inside the `render.screen` object. - * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. - * - * @function Phaser.Utils.Objects.GetValue - * @since 3.0.0 - * - * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. - * @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. - * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. - * - * @return {*} The value of the requested key. - */ -var GetValue = function (source, key, defaultValue, altSource) -{ - if ((!source && !altSource) || typeof source === 'number') - { - return defaultValue; - } - else if (source && source.hasOwnProperty(key)) - { - return source[key]; - } - else if (altSource && altSource.hasOwnProperty(key)) - { - return altSource[key]; - } - else if (key.indexOf('.') !== -1) - { - var keys = key.split('.'); - var parentA = source; - var parentB = altSource; - var value = defaultValue; - - // Use for loop here so we can break early - for (var i = 0; i < keys.length; i++) + if (!this.frame.cutWidth || !this.frame.cutHeight) { - if (parentA && parentA.hasOwnProperty(keys[i])) - { - // Yes parentA has a key property, let's carry on down - value = parentA[keys[i]]; + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } - parentA = parentA[keys[i]]; - } - else if (parentB && parentB.hasOwnProperty(keys[i])) - { - // Yes parentB has a key property, let's carry on down - value = parentB[keys[i]]; + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } - parentB = parentB[keys[i]]; + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); } else { - // Can't go any further, so reset to default - value = defaultValue; - break; + this.updateDisplayOrigin(); } } - return value; + return this; + } + +}; + +module.exports = Texture; + + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Frame = __webpack_require__(68); + +// 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|number)} [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. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. + * @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; } + + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + 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; + + +/***/ }), +/* 340 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * 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 = { + + /** + * The tint value being applied to the top-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintTopLeft: 0xffffff, + + /** + * The tint value being applied to the top-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintTopRight: 0xffffff, + + /** + * The tint value being applied to the bottom-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintBottomLeft: 0xffffff, + + /** + * The tint value being applied to the bottom-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {number} + * @default 0xffffff + * @since 3.0.0 + */ + tintBottomRight: 0xffffff, + + /** + * The tint fill mode. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * + * @name Phaser.GameObjects.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); + + 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {number} [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.tintTopLeft = topLeft; + this.tintTopRight = topRight; + this.tintBottomLeft = bottomLeft; + this.tintBottomRight = bottomRight; + + 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {number} [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 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 {number} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied? + * + * It checks to see if the 4 tint properties are set to the value 0xffffff + * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + var white = 0xffffff; + + return ( + this.tintFill || + this.tintTopLeft !== white || + this.tintTopRight !== white || + this.tintBottomLeft !== white || + this.tintBottomRight !== white + ); + } + + } + +}; + +module.exports = Tint; + + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var NOOP = __webpack_require__(2); +var renderWebGL = NOOP; +var renderCanvas = NOOP; + +if (true) +{ + renderWebGL = __webpack_require__(342); +} + +if (false) +{} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 342 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 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 {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, camera, parentMatrix) +{ + camera.addToRenderList(container); + + var children = container.list; + var childCount = children.length; + + if (childCount === 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 { - return defaultValue; + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); } + + renderer.pipelines.preBatch(container); + + 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; + + 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) ? (children[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, camera, transformMatrix, container); + + // Restore original values + + child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); + + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + + if (mask) + { + mask.postRenderWebGL(renderer, camera); + } + + renderer.newType = false; + } + + renderer.pipelines.postBatch(container); }; -module.exports = GetValue; +module.exports = ContainerWebGLRenderer; /***/ }), - -/***/ 2482: -/***/ ((module) => { +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(29); + +/** + * 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; + + +/***/ }), +/* 344 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(2); +var renderCanvas = __webpack_require__(2); + +if (true) +{ + renderWebGL = __webpack_require__(345); +} + +if (false) +{} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 345 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2022 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]. + * 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. * - * @function Phaser.Utils.Objects.IsPlainObject - * @since 3.0.0 + * @method SpineContainerWebGLRenderer#renderWebGL + * @since 3.50.0 + * @private * - * @param {object} obj - The object to inspect. - * - * @return {boolean} `true` if the object is plain, otherwise `false`. + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {SpineContainer} container - The Game Object being rendered in this call. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var IsPlainObject = function (obj) +var SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix) { - // 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; - } + var plugin = container.plugin; + var sceneRenderer = plugin.sceneRenderer; + var children = container.list; - // 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 (children.length === 0) { - if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) + if (sceneRenderer.batcher.isDrawing && renderer.finalType) { - return false; + sceneRenderer.end(); + + renderer.pipelines.rebind(); } - } - catch (e) - { - return false; + + return; } - // 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; -}; + camera.addToRenderList(container); -module.exports = IsPlainObject; + var transformMatrix = container.localTransform; - -/***/ }), - -/***/ 7222: -/***/ ((module) => { - -/** - * @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 {number} [len=0] - The number of characters to be added. - * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). - * @param {number} [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) + if (parentMatrix) { - switch (dir) + 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); + } + + if (renderer.newType) + { + // flush + clear if this is a new type + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + var rendererNextType = renderer.nextTypeMatch; + + // Force these to avoid batch flushing during SpineGameObject.renderWebGL + renderer.nextTypeMatch = true; + renderer.newType = false; + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (child.willRender(camera, container)) { - case 1: - str = new Array(len + 1 - str.length).join(pad) + str; - break; + var mask = child.mask; - 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; + if (mask) + { + sceneRenderer.end(); - default: - str = str + new Array(len + 1 - str.length).join(pad); - break; + renderer.pipelines.rebind(); + + mask.preRenderWebGL(renderer, child, camera); + + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } + + child.renderWebGL(renderer, child, camera, transformMatrix, container); + + if (mask) + { + sceneRenderer.end(); + + renderer.pipelines.rebind(); + + mask.postRenderWebGL(renderer, camera); + + renderer.pipelines.clear(); + + sceneRenderer.begin(); + } } } - return str; + renderer.nextTypeMatch = rendererNextType; + + if (!rendererNextType) + { + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch + sceneRenderer.end(); + + // And rebind the previous pipeline + renderer.pipelines.rebind(); + } }; -module.exports = Pad; +module.exports = SpineContainerWebGLRenderer; /***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __webpack_require__(4513); -/******/ window.SpinePlugin = __webpack_exports__; -/******/ -/******/ })() -; \ No newline at end of file +/******/ ]); \ No newline at end of file diff --git a/plugins/spine/dist/SpineWebGLPlugin.min.js b/plugins/spine/dist/SpineWebGLPlugin.min.js index d00c0c6af..185c304cc 100644 --- a/plugins/spine/dist/SpineWebGLPlugin.min.js +++ b/plugins/spine/dist/SpineWebGLPlugin.min.js @@ -1 +1,1266 @@ -(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(t,e,n,s,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var o=new r(n,s||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,a=new Array(s);r{(function(){var e,i,n,r=this&&this.__extends||(e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},e(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});!function(t){var e,i,n,s=function(){function t(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;n0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},t.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},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"}(i=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"}(n=t.TimelineType||(t.TimelineType={}));var a=function(){function e(i){if(i<=0)throw new Error("frameCount must be > 0: "+i);this.curves=t.Utils.newFloatArray((i-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 i=t*e.BEZIER_SIZE;if(i==this.curves.length)return e.LINEAR;var n=this.curves[i];return n==e.LINEAR?e.LINEAR:n==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,i,n,r,s){var a=.03*(2*-i+r),o=.03*(2*-n+s),h=.006*(3*(i-r)+1),l=.006*(3*(n-s)+1),u=2*a+h,c=2*o+l,f=.3*i+a+.16666667*h,d=.3*n+o+.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=n){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)*(n-u)/(o-u)}var f=r[s-1];return f+(1-f)*(n-o)/(1-o)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=a;var o=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e<<1),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=i},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,a.ENTRIES),v=u[p+a.PREV_ROTATION],g=u[p],m=this.getCurvePercent((p>>1)-1,1-(n-g)/(u[p+a.PREV_TIME]-g)),M=u[p+a.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)))*o;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)))*o}}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_ROTATION=-1,a.ROTATION=1,a}(a);t.RotateTimeline=o;var h=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=i,this.frames[t+a.Y]=n},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,a.ENTRIES);f=u[p+a.PREV_X],d=u[p+a.PREV_Y];var v=u[p],g=this.getCurvePercent(p/a.ENTRIES-1,1-(n-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.X]-f)*g,d+=(u[p+a.Y]-d)*g}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(n.scale<<24)+this.boneIndex},o.prototype.apply=function(n,r,a,h,l,u,c){var f=this.frames,d=n.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 g=s.binarySearch(f,a,o.ENTRIES);p=f[g+o.PREV_X],v=f[g+o.PREV_Y];var m=f[g],M=this.getCurvePercent(g/o.ENTRIES-1,1-(a-m)/(f[g+o.PREV_TIME]-m));p=(p+(f[g+o.X]-p)*M)*d.data.scaleX,v=(v+(f[g+o.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==i.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}}}},o}(h);t.ScaleTimeline=l;var u=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,r,a,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_X],d=u[u.length+i.PREV_Y];else{var p=s.binarySearch(u,r,i.ENTRIES);f=u[p+i.PREV_X],d=u[p+i.PREV_Y];var v=u[p],g=this.getCurvePercent(p/i.ENTRIES-1,1-(r-v)/(u[p+i.PREV_TIME]-v));f+=(u[p+i.X]-f)*g,d+=(u[p+i.Y]-d)*g}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}}},i}(h);t.ShearTimeline=u;var c=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,this.frames[t+a.B]=r,this.frames[t+a.A]=s},a.prototype.apply=function(t,i,n,r,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=c[c.length-a.ENTRIES]){var M=c.length;p=c[M+a.PREV_R],v=c[M+a.PREV_G],g=c[M+a.PREV_B],m=c[M+a.PREV_A]}else{var x=s.binarySearch(c,n,a.ENTRIES);p=c[x+a.PREV_R],v=c[x+a.PREV_G],g=c[x+a.PREV_B],m=c[x+a.PREV_A];var y=c[x],w=this.getCurvePercent(x/a.ENTRIES-1,1-(n-y)/(c[x+a.PREV_TIME]-y));p+=(c[x+a.R]-p)*w,v+=(c[x+a.G]-v)*w,g+=(c[x+a.B]-g)*w,m+=(c[x+a.A]-m)*w}if(1==o)u.color.set(p,v,g,m);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*o,(v-f.g)*o,(g-f.b)*o,(m-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(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s,o,h,l){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,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,i,n,r,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=c[c.length-a.ENTRIES]){var T=c.length;g=c[T+a.PREV_R],m=c[T+a.PREV_G],M=c[T+a.PREV_B],x=c[T+a.PREV_A],y=c[T+a.PREV_R2],w=c[T+a.PREV_G2],E=c[T+a.PREV_B2]}else{var b=s.binarySearch(c,n,a.ENTRIES);g=c[b+a.PREV_R],m=c[b+a.PREV_G],M=c[b+a.PREV_B],x=c[b+a.PREV_A],y=c[b+a.PREV_R2],w=c[b+a.PREV_G2],E=c[b+a.PREV_B2];var A=c[b],R=this.getCurvePercent(b/a.ENTRIES-1,1-(n-A)/(c[b+a.PREV_TIME]-A));g+=(c[b+a.R]-g)*R,m+=(c[b+a.G]-m)*R,M+=(c[b+a.B]-M)*R,x+=(c[b+a.A]-x)*R,y+=(c[b+a.R2]-y)*R,w+=(c[b+a.G2]-w)*R,E+=(c[b+a.B2]-E)*R}if(1==o)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)*o,(m-f.g)*o,(M-f.b)*o,(x-f.a)*o),d.add((y-d.r)*o,(w-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(n.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},r.prototype.apply=function(t,n,r,a,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=i.mixOut){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else h==e.setup&&this.setAttachment(t,u,u.data.attachmentName)},r.prototype.setAttachment=function(t,e,i){e.attachment=null==i?null:t.getAttachment(this.slotIndex,i)},r}();t.AttachmentTimeline=d;var p=null,v=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e),n.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},a.prototype.apply=function(i,n,r,a,o,h,l){var u=i.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==o)if(h==e.add)if(null==(g=c).bones){M=g.vertices;for(var E=0;Ei)this.apply(t,e,Number.MAX_VALUE,n,r,a,o),e=-1;else if(e>=h[l-1])return;if(!(i0&&h[u-1]==c;)u--;for(;u=h[u];u++)n.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 n.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},r.prototype.apply=function(n,r,a,o,h,l,u){var c=n.drawOrder,f=n.slots;if(u!=i.mixOut){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 g=0,m=v.length;g=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==i.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==i.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],g=c[d],m=this.getCurvePercent(d/o.ENTRIES-1,1-(r-g)/(c[d+o.PREV_TIME]-g));l==e.setup?(f.mix=f.data.mix+(p+(c[d+o.MIX]-p)*m-f.data.mix)*h,f.softness=f.data.softness+(v+(c[d+o.SOFTNESS]-v)*m-f.data.softness)*h,u==i.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)*m-f.mix)*h,f.softness+=(v+(c[d+o.SOFTNESS]-v)*m-f.softness)*h,u==i.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=M;var x=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n,this.frames[t+a.SCALE]=r,this.frames[t+a.SHEAR]=s},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(n=u[u.length-a.ENTRIES]){var m=u.length;d=u[m+a.PREV_ROTATE],p=u[m+a.PREV_TRANSLATE],v=u[m+a.PREV_SCALE],g=u[m+a.PREV_SHEAR]}else{var M=s.binarySearch(u,n,a.ENTRIES);d=u[M+a.PREV_ROTATE],p=u[M+a.PREV_TRANSLATE],v=u[M+a.PREV_SCALE],g=u[M+a.PREV_SHEAR];var x=u[M],y=this.getCurvePercent(M/a.ENTRIES-1,1-(n-x)/(u[M+a.PREV_TIME]-x));d+=(u[M+a.ROTATE]-d)*y,p+=(u[M+a.TRANSLATE]-p)*y,v+=(u[M+a.SCALE]-v)*y,g+=(u[M+a.SHEAR]-g)*y}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+(g-f.shearMix)*o}else c.rotateMix+=(d-c.rotateMix)*o,c.translateMix+=(p-c.translateMix)*o,c.scaleMix+=(v-c.scaleMix)*o,c.shearMix+=(g-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 y=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=i},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_VALUE];else{var d=s.binarySearch(u,n,a.ENTRIES);f=u[d+a.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/a.ENTRIES-1,1-(n-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=y;var w=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,r,a,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_VALUE];else{var d=s.binarySearch(u,r,i.ENTRIES);f=u[d+i.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(u[d+i.PREV_TIME]-p));f+=(u[d+i.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o}},i}(y);t.PathConstraintSpacingTimeline=w;var E=function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return r(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n},a.prototype.apply=function(t,i,n,r,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=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,n,a.ENTRIES);f=u[p+a.PREV_ROTATE],d=u[p+a.PREV_TRANSLATE];var v=u[p],g=this.getCurvePercent(p/a.ENTRIES-1,1-(n-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.ROTATE]-f)*g,d+=(u[p+a.TRANSLATE]-d)*g}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}(n||(n={})),function(t){var e=function(){function e(e){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 t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool((function(){return new i})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i0){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(i,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=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,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 i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=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)},e.prototype.apply=function(i){if(null==i)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=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,i,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.applyAttachmentTimeline=function(i,n,r,s,a){var o=n.slots[i.slotIndex];if(o.bone.active){var h,l=i.frames;if(r=l[l.length-1]?l.length-1:t.Animation.binarySearch(l,r)-1,this.setAttachment(n,o,i.attachmentNames[h],a);o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+e.SETUP)}},e.prototype.setAttachment=function(t,i,n,r){i.attachment=null==n?null:t.getAttachment(i.data.index,n),r&&(i.attachmentState=this.unkeyedState+e.CURRENT)},e.prototype.applyRotateTimeline=function(e,i,n,r,s,a,o,h){if(h&&(a[o]=0),1!=r){var l=e,u=l.frames,c=i.bones[l.boneIndex];if(c.active){var f=0,d=0;if(n=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,n,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],g=u[p],m=l.getCurvePercent((p>>1)-1,1-(n-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=a[o];else{var y=0,w=0;h?(y=0,w=x):(y=a[o],w=a[o+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)),a[o]=M}a[o+1]=x,f+=M*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(i,0,n,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,a=this.events,o=0,h=a.length;on||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=n&&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()}}},e.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,n.mixingTo=e,e.mixTime=0,null!=n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},e.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!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,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},e.prototype.addAnimationWith=function(t,e,i,n){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,i,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,n<=0){var a=r.animationEnd-r.animationStart;0!=a?(r.loop?n+=a*(1+(r.trackTime/a|0)):n+=Math.max(a,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime}return s.delay=n,s},e.prototype.setEmptyAnimation=function(t,i){var n=this.setAnimationWith(t,e.emptyAnimation,!1);return n.mixDuration=i,n.trackEnd=i,n},e.prototype.addEmptyAnimation=function(t,i,n){n<=0&&(n-=i);var r=this.addAnimationWith(t,e.emptyAnimation,!1,n);return r.mixDuration=i,r.trackEnd=i,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i0){a[l]=e.HOLD_MIX,o[l]=f;continue t}break}a[l]=e.HOLD_FIRST}else a[l]=e.SUBSEQUENT}},e.prototype.getCurrent=function(t){return t>=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_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,e}();t.AnimationState=e;var i=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=i;var n,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(n.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(n.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(n.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(n.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,i=0;i=0?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,(function(a){var o={count:0},h=new Array;try{new t.TextureAtlas(a,(function(e){h.push(""==s?e:s+"/"+e);var i=document.createElement("img");return i.width=16,i.height=16,new t.FakeTexture(i)}))}catch(t){var l=t;return r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(l.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(l.message)),r.toLoad--,void r.loaded++}for(var u=function(l){var u=!1;r.loadTexture(l,(function(l,c){if(o.count++,o.count==h.length)if(u)r.errors[e]="Couldn't load texture atlas page ".concat(l,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(l," of atlas ").concat(e)),r.toLoad--,r.loaded++;else try{var f=new t.TextureAtlas(a,(function(t){return r.get(""==s?t:s+"/"+t)}));r.assets[e]=f,i&&i(e,f),r.toLoad--,r.loaded++}catch(t){var d=t;r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(d.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(d.message)),r.toLoad--,r.loaded++}}),(function(t,i){u=!0,o.count++,o.count==h.length&&(r.errors[e]="Couldn't load texture atlas page ".concat(t,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(t," of atlas ").concat(e)),r.toLoad--,r.loaded++)}))},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(n||(n={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (region attachment: "+i+")");r.renderObject=r;var s=new t.RegionAttachment(i);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+i+")");r.renderObject=r;var s=new t.MeshAttachment(i);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,i){return new t.BoundingBoxAttachment(i)},e.prototype.newPathAttachment=function(e,i){return new t.PathAttachment(i)},e.prototype.newPointAttachment=function(e,i){return new t.PointAttachment(i)},e.prototype.newClippingAttachment=function(e,i){return new t.ClippingAttachment(i)},e}();t.AtlasAttachmentLoader=e}(n||(n={})),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={}))}(n||(n={})),function(t){var e=function(){function e(t,e,i){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=i,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,i,n,r,s,a,o){this.ax=e,this.ay=i,this.arotation=n,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=n+90+o,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(n+a)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(n+a)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=i*f+l.y)}var d=h.a,p=h.b,v=h.c,g=h.d;switch(this.worldX=d*e+p*i+h.worldX,this.worldY=v*e+g*i+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=n+90+o;var m=t.MathUtils.cosDeg(n+a)*r,M=t.MathUtils.cosDeg(u)*s,x=t.MathUtils.sinDeg(n+a)*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=n+90+o;this.a=t.MathUtils.cosDeg(n+a)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(n+a)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var w=0;(b=d*d+v*v)>1e-4?(b=Math.abs(d*g-p*v)/b,d/=this.skeleton.scaleX,p=(v/=this.skeleton.scaleY)*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=n+a-w,T=n+o-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(n),R=t.MathUtils.sinDeg(n),S=(d*A+p*R)/this.skeleton.scaleX,C=(v*A+g*R)/this.skeleton.scaleY;(b=Math.sqrt(S*S+C*C))>1e-5&&(b=1/b),S*=b,C*=b,b=Math.sqrt(S*S+C*C),this.data.transformMode==t.TransformMode.NoScale&&d*g-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(b=-b);var I=Math.PI/2+Math.atan2(C,S),P=Math.cos(I)*b,L=Math.sin(I)*b;m=t.MathUtils.cosDeg(a)*r,M=t.MathUtils.cosDeg(90+o)*s,x=t.MathUtils.sinDeg(a)*r,y=t.MathUtils.sinDeg(90+o)*s;this.a=S*m+P*x,this.b=S*M+P*y,this.c=C*m+L*x,this.d=C*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 i=e.a,n=e.b,r=e.c,s=e.d,a=1/(i*s-n*r),o=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=o*s*a-h*n*a,this.ay=h*i*a-o*r*a;var l=a*s,u=a*i,c=a*n,f=a*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,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*i*s,t.y=o*e*s-a*n*s,t},e.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(this.a*i-this.c*n,this.d*n-this.b*i)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(n*this.c+i*this.d,n*this.a+i*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var i=this.a,n=this.b,r=this.c,s=this.d,a=t.MathUtils.cosDeg(e),o=t.MathUtils.sinDeg(e);this.a=a*i-o*r,this.b=a*n-o*s,this.c=o*i+a*r,this.d=o*n+a*s,this.appliedValid=!1},e}();t.Bone=e}(n||(n={})),function(t){var e,i=function(i,n,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,i<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=i,this.name=n,this.parent=r};t.BoneData=i,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={}))}(n||(n={})),function(t){var e=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i};t.ConstraintData=e}(n||(n={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(n||(n={})),function(t){var e=function(t){this.name=t};t.EventData=e}(n||(n={})),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 i=0;i180?d-=360:d<-180&&(d+=360);var E=e.ascaleX,T=e.ascaleY;if(r||s){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=i-e.worldX,v=n-e.worldY}var b=e.data.length*E,A=Math.sqrt(p*p+v*v);if(r&&Ab&&b>1e-4)E*=g=(A/b-1)*o+1,a&&(T*=g)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*o,E,T,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,i,n,r,s,a,o,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),i.appliedValid||i.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=i.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=i.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=i.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 C,I,P=1/(E*(A=S.d)-T*b),L=y-S.worldX,_=w-S.worldY,O=(L*A-_*T)*P-l,k=(_*E-L*b)*P-u,F=Math.sqrt(O*O+k*k),D=i.data.length*p;if(F<1e-4)return this.apply1(e,n,r,!1,a,!1,h),void i.updateWorldTransformWith(M,x,0,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY);var V=((L=n-S.worldX)*A-(_=r-S.worldY)*T)*P-l,N=(_*E-L*b)*P-u,Y=V*V+N*N;if(0!=o){o*=c*(p+1)/2;var B=Math.sqrt(Y),X=B-F-D*c+o;if(X>0){var U=Math.min(1,X/(2*o))-1;Y=(V-=(U=(X-o*(1-U*U))/B)*V)*V+(N-=U*N)*N}}t:if(R){var z=(Y-F*F-(D*=c)*D)/(2*F*D);z<-1?z=-1:z>1&&(z=1,a&&(f*=(Math.sqrt(Y)/(F+D)-1)*h+1)),I=Math.acos(z)*s,E=F+D*z,T=D*Math.sin(I),C=Math.atan2(N*E-V*T,V*E+N*T)}else{var W=(E=c*D)*E,G=(T=d*D)*T,H=Math.atan2(N,V),q=-2*G*F,j=G-W;if((A=q*q-4*j*(b=G*F*F+W*Y-W*G))>=0){var Z=Math.sqrt(A);q<0&&(Z=-Z);var K=(Z=-(q+Z)/2)/j,Q=b/Z,J=Math.abs(K)=-1&&b<=1&&(b=Math.acos(b),(A=(L=E*Math.cos(b)+F)*L+(_=T*Math.sin(b))*_)st&&(nt=b,st=A,rt=L,at=_)),Y<=(et+st)/2?(C=H-Math.atan2(it*s,tt),I=$*s):(C=H-Math.atan2(at*s,rt),I=nt*s)}var ot=Math.atan2(x,M)*m,ht=e.arotation;(C=(C-ot)*t.MathUtils.radDeg+v-ht)>180?C-=360:C<-180&&(C+=360),e.updateWorldTransformWith(l,u,ht+C*h,f,e.ascaleY,0,0),ht=i.arotation,(I=((I+ot)*t.MathUtils.radDeg-i.ashearX)*m+g-ht)>180?I-=360:I<-180&&(I+=360),i.updateWorldTransformWith(M,x,ht+I*h,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY)}else i.updateWorldTransform()},e}();t.IkConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.bendDirection=1,i.compress=!1,i.stretch=!1,i.uniform=!1,i.mix=1,i.softness=0,i}return r(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(n||(n={})),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 i=0,n=t.bones.length;i0;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,g=this.spacing;if(u||!o){u&&(v=t.Utils.setArraySize(this.lengths,c));for(var m=a.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*=n,X=Math.cos(B),U=Math.sin(B),L.a=X*D-U*N,L.b=X*V-U*Y,L.c=U*D+X*N,L.d=U*V+X*Y}L.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(i,n,r,s,a){var o=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*n+2),c=null,f=i.closed,d=i.worldVerticesLength,p=d/6,v=e.NONE;if(!i.constantSpeed){var g=i.lengths,m=g[p-=f?1:2];if(s&&(h*=m),a)for(var M=1;Mm){v!=e.AFTER&&(v=e.AFTER,i.computeWorldVertices(o,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?(i.computeWorldVertices(o,d-4,4,c,0,2),i.computeWorldVertices(o,0,4,c,4,2)):i.computeWorldVertices(o,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==G)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(o,2,d-4,c,0,2),i.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),i.computeWorldVertices(o,2,d,c,0,2));for(var T=t.Utils.setArraySize(this.curves,p),b=0,A=c[0],R=c[1],S=0,C=0,I=0,P=0,L=0,_=0,O=0,k=0,F=0,D=0,V=0,N=0,Y=0,B=0,X=(M=0,2);Mb){this.addAfterPosition(w-b,c,d-4,u,x);continue}}for(;;y++){var H=T[y];if(!(w>H)){if(0==y)w/=H;else w=(w-(Z=T[y-1]))/(H-Z);break}}if(y!=v){v=y;var q=6*y;for(A=c[q],R=c[q+1],S=c[q+2],C=c[q+3],I=c[q+4],P=c[q+5],V=2*(O=.03*(A-2*S+I))+(F=.006*(3*(S-I)-A+(L=c[q+6]))),N=2*(k=.03*(R-2*C+P))+(D=.006*(3*(C-P)-R+(_=c[q+7]))),Y=.3*(S-A)+O+.16666667*F,B=.3*(C-R)+k+.16666667*D,z=Math.sqrt(Y*Y+B*B),U[0]=z,q=1;q<8;q++)Y+=V,B+=N,V+=F,N+=D,z+=Math.sqrt(Y*Y+B*B),U[q]=z;Y+=V,B+=N,z+=Math.sqrt(Y*Y+B*B),U[8]=z,Y+=V+F,B+=N+D,z+=Math.sqrt(Y*Y+B*B),U[9]=z,W=0}for(w*=z;;W++){var j=U[W];if(!(w>j)){var Z;if(0==W)w/=j;else w=W+(w-(Z=U[W-1]))/(j-Z);break}}this.addCurvePosition(.1*w,A,R,S,C,I,P,L,_,u,x,r||M>0&&0==G)}return u},e.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],a=e[i+1],o=e[i+2]-s,h=e[i+3]-a,l=Math.atan2(h,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},e.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],a=e[i+3],o=s-e[i],h=a-e[i+1],l=Math.atan2(h,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},e.prototype.addCurvePosition=function(t,e,i,n,r,s,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,n-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+n*x+s*y+o*d,E=i*g+r*x+a*y+h*d;l[u]=w,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(E-(i*v+r*m*2+a*f),w-(e*v+n*m*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i}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={}))}(n||(n={})),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}(),i=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,i,n){var r=this.clientAssets[t];return null==r&&(r=new e(t),this.clientAssets[t]=r),null!==i&&(r.textureLoader=i),r.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},t.prototype.loadText=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadJson=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadTexture=function(t,e,i){var n=this;if(i=this.pathPrefix+i,this.queueAsset(t,e,i))if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(i,{mode:"cors"}).then((function(t){return t.ok||(n.errors[i]="Couldn't load image "+i),t.blob()})).then((function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(t){n.rawAssets[i]=t}))}else{var r=new Image;r.crossOrigin="anonymous",r.onload=function(t){n.rawAssets[i]=r},r.onerror=function(t){n.errors[i]="Couldn't load image ".concat(i)},r.src=i}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts,i=0;i0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=i}(n||(n={})),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 i=0;i1){var s=n[n.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),n[n.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 i=e.target,n=i.data.index,r=i.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var s=0,a=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){y=new t.DrawOrderTimeline(D);var V=r.slots.length;for(u=0;u=0;d--)Y[d]=-1;var B=t.Utils.newArray(V-N,0),X=0,U=0;for(d=0;d=0;d--)-1==Y[d]&&(Y[d]=B[--U]);y.setFrame(u,M,Y)}s.push(y),o=Math.max(o,y.frames[D-1])}var z=i.readInt(!0);if(z>0){for(y=new t.EventTimeline(z),u=0;u>>1^-(1&i)},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="",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},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}(),n=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},r=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(n||(n={})),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,i){if(null==e)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,s=this.polygonPool,a=e.slots,o=a.length;n.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,i,n){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||t>=a&&i>=a||e>=o&&n>=o)return!1;var h=(n-e)/(i-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 i=this.polygons,n=0,r=i.length;n=i||l=i){var u=n[o];u+(i-h)/(l-h)*(n[s]-u)=u&&x<=d||x>=d&&x<=u)&&(x>=e&&x<=n||x>=n&&x<=e)){var y=(l*m-h*v)/M;if((y>=c&&y<=p||y>=p&&y<=c)&&(y>=i&&y<=r||y>=r&&y<=i))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}(n||(n={})),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(i,n){if(null!=this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(i,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,B=t.Utils.setArraySize(u,L+N*p),X=0;X<_;X+=2){var U=Y[X],z=Y[X+1];B[L]=U,B[L+1]=z,B[L+2]=a.r,B[L+3]=a.g,B[L+4]=a.b,B[L+5]=a.a;var W=U-R,G=z-S,H=(O*W+k*G)*V,q=(D*W+F*G)*V,j=1-H-q;B[L+6]=y*H+b*q+C*j,B[L+7]=w*H+A*q+I*j,h&&(B[L+8]=o.r,B[L+9]=o.g,B[L+10]=o.b,B[L+11]=o.a),L+=p}L=c.length;var Z=t.Utils.setArraySize(c,L+3*(N-2));N--;for(X=1;X=2?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(i),u.push(n),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],g=c[d+2],m=c[d+3],M=p-g,x=v-m,y=u,w=u.length-2,E=o.length,T=0;T0;if(M*(A-m)-x*(b-g)>0){if(C){o.push(R),o.push(S);continue}var I=(L=S-A)*(g-p)-(_=R-b)*(m-v);if(Math.abs(I)>1e-6){var P=(_*(v-A)-L*(p-b))/I;o.push(p+(g-p)*P),o.push(v+(m-v)*P)}else o.push(p),o.push(v)}else if(C){var L,_;I=(L=S-A)*(g-p)-(_=R-b)*(m-v);if(Math.abs(I)>1e-6){P=(_*(v-A)-L*(p-b))/I;o.push(p+(g-p)*P),o.push(v+(m-v)*P)}else o.push(p),o.push(v);o.push(R),o.push(S)}l=!0}if(E==o.length)return h.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var O=o;(o=u).length=0,u=O}if(h!=o){h.length=0;d=0;for(var k=o.length-2;d>1;o=0;f--)-1==G[f]&&(G[f]=q[--Z])}y.setFrame(c++,this.getValue(W,"time",0),G)}s.push(y),a=Math.max(a,y.frames[y.getFrameCount()-1])}if(e.events){for(y=new t.EventTimeline(e.events.length),c=0,f=0;f=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},i.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==i)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=e,this.name=i,this.boneData=n};t.SlotData=e}(n||(n={})),function(t){var e,i,n=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 ".concat(t))}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap ".concat(t))}},t}();t.Texture=n,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"}(i=t.TextureWrap||(t.TextureWrap={}));var s=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}(n);t.FakeTexture=a}(n||(n={})),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 i(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 n).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 g=a.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(),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},t}(),n=function(){};t.TextureAtlasPage=n;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(n||(n={})),function(t){var e=function(){function e(e,i){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==i)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 n=0;n0?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!=i){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=(b.x-g.worldX)*i,g.worldY+=(b.y-g.worldY)*i,m=!0}if(n>0){var A=Math.sqrt(g.a*g.a+g.c*g.c),R=Math.sqrt(a*a+h*h);A>1e-5&&(A=(A+(R-A+this.data.offsetScaleX)*n)/A),g.a*=A,g.c*=A,A=Math.sqrt(g.b*g.b+g.d*g.d),R=Math.sqrt(o*o+l*l),A>1e-5&&(A=(A+(R-A+this.data.offsetScaleY)*n)/A),g.b*=A,g.d*=A,m=!0}if(r>0){x=g.b,w=g.d;var S,C=Math.atan2(w,x);(S=Math.atan2(l,o)-Math.atan2(h,a)-(C-Math.atan2(g.c,g.a)))>t.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2),S=C+(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,i=this.translateMix,n=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);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!=i){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=b.x*i,g.worldY+=b.y*i,m=!0}if(n>0){var A=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleX)*n+1;g.a*=A,g.c*=A,A=(Math.sqrt(o*o+l*l)-1+this.data.offsetScaleY)*n+1,g.b*=A,g.d*=A,m=!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=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,i=this.scaleMix,n=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)*i)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*i)/p));var v=h.ashearY;if(0!=n){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*n}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=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;a1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var p=h.ashearY;0!=n&&(p+=(r.ashearY+this.data.offsetShearY)*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.rotateMix=0,i.translateMix=0,i.scaleMix=0,i.shearMix=0,i.offsetRotation=0,i.offsetX=0,i.offsetY=0,i.offsetScaleX=0,i.offsetScaleY=0,i.offsetShearY=0,i.relative=!1,i.local=!1,i}return r(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(n||(n={})),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 i=t,n=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=n-1,u=(s=0,1);;){t:if(!a[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=i[c],v=i[c+1],g=i[f],m=i[f+1],M=i[d],x=i[d+1],y=(u+1)%n;y!=l;y=(y+1)%n)if(a[y]){var w=r[y]<<1,E=i[w],T=i[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(!a[s])break;s--}while(s>0);break}l=s,s=u,u=(u+1)%n}h.push(r[(n+s-1)%n]),h.push(r[s]),h.push(r[(s+1)%n]),r.splice(s,1),a.splice(s,1);var b=(--n+s-1)%n,A=s==n?0:s;a[b]=e.isConcave(b,n,i,r),a[A]=e.isConcave(A,n,i,r)}return 3==n&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,i){var n=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=i.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(g),o.push(m),o.push(M),o.push(x),o.push(y),(a=this.polygonIndicesPool.obtain()).length=0,a.push(f),a.push(d),a.push(p),l=e.winding(v,g,m,M,x,y),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,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,a=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[s],i[s+1],i[a],i[a+1])},e.positiveArea=function(t,e,i,n,r,s){return t*(s-n)+i*(e-s)+r*(n-e)>=0},e.winding=function(t,e,i,n,r,s){var a=i-t,o=n-e;return r*o-s*a+a*e-t*o>=0?1:-1},e}();t.Triangulator=e}(n||(n={})),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 null!=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 i=function(){function t(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}return t.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,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,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,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=i;var n=function(){function t(){}return t.clamp=function(t,e,i){return ti?i: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,i){return t.randomTriangularWith(e,i,.5*(e+i))},t.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},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=n;var s=function(){function t(){}return t.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},t}();t.Interpolation=s;var a=function(t){function e(e){var i=t.call(this)||this;return i.power=2,i.power=e,i}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,i,n,r){for(var s=e,a=n;s=i?e:t.setArraySize(e,i,n)},t.newArray=function(t,e){for(var i=new Array(t),n=0;n0?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 y,w=(y=t.bone).worldX,E=y.worldY,T=y.a,b=y.b,A=y.c,R=y.d,S=e,C=r;Cthis.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,i,n){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,n,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,n),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var i=0,n=0;n0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,i=0;i0&&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 i=function(t,e,i){this.name=t,this.type=e,this.numElements=i};t.VertexAttribute=i;var n=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,2)||this}return r(i,e),i}(i);t.Position2Attribute=n;var s=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,3)||this}return r(i,e),i}(i);t.Position3Attribute=s;var a=function(e){function i(i){return void 0===i&&(i=0),e.call(this,t.Shader.TEXCOORDS+(0==i?"":i),h.Float,2)||this}return r(i,e),i}(i);t.TexCoordAttribute=a;var o=function(e){function i(){return e.call(this,t.Shader.COLOR,h.Float,4)||this}return r(i,e),i}(i);t.ColorAttribute=o;var h,l=function(e){function i(){return e.call(this,t.Shader.COLOR2,h.Float,4)||this}return r(i,e),i}(i);t.Color2Attribute=l,function(t){t[t.Float=0]="Float"}(h=t.VertexAttributeType||(t.VertexAttributeType={}))}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(t){var e=function(){function e(e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,n>10920)throw new Error("Can't have more than 10920 triangles per batch: "+n);this.context=e instanceof t.ManagedWebGLRenderingContext?e:new t.ManagedWebGLRenderingContext(e);var r=i?[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,n,3*n),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 i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},e.prototype.draw=function(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.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;a0||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={}))}(n||(n={})),function(t){!function(e){var i,n=function(){function n(i,n,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=i,this.context=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.twoColorTint=r,this.camera=new e.OrthoCamera(i.width,i.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 n.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},n.prototype.drawSkeleton=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=-1),void 0===n&&(n=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,i,n)},n.prototype.drawSkeletonDebug=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,i)},n.prototype.drawTexture=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var a=this.QUAD,o=0;a[o++]=e,a[o++]=i,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=0,a[o++]=1,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e+n,a[o++]=i,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=1,a[o++]=1,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e+n,a[o++]=i+r,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=1,a[o++]=0,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e,a[o++]=i+r,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=0,a[o++]=0,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),this.batcher.draw(t,a,this.QUAD_TRIANGLES)},n.prototype.drawTextureUV=function(t,e,i,n,r,s,a,o,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++]=i,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=a,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+n,u[c++]=i,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=o,u[c++]=a,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+n,u[c++]=i+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=o,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e,u[c++]=i+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)},n.prototype.drawTextureRotated=function(e,i,n,r,s,a,o,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=i+a,d=n+o,p=-a,v=-o,g=r-a,m=s-o,M=p,x=v,y=p,w=m,E=g,T=m,b=g,A=v,R=0,S=0,C=0,I=0,P=0,L=0,_=0,O=0;if(0!=h){var k=t.MathUtils.cosDeg(h),F=t.MathUtils.sinDeg(h);C=(P=k*E-F*T)+((R=k*M-F*x)-(_=k*y-F*w)),I=(L=F*E+k*T)+((S=F*M+k*x)-(O=F*y+k*w))}else R=M,S=x,_=y,O=w,P=E,L=T,C=b,I=A;R+=f,S+=d,C+=f,I+=d,P+=f,L+=d,_+=f,O+=d;var D=0;c[D++]=R,c[D++]=S,c[D++]=l.r,c[D++]=l.g,c[D++]=l.b,c[D++]=l.a,c[D++]=0,c[D++]=1,this.twoColorTint&&(c[D++]=0,c[D++]=0,c[D++]=0,c[D++]=0),c[D++]=C,c[D++]=I,c[D++]=l.r,c[D++]=l.g,c[D++]=l.b,c[D++]=l.a,c[D++]=1,c[D++]=1,this.twoColorTint&&(c[D++]=0,c[D++]=0,c[D++]=0,c[D++]=0),c[D++]=P,c[D++]=L,c[D++]=l.r,c[D++]=l.g,c[D++]=l.b,c[D++]=l.a,c[D++]=1,c[D++]=0,this.twoColorTint&&(c[D++]=0,c[D++]=0,c[D++]=0,c[D++]=0),c[D++]=_,c[D++]=O,c[D++]=l.r,c[D++]=l.g,c[D++]=l.b,c[D++]=l.a,c[D++]=0,c[D++]=0,this.twoColorTint&&(c[D++]=0,c[D++]=0,c[D++]=0,c[D++]=0),this.batcher.draw(e,c,this.QUAD_TRIANGLES)},n.prototype.drawRegion=function(t,e,i,n,r,s,a){void 0===s&&(s=null),void 0===a&&(a=!1),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var o=this.QUAD,h=0;o[h++]=e,o[h++]=i,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u,o[h++]=t.v2,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e+n,o[h++]=i,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u2,o[h++]=t.v2,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e+n,o[h++]=i+r,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u2,o[h++]=t.v,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e,o[h++]=i+r,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u,o[h++]=t.v,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),this.batcher.draw(t.texture,o,this.QUAD_TRIANGLES)},n.prototype.line=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,i,n,r)},n.prototype.triangle=function(t,e,i,n,r,s,a,o,h,l){void 0===o&&(o=null),void 0===h&&(h=null),void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.triangle(t,e,i,n,r,s,a,o,h,l)},n.prototype.quad=function(t,e,i,n,r,s,a,o,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,i,n,r,s,a,o,h,l,u,c,f)},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,i,n,r,s)},n.prototype.rectLine=function(t,e,i,n,r,s,a){void 0===a&&(a=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,i,n,r,s,a)},n.prototype.polygon=function(t,e,i,n){void 0===n&&(n=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,i,n)},n.prototype.circle=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,i,n,r,s)},n.prototype.curve=function(t,e,i,n,r,s,a,o,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,i,n,r,s,a,o,h,l)},n.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},n.prototype.resize=function(t){var e=this.canvas,n=e.clientWidth,r=e.clientHeight;if(e.width==n&&e.height==r||(e.width=n,e.height=r),this.context.gl.viewport(0,0,e.width,e.height),t===i.Stretch);else if(t===i.Expand)this.camera.setViewport(n,r);else if(t===i.Fit){var s=e.width,a=e.height,o=this.camera.viewportWidth,h=this.camera.viewportHeight,l=h/o10920)throw new Error("Can't have more than 10920 triangles per batch: "+r);this.context=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.mesh=new e.Mesh(n,[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 n.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)},n.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},n.prototype.setColor=function(t){this.color.setFromColor(t)},n.prototype.setColorWith=function(t,e,i,n){this.color.set(t,e,i,n)},n.prototype.point=function(t,e,n){void 0===n&&(n=null),this.check(i.Point,1),null===n&&(n=this.color),this.vertex(t,e,n)},n.prototype.line=function(t,e,n,r,s){void 0===s&&(s=null),this.check(i.Line,2);this.mesh.getVertices(),this.vertexIndex;null===s&&(s=this.color),this.vertex(t,e,s),this.vertex(n,r,s)},n.prototype.triangle=function(t,e,n,r,s,a,o,h,l,u){void 0===h&&(h=null),void 0===l&&(l=null),void 0===u&&(u=null),this.check(t?i.Filled:i.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,n,h),this.vertex(r,s,l),this.vertex(a,o,u)):(this.vertex(e,n,h),this.vertex(r,s,l),this.vertex(r,s,h),this.vertex(a,o,l),this.vertex(a,o,h),this.vertex(e,n,l))},n.prototype.quad=function(t,e,n,r,s,a,o,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?i.Filled:i.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,n,u),this.vertex(r,s,c),this.vertex(a,o,f),this.vertex(a,o,f),this.vertex(h,l,d),this.vertex(e,n,u)):(this.vertex(e,n,u),this.vertex(r,s,c),this.vertex(r,s,c),this.vertex(a,o,f),this.vertex(a,o,f),this.vertex(h,l,d),this.vertex(h,l,d),this.vertex(e,n,u))},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.quad(t,e,i,e+n,i,e+n,i+r,e,i+r,s,s,s,s)},n.prototype.rectLine=function(t,e,n,r,s,a,o){void 0===o&&(o=null),this.check(t?i.Filled:i.Line,8),null===o&&(o=this.color);var h=this.tmp.set(s-n,e-r);h.normalize(),a*=.5;var l=h.x*a,u=h.y*a;t?(this.vertex(e+l,n+u,o),this.vertex(e-l,n-u,o),this.vertex(r+l,s+u,o),this.vertex(r-l,s-u,o),this.vertex(r+l,s+u,o),this.vertex(e-l,n-u,o)):(this.vertex(e+l,n+u,o),this.vertex(e-l,n-u,o),this.vertex(r+l,s+u,o),this.vertex(r-l,s-u,o),this.vertex(r+l,s+u,o),this.vertex(e+l,n+u,o),this.vertex(r-l,s-u,o),this.vertex(e-l,n-u,o))},n.prototype.x=function(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)},n.prototype.polygon=function(t,e,n,r){if(void 0===r&&(r=null),n<3)throw new Error("Polygon must contain at least 3 vertices");this.check(i.Line,2*n),null===r&&(r=this.color);this.mesh.getVertices(),this.vertexIndex;n<<=1;for(var s=t[e<<=1],a=t[e+1],o=e+n,h=e,l=e+n-2;h=o?(f=s,d=a):(f=t[h+2],d=t[h+3]),this.vertex(u,c,r),this.vertex(f,d,r)}},n.prototype.circle=function(e,n,r,s,a,o){if(void 0===a&&(a=null),void 0===o&&(o=0),0===o&&(o=Math.max(1,6*t.MathUtils.cbrt(s)|0)),o<=0)throw new Error("segments must be > 0.");null===a&&(a=this.color);var h=2*t.MathUtils.PI/o,l=Math.cos(h),u=Math.sin(h),c=s,f=0;if(e){this.check(i.Filled,3*o+3),o--;for(p=0;p0;)this.vertex(E,T,u),E+=b,T+=A,b+=R,A+=S,R+=C,S+=I,this.vertex(E,T,u);this.vertex(E,T,u),this.vertex(o,h,u)},n.prototype.vertex=function(t,e,i){var n=this.vertexIndex,r=this.mesh.getVertices();r[n++]=t,r[n++]=e,r[n++]=i.r,r[n++]=i.g,r[n++]=i.b,r[n++]=i.a,this.vertexIndex=n},n.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},n.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},n.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=a+f.data.length*f.c+f.worldY;e.rectLine(!0,s+f.worldX,a+f.worldY,d,p,this.boneWidth*this.scale)}}this.drawSkeletonXY&&e.x(s,a,4*this.scale)}if(this.drawRegionAttachments){e.setColor(this.attachmentLineColor);for(u=0,c=(U=n.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,a+f.worldY,3*this.scale,i.GREEN,8)}}if(this.drawClipping){var U=n.slots;e.setColor(this.clipColor);for(u=0,c=U.length;u=0&&s==R.data.index&&(E=!0),E){a>=0&&a==R.data.index&&(E=!1);var S=R.getAttachment(),C=null;if(S instanceof t.RegionAttachment){var I=S;v.vertices=this.vertices,v.numVertices=4,v.numFloats=A<<2,I.computeWorldVertices(R.bone,v.vertices,0,A),m=n.QUAD_TRIANGLES,g=I.uvs,C=I.region.renderObject.texture,x=I.color}else{if(!(S instanceof t.MeshAttachment)){if(S instanceof t.ClippingAttachment){var P=S;o.clipStart(R,P);continue}o.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,C=L.region.renderObject.texture,g=L.uvs,x=L.color}if(null!=C){var _=R.color,O=this.tempColor;O.r=y.r*_.r*x.r,O.g=y.g*_.g*x.g,O.b=y.b*_.b*x.b,O.a=y.a*_.a*x.a,h&&(O.r*=O.a,O.g*=O.a,O.b*=O.a);var k=this.tempColor2;null==R.darkColor?k.set(0,0,0,1):(h?(k.r=R.darkColor.r*O.a,k.g=R.darkColor.g*O.a,k.b=R.darkColor.b*O.a):k.setFromColor(R.darkColor),k.a=h?1:0);var F=R.data.blendMode;if(F!=u&&(u=F,i.setBlendMode(e.WebGLBlendModeConverter.getSourceGLBlendMode(u,h),e.WebGLBlendModeConverter.getDestGLBlendMode(u))),o.isClipping()){o.clipTriangles(v.vertices,v.numFloats,m,m.length,g,O,k,l);var D=new Float32Array(o.clippedVertices),V=o.clippedTriangles;if(null!=this.vertexEffect){var N=this.vertexEffect,Y=D;if(l){X=0;for(var B=D.length;X-1&&this.restorables.splice(e,1)},t}();e.ManagedWebGLRenderingContext=i;var n=function(){function e(){}return e.getDestGLBlendMode=function(i){switch(i){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: "+i)}},e.getSourceGLBlendMode=function(i,n){switch(void 0===n&&(n=!1),i){case t.BlendMode.Normal:case t.BlendMode.Additive:return n?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: "+i)}},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=n}(t.webgl||(t.webgl={}))}(n||(n={})),t.exports=n}).call(window)},3524:(t,e,i)=>{var n=i(7473),r=i(4597),s=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),u=new n({Extends:h,initialize:function(t,e,i,n,s,u,c){var f,d,p,v=[],g=t.cacheManager.custom.spine;if(a(e)){var m=e;for(e=r(m,"key"),d=new o(t,{key:e,url:r(m,"jsonURL"),extension:r(m,"jsonExtension","json"),xhrSettings:r(m,"jsonXhrSettings")}),n=r(m,"atlasURL"),s=r(m,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),f=0;f{var n=i(2494),r=i(7473),s=i(5851),a=i(3527),o=i(5722),h=i(6937),l=i(3524),u=i(8332),c=i(5782),f=i(1984),d=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.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=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:f,postRender:f,render:f,destroy:f});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,n,r,s){var a=this.scene.sys[i],o=new u(this.scene,a,t,e,n,r,s);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=s(t,"key",null),a=s(t,"animationName",null),o=s(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),n(this.scene,l,t);var c=s(t,"skinName",!1);c&&l.setSkinByName(c);var f=s(t,"slotName",!1),d=s(t,"attachmentName",null);return f&&l.setAttachment(f,d),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,n){var r=this.scene.sys[i],s=new c(this.scene,r,t,e,n);return this.displayList.add(s),s}),(function(t,e){void 0===t&&(t={});var r=s(t,"x",0),a=s(t,"y",0),o=s(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))}},e=this.renderer.spineSceneRenderer;e||((e=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,e.shapes.setBlendMode=t,this.renderer.spineSceneRenderer=e),this.sceneRenderer=e,this.skeletonRenderer=e.skeletonRenderer,this.skeletonDebugRenderer=e.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 i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures;i=new h.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new h.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(s,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,r,s){var a;if(Array.isArray(t))for(var o=0;o{var n=i(7473),r=i(7361),s=i(2437),a=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s){r.call(this,t,i,n,s),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},2437:(t,e,i)=>{var n=i(1984),r=i(1984);n=i(434),t.exports={renderWebGL:n,renderCanvas:r}},434:t=>{t.exports=function(t,e,i,n){var r=e.plugin.sceneRenderer,s=e.list;if(0!==s.length){i.addToRenderList(e);var a=e.localTransform;n?(a.loadIdentity(),a.multiply(n),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var o=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var n=i(6412),r=i(2915),s=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),u=i(3212),c=i(8414),f=i(3426),d=i(7149),p=i(2273),v=i(4208),g=i(5146),m=i(2762),M=new s({Extends:p,Mixins:[a,o,h,l,u,c,m],initialize:function(t,e,i,n,r,s,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),r&&this.setSkeleton(r,s,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var n=this.plugin,r=n.sceneRenderer;n.gl&&r.batcher.isDrawing&&(r.end(),n.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,n=(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=i,a.color.g=n,a.color.b=r,null!==s&&(a.color.a=s),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=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,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{var n=i(1984),r=i(1984),s=i(1984);n=i(4290),s=i(780),t.exports={renderWebGL:n,renderCanvas:r,renderDirect:s}},780:(t,e,i)=>{var n=i(2915),r=i(3426),s=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var u=e.plugin,c=e.skeleton,f=u.sceneRenderer;t.pipelines.clear(),f.begin();var d=e.scrollFactorX,p=e.scrollFactorY,v=c.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,c.color.a=n(v*l.alpha,0,1)),i.addToRenderList(e);var g=s(e,i,h).calc,m=t.height;if(c.x=g.tx,c.y=m-g.ty,c.scaleX=g.scaleX,c.scaleY=g.scaleY,e.scaleX<0?(c.scaleX*=-1,e.root.rotation=o(a(g.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(c.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(g.rotationNormalized):e.root.rotation+=2*a(g.rotationNormalized)),c.updateWorldTransform(),f.drawSkeleton(c,e.preMultipliedAlpha),l&&(e.scrollFactorX=d,e.scrollFactorY=p,c.color.a=v),u.drawDebug||e.drawDebug){var M=c.x,x=c.y;c.x=0,c.y=0,f.drawSkeletonDebug(c,e.preMultipliedAlpha),c.x=M,c.y=x}f.end(),t.pipelines.rebind()}},4290:(t,e,i)=>{var n=i(2915),r=i(3426),s=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var u=e.plugin,c=e.skeleton,f=u.sceneRenderer;t.newType&&(t.pipelines.clear(),f.begin());var d=e.scrollFactorX,p=e.scrollFactorY,v=c.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,c.color.a=n(v*l.alpha,0,1)),i.addToRenderList(e);var g=s(e,i,h).calc,m=t.height;if(c.x=g.tx,c.y=m-g.ty,c.scaleX=g.scaleX,c.scaleY=g.scaleY,e.scaleX<0?(c.scaleX*=-1,e.root.rotation=o(a(g.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(c.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(g.rotationNormalized):e.root.rotation+=2*a(g.rotationNormalized)),c.updateWorldTransform(),f.drawSkeleton(c,e.preMultipliedAlpha),l&&(e.scrollFactorX=d,e.scrollFactorY=p,c.color.a=v),u.drawDebug||e.drawDebug){var M=c.x,x=c.y;c.x=0,c.y=0,f.drawSkeletonDebug(c,e.preMultipliedAlpha),c.x=M,c.y=x}t.nextTypeMatch||(f.end(),t.pipelines.rebind())}},8599:t=>{t.exports="blur"},3570:t=>{t.exports="boot"},7950:t=>{t.exports="contextlost"},5389:t=>{t.exports="contextrestored"},4679:t=>{t.exports="destroy"},6903:t=>{t.exports="focus"},9638:t=>{t.exports="hidden"},2505:t=>{t.exports="pause"},8616:t=>{t.exports="postrender"},1868:t=>{t.exports="poststep"},2075:t=>{t.exports="prerender"},918:t=>{t.exports="prestep"},8136:t=>{t.exports="ready"},5113:t=>{t.exports="resume"},2029:t=>{t.exports="step"},527:t=>{t.exports="visible"},5215:(t,e,i)=>{t.exports={BLUR:i(8599),BOOT:i(3570),CONTEXT_LOST:i(7950),CONTEXT_RESTORED:i(5389),DESTROY:i(4679),FOCUS:i(6903),HIDDEN:i(9638),PAUSE:i(2505),POST_RENDER:i(8616),POST_STEP:i(1868),PRE_RENDER:i(2075),PRE_STEP:i(918),READY:i(8136),RESUME:i(5113),STEP:i(2029),VISIBLE:i(527)}},1081:(t,e,i)=>{var n=i(7473),r=i(6748),s=new n({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(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},7499:(t,e,i)=>{var n=i(7473),r=i(5215),s=i(8604),a=new n({initialize:function(t,e){var i=t.sys.renderer;this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.scene=t,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this),i&&i.on(s.RESIZE,this.createMask,this)},createMask:function(){var t=this.renderer;if(t&&t.gl){this.mainTexture&&this.clearMask();var e=t.width,i=t.height,n=0==(e&e-1)&&0==(i&i-1),r=t.gl,s=n?r.REPEAT:r.CLAMP_TO_EDGE,a=r.LINEAR;this.mainTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,i),this.mainFramebuffer=t.createFramebuffer(e,i,this.mainTexture,!0),this.maskFramebuffer=t.createFramebuffer(e,i,this.maskTexture,!0)}},clearMask:function(){var t=this.renderer;t&&t.gl&&this.mainTexture&&(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)},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.scene.sys.game.events.off(r.CONTEXT_RESTORED,this.createMask,this),this.renderer&&this.renderer.off(s.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=a},6726:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var n=t.maskStack[t.maskStack.length-1];n.mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},2494:(t,e,i)=>{var n=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var s=r(i,"scale",null);"number"==typeof s?e.setScale(s):null!==s&&(e.scaleX=r(s,"x",1),e.scaleY=r(s,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",n.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var n=i(7473),r=i(6125),s=i(1081),a=i(4399),o=i(3389),h=i(204),l=new n({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},2208:(t,e,i)=>{var n=i(4227),r=new n,s=new n,a=new n,o={camera:r,sprite:s,calc:a};t.exports=function(t,e,i){var n=r,h=s,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),n.multiply(h,l),o}},4344:(t,e,i)=>{var n=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var n=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var n=i(8351),r={_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=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.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},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},9660:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var n=i(2150),r=i(9876),s=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new 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,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,s,a,o,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,s=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,s=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,s,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,s,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var n=i(7499),r=i(6726),s={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||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&(this instanceof Phaser.GameObjects.Graphics||this instanceof Phaser.GameObjects.Shape)&&(t=this),new r(this.scene,t)}};t.exports=s},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var n=i(7149),r=i(1864),s=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=s(t,"from",0),t.to=s(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=s(t,"rotationOffset",0);var l=s(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var s=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-s,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var n=i(3911),r=i(5412),s=i(8935),a={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){void 0===t&&(t=r.MULTI_PIPELINE);var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){var n=i.get(t);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){var a=s.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?n(e):e)}return this},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),s(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},4759:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:t=>{var e={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=e},9243:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var n=i(7425),r=i(4227),s=i(7556),a=i(3692),o=i(2820),h=i(2529),l={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(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},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,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 h),n||(n=this.scene.sys.cameras.main);var r=n.scrollX,a=n.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):s(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var n=i(7473),r=i(7425),s=i(2529),a=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],s=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||s?r.TAU-(s>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3];return n[0]=r*i+a*e,n[1]=s*i+o*e,n[2]=r*-e+a*i,n[3]=s*-e+o*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],g=void 0===e?this:e;return g.a=u*r+c*a,g.b=u*s+c*o,g.c=f*r+d*a,g.d=f*s+d*o,g.e=p*r+v*a+h,g.f=p*s+v*o+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],a=n[1],o=n[2],h=n[3],l=e*s+i*o+n[4],u=e*a+i*h+n[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],g=r[5];return n[0]=c*s+f*o,n[1]=c*a+f*h,n[2]=d*s+p*o,n[3]=d*a+p*h,n[4]=v*s+g*o+l,n[5]=v*a+g*h+u,this},transform:function(t,e,i,n,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]=i*o+n*l,a[3]=i*h+n*u,a[4]=r*o+s*l+c,a[5]=r*h+s*u+f,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5];return i.x=t*r+e*a+h,i.y=t*s+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=e*r-i*n;return t[0]=r/o,t[1]=-i/o,t[2]=-n/o,t[3]=e/o,t[4]=(n*a-r*s)/o,t[5]=-(e*a-i*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,i,n,r,s){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=r,a[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],a=i*s-n*r;if(t.translateX=e[4],t.translateY=e[5],i||n){var o=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/o):-Math.acos(i/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,i,n,r){var s=this.matrix,a=Math.sin(i),o=Math.cos(i);return s[4]=t,s[5]=e,s[0]=o*n,s[1]=a*n,s[2]=-a*r,s[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],a=n[1],o=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=r*c*e+-a*c*t+(-u*r+l*a)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},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},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),ScrollFactor:i(4627),Size:i(4759),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var n=i(1953),r=i(8351),s=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(2150),u=i(3232),c=i(9422),f=i(2529),d=new s({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Pipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,n=[null],r=this.list.slice(),s=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=d},3232:(t,e,i)=>{var n=i(1984),r=i(1984);n=i(4343),t.exports={renderWebGL:n,renderCanvas:r}},4343:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list,s=r.length;if(0!==s){var a=e.localTransform;n?(a.loadIdentity(),a.multiply(n),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},5241:t=>{t.exports="loop"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},8118:t=>{t.exports="stop"},5529:t=>{t.exports="timeout"},4287:t=>{t.exports="unlocked"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STOP:i(8118),VIDEO_TIMEOUT:i(5529),VIDEO_UNLOCKED:i(4287)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var n=i(7655);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}},4479:(t,e,i)=>{var n=i(4771),r=i(7655);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=n(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var n=i(7473),r=i(8881),s=i(4479),a=i(1643),o=i(3915),h=i(2529),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.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return o(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},3915:(t,e,i)=>{var n=i(7655);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var n=i(7473),r=i(1643),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},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var n=i(8073),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var s=n(t)*e;return e>.5?(s-=t.width+t.height)<=t.width?(i.x=t.right-s,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(s-t.width)):s<=t.width?(i.x=t.x+s,i.y=t.y):(i.x=t.right,i.y=t.y+(s-t.width)),i}},8151:(t,e,i)=>{var n=i(716),r=i(8073);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var n=i(7655);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},2150:(t,e,i)=>{var n=i(7473),r=i(5956),s=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),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.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},9422:(t,e,i)=>{var n=i(2150);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=Math.min(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-s;return i.setTo(r,s,a,o)}},1593:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),u=i(707),c=new n({initialize:function(t,e){this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var n=a(e,"url");void 0===n?n=t.path+i+"."+a(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&(0===t.responseURL.indexOf("file://")||0===t.responseURL.indexOf("capacitor://"))&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},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(){console.error('Failed to process file: %s "%s"',this.type,this.key),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.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var n=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);return i}},3137:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1179),a=new n({initialize:function(t,e,i,n){var s=[];n.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.state=r.FILE_PENDING,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a{var n=i(7410);t.exports=function(t,e){var i=n(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var s in i.headers)r.setRequestHeader(s,i.headers[s]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{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}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),u=new n({Extends:s,initialize:function t(e,i,n,r,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),n=o(c,"url"),l=o(c,"normalMap"),r=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var f={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:r,config:a};if(s.call(this,e,f),l){var d=new t(e,this.key,l,r,a);d.type="normalMap",this.setLink(d),e.addFile(d)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){s.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(t.data),t.onProcessError()},s.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t&&t.state===r.FILE_COMPLETE?"image"===this.type?this.cache.addImage(this.key,this.data,t.data):this.cache.addImage(t.key,t.data,this.data):t||this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),u=new n({Extends:s,initialize:function(t,e,i,n,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),n=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var f={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:a};s.call(this,t,f),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r{var n=i(7473),r=i(4359),s=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new n({Extends:s,initialize:function(t,e,i,n){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),n=o(u,"xhrSettings"),a=o(u,"extension",a),r=o(u,"type",r),l=o(u,"cache",l)}var c={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n{t.exports=function(t){for(var e=0,i=0;i{var n=i(3916);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,n,r){var s=.5*(n-e),a=.5*(r-i),o=t*t;return(2*i-2*n+s+a)*(t*o)+(-3*i+3*n-2*s-a)*o+s*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t*n.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var n=i(2915),r=i(7473),s=i(9652),a=i(1984),o=new s,h=new r({initialize:function t(e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,s=r[0],a=r[4],o=r[8],h=r[1],l=r[5],u=r[9],c=r[2],f=r[6],d=r[10],p=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(n(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},1555:(t,e,i)=>{var n=i(2915);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var n=new(i(7473))({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 e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=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+i*c+n*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*i+n*h)*d,t[2]=(a*i-n*s)*d,t[3]=c*d,t[4]=(l*e-n*o)*d,t[5]=(-a*e+n*r)*d,t[6]=f*d,t[7]=(-h*e+i*o)*d,t[8]=(s*e-i*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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]=n*h-i*l,t[2]=i*a-n*s,t[3]=a*o-r*l,t[4]=e*l-n*o,t[5]=n*r-e*a,t[6]=r*h-s*o,t[7]=i*o-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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)+i*(-l*r+a*o)+n*(h*r-s*o)},multiply:function(t){var e=this.val,i=e[0],n=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],g=c[4],m=c[5],M=c[6],x=c[7],y=c[8];return e[0]=f*i+d*s+p*h,e[1]=f*n+d*a+p*l,e[2]=f*r+d*o+p*u,e[3]=v*i+g*s+m*h,e[4]=v*n+g*a+m*l,e[5]=v*r+g*o+m*u,e[6]=M*i+x*s+y*h,e[7]=M*n+x*a+y*l,e[8]=M*r+x*o+y*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=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*i+h*s,e[1]=l*n+h*a,e[2]=l*r+h*o,e[3]=l*s-h*i,e[4]=l*a-h*n,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,a=i+i,o=n+n,h=e*s,l=e*a,u=e*o,c=i*a,f=i*o,d=n*o,p=r*s,v=r*a,g=r*o,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,i=this.val,n=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],g=e[13],m=e[14],M=e[15],x=n*h-r*o,y=n*l-s*o,w=n*u-a*o,E=r*l-s*h,T=r*u-a*h,b=s*u-a*l,A=c*g-f*v,R=c*m-d*v,S=c*M-p*v,C=f*m-d*g,I=f*M-p*g,P=d*M-p*m,L=x*P-y*I+w*C+E*S-T*R+b*A;return L?(L=1/L,i[0]=(h*P-l*I+u*C)*L,i[1]=(l*S-o*P-u*R)*L,i[2]=(o*I-h*S+u*A)*L,i[3]=(s*I-r*P-a*C)*L,i[4]=(n*P-s*S+a*R)*L,i[5]=(r*S-n*I-a*A)*L,i[6]=(g*b-m*T+M*E)*L,i[7]=(m*w-v*b-M*y)*L,i[8]=(v*T-g*w+M*x)*L,this):null}});t.exports=n},9652:(t,e,i)=>{var n=i(7473),r=i(5689),s=1e-6,a=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,r,s,a,o,h,l,u,c,f,d,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=r,g[5]=s,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=f,g[13]=d,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=o.fromQuat(i).val,r=e.x,s=e.y,a=e.z;return this.setValues(n[0]*r,n[1]*r,n[2]*r,0,n[4]*s,n[5]*s,n[6]*s,0,n[8]*a,n[9]*a,n[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=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]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15],m=e*a-i*s,M=e*o-n*s,x=e*h-r*s,y=i*o-n*a,w=i*h-r*a,E=n*h-r*o,T=l*p-u*d,b=l*v-c*d,A=l*g-f*d,R=u*v-c*p,S=u*g-f*p,C=c*g-f*v,I=m*C-M*S+x*R+y*A-w*b+E*T;return I?(I=1/I,this.setValues((a*C-o*S+h*R)*I,(n*S-i*C-r*R)*I,(p*E-v*w+g*y)*I,(c*w-u*E-f*y)*I,(o*A-s*C-h*b)*I,(e*C-n*A+r*b)*I,(v*x-d*E-g*M)*I,(l*E-c*x+f*M)*I,(s*S-a*A+h*T)*I,(i*A-e*S-r*T)*I,(d*w-p*x+g*m)*I,(u*x-l*w-f*m)*I,(a*b-s*R-o*T)*I,(e*R-i*b+n*T)*I,(p*M-d*y-v*m)*I,(l*y-u*M+c*m)*I)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15];return this.setValues(a*(c*g-f*v)-u*(o*g-h*v)+p*(o*f-h*c),-(i*(c*g-f*v)-u*(n*g-r*v)+p*(n*f-r*c)),i*(o*g-h*v)-a*(n*g-r*v)+p*(n*h-r*o),-(i*(o*f-h*c)-a*(n*f-r*c)+u*(n*h-r*o)),-(s*(c*g-f*v)-l*(o*g-h*v)+d*(o*f-h*c)),e*(c*g-f*v)-l*(n*g-r*v)+d*(n*f-r*c),-(e*(o*g-h*v)-s*(n*g-r*v)+d*(n*h-r*o)),e*(o*f-h*c)-s*(n*f-r*c)+l*(n*h-r*o),s*(u*g-f*p)-l*(a*g-h*p)+d*(a*f-h*u),-(e*(u*g-f*p)-l*(i*g-r*p)+d*(i*f-r*u)),e*(a*g-h*p)-s*(i*g-r*p)+d*(i*h-r*a),-(e*(a*f-h*u)-s*(i*f-r*u)+l*(i*h-r*a)),-(s*(u*v-c*p)-l*(a*v-o*p)+d*(a*c-o*u)),e*(u*v-c*p)-l*(i*v-n*p)+d*(i*c-n*u),-(e*(a*v-o*p)-s*(i*v-n*p)+d*(i*o-n*a)),e*(a*c-o*u)-s*(i*c-n*u)+l*(i*o-n*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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],g=t[15];return(e*a-i*s)*(c*g-f*v)-(e*o-n*s)*(u*g-f*p)+(e*h-r*s)*(u*v-c*p)+(i*o-n*a)*(l*g-f*d)-(i*h-r*a)*(l*v-c*d)+(n*h-r*o)*(l*p-u*d)},multiply:function(t){var e=this.val,i=e[0],n=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],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*i+y*a+w*u+E*p,e[1]=x*n+y*o+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*i+y*a+w*u+E*p,e[5]=x*n+y*o+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*i+y*a+w*u+E*p,e[9]=x*n+y*o+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*i+y*a+w*u+E*p,e[13]=x*n+y*o+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=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,r=i[0],s=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],f=i[2],d=i[6],p=i[10],v=i[14],g=i[3],m=i[7],M=i[11],x=i[15],y=n[0],w=n[4],E=n[8],T=n[12],b=n[1],A=n[5],R=n[9],S=n[13],C=n[2],I=n[6],P=n[10],L=n[14],_=n[3],O=n[7],k=n[11],F=n[15];return this.setValues(r*y+s*b+a*C+o*_,h*y+l*b+u*C+c*_,f*y+d*b+p*C+v*_,g*y+m*b+M*C+x*_,r*w+s*A+a*I+o*O,h*w+l*A+u*I+c*O,f*w+d*A+p*I+v*O,g*w+m*A+M*I+x*O,r*E+s*R+a*P+o*k,h*E+l*R+u*P+c*k,f*E+d*R+p*P+v*k,g*E+m*R+M*P+x*k,r*T+s*S+a*L+o*F,h*T+l*S+u*L+c*F,f*T+d*S+p*L+v*F,g*T+m*S+M*L+x*F)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,a=t.y,o=t.z,h=r*s,l=r*a;return this.setValues(h*s+i,h*a-n*o,h*o+n*a,0,h*a+n*o,l*a+i,l*o-n*s,0,h*o-n*a,l*o+n*s,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,a=e.z,o=Math.sqrt(n*n+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var n=i(7473),r=i(2149),s=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new a(1,0,0),c=new a(0,1,0),f=new a,d=new r,p=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(f.copy(u).cross(t).length().999999?this.set(0,0,0,1):(f.copy(t).cross(e),this._x=f.x,this._y=f.y,this._z=f.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=d.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(d).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*s+i*o-n*a,i*h+r*a+n*s-e*o,n*h+r*o+e*a-i*s,r*h-e*s-i*a-n*o)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,a=t.x,h=t.y,l=t.z,u=t.w,c=i*a+n*h+r*l+s*u;c<0&&(c=-c,a=-a,h=-h,l=-l,u=-u);var f=1-e,d=e;if(1-c>o){var p=Math.acos(c),v=Math.sin(p);f=Math.sin((1-e)*p)/v,d=Math.sin(e*p)/v}return this.set(f*i+d*a,f*n+d*h,f*r+d*l,f*s+d*u)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.set(-t*s,-e*s,-i*s,n*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*s,i*a+n*s,n*a-i*s,r*a-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a-n*s,i*a+r*s,n*a+e*s,r*a-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*s,i*a-e*s,n*a+r*s,r*a-n*s)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,r=t.z/2,s=Math.cos(i),a=Math.cos(n),o=Math.cos(r),h=Math.sin(i),l=Math.sin(n),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],r=i[4],s=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],f=n+o+c;return f>0?(e=.5/Math.sqrt(f+1),this.set((u-h)*e,(s-l)*e,(a-r)*e,.25/e)):n>o&&n>c?(e=2*Math.sqrt(1+n-o-c),this.set(.25*e,(r+a)/e,(s+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-n-c),this.set((r+a)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-n-o),this.set((s+l)/e,(h+u)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var s=h[r],a=h[s];e=Math.sqrt(i[3*r+r]-i[3*s+s]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[s]=(i[3*s+r]+i[3*r+s])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+s]-i[3*s+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t*n.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),a=t.x-e,o=t.y-i;return t.x=a*r-o*s+e,t.y=a*s+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},4497:t=>{t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},9640:(t,e,i)=>{var n=i(5689),r=i(9652),s=i(372),a=new r,o=new s,h=new n;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},4936:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var n=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new n);var s=0,a=0;return t>0&&t<=e*i&&(s=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(s,a)}},7556:(t,e,i)=>{var n=i(2529);t.exports=function(t,e,i,r,s,a,o,h){void 0===h&&(h=new n);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-i*p)*v,h.y=c*v*e+-f*v*t+(-r*c+i*f)*v,h}},2529:(t,e,i)=>{var n=i(7473),r=i(12),s=new n({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 s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},5689:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=n*o-r*a,this.y=r*s-i*o,this.z=i*a-n*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,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,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 n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z;return this.x=i*a-n*s,this.y=n*r-e*a,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],a=e*r[1]+i*r[5]+n*r[9]+r[13],o=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*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,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*n-a*i,l=o*i+a*e-r*n,u=o*n+r*i-s*e,c=-r*e-s*i-a*n;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,i=this.y,n=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],g=r[11],m=r[12],M=r[13],x=r[14],y=1/(e*h+i*f+n*g+r[15]);return this.x=(e*s+i*l+n*d+m)*y,this.y=(e*a+i*u+n*p+M)*y,this.z=(e*o+i*c+n*v+x)*y,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,a=this.x-i,o=s-this.y-1-n,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}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},9279:(t,e,i)=>{var n=new(i(7473))({initialize:function(t,e,i,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=e||0,this.z=i||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,e,i,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=e||0,this.z=i||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,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*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 i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),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,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+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,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*n-a*i,l=o*i+a*e-r*n,u=o*n+r*i-s*e,c=-r*e-s*i-a*n;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}});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},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},6412:t=>{t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},3426:(t,e,i)=>{var n=i(7425);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var n=i(104);t.exports=function(){return n(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var n=i(104);t.exports=function(){return n(-180,180)}},936:(t,e,i)=>{var n=i(6906);t.exports=function(t){return n(t+Math.PI)}},1935:(t,e,i)=>{var n=i(7425);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&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var n=i(8445);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var n=i(8445);t.exports=function(t){return n(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},4361:t=>{t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},7798:t=>{t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},8290:t=>{t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},3788:t=>{t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var n=i(7425),r=i(1030),s={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};s=r(!1,s,n),t.exports=s},1640:(t,e,i)=>{var n=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,s=0;s<=r;s++)i+=Math.pow(1-e,r-s)*Math.pow(e,s)*t[s]*n(r,s);return i}},6105:(t,e,i)=>{var n=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return t[0]===t[i]?(e<0&&(s=Math.floor(r=i*(1+e))),n(r-s,t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i])):e<0?t[0]-(n(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(r-s,t[s?s-1:0],t[s],t[i{t.exports=function(t,e,i,n,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var n=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return e<0?n(t[0],t[1],r):e>1?n(t[i],t[i-1],i-r):n(t[s],t[s+1>i?i:s+1],r-s)}},6388:t=>{t.exports=function(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},5735:(t,e,i)=>{var n=i(2733);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},8705:(t,e,i)=>{var n=i(278);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var n=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},5659:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var n=new(i(7473))({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=n},5722:(t,e,i)=>{var n=i(8666),r=i(7473),s=i(204),a=new r({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,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},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},387:t=>{t.exports="postrender"},7970:t=>{t.exports="prerender"},674:t=>{t.exports="render"},9418:t=>{t.exports="resize"},8604:(t,e,i)=>{t.exports={POST_RENDER:i(387),PRE_RENDER:i(7970),RENDER:i(674),RESIZE:i(9418)}},5412:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline"}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},7473:t=>{function e(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&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 i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function n(t,n,r,a){for(var o in n)if(n.hasOwnProperty(o)){var h=e(n,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(s.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]=n[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),i>0){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>s&&(e.splice(s),a=s);for(var o=0;o{t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),n>0){var a=n-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;n>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var n=i(2497);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var a=0;if(n(t,r,s))for(var o=r;o{t.exports=function(t,e,i){var n,r=[null];for(n=3;n{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(te.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)}},6245:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var a=[];if(n(t,r,s))for(var o=r;o{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n>r||(t.splice(n,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var n=t[i-1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,n){var r,s=[],a=!1;if((i||n)&&(a=!0,i||(i=""),n||(n="")),e=e;r--)a?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)a?s.push(i+r.toString()+n):s.push(r);return s}},1316:(t,e,i)=>{var n=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],s=Math.max(n((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t,r,s,a,o){for(void 0===s&&(s=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>s;){if(a-s>600){var h=a-s+1,l=r-s+1,u=Math.log(h),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),d=Math.max(s,Math.floor(r-l*c/h+f)),p=Math.min(a,Math.floor(r+(h-l)*c/h+f));n(t,r,d,p,o)}var v=t[r],g=s,m=a;for(e(t,s,r),o(t[a],v)>0&&e(t,s,a);g0;)m--}0===o(t[s],v)?e(t,s,m):e(t,++m,a),m<=r&&(s=m+1),r<=m&&(a=m-1)}};t.exports=n},9703:(t,e,i)=>{var n=i(5851),r=i(4912),s=function(t,e,i){for(var n=[],r=0;r{var n=i(8935);t.exports=function(t,e,i,r){var s;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(n(t,s),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(s=t.indexOf(h))&&(n(t,s),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var n=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var s=n(t,e);return i&&i.call(r,s),s}},8780:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),n(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var n=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return n(t,r)}},6960:t=>{t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n{t.exports=function(t,e,i,n){var r=t.length;if(e<0||e>r||e>=i||i>r||e+i>r){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var n=i(2497);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r{function e(t,e){return String(t).localeCompare(e)}function i(t,e,i,n){var r,s,a,o,h,l=t.length,u=0,c=2*i;for(r=0;rl&&(s=l),a>l&&(a=l),o=r,h=s;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var n=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var n=i(7116);t.exports=function(t){return n(t,180)}},2597:(t,e,i)=>{var n=i(7116);t.exports=function(t){return n(t,90)}},7116:(t,e,i)=>{var n=i(1816),r=i(4780);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{var n=i(7116);t.exports=function(t){return n(t,-90)}},7711:(t,e,i)=>{var n=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):r(t,i)),0!==e)for(var s=0;s{t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r-1;s--)n[r][s]=t[s][r]}return n}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,n,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)n=t[r],i[r]=e(n);return i};t.exports=e},1030:(t,e,i)=>{var n=i(2482),r=function(){var t,e,i,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{var n=i(4675),r=i(5851);t.exports=function(t,e,i){var s=r(t,e,null);if(null===s)return i;if(Array.isArray(s))return n.RND.pick(s);if("object"==typeof s){if(s.hasOwnProperty("randInt"))return n.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return n.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if("function"==typeof s)return s(e);return s}},4597:t=>{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}},5851:t=>{t.exports=function(t,e,i,n){if(!t&&!n||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(n&&n.hasOwnProperty(e))return n[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),s=t,a=n,o=i,h=0;h{t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var r=0;if(e+1>=(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(r-s+1).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file +window.SpinePlugin=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=69)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||! +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function r(t,e,r,s){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,r);if(!1!==h){if(n((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 i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(35),s=new n({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 s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e){t.exports=function(t,e,i,n){var r=t.length;if(e<0||e>r||e>=i||i>r){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t,e,i,n){if(!t&&!n||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(n&&n.hasOwnProperty(e))return n[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),s=t,o=n,a=i,h=i,l=!0,u=!0,c=0;c=t.length)){for(var i=t.length-1,n=t[e],r=e;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(30),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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=n*a-r*o,this.y=r*s-i*a,this.z=i*o-n*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,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,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 n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z;return this.x=i*o-n*s,this.y=n*r-e*o,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],o=e*r[1]+i*r[5]+n*r[9]+r[13],a=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*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,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,l=a*i+o*e-r*n,u=a*n+r*i-s*e,c=-r*e-s*i-o*n;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,i=this.y,n=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],y=r[14],x=1/(e*h+i*f+n*g+r[15]);return this.x=(e*s+i*l+n*d+m)*x,this.y=(e*o+i*u+n*p+M)*x,this.z=(e*a+i*c+n*v+y)*x,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=this.x-i,a=s-this.y-1-n,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}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(27),r=i(61);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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n,r=i(28),s={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(n=navigator.userAgent,/Edg\/\d+/.test(n)?(s.edge=!0,s.es2019=!0):/OPR/.test(n)?(s.opera=!0,s.es2019=!0):/Chrome\/(\d+)/.test(n)&&!r.windowsPhone?(s.chrome=!0,s.chromeVersion=parseInt(RegExp.$1,10),s.es2019=s.chromeVersion>69):/Firefox\D+(\d+)/.test(n)?(s.firefox=!0,s.firefoxVersion=parseInt(RegExp.$1,10),s.es2019=s.firefoxVersion>10):/AppleWebKit/.test(n)&&r.iOS?s.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(s.ie=!0,s.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(n)&&!r.windowsPhone?(s.safari=!0,s.safariVersion=parseInt(RegExp.$1,10),s.es2019=s.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(s.ie=!0,s.trident=!0,s.tridentVersion=parseInt(RegExp.$1,10),s.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(s.silk=!0),s)},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(6),r=function(){var t,e,i,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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(15),s=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,r,s,o,a,h,l,u,c,f,d,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=r,g[5]=s,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=f,g[13]=d,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=o.fromQuat(i).val,r=e.x,s=e.y,a=e.z;return this.setValues(n[0]*r,n[1]*r,n[2]*r,0,n[4]*s,n[5]*s,n[6]*s,0,n[8]*a,n[9]*a,n[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=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]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=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-i*s,M=e*a-n*s,y=e*h-r*s,x=i*a-n*o,w=i*h-r*o,E=n*h-r*a,T=l*p-u*d,b=l*v-c*d,A=l*g-f*d,S=u*v-c*p,R=u*g-f*p,C=c*g-f*v,I=m*C-M*R+y*S+x*A-w*b+E*T;return I?(I=1/I,this.setValues((o*C-a*R+h*S)*I,(n*R-i*C-r*S)*I,(p*E-v*w+g*x)*I,(c*w-u*E-f*x)*I,(a*A-s*C-h*b)*I,(e*C-n*A+r*b)*I,(v*y-d*E-g*M)*I,(l*E-c*y+f*M)*I,(s*R-o*A+h*T)*I,(i*A-e*R-r*T)*I,(d*w-p*y+g*m)*I,(u*y-l*w-f*m)*I,(o*b-s*S-a*T)*I,(e*S-i*b+n*T)*I,(p*M-d*x-v*m)*I,(l*x-u*M+c*m)*I)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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 this.setValues(o*(c*g-f*v)-u*(a*g-h*v)+p*(a*f-h*c),-(i*(c*g-f*v)-u*(n*g-r*v)+p*(n*f-r*c)),i*(a*g-h*v)-o*(n*g-r*v)+p*(n*h-r*a),-(i*(a*f-h*c)-o*(n*f-r*c)+u*(n*h-r*a)),-(s*(c*g-f*v)-l*(a*g-h*v)+d*(a*f-h*c)),e*(c*g-f*v)-l*(n*g-r*v)+d*(n*f-r*c),-(e*(a*g-h*v)-s*(n*g-r*v)+d*(n*h-r*a)),e*(a*f-h*c)-s*(n*f-r*c)+l*(n*h-r*a),s*(u*g-f*p)-l*(o*g-h*p)+d*(o*f-h*u),-(e*(u*g-f*p)-l*(i*g-r*p)+d*(i*f-r*u)),e*(o*g-h*p)-s*(i*g-r*p)+d*(i*h-r*o),-(e*(o*f-h*u)-s*(i*f-r*u)+l*(i*h-r*o)),-(s*(u*v-c*p)-l*(o*v-a*p)+d*(o*c-a*u)),e*(u*v-c*p)-l*(i*v-n*p)+d*(i*c-n*u),-(e*(o*v-a*p)-s*(i*v-n*p)+d*(i*a-n*o)),e*(o*c-a*u)-s*(i*c-n*u)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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-i*s)*(c*g-f*v)-(e*a-n*s)*(u*g-f*p)+(e*h-r*s)*(u*v-c*p)+(i*a-n*o)*(l*g-f*d)-(i*h-r*o)*(l*v-c*d)+(n*h-r*a)*(l*p-u*d)},multiply:function(t){var e=this.val,i=e[0],n=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,y=M[0],x=M[1],w=M[2],E=M[3];return e[0]=y*i+x*o+w*u+E*p,e[1]=y*n+x*a+w*c+E*v,e[2]=y*r+x*h+w*f+E*g,e[3]=y*s+x*l+w*d+E*m,y=M[4],x=M[5],w=M[6],E=M[7],e[4]=y*i+x*o+w*u+E*p,e[5]=y*n+x*a+w*c+E*v,e[6]=y*r+x*h+w*f+E*g,e[7]=y*s+x*l+w*d+E*m,y=M[8],x=M[9],w=M[10],E=M[11],e[8]=y*i+x*o+w*u+E*p,e[9]=y*n+x*a+w*c+E*v,e[10]=y*r+x*h+w*f+E*g,e[11]=y*s+x*l+w*d+E*m,y=M[12],x=M[13],w=M[14],E=M[15],e[12]=y*i+x*o+w*u+E*p,e[13]=y*n+x*a+w*c+E*v,e[14]=y*r+x*h+w*f+E*g,e[15]=y*s+x*l+w*d+E*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,r=i[0],s=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],f=i[2],d=i[6],p=i[10],v=i[14],g=i[3],m=i[7],M=i[11],y=i[15],x=n[0],w=n[4],E=n[8],T=n[12],b=n[1],A=n[5],S=n[9],R=n[13],C=n[2],I=n[6],P=n[10],L=n[14],_=n[3],O=n[7],k=n[11],F=n[15];return this.setValues(r*x+s*b+o*C+a*_,h*x+l*b+u*C+c*_,f*x+d*b+p*C+v*_,g*x+m*b+M*C+y*_,r*w+s*A+o*I+a*O,h*w+l*A+u*I+c*O,f*w+d*A+p*I+v*O,g*w+m*A+M*I+y*O,r*E+s*S+o*P+a*k,h*E+l*S+u*P+c*k,f*E+d*S+p*P+v*k,g*E+m*S+M*P+y*k,r*T+s*R+o*L+a*F,h*T+l*R+u*L+c*F,f*T+d*R+p*L+v*F,g*T+m*R+M*L+y*F)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,o=t.y,a=t.z,h=r*s,l=r*o;return this.setValues(h*s+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*s,0,h*a-n*o,l*a+n*s,r*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,s=e.z,o=Math.sqrt(n*n+r*r+s*s);if(Math.abs(o)<1e-6)return this;n*=o=1/o,r*=o,s*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],v=i[5],g=i[6],m=i[7],M=i[8],y=i[9],x=i[10],w=i[11],E=i[12],T=i[13],b=i[14],A=i[15],S=n*n*l+h,R=r*n*l+s*a,C=s*n*l-r*a,I=n*r*l-s*a,P=r*r*l+h,L=s*r*l+n*a,_=n*s*l+r*a,O=r*s*l-n*a,k=s*s*l+h;return this.setValues(u*S+p*R+M*C,c*S+v*R+y*C,f*S+g*R+x*C,d*S+m*R+w*C,u*I+p*P+M*L,c*I+v*P+y*L,f*I+g*P+x*L,d*I+m*P+w*L,u*_+p*O+M*k,c*_+v*O+y*k,f*_+g*O+x*k,d*_+m*O+w*k,E,T,b,A)},rotateX:function(t){var e=this.val,i=Math.sin(t),n=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*n+h*i,e[5]=s*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-r*i,e[9]=l*n-s*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=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*n-h*i,e[1]=s*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=r*i+h*n,e[9]=s*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=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*n+h*i,e[1]=s*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-r*i,e[5]=l*n-s*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=i+i,a=n+n,h=r+r,l=i*o,u=i*a,c=i*h,f=n*a,d=n*h,p=r*h,v=s*o,g=s*a,m=s*h;return this.setValues(1-(f+p),u+m,c-g,0,u-m,1-(l+p),d+v,0,c+g,d-v,1-(l+f),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,l=e*o,u=e*a,c=i*o,f=i*a,d=n*a,p=r*s,v=r*o,g=r*a;return this.setValues(1-(c+d),l+g,u-v,0,l-g,1-(h+d),f+p,0,u+v,f-p,1-(h+c),0,0,0,0,1)},frustum:function(t,e,i,n,r,s){var o=1/(e-t),a=1/(n-i),h=1/(r-s);return this.setValues(2*r*o,0,0,0,0,2*r*a,0,0,(e+t)*o,(n+i)*a,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,i,n){var r=1/Math.tan(t/2),s=1/(i-n);return this.setValues(r/e,0,0,0,0,r,0,0,0,0,(n+i)*s,-1,0,0,2*n*i*s,0)},perspectiveLH:function(t,e,i,n){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-n/(i-n),1,0,0,i*n/(i-n),0)},ortho:function(t,e,i,n,r,s){var o=t-e,a=i-n,h=r-s;return o=0===o?o:1/o,a=0===a?a:1/a,h=0===h?h:1/h,this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(s+r)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return u.subVectors(t,e),0===u.getLengthSquared()&&(u.z=1),u.normalize(),h.crossVectors(i,u),0===h.getLengthSquared()&&(1===Math.abs(i.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),h.crossVectors(i,u)),h.normalize(),l.crossVectors(u,h),n[0]=h.x,n[1]=h.y,n[2]=h.z,n[4]=l.x,n[5]=l.y,n[6]=l.z,n[8]=u.x,n[9]=u.y,n[10]=u.z,this},lookAt:function(t,e,i){var n=t.x,r=t.y,s=t.z,o=i.x,a=i.y,h=i.z,l=e.x,u=e.y,c=e.z;if(Math.abs(n-l)<1e-6&&Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6)return this.identity();var f=n-l,d=r-u,p=s-c,v=1/Math.sqrt(f*f+d*d+p*p),g=a*(p*=v)-h*(d*=v),m=h*(f*=v)-o*p,M=o*d-a*f;(v=Math.sqrt(g*g+m*m+M*M))?(g*=v=1/v,m*=v,M*=v):(g=0,m=0,M=0);var y=d*M-p*m,x=p*g-f*M,w=f*m-d*g;return(v=Math.sqrt(y*y+x*x+w*w))?(y*=v=1/v,x*=v,w*=v):(y=0,x=0,w=0),this.setValues(g,y,f,0,m,x,d,0,M,w,p,0,-(g*n+m*r+M*s),-(y*n+x*r+w*s),-(f*n+d*r+p*s),1)},yawPitchRoll:function(t,e,i){this.zero(),o.zero(),a.zero();var n=this.val,r=o.val,s=a.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),r[0]=1,r[15]=1,r[5]=l,r[10]=l,r[9]=-h,r[6]=h,h=Math.sin(t),l=Math.cos(t),s[5]=1,s[15]=1,s[0]=l,s[2]=-h,s[8]=h,s[10]=l,this.multiplyLocal(o),this.multiplyLocal(a),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),o.scaling(i.x,i.y,i.z),a.xyz(e.x,e.y,e.z),this.multiplyLocal(o),this.multiplyLocal(a),n&&this.multiplyLocal(n),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,n=t.val,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=i[6],c=i[7],f=i[8],d=i[9],p=i[10],v=i[11],g=i[12],m=i[13],M=i[14],y=i[15],x=n[0],w=n[1],E=n[2],T=n[3],b=n[4],A=n[5],S=n[6],R=n[7],C=n[8],I=n[9],P=n[10],L=n[11],_=n[12],O=n[13],k=n[14],F=n[15];return e.setValues(x*r+w*h+E*f+T*g,w*s+w*l+E*d+T*m,E*o+w*u+E*p+T*M,T*a+w*c+E*v+T*y,b*r+A*h+S*f+R*g,b*s+A*l+S*d+R*m,b*o+A*u+S*p+R*M,b*a+A*c+S*v+R*y,C*r+I*h+P*f+L*g,C*s+I*l+P*d+L*m,C*o+I*u+P*p+L*M,C*a+I*c+P*v+L*y,_*r+O*h+k*f+F*g,_*s+O*l+k*d+F*m,_*o+O*u+k*p+F*M,_*a+O*c+k*v+F*y)},fromRotationXYTranslation:function(t,e,i){var n=e.x,r=e.y,s=e.z,o=Math.sin(t.x),a=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=n,c=r,f=s,d=-o,p=0-d*h,v=0-a*h,g=d*l,m=a*l;return i||(u=l*n+h*s,c=p*n+a*r+g*s,f=v*n+o*r+m*s),this.setValues(l,p,v,0,0,a,o,0,h,g,m,0,u,c,f,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}}),o=new s,a=new s,h=new r,l=new r,u=new r;t.exports=s},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADDED_TO_SCENE:i(187),BOOT:i(188),CREATE:i(189),DESTROY:i(190),PAUSE:i(191),POST_UPDATE:i(192),PRE_RENDER:i(193),PRE_UPDATE:i(194),READY:i(195),REMOVED_FROM_SCENE:i(196),RENDER:i(197),RESUME:i(198),SHUTDOWN:i(199),SLEEP:i(200),START:i(201),TRANSITION_COMPLETE:i(202),TRANSITION_INIT:i(203),TRANSITION_OUT:i(204),TRANSITION_START:i(205),TRANSITION_WAKE:i(206),UPDATE:i(207),WAKE:i(208)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(10),s=i(47),o=i(9),a=i(48),h=i(49),l=i(222),u=i(50),c=new n({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},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(){console.error('Failed to process file: %s "%s"',this.type,this.key),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.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(4),s=i(3),o=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},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||s?r.TAU-(s>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3];return n[0]=r*i+o*e,n[1]=s*i+a*e,n[2]=r*-e+o*i,n[3]=s*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],g=void 0===e?i:e.matrix;return g[0]=u*r+c*o,g[1]=u*s+c*a,g[2]=f*r+d*o,g[3]=f*s+d*a,g[4]=p*r+v*o+h,g[5]=p*s+v*a+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=e*s+i*a+n[4],u=e*o+i*h+n[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],g=r[5];return n[0]=c*s+f*a,n[1]=c*o+f*h,n[2]=d*s+p*a,n[3]=d*o+p*h,n[4]=v*s+g*a+l,n[5]=v*o+g*h+u,this},transform:function(t,e,i,n,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]=i*a+n*l,o[3]=i*h+n*u,o[4]=r*a+s*l+c,o[5]=r*h+s*u+f,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*r+e*o+h,i.y=t*s+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=e*r-i*n;return t[0]=r/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-r*s)/a,t[5]=-(e*o-i*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,i,n,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/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,i,n,r){var s=this.matrix,o=Math.sin(i),a=Math.cos(i);return s[4]=t,s[5]=e,s[0]=a*n,s[1]=o*n,s[2]=-o*r,s[3]=a*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=r*c*e+-o*c*t+(-u*r+l*o)*c,i},setQuad:function(t,e,i,n,r,s){void 0===s&&(s=this.quad);var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],f=o[5];return s[0]=t*a+e*l+c,s[1]=t*h+e*u+f,s[2]=t*a+n*l+c,s[3]=t*h+n*u+f,s[4]=i*a+n*l+c,s[5]=i*h+n*u+f,s[6]=i*a+e*l+c,s[7]=i*h+e*u+f,r&&s.forEach((function(t,e){s[e]=Math.round(t)})),s},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=o},function(t,e){t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return i;var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(i.iOS=!0,i.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(i.cordova=!0),void 0!==window.ejecta&&(i.ejecta=!0)),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(300))},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(318),s=i(66),o=i(319),a=i(30),h=i(320),l=i(325),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.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},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,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(7);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(7);t.exports=function(t){return n(t,-180,180)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(37);t.exports=function(t,e){return n(t)/n(e)/n(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,i,n,r){var s=.5*(n-e),o=.5*(r-i),a=t*t;return(2*i-2*n+s+o)*(t*a)+(-3*i+3*n-2*s-o)*a+s*t+i}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x-e,a=t.y-i;return t.x=o*r-a*s+e,t.y=o*s+a*r+i,t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(3);t.exports=function(t,e,i,r,s,o,a,h){void 0===h&&(h=new n);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-i*p)*v,h.y=c*v*e+-f*v*t+(-r*c+i*f)*v,h}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=new(i(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 e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=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+i*c+n*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*i+n*h)*d,t[2]=(o*i-n*s)*d,t[3]=c*d,t[4]=(l*e-n*a)*d,t[5]=(-o*e+n*r)*d,t[6]=f*d,t[7]=(-h*e+i*a)*d,t[8]=(s*e-i*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=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]=n*h-i*l,t[2]=i*o-n*s,t[3]=o*a-r*l,t[4]=e*l-n*a,t[5]=n*r-e*o,t[6]=r*h-s*a,t[7]=i*a-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=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)+i*(-l*r+o*a)+n*(h*r-s*a)},multiply:function(t){var e=this.val,i=e[0],n=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],y=c[7],x=c[8];return e[0]=f*i+d*s+p*h,e[1]=f*n+d*o+p*l,e[2]=f*r+d*a+p*u,e[3]=v*i+g*s+m*h,e[4]=v*n+g*o+m*l,e[5]=v*r+g*a+m*u,e[6]=M*i+y*s+x*h,e[7]=M*n+y*o+x*l,e[8]=M*r+y*a+x*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=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*i+h*s,e[1]=l*n+h*o,e[2]=l*r+h*a,e[3]=l*s-h*i,e[4]=l*o-h*n,e[5]=l*a-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,l=e*o,u=e*a,c=i*o,f=i*a,d=n*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,i=this.val,n=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],y=n*h-r*a,x=n*l-s*a,w=n*u-o*a,E=r*l-s*h,T=r*u-o*h,b=s*u-o*l,A=c*g-f*v,S=c*m-d*v,R=c*M-p*v,C=f*m-d*g,I=f*M-p*g,P=d*M-p*m,L=y*P-x*I+w*C+E*R-T*S+b*A;return L?(L=1/L,i[0]=(h*P-l*I+u*C)*L,i[1]=(l*R-a*P-u*S)*L,i[2]=(a*I-h*R+u*A)*L,i[3]=(s*I-r*P-o*C)*L,i[4]=(n*P-s*R+o*S)*L,i[5]=(r*R-n*I-o*A)*L,i[6]=(g*b-m*T+M*E)*L,i[7]=(m*w-v*b-M*x)*L,i[8]=(v*T-g*w+M*y)*L,this):null}});t.exports=n},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(45),s=i(2),o=i(15),a=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),l=new o(1,0,0),u=new o(0,1,0),c=new o,f=new r,d=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(c.copy(l).cross(t).length()<1e-6&&c.copy(u).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):i>.999999?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=f.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+r*s+i*a-n*o,i*h+r*o+n*s-e*a,n*h+r*a+e*o-i*s,r*h-e*s-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*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.set(c*i+f*o,c*n+f*a,c*r+f*h,c*s+f*l)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.set(-t*s,-e*s,-i*s,n*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+r*s,i*o+n*s,n*o-i*s,r*o-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o-n*s,i*o+r*s,n*o+e*s,r*o-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*s,i*o-e*s,n*o+r*s,r*o-n*s)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,r=t.z/2,s=Math.cos(i),o=Math.cos(n),a=Math.cos(r),h=Math.sin(i),l=Math.sin(n),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*o*a+s*l*u,s*l*a-h*o*u,s*o*u+h*l*a,s*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+s*l*u,s*l*a-h*o*u,s*o*u-h*l*a,s*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-s*l*u,s*l*a+h*o*u,s*o*u+h*l*a,s*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-s*l*u,s*l*a+h*o*u,s*o*u-h*l*a,s*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+s*l*u,s*l*a+h*o*u,s*o*u-h*l*a,s*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-s*l*u,s*l*a-h*o*u,s*o*u+h*l*a,s*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],r=i[4],s=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],f=n+a+c;return f>0?(e=.5/Math.sqrt(f+1),this.set((u-h)*e,(s-l)*e,(o-r)*e,.25/e)):n>a&&n>c?(e=2*Math.sqrt(1+n-a-c),this.set(.25*e,(r+o)/e,(s+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-n-c),this.set((r+o)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-n-a),this.set((s+l)/e,(h+u)/e,.25*e,(o-r)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var s=a[r],o=a[s];e=Math.sqrt(i[3*r+r]-i[3*s+s]-i[3*o+o]+1),h[r]=.5*e,e=.5/e,h[s]=(i[3*s+r]+i[3*r+s])*e,h[o]=(i[3*o+r]+i[3*r+o])*e,this._x=h[0],this._y=h[1],this._z=h[2],this._w=(i[3*o+s]-i[3*s+o])*e}return this.onChangeCallback(this),this}});t.exports=d},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADD:i(212),COMPLETE:i(213),FILE_COMPLETE:i(214),FILE_KEY_COMPLETE:i(215),FILE_LOAD_ERROR:i(216),FILE_LOAD:i(217),FILE_PROGRESS:i(218),POST_PROCESS:i(219),PROGRESS:i(220),START:i(221)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(19),r=i(50);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4),r=i(26),s=i(44),o=i(33),a=i(34),h=i(3),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*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=o(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},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,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 h),n||(n=this.scene.sys.cameras.main);var r=n.scrollX,o=n.scrollY,a=t+r*this.scrollFactorX-r,l=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,l,i):s(a,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={_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=i},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(58),s=i(227),o=i(234),a=i(59),h=i(23),l=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},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,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={ADDED_TO_SCENE:i(235),DESTROY:i(236),REMOVED_FROM_SCENE:i(237),VIDEO_COMPLETE:i(238),VIDEO_CREATED:i(239),VIDEO_ERROR:i(240),VIDEO_LOOP:i(241),VIDEO_PLAY:i(242),VIDEO_SEEKED:i(243),VIDEO_SEEKING:i(244),VIDEO_STOP:i(245),VIDEO_TIMEOUT:i(246),VIDEO_UNLOCKED:i(247)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(26),r=new n,s=new n,o=new n,a={camera:r,sprite:s,calc:o};t.exports=function(t,e,i){var n=r,h=s,l=o;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),n.multiply(h,l),a}},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r-1;s--)n[r][s]=t[s][r]}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n,r,s,o=i(302),a=i(304),h=[],l=!1;t.exports=(s=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,s){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===s&&(s=!1);var c=r(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),s&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(67),r=i(12);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var s=n(t)*e;return e>.5?(s-=t.width+t.height)<=t.width?(i.x=t.right-s,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(s-t.width)):s<=t.width?(i.x=t.x+s,i.y=t.y):(i.x=t.right,i.y=t.y+(s-t.width)),i}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(1),s=i(19),o=new n({initialize:function(t,e,i,n,r,s,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(s,o,n,r)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,s=r.cut;s.x=i,s.y=n,s.w=t,s.h=e,s.r=i+t,s.b=n+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var o=r.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,r,s){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=r,a.h=s,a.r=i+r,a.b=n+s,this.x=i,this.y=n,this.width=r,this.height=s,this.halfWidth=.5*r,this.halfHeight=.5*s,this.centerX=Math.floor(r/2),this.centerY=Math.floor(s/2),this.updateUVs()},setCropUVs:function(t,e,i,n,s,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,f=this.realWidth,d=this.realHeight,p=h+(e=r(e,0,f)),v=l+(i=r(i,0,d)),g=n=r(n,0,f-e),m=s=r(s,0,d-i),M=this.data;if(M.trim){var y=M.spriteSourceSize,x=e+(n=r(n,0,u-e)),w=i+(s=r(s,0,c-i));if(!(y.rx||y.y>w)){var E=Math.max(y.x,e),T=Math.max(y.y,i),b=Math.min(y.r,x)-E,A=Math.min(y.b,w)-T;g=b,m=A,p=o?h+(u-(E-y.x)-b):h+(E-y.x),v=a?l+(c-(T-y.y)-A):l+(T-y.y),e=E,i=T,n=b,s=A}else p=0,v=0,g=0,m=0}else o&&(p=h+(u-e-n)),a&&(v=l+(c-i-s));var S=this.source.width,R=this.source.height;return t.u0=Math.max(0,p/S),t.v0=Math.max(0,v/R),t.u1=Math.min(1,(p+g)/S),t.v1=Math.min(1,(v+m)/R),t.x=e,t.y=i,t.cx=p,t.cy=v,t.cw=g,t.ch=m,t.width=n,t.height=s,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,r,s){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=r,this.v1=s,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=n;var s=this.source.width,o=this.source.height;return this.u0=t/s,this.v0=e/o,this.u1=(t+i)/s,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 o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=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=o},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(70),r=i(0),s=i(8),o=i(184),a=i(185),h=i(209),l=i(210),u=i(226),c=i(258),f=i(2),d=new r({Extends:a,initialize:function(t,e,i){a.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.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=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:f,postRender:f,render:f,destroy:f});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,n,r,s){var o=this.scene.sys[i],a=new u(this.scene,o,t,e,n,r,s);return this.displayList.add(a),this.updateList.add(a),a}),(function(t,e){void 0===t&&(t={});var r=s(t,"key",null),o=s(t,"animationName",null),a=s(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,r,o,a);void 0!==e&&(t.add=e),n(this.scene,l,t);var c=s(t,"skinName",!1);c&&l.setSkinByName(c);var f=s(t,"slotName",!1),d=s(t,"attachmentName",null);return f&&l.setAttachment(f,d),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,n){var r=this.scene.sys[i],s=new c(this.scene,r,t,e,n);return this.displayList.add(s),s}),(function(t,e){void 0===t&&(t={});var r=s(t,"x",0),o=s(t,"y",0),a=s(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,r,o,a);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))}},e=this.renderer.spineSceneRenderer;e||((e=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,e.shapes.setBlendMode=t,this.renderer.spineSceneRenderer=e),this.sceneRenderer=e,this.skeletonRenderer=e.skeletonRenderer,this.skeletonDebugRenderer=e.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 i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures;i=new h.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new h.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(s,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,r,s,o){var a;if(o=o||{},Array.isArray(t))for(var h=0;h + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(13),r=i(71);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var s=r(i,"scale",null);"number"==typeof s?e.setScale(s):null!==s&&(e.scaleX=r(s,"x",1),e.scaleY=r(s,"y",1));var o=r(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=r(o,"x",1),e.scrollFactorY=r(o,"y",1)),e.rotation=r(i,"rotation",0);var a=r(i,"angle",null);null!==a&&(e.angle=a),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",n.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(72),r=i(8);t.exports=function(t,e,i){var s=r(t,e,null);if(null===s)return i;if(Array.isArray(s))return n.RND.pick(s);if("object"==typeof s){if(s.hasOwnProperty("randInt"))return n.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return n.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if("function"==typeof s)return s(e);return s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4),r=i(19),s={Angle:i(73),Distance:i(82),Easing:i(90),Fuzzy:i(135),Interpolation:i(140),Pow2:i(148),Snap:i(152),RandomDataGenerator:i(156),Average:i(157),Bernstein:i(36),Between:i(158),CatmullRom:i(38),CeilTo:i(159),Clamp:i(1),DegToRad:i(21),Difference:i(160),Euler:i(161),Factorial:i(37),FloatBetween:i(20),FloorTo:i(162),FromPercent:i(163),GetSpeed:i(164),IsEven:i(165),IsEvenStrict:i(166),Linear:i(39),LinearXY:i(167),MaxAdd:i(168),Median:i(169),MinSub:i(170),Percent:i(171),RadToDeg:i(16),RandomXY:i(172),RandomXYZ:i(173),RandomXYZW:i(174),Rotate:i(175),RotateAround:i(42),RotateAroundDistance:i(176),RotateTo:i(177),RoundAwayFromZero:i(43),RoundTo:i(178),SinCosTableGenerator:i(179),SmootherStep:i(41),SmoothStep:i(40),ToXY:i(180),TransformXY:i(44),Within:i(181),Wrap:i(7),Vector2:i(3),Vector3:i(15),Vector4:i(182),Matrix3:i(45),Matrix4:i(22),Quaternion:i(46),RotateVec3:i(183)};s=r(!1,s,n),t.exports=s},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Between:i(31),BetweenPoints:i(74),BetweenPointsY:i(75),BetweenY:i(76),CounterClockwise:i(14),Normalize:i(32),Random:i(77),RandomDegrees:i(78),Reverse:i(79),RotateTo:i(80),ShortestBetween:i(81),Wrap:i(33),WrapDegrees:i(34)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){ +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(20);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){ +/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(20);t.exports=function(){return n(-180,180)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(32);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(4);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&&(et?t+=i:e + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Between:i(83),BetweenPoints:i(84),BetweenPointsSquared:i(85),Chebyshev:i(86),Power:i(87),Snake:i(88),Squared:i(89)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},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){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Back:i(91),Bounce:i(95),Circular:i(99),Cubic:i(103),Elastic:i(107),Expo:i(111),Linear:i(115),Quadratic:i(117),Quartic:i(121),Quintic:i(125),Sine:i(129),Stepped:i(133)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(92),Out:i(93),InOut:i(94)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(96),Out:i(97),InOut:i(98)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(100),Out:i(101),InOut:i(102)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(104),Out:i(105),InOut:i(106)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(108),Out:i(109),InOut:i(110)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(112),Out:i(113),InOut:i(114)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports=i(116)},function(t,e){t.exports=function(t){return t}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(118),Out:i(119),InOut:i(120)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(122),Out:i(123),InOut:i(124)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(126),Out:i(127),InOut:i(128)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={In:i(130),Out:i(131),InOut:i(132)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports=i(134)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Ceil:i(136),Equal:i(35),Floor:i(137),GreaterThan:i(138),LessThan:i(139)}},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){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Bezier:i(141),CatmullRom:i(142),CubicBezier:i(143),Linear:i(144),QuadraticBezier:i(145),SmoothStep:i(146),SmootherStep:i(147)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(36);t.exports=function(t,e){for(var i=0,r=t.length-1,s=0;s<=r;s++)i+=Math.pow(1-e,r-s)*Math.pow(e,s)*t[s]*n(r,s);return i}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(38);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return t[0]===t[i]?(e<0&&(s=Math.floor(r=i*(1+e))),n(r-s,t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i])):e<0?t[0]-(n(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(r-s,t[s?s-1:0],t[s],t[i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(39);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return e<0?n(t[0],t[1],r):e>1?n(t[i],t[i-1],i-r):n(t[s],t[s+1>i?i:s+1],r-s)}},function(t,e){t.exports=function(t,e,i,n){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(40);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(41);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={GetNext:i(149),IsSize:i(150),IsValue:i(151)}},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,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Ceil:i(153),Floor:i(154),To:i(155)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=new(i(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,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(1),r=i(0),s=i(22),o=i(2),a=new s,h=new r({initialize:function t(e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,s=r[0],o=r[4],a=r[8],h=r[1],l=r[5],u=r[9],c=r[2],f=r[6],d=r[10],p=0,v=0,g=0;switch(e){case"XYZ":v=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(p=Math.atan2(-u,d),g=Math.atan2(-o,s)):p=Math.atan2(f,l);break;case"YXZ":p=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(v=Math.atan2(a,d),g=Math.atan2(h,l)):v=Math.atan2(-c,s);break;case"ZXY":p=Math.asin(n(f,-1,1)),Math.abs(f)<.99999?(v=Math.atan2(-c,d),g=Math.atan2(-o,l)):g=Math.atan2(h,s);break;case"ZYX":v=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(p=Math.atan2(f,d),g=Math.atan2(h,s)):g=Math.atan2(-o,l);break;case"YZX":g=Math.asin(n(h,-1,1)),Math.abs(h)<.99999?(p=Math.atan2(-u,l),v=Math.atan2(-c,s)):v=Math.atan2(a,d);break;case"XZY":g=Math.asin(-n(o,-1,1)),Math.abs(o)<.99999?(p=Math.atan2(f,l),v=Math.atan2(a,s)):p=Math.atan2(-u,d)}return this._x=p,this._y=v,this._z=g,this._order=e,i&&this.onChangeCallback(this),this}});h.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],h.DefaultOrder="XYZ",t.exports=h},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(1);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*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 i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},function(t,e){t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],o=0;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(3);t.exports=function(t,e,i,r){void 0===r&&(r=new n);var s=0,o=0;return t>0&&t<=e*i&&(s=t>e-1?t-(o=Math.floor(t/e))*e:t),r.set(s,o)}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=new(i(0))({initialize:function(t,e,i,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=e||0,this.z=i||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,e,i,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=e||0,this.z=i||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,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*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 i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),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,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+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,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,l=a*i+o*e-r*n,u=a*n+r*i-s*e,c=-r*e-s*i-o*n;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}});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,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(15),r=i(22),s=i(46),o=new r,a=new s,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="resize"},function(t,e,i){ +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ +var n=i(186),r=i(0),s=i(23),o=new r({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,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,i){ +/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ +var n=new(i(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=n},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addedtoscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="boot"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="create"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="pause"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="postupdate"},function(t,e){ +/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="prerender"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="preupdate"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="ready"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedfromscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="render"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="resume"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="shutdown"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="sleep"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitioncomplete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitioninit"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionout"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionstart"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="transitionwake"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="update"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="wake"},function(t,e){(function(){var e,i,n,r=this&&this.__extends||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});!function(t){var e,i,n,s=function(){function t(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;n0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},t.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},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"}(i=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"}(n=t.TimelineType||(t.TimelineType={}));var o=function(){function e(i){if(i<=0)throw new Error("frameCount must be > 0: "+i);this.curves=t.Utils.newFloatArray((i-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 i=t*e.BEZIER_SIZE;if(i==this.curves.length)return e.LINEAR;var n=this.curves[i];return n==e.LINEAR?e.LINEAR:n==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,i,n,r,s){var o=.03*(2*-i+r),a=.03*(2*-n+s),h=.006*(3*(i-r)+1),l=.006*(3*(n-s)+1),u=2*o+h,c=2*a+l,f=.3*i+o+.16666667*h,d=.3*n+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=n){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)*(n-u)/(a-u)}var f=r[s-1];return f+(1-f)*(n-a)/(1-a)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=o;var a=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e<<1),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+o.ROTATION]=i},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,o.ENTRIES),v=u[p+o.PREV_ROTATION],g=u[p],m=this.getCurvePercent((p>>1)-1,1-(n-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(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,i,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.X]=i,this.frames[t+o.Y]=n},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(n=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,n,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-(n-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(n.scale<<24)+this.boneIndex},a.prototype.apply=function(n,r,o,h,l,u,c){var f=this.frames,d=n.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 y=0,x=0;if(c==i.mixOut)switch(u){case e.setup:y=d.data.scaleX,x=d.data.scaleY,d.scaleX=y+(Math.abs(p)*t.MathUtils.signum(y)-y)*l,d.scaleY=x+(Math.abs(v)*t.MathUtils.signum(x)-x)*l;break;case e.first:case e.replace:y=d.scaleX,x=d.scaleY,d.scaleX=y+(Math.abs(p)*t.MathUtils.signum(y)-y)*l,d.scaleY=x+(Math.abs(v)*t.MathUtils.signum(x)-x)*l;break;case e.add:y=d.scaleX,x=d.scaleY,d.scaleX=y+(Math.abs(p)*t.MathUtils.signum(y)-d.data.scaleX)*l,d.scaleY=x+(Math.abs(v)*t.MathUtils.signum(x)-d.data.scaleY)*l}else switch(u){case e.setup:y=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),x=Math.abs(d.data.scaleY)*t.MathUtils.signum(v),d.scaleX=y+(p-y)*l,d.scaleY=x+(v-x)*l;break;case e.first:case e.replace:y=Math.abs(d.scaleX)*t.MathUtils.signum(p),x=Math.abs(d.scaleY)*t.MathUtils.signum(v),d.scaleX=y+(p-y)*l,d.scaleY=x+(v-x)*l;break;case e.add:y=t.MathUtils.signum(p),x=t.MathUtils.signum(v),d.scaleX=Math.abs(d.scaleX)*y+(p-Math.abs(d.data.scaleX)*y)*l,d.scaleY=Math.abs(d.scaleY)*x+(v-Math.abs(d.data.scaleY)*x)*l}}}},a}(h);t.ScaleTimeline=l;var u=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,r,o,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_X],d=u[u.length+i.PREV_Y];else{var p=s.binarySearch(u,r,i.ENTRIES);f=u[p+i.PREV_X],d=u[p+i.PREV_Y];var v=u[p],g=this.getCurvePercent(p/i.ENTRIES-1,1-(r-v)/(u[p+i.PREV_TIME]-v));f+=(u[p+i.X]-f)*g,d+=(u[p+i.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}}},i}(h);t.ShearTimeline=u;var c=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,i,n,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=i,this.frames[t+o.G]=n,this.frames[t+o.B]=r,this.frames[t+o.A]=s},o.prototype.apply=function(t,i,n,r,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=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 y=s.binarySearch(c,n,o.ENTRIES);p=c[y+o.PREV_R],v=c[y+o.PREV_G],g=c[y+o.PREV_B],m=c[y+o.PREV_A];var x=c[y],w=this.getCurvePercent(y/o.ENTRIES-1,1-(n-x)/(c[y+o.PREV_TIME]-x));p+=(c[y+o.R]-p)*w,v+=(c[y+o.G]-v)*w,g+=(c[y+o.B]-g)*w,m+=(c[y+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(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,i,n,r,s,a,h,l){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=i,this.frames[t+o.G]=n,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,i,n,r,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(n=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],y=c[T+o.PREV_A],x=c[T+o.PREV_R2],w=c[T+o.PREV_G2],E=c[T+o.PREV_B2]}else{var b=s.binarySearch(c,n,o.ENTRIES);g=c[b+o.PREV_R],m=c[b+o.PREV_G],M=c[b+o.PREV_B],y=c[b+o.PREV_A],x=c[b+o.PREV_R2],w=c[b+o.PREV_G2],E=c[b+o.PREV_B2];var A=c[b],S=this.getCurvePercent(b/o.ENTRIES-1,1-(n-A)/(c[b+o.PREV_TIME]-A));g+=(c[b+o.R]-g)*S,m+=(c[b+o.G]-m)*S,M+=(c[b+o.B]-M)*S,y+=(c[b+o.A]-y)*S,x+=(c[b+o.R2]-x)*S,w+=(c[b+o.G2]-w)*S,E+=(c[b+o.B2]-E)*S}if(1==a)u.color.set(g,m,M,y),u.darkColor.set(x,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,(y-f.a)*a),d.add((x-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(n.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},r.prototype.apply=function(t,n,r,o,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=i.mixOut){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else h==e.setup&&this.setAttachment(t,u,u.data.attachmentName)},r.prototype.setAttachment=function(t,e,i){e.setAttachment(null==i?null:t.getAttachment(this.slotIndex,i))},r}();t.AttachmentTimeline=d;var p=null,v=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e),n.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},o.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},o.prototype.apply=function(i,n,r,o,a,h,l){var u=i.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;Ei)this.apply(t,e,Number.MAX_VALUE,n,r,o,a),e=-1;else if(e>=h[l-1])return;if(!(i0&&h[u-1]==c;)u--;for(;u=h[u];u++)n.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 n.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},r.prototype.apply=function(n,r,o,a,h,l,u){var c=n.drawOrder,f=n.slots;if(u!=i.mixOut){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==i.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==i.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==i.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==i.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 y=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},o.prototype.setFrame=function(t,e,i,n,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=i,this.frames[t+o.TRANSLATE]=n,this.frames[t+o.SCALE]=r,this.frames[t+o.SHEAR]=s},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(n=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,n,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 y=u[M],x=this.getCurvePercent(M/o.ENTRIES-1,1-(n-y)/(u[M+o.PREV_TIME]-y));d+=(u[M+o.ROTATE]-d)*x,p+=(u[M+o.TRANSLATE]-p)*x,v+=(u[M+o.SCALE]-v)*x,g+=(u[M+o.SHEAR]-g)*x}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=y;var x=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,i){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.VALUE]=i},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_VALUE];else{var d=s.binarySearch(u,n,o.ENTRIES);f=u[d+o.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/o.ENTRIES-1,1-(n-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=x;var w=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,r,o,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_VALUE];else{var d=s.binarySearch(u,r,i.ENTRIES);f=u[d+i.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(u[d+i.PREV_TIME]-p));f+=(u[d+i.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*a:c.spacing+=(f-c.spacing)*a}},i}(x);t.PathConstraintSpacingTimeline=w;var E=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,i,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=i,this.frames[t+o.TRANSLATE]=n},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(n=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,n,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-(n-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}(n||(n={})),function(t){var e=function(){function e(e){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 t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool((function(){return new i})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i0){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(i,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(r.trackLast>=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,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 i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=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)},e.prototype.apply=function(i){if(null==i)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=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,i,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.applyAttachmentTimeline=function(i,n,r,s,o){var a=n.slots[i.slotIndex];if(a.bone.active){var h,l=i.frames;if(r=l[l.length-1]?l.length-1:t.Animation.binarySearch(l,r)-1,this.setAttachment(n,a,i.attachmentNames[h],o);a.attachmentState<=this.unkeyedState&&(a.attachmentState=this.unkeyedState+e.SETUP)}},e.prototype.setAttachment=function(t,i,n,r){i.setAttachment(null==n?null:t.getAttachment(i.data.index,n)),r&&(i.attachmentState=this.unkeyedState+e.CURRENT)},e.prototype.applyRotateTimeline=function(e,i,n,r,s,o,a,h){if(h&&(o[a]=0),1!=r){var l=e,u=l.frames,c=i.bones[l.boneIndex];if(c.active){var f=0,d=0;if(n=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,n,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],g=u[p],m=l.getCurvePercent((p>>1)-1,1-(n-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,y=d-f;if(0==(y-=360*(16384-(16384.499999999996-y/360|0))))M=o[a];else{var x=0,w=0;h?(x=0,w=y):(x=o[a],w=o[a+1]);var E=y>0,T=x>=0;t.MathUtils.signum(w)!=t.MathUtils.signum(y)&&Math.abs(w)<=90&&(Math.abs(x)>180&&(x+=360*t.MathUtils.signum(x)),T=E),M=y+x-x%360,T!=E&&(M+=360*t.MathUtils.signum(x)),o[a]=M}o[a+1]=y,f+=M*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(i,0,n,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,o=this.events,a=0,h=o.length;an||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=n&&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()}}},e.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,n.mixingTo=e,e.mixTime=0,null!=n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},e.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!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,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},e.prototype.addAnimationWith=function(t,e,i,n){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,i,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,n<=0){var o=r.animationEnd-r.animationStart;0!=o?(r.loop?n+=o*(1+(r.trackTime/o|0)):n+=Math.max(o,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime}return s.delay=n,s},e.prototype.setEmptyAnimation=function(t,i){var n=this.setAnimationWith(t,e.emptyAnimation,!1);return n.mixDuration=i,n.trackEnd=i,n},e.prototype.addEmptyAnimation=function(t,i,n){n<=0&&(n-=i);var r=this.addAnimationWith(t,e.emptyAnimation,!1,n);return r.mixDuration=i,r.trackEnd=i,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i0){o[l]=e.HOLD_MIX,a[l]=f;continue t}break}o[l]=e.HOLD_FIRST}else o[l]=e.SUBSEQUENT}},e.prototype.getCurrent=function(t){return t>=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_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,e}();t.AnimationState=e;var i=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=i;var n,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(n.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(n.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(n.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(n.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,i=0;i=0?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,(function(o){var a={count:0},h=new Array;try{new t.TextureAtlas(o,(function(e){h.push(""==s?e:s+"/"+e);var i=document.createElement("img");return i.width=16,i.height=16,new t.FakeTexture(i)}))}catch(t){var l=t;return r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(l.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(l.message)),r.toLoad--,void r.loaded++}for(var u=function(l){var u=!1;r.loadTexture(l,(function(l,c){if(a.count++,a.count==h.length)if(u)r.errors[e]="Couldn't load texture atlas page ".concat(l,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(l," of atlas ").concat(e)),r.toLoad--,r.loaded++;else try{var f=new t.TextureAtlas(o,(function(t){return r.get(""==s?t:s+"/"+t)}));r.assets[e]=f,i&&i(e,f),r.toLoad--,r.loaded++}catch(t){var d=t;r.errors[e]="Couldn't load texture atlas ".concat(e,": ").concat(d.message),n&&n(e,"Couldn't load texture atlas ".concat(e,": ").concat(d.message)),r.toLoad--,r.loaded++}}),(function(t,i){u=!0,a.count++,a.count==h.length&&(r.errors[e]="Couldn't load texture atlas page ".concat(t,"} of atlas ").concat(e),n&&n(e,"Couldn't load texture atlas page ".concat(t," of atlas ").concat(e)),r.toLoad--,r.loaded++)}))},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(n||(n={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (region attachment: "+i+")");r.renderObject=r;var s=new t.RegionAttachment(i);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+i+")");r.renderObject=r;var s=new t.MeshAttachment(i);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,i){return new t.BoundingBoxAttachment(i)},e.prototype.newPathAttachment=function(e,i){return new t.PathAttachment(i)},e.prototype.newPointAttachment=function(e,i){return new t.PointAttachment(i)},e.prototype.newClippingAttachment=function(e,i){return new t.ClippingAttachment(i)},e}();t.AtlasAttachmentLoader=e}(n||(n={})),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={}))}(n||(n={})),function(t){var e=function(){function e(t,e,i){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=i,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,i,n,r,s,o,a){this.ax=e,this.ay=i,this.arotation=n,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=n+90+a,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(n+o)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(n+o)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=i*f+l.y)}var d=h.a,p=h.b,v=h.c,g=h.d;switch(this.worldX=d*e+p*i+h.worldX,this.worldY=v*e+g*i+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=n+90+a;var m=t.MathUtils.cosDeg(n+o)*r,M=t.MathUtils.cosDeg(u)*s,y=t.MathUtils.sinDeg(n+o)*r,x=t.MathUtils.sinDeg(u)*s;return this.a=d*m+p*y,this.b=d*M+p*x,this.c=v*m+g*y,void(this.d=v*M+g*x);case t.TransformMode.OnlyTranslation:u=n+90+a;this.a=t.MathUtils.cosDeg(n+o)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(n+o)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var w=0;(b=d*d+v*v)>1e-4?(b=Math.abs(d*g-p*v)/b,d/=this.skeleton.scaleX,p=(v/=this.skeleton.scaleY)*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=n+o-w,T=n+a-w+90;m=t.MathUtils.cosDeg(E)*r,M=t.MathUtils.cosDeg(T)*s,y=t.MathUtils.sinDeg(E)*r,x=t.MathUtils.sinDeg(T)*s;this.a=d*m-p*y,this.b=d*M-p*x,this.c=v*m+g*y,this.d=v*M+g*x;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var b,A=t.MathUtils.cosDeg(n),S=t.MathUtils.sinDeg(n),R=(d*A+p*S)/this.skeleton.scaleX,C=(v*A+g*S)/this.skeleton.scaleY;(b=Math.sqrt(R*R+C*C))>1e-5&&(b=1/b),R*=b,C*=b,b=Math.sqrt(R*R+C*C),this.data.transformMode==t.TransformMode.NoScale&&d*g-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(b=-b);var I=Math.PI/2+Math.atan2(C,R),P=Math.cos(I)*b,L=Math.sin(I)*b;m=t.MathUtils.cosDeg(o)*r,M=t.MathUtils.cosDeg(90+a)*s,y=t.MathUtils.sinDeg(o)*r,x=t.MathUtils.sinDeg(90+a)*s;this.a=R*m+P*y,this.b=R*M+P*x,this.c=C*m+L*y,this.d=C*M+L*x}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 i=e.a,n=e.b,r=e.c,s=e.d,o=1/(i*s-n*r),a=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=a*s*o-h*n*o,this.ay=h*i*o-a*r*o;var l=o*s,u=o*i,c=o*n,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,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),o=t.x-this.worldX,a=t.y-this.worldY;return t.x=o*r*s-a*i*s,t.y=a*e*s-o*n*s,t},e.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(this.a*i-this.c*n,this.d*n-this.b*i)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(n*this.c+i*this.d,n*this.a+i*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var i=this.a,n=this.b,r=this.c,s=this.d,o=t.MathUtils.cosDeg(e),a=t.MathUtils.sinDeg(e);this.a=o*i-a*r,this.b=o*n-a*s,this.c=a*i+o*r,this.d=a*n+o*s,this.appliedValid=!1},e}();t.Bone=e}(n||(n={})),function(t){var e,i=function(i,n,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,i<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=i,this.name=n,this.parent=r};t.BoneData=i,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={}))}(n||(n={})),function(t){var e=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i};t.ConstraintData=e}(n||(n={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(n||(n={})),function(t){var e=function(t){this.name=t};t.EventData=e}(n||(n={})),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 i=0;i180?d-=360:d<-180&&(d+=360);var E=e.ascaleX,T=e.ascaleY;if(r||s){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=i-e.worldX,v=n-e.worldY}var b=e.data.length*E,A=Math.sqrt(p*p+v*v);if(r&&Ab&&b>1e-4)E*=g=(A/b-1)*a+1,o&&(T*=g)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*a,E,T,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,i,n,r,s,o,a,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),i.appliedValid||i.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=i.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=i.ax,y=0,x=0,w=0,E=e.a,T=e.b,b=e.c,A=e.d,S=Math.abs(c-d)<=1e-4;S?(x=E*M+T*(y=i.ay)+e.worldX,w=b*M+A*y+e.worldY):(y=0,x=E*M+e.worldX,w=b*M+e.worldY);var R=e.parent;E=R.a,T=R.b,b=R.c;var C,I,P=1/(E*(A=R.d)-T*b),L=x-R.worldX,_=w-R.worldY,O=(L*A-_*T)*P-l,k=(_*E-L*b)*P-u,F=Math.sqrt(O*O+k*k),V=i.data.length*p;if(F<1e-4)return this.apply1(e,n,r,!1,o,!1,h),void i.updateWorldTransformWith(M,y,0,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY);var D=((L=n-R.worldX)*A-(_=r-R.worldY)*T)*P-l,N=(_*E-L*b)*P-u,U=D*D+N*N;if(0!=a){a*=c*(p+1)/2;var B=Math.sqrt(U),Y=B-F-V*c+a;if(Y>0){var X=Math.min(1,Y/(2*a))-1;U=(D-=(X=(Y-a*(1-X*X))/B)*D)*D+(N-=X*N)*N}}t:if(S){var z=(U-F*F-(V*=c)*V)/(2*F*V);z<-1?z=-1:z>1&&(z=1,o&&(f*=(Math.sqrt(U)/(F+V)-1)*h+1)),I=Math.acos(z)*s,E=F+V*z,T=V*Math.sin(I),C=Math.atan2(N*E-D*T,D*E+N*T)}else{var W=(E=c*V)*E,G=(T=d*V)*T,q=Math.atan2(N,D),H=-2*G*F,j=G-W;if((A=H*H-4*j*(b=G*F*F+W*U-W*G))>=0){var Z=Math.sqrt(A);H<0&&(Z=-Z);var K=(Z=-(H+Z)/2)/j,Q=b/Z,$=Math.abs(K)=-1&&b<=1&&(b=Math.acos(b),(A=(L=E*Math.cos(b)+F)*L+(_=T*Math.sin(b))*_)st&&(nt=b,st=A,rt=L,ot=_)),U<=(et+st)/2?(C=q-Math.atan2(it*s,tt),I=J*s):(C=q-Math.atan2(ot*s,rt),I=nt*s)}var at=Math.atan2(y,M)*m,ht=e.arotation;(C=(C-at)*t.MathUtils.radDeg+v-ht)>180?C-=360:C<-180&&(C+=360),e.updateWorldTransformWith(l,u,ht+C*h,f,e.ascaleY,0,0),ht=i.arotation,(I=((I+at)*t.MathUtils.radDeg-i.ashearX)*m+g-ht)>180?I-=360:I<-180&&(I+=360),i.updateWorldTransformWith(M,y,ht+I*h,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY)}else i.updateWorldTransform()},e}();t.IkConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.bendDirection=1,i.compress=!1,i.stretch=!1,i.uniform=!1,i.mix=1,i.softness=0,i}return r(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(n||(n={})),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 i=0,n=t.bones.length;i0;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,y=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*=n,Y=Math.cos(B),X=Math.sin(B),L.a=Y*V-X*N,L.b=Y*D-X*U,L.c=X*V+Y*N,L.d=X*D+Y*U}L.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(i,n,r,s,o){var a=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*n+2),c=null,f=i.closed,d=i.worldVerticesLength,p=d/6,v=e.NONE;if(!i.constantSpeed){var g=i.lengths,m=g[p-=f?1:2];if(s&&(h*=m),o)for(var M=1;Mm){v!=e.AFTER&&(v=e.AFTER,i.computeWorldVertices(a,d-6,4,c,0,2)),this.addAfterPosition(w-m,c,0,u,y);continue}}for(;;x++){var E=g[x];if(!(w>E)){if(0==x)w/=E;else w=(w-(Z=g[x-1]))/(E-Z);break}}x!=v&&(v=x,f&&x==p?(i.computeWorldVertices(a,d-4,4,c,0,2),i.computeWorldVertices(a,0,4,c,4,2)):i.computeWorldVertices(a,6*x+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,y,r||M>0&&0==G)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(a,2,d-4,c,0,2),i.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),i.computeWorldVertices(a,2,d,c,0,2));for(var T=t.Utils.setArraySize(this.curves,p),b=0,A=c[0],S=c[1],R=0,C=0,I=0,P=0,L=0,_=0,O=0,k=0,F=0,V=0,D=0,N=0,U=0,B=0,Y=(M=0,2);Mb){this.addAfterPosition(w-b,c,d-4,u,y);continue}}for(;;x++){var q=T[x];if(!(w>q)){if(0==x)w/=q;else w=(w-(Z=T[x-1]))/(q-Z);break}}if(x!=v){v=x;var H=6*x;for(A=c[H],S=c[H+1],R=c[H+2],C=c[H+3],I=c[H+4],P=c[H+5],D=2*(O=.03*(A-2*R+I))+(F=.006*(3*(R-I)-A+(L=c[H+6]))),N=2*(k=.03*(S-2*C+P))+(V=.006*(3*(C-P)-S+(_=c[H+7]))),U=.3*(R-A)+O+.16666667*F,B=.3*(C-S)+k+.16666667*V,z=Math.sqrt(U*U+B*B),X[0]=z,H=1;H<8;H++)U+=D,B+=N,D+=F,N+=V,z+=Math.sqrt(U*U+B*B),X[H]=z;U+=D,B+=N,z+=Math.sqrt(U*U+B*B),X[8]=z,U+=D+F,B+=N+V,z+=Math.sqrt(U*U+B*B),X[9]=z,W=0}for(w*=z;;W++){var j=X[W];if(!(w>j)){var Z;if(0==W)w/=j;else w=W+(w-(Z=X[W-1]))/(j-Z);break}}this.addCurvePosition(.1*w,A,S,R,C,I,P,L,_,u,y,r||M>0&&0==G)}return u},e.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],o=e[i+1],a=e[i+2]-s,h=e[i+3]-o,l=Math.atan2(h,a);n[r]=s+t*Math.cos(l),n[r+1]=o+t*Math.sin(l),n[r+2]=l},e.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],o=e[i+3],a=s-e[i],h=o-e[i+1],l=Math.atan2(h,a);n[r]=s+t*Math.cos(l),n[r+1]=o+t*Math.sin(l),n[r+2]=l},e.prototype.addCurvePosition=function(t,e,i,n,r,s,o,a,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,n-e));var f=t*t,d=f*t,p=1-t,v=p*p,g=v*p,m=p*t,M=3*m,y=p*M,x=M*t,w=e*g+n*y+s*x+a*d,E=i*g+r*y+o*x+h*d;l[u]=w,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(E-(i*v+r*m*2+o*f),w-(e*v+n*m*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i}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={}))}(n||(n={})),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}(),i=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,i,n){var r=this.clientAssets[t];return null==r&&(r=new e(t),this.clientAssets[t]=r),null!==i&&(r.textureLoader=i),r.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},t.prototype.loadText=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadJson=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text ".concat(e,": status ").concat(n.status,", ").concat(n.responseText))},n.open("GET",e,!0),n.send()}},t.prototype.loadTexture=function(t,e,i){var n=this;if(i=this.pathPrefix+i,this.queueAsset(t,e,i))if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(i,{mode:"cors"}).then((function(t){return t.ok||(n.errors[i]="Couldn't load image "+i),t.blob()})).then((function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(t){n.rawAssets[i]=t}))}else{var r=new Image;r.crossOrigin="anonymous",r.onload=function(t){n.rawAssets[i]=r},r.onerror=function(t){n.errors[i]="Couldn't load image ".concat(i)},r.src=i}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts,i=0;i0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=i}(n||(n={})),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 i=0;i1){var s=n[n.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),n[n.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 i=e.target,n=i.data.index,r=i.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var s=0,o=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){x=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),Y=0,X=0;for(d=0;d=0;d--)-1==U[d]&&(U[d]=B[--X]);x.setFrame(u,M,U)}s.push(x),a=Math.max(a,x.frames[V-1])}var z=i.readInt(!0);if(z>0){for(x=new t.EventTimeline(z),u=0;u>>1^-(1&i)},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="",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},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}(),n=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},r=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(n||(n={})),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,i){if(null==e)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,s=this.polygonPool,o=e.slots,a=o.length;n.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,i,n){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||t>=o&&i>=o||e>=a&&n>=a)return!1;var h=(n-e)/(i-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 i=this.polygons,n=0,r=i.length;n=i||l=i){var u=n[a];u+(i-h)/(l-h)*(n[s]-u)=u&&y<=d||y>=d&&y<=u)&&(y>=e&&y<=n||y>=n&&y<=e)){var x=(l*m-h*v)/M;if((x>=c&&x<=p||x>=p&&x<=c)&&(x>=i&&x<=r||x>=r&&x<=i))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}(n||(n={})),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(i,n){if(null!=this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(i,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),Y=0;Y<_;Y+=2){var X=U[Y],z=U[Y+1];B[L]=X,B[L+1]=z,B[L+2]=o.r,B[L+3]=o.g,B[L+4]=o.b,B[L+5]=o.a;var W=X-S,G=z-R,q=(O*W+k*G)*D,H=(V*W+F*G)*D,j=1-q-H;B[L+6]=x*q+b*H+C*j,B[L+7]=w*q+A*H+I*j,h&&(B[L+8]=a.r,B[L+9]=a.g,B[L+10]=a.b,B[L+11]=a.a),L+=p}L=c.length;var Z=t.Utils.setArraySize(c,L+3*(N-2));N--;for(Y=1;Y=2?(u=a,a=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(i),u.push(n),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,y=v-m,x=u,w=u.length-2,E=a.length,T=0;T0;if(M*(A-m)-y*(b-g)>0){if(C){a.push(S),a.push(R);continue}var I=(L=R-A)*(g-p)-(_=S-b)*(m-v);if(Math.abs(I)>1e-6){var P=(_*(v-A)-L*(p-b))/I;a.push(p+(g-p)*P),a.push(v+(m-v)*P)}else a.push(p),a.push(v)}else if(C){var L,_;I=(L=R-A)*(g-p)-(_=S-b)*(m-v);if(Math.abs(I)>1e-6){P=(_*(v-A)-L*(p-b))/I;a.push(p+(g-p)*P),a.push(v+(m-v)*P)}else a.push(p),a.push(v);a.push(S),a.push(R)}l=!0}if(E==a.length)return h.length=0,!0;if(a.push(a[0]),a.push(a[1]),d==f)break;var O=a;(a=u).length=0,u=O}if(h!=a){h.length=0;d=0;for(var k=a.length-2;d>1;a=0;f--)-1==G[f]&&(G[f]=H[--Z])}x.setFrame(c++,this.getValue(W,"time",0),G)}s.push(x),o=Math.max(o,x.frames[x.getFrameCount()-1])}if(e.events){for(x=new t.EventTimeline(e.events.length),c=0,f=0;f=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},i.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==i)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=e,this.name=i,this.boneData=n};t.SlotData=e}(n||(n={})),function(t){var e,i,n=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 ".concat(t))}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap ".concat(t))}},t}();t.Texture=n,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"}(i=t.TextureWrap||(t.TextureWrap={}));var s=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}(n);t.FakeTexture=o}(n||(n={})),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 i(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 n).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(),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},t}(),n=function(){};t.TextureAtlasPage=n;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(n||(n={})),function(t){var e=function(){function e(e,i){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==i)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 n=0;n0?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*x,g.b=E*y-T*w,g.c=T*M+E*x,g.d=T*y+E*w,m=!0}if(0!=i){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=(b.x-g.worldX)*i,g.worldY+=(b.y-g.worldY)*i,m=!0}if(n>0){var A=Math.sqrt(g.a*g.a+g.c*g.c),S=Math.sqrt(o*o+h*h);A>1e-5&&(A=(A+(S-A+this.data.offsetScaleX)*n)/A),g.a*=A,g.c*=A,A=Math.sqrt(g.b*g.b+g.d*g.d),S=Math.sqrt(a*a+l*l),A>1e-5&&(A=(A+(S-A+this.data.offsetScaleY)*n)/A),g.b*=A,g.d*=A,m=!0}if(r>0){y=g.b,w=g.d;var R,C=Math.atan2(w,y);(R=Math.atan2(l,a)-Math.atan2(h,o)-(C-Math.atan2(g.c,g.a)))>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R=C+(R+f)*r;A=Math.sqrt(y*y+w*w);g.b=Math.cos(R)*A,g.d=Math.sin(R)*A,m=!0}m&&(g.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,i=this.translateMix,n=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?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*x,g.b=E*y-T*w,g.c=T*M+E*x,g.d=T*y+E*w,m=!0}if(0!=i){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=b.x*i,g.worldY+=b.y*i,m=!0}if(n>0){var A=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleX)*n+1;g.a*=A,g.c*=A,A=(Math.sqrt(a*a+l*l)-1+this.data.offsetScaleY)*n+1,g.b*=A,g.d*=A,m=!0}if(r>0){var S;(S=Math.atan2(l,a)-Math.atan2(h,o))>t.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2);y=g.b,w=g.d;S=Math.atan2(w,y)+(S-t.MathUtils.PI/2+f)*r;A=Math.sqrt(y*y+w*w);g.b=Math.cos(S)*A,g.d=Math.sin(S)*A,m=!0}m&&(g.appliedValid=!1)}},e.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,o=0,a=s.length;o1e-5&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*i)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*i)/p));var v=h.ashearY;if(0!=n){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*n}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=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,o=0,a=s.length;o1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var p=h.ashearY;0!=n&&(p+=(r.ashearY+this.data.offsetShearY)*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(n||(n={})),function(t){var e=function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.rotateMix=0,i.translateMix=0,i.scaleMix=0,i.shearMix=0,i.offsetRotation=0,i.offsetX=0,i.offsetY=0,i.offsetScaleX=0,i.offsetScaleY=0,i.offsetShearY=0,i.relative=!1,i.local=!1,i}return r(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(n||(n={})),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 i=t,n=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=n-1,u=(s=0,1);;){t:if(!o[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=i[c],v=i[c+1],g=i[f],m=i[f+1],M=i[d],y=i[d+1],x=(u+1)%n;x!=l;x=(x+1)%n)if(o[x]){var w=r[x]<<1,E=i[w],T=i[w+1];if(e.positiveArea(M,y,p,v,E,T)&&e.positiveArea(p,v,g,m,E,T)&&e.positiveArea(g,m,M,y,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)%n}h.push(r[(n+s-1)%n]),h.push(r[s]),h.push(r[(s+1)%n]),r.splice(s,1),o.splice(s,1);var b=(--n+s-1)%n,A=s==n?0:s;o[b]=e.isConcave(b,n,i,r),o[A]=e.isConcave(A,n,i,r)}return 3==n&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,i){var n=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=i.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(y),a.push(x),(o=this.polygonIndicesPool.obtain()).length=0,o.push(f),o.push(d),o.push(p),l=e.winding(v,g,m,M,y,x),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,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,o=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[s],i[s+1],i[o],i[o+1])},e.positiveArea=function(t,e,i,n,r,s){return t*(s-n)+i*(e-s)+r*(n-e)>=0},e.winding=function(t,e,i,n,r,s){var o=i-t,a=n-e;return r*a-s*o+o*e-t*a>=0?1:-1},e}();t.Triangulator=e}(n||(n={})),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 null!=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 i=function(){function t(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}return t.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,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,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,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=i;var n=function(){function t(){}return t.clamp=function(t,e,i){return ti?i: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,i){return t.randomTriangularWith(e,i,.5*(e+i))},t.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},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=n;var s=function(){function t(){}return t.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},t}();t.Interpolation=s;var o=function(t){function e(e){var i=t.call(this)||this;return i.power=2,i.power=e,i}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,i,n,r){for(var s=e,o=n;s=i?e:t.setArraySize(e,i,n)},t.newArray=function(t,e){for(var i=new Array(t),n=0;n0?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 x,w=(x=t.bone).worldX,E=x.worldY,T=x.a,b=x.b,A=x.c,S=x.d,R=e,C=r;Cthis.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,i,n){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,n,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,n),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var i=0,n=0;n0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,i=0;i0&&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 i=function(t,e,i){this.name=t,this.type=e,this.numElements=i};t.VertexAttribute=i;var n=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,2)||this}return r(i,e),i}(i);t.Position2Attribute=n;var s=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,3)||this}return r(i,e),i}(i);t.Position3Attribute=s;var o=function(e){function i(i){return void 0===i&&(i=0),e.call(this,t.Shader.TEXCOORDS+(0==i?"":i),h.Float,2)||this}return r(i,e),i}(i);t.TexCoordAttribute=o;var a=function(e){function i(){return e.call(this,t.Shader.COLOR,h.Float,4)||this}return r(i,e),i}(i);t.ColorAttribute=a;var h,l=function(e){function i(){return e.call(this,t.Shader.COLOR2,h.Float,4)||this}return r(i,e),i}(i);t.Color2Attribute=l,function(t){t[t.Float=0]="Float"}(h=t.VertexAttributeType||(t.VertexAttributeType={}))}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(t){var e=function(){function e(e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,n>10920)throw new Error("Can't have more than 10920 triangles per batch: "+n);this.context=e instanceof t.ManagedWebGLRenderingContext?e:new t.ManagedWebGLRenderingContext(e);var r=i?[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,n,3*n),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 i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},e.prototype.draw=function(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.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,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={}))}(n||(n={})),function(t){!function(e){var i,n=function(){function n(i,n,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=i,this.context=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.twoColorTint=r,this.camera=new e.OrthoCamera(i.width,i.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 n.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},n.prototype.drawSkeleton=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=-1),void 0===n&&(n=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,i,n)},n.prototype.drawSkeletonDebug=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,i)},n.prototype.drawTexture=function(t,e,i,n,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++]=i,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+n,o[a++]=i,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+n,o[a++]=i+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++]=i+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)},n.prototype.drawTextureUV=function(t,e,i,n,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++]=i,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+n,u[c++]=i,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+n,u[c++]=i+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++]=i+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)},n.prototype.drawTextureRotated=function(e,i,n,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=i+o,d=n+a,p=-o,v=-a,g=r-o,m=s-a,M=p,y=v,x=p,w=m,E=g,T=m,b=g,A=v,S=0,R=0,C=0,I=0,P=0,L=0,_=0,O=0;if(0!=h){var k=t.MathUtils.cosDeg(h),F=t.MathUtils.sinDeg(h);C=(P=k*E-F*T)+((S=k*M-F*y)-(_=k*x-F*w)),I=(L=F*E+k*T)+((R=F*M+k*y)-(O=F*x+k*w))}else S=M,R=y,_=x,O=w,P=E,L=T,C=b,I=A;S+=f,R+=d,C+=f,I+=d,P+=f,L+=d,_+=f,O+=d;var V=0;c[V++]=S,c[V++]=R,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++]=C,c[V++]=I,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++]=_,c[V++]=O,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)},n.prototype.drawRegion=function(t,e,i,n,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++]=i,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+n,a[h++]=i,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+n,a[h++]=i+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++]=i+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)},n.prototype.line=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,i,n,r)},n.prototype.triangle=function(t,e,i,n,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,i,n,r,s,o,a,h,l)},n.prototype.quad=function(t,e,i,n,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,i,n,r,s,o,a,h,l,u,c,f)},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,i,n,r,s)},n.prototype.rectLine=function(t,e,i,n,r,s,o){void 0===o&&(o=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,i,n,r,s,o)},n.prototype.polygon=function(t,e,i,n){void 0===n&&(n=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,i,n)},n.prototype.circle=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,i,n,r,s)},n.prototype.curve=function(t,e,i,n,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,i,n,r,s,o,a,h,l)},n.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},n.prototype.resize=function(t){var e=this.canvas,n=e.clientWidth,r=e.clientHeight;if(e.width==n&&e.height==r||(e.width=n,e.height=r),this.context.gl.viewport(0,0,e.width,e.height),t===i.Stretch);else if(t===i.Expand)this.camera.setViewport(n,r);else if(t===i.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=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.mesh=new e.Mesh(n,[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 n.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)},n.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},n.prototype.setColor=function(t){this.color.setFromColor(t)},n.prototype.setColorWith=function(t,e,i,n){this.color.set(t,e,i,n)},n.prototype.point=function(t,e,n){void 0===n&&(n=null),this.check(i.Point,1),null===n&&(n=this.color),this.vertex(t,e,n)},n.prototype.line=function(t,e,n,r,s){void 0===s&&(s=null),this.check(i.Line,2);this.mesh.getVertices(),this.vertexIndex;null===s&&(s=this.color),this.vertex(t,e,s),this.vertex(n,r,s)},n.prototype.triangle=function(t,e,n,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?i.Filled:i.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,n,h),this.vertex(r,s,l),this.vertex(o,a,u)):(this.vertex(e,n,h),this.vertex(r,s,l),this.vertex(r,s,h),this.vertex(o,a,l),this.vertex(o,a,h),this.vertex(e,n,l))},n.prototype.quad=function(t,e,n,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?i.Filled:i.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,n,u),this.vertex(r,s,c),this.vertex(o,a,f),this.vertex(o,a,f),this.vertex(h,l,d),this.vertex(e,n,u)):(this.vertex(e,n,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,n,u))},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.quad(t,e,i,e+n,i,e+n,i+r,e,i+r,s,s,s,s)},n.prototype.rectLine=function(t,e,n,r,s,o,a){void 0===a&&(a=null),this.check(t?i.Filled:i.Line,8),null===a&&(a=this.color);var h=this.tmp.set(s-n,e-r);h.normalize(),o*=.5;var l=h.x*o,u=h.y*o;t?(this.vertex(e+l,n+u,a),this.vertex(e-l,n-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,n-u,a)):(this.vertex(e+l,n+u,a),this.vertex(e-l,n-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,n+u,a),this.vertex(r-l,s-u,a),this.vertex(e-l,n-u,a))},n.prototype.x=function(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)},n.prototype.polygon=function(t,e,n,r){if(void 0===r&&(r=null),n<3)throw new Error("Polygon must contain at least 3 vertices");this.check(i.Line,2*n),null===r&&(r=this.color);this.mesh.getVertices(),this.vertexIndex;n<<=1;for(var s=t[e<<=1],o=t[e+1],a=e+n,h=e,l=e+n-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)}},n.prototype.circle=function(e,n,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(i.Filled,3*a+3),a--;for(p=0;p0;)this.vertex(E,T,u),E+=b,T+=A,b+=S,A+=R,S+=C,R+=I,this.vertex(E,T,u);this.vertex(E,T,u),this.vertex(a,h,u)},n.prototype.vertex=function(t,e,i){var n=this.vertexIndex,r=this.mesh.getVertices();r[n++]=t,r[n++]=e,r[n++]=i.r,r[n++]=i.g,r[n++]=i.b,r[n++]=i.a,this.vertexIndex=n},n.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},n.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},n.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=(X=n.slots).length;u0){e.setColor(this.attachmentLineColor);var A=g[(y=2*(y>>1))-2],S=g[y-1];for(x=0,w=y;x-1||e.circle(!0,s+f.worldX,o+f.worldY,3*this.scale,i.GREEN,8)}}if(this.drawClipping){var X=n.slots;e.setColor(this.clipColor);for(u=0,c=X.length;u=0&&s==S.data.index&&(E=!0),E){o>=0&&o==S.data.index&&(E=!1);var R=S.getAttachment(),C=null;if(R instanceof t.RegionAttachment){var I=R;v.vertices=this.vertices,v.numVertices=4,v.numFloats=A<<2,I.computeWorldVertices(S.bone,v.vertices,0,A),m=n.QUAD_TRIANGLES,g=I.uvs,C=I.region.renderObject.texture,y=I.color}else{if(!(R instanceof t.MeshAttachment)){if(R instanceof t.ClippingAttachment){var P=R;a.clipStart(S,P);continue}a.clipEndWithSlot(S);continue}var L=R;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(S,0,L.worldVerticesLength,v.vertices,0,A),m=L.triangles,C=L.region.renderObject.texture,g=L.uvs,y=L.color}if(null!=C){var _=S.color,O=this.tempColor;O.r=x.r*_.r*y.r,O.g=x.g*_.g*y.g,O.b=x.b*_.b*y.b,O.a=x.a*_.a*y.a,h&&(O.r*=O.a,O.g*=O.a,O.b*=O.a);var k=this.tempColor2;null==S.darkColor?k.set(0,0,0,1):(h?(k.r=S.darkColor.r*O.a,k.g=S.darkColor.g*O.a,k.b=S.darkColor.b*O.a):k.setFromColor(S.darkColor),k.a=h?1:0);var F=S.data.blendMode;if(F!=u&&(u=F,i.setBlendMode(e.WebGLBlendModeConverter.getSourceGLBlendMode(u,h),e.WebGLBlendModeConverter.getDestGLBlendMode(u))),a.isClipping()){a.clipTriangles(v.vertices,v.numFloats,m,m.length,g,O,k,l);var V=new Float32Array(a.clippedVertices),D=a.clippedTriangles;if(null!=this.vertexEffect){var N=this.vertexEffect,U=V;if(l){Y=0;for(var B=V.length;Y-1&&this.restorables.splice(e,1)},t}();e.ManagedWebGLRenderingContext=i;var n=function(){function e(){}return e.getDestGLBlendMode=function(i){switch(i){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: "+i)}},e.getSourceGLBlendMode=function(i,n){switch(void 0===n&&(n=!1),i){case t.BlendMode.Normal:case t.BlendMode.Additive:return n?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: "+i)}},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=n}(t.webgl||(t.webgl={}))}(n||(n={})),t.exports=n}).call(window)},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(0),r=i(9),s=i(211),o=i(6),a=i(223),h=i(224),l=i(225),u=new n({Extends:h,initialize:function(t,e,i,n,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")}),n=r(m,"atlasURL"),s=r(m,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),f=0;f + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(10),s=i(24),o=i(25),a=i(9),h=i(6),l=i(48),u=new n({Extends:s,initialize:function t(e,i,n,r,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),r=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var f={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:r,config:o};if(s.call(this,e,f),l){var d=new t(e,this.key,l,r,o);d.type="normalMap",this.setLink(d),e.addFile(d)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){s.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(t.data),t.onProcessError()},s.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addfile"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="filecomplete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="filecomplete-"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="loaderror"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="load"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="fileprogress"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="postprocess"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="progress"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(49);t.exports=function(t,e){var i=n(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var s in i.headers)r.setRequestHeader(s,i.headers[s]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(10),s=i(24),o=i(25),a=i(9),h=i(8),l=i(6),u=new n({Extends:s,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var f={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};s.call(this,t,f),l(i)&&(this.data=o?h(i,o):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(10),s=i(47),o=new n({initialize:function(t,e,i,n){var s=[];n.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.state=r.FILE_PENDING,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(10),s=i(24),o=i(25),a=i(9),h=i(6),l=new n({Extends:s,initialize:function(t,e,i,n){var r="text",o="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),n=a(u,"xhrSettings"),o=a(u,"extension",o),r=a(u,"type",r),l=a(u,"cache",l)}var c={type:r,cache:l,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(31),r=i(1),s=i(0),o=i(51),a=i(52),h=i(53),l=i(54),u=i(55),c=i(56),f=i(14),d=i(21),p=i(57),v=i(16),g=i(248),m=i(255),M=new s({Extends:p,Mixins:[o,a,h,l,u,c,m],initialize:function(t,e,i,n,r,s,o){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),r&&this.setSkeleton(r,s,o)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var n=this.plugin,r=n.sceneRenderer;n.gl&&r.batcher.isDrawing&&(r.end(),n.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,n=(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=i,o.color.g=n,o.color.b=r,null!==s&&(o.color.a=s),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=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,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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(228),s=new n({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(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={CHANGE_DATA:i(229),CHANGE_DATA_KEY:i(230),DESTROY:i(231),REMOVE_DATA:i(232),SET_DATA:i(233)}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="changedata"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="changedata-"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedata"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="setdata"},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function s(){}function o(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function a(t,e,i,n,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new o(i,n||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function l(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(r=!1)),l.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},l.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,o=new Array(s);n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="addedtoscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="destroy"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="removedfromscene"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="created"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="error"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="loop"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="play"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="seeked"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="seeking"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="stop"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="timeout"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="unlocked"},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={COMPLETE:i(249),DISPOSE:i(250),END:i(251),EVENT:i(252),INTERRUPTED:i(253),START:i(254)}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="complete"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="dispose"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="end"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="event"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="interrupted"},function(t,e){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports="start"},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(2),r=i(2),s=i(2);n=i(256),s=i(257),t.exports={renderWebGL:n,renderCanvas:r,renderDirect:s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(1),r=i(14),s=i(60),o=i(16),a=i(7);t.exports=function(t,e,i,h,l){var u=e.plugin,c=e.skeleton,f=u.sceneRenderer;t.newType&&(t.pipelines.clear(),f.begin());var d=e.scrollFactorX,p=e.scrollFactorY,v=c.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,c.color.a=n(v*l.alpha,0,1)),i.addToRenderList(e);var g=s(e,i,h).calc,m=t.height;if(c.x=g.tx,c.y=m-g.ty,c.scaleX=g.scaleX,c.scaleY=g.scaleY,e.scaleX<0?(c.scaleX*=-1,e.root.rotation=a(o(g.rotationNormalized)-180,0,360)):e.root.rotation=a(o(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(c.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*o(g.rotationNormalized):e.root.rotation+=2*o(g.rotationNormalized)),c.updateWorldTransform(),f.drawSkeleton(c,e.preMultipliedAlpha),l&&(e.scrollFactorX=d,e.scrollFactorY=p,c.color.a=v),u.drawDebug||e.drawDebug){var M=c.x,y=c.y;c.x=0,c.y=0,f.drawSkeletonDebug(c,e.preMultipliedAlpha),c.x=M,c.y=y}t.nextTypeMatch||(f.end(),t.pipelines.rebind())}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(1),r=i(14),s=i(60),o=i(16),a=i(7);t.exports=function(t,e,i,h,l){var u=e.plugin,c=e.skeleton,f=u.sceneRenderer;t.pipelines.clear(),f.begin();var d=e.scrollFactorX,p=e.scrollFactorY,v=c.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,c.color.a=n(v*l.alpha,0,1)),i.addToRenderList(e);var g=s(e,i,h).calc,m=t.height;if(c.x=g.tx,c.y=m-g.ty,c.scaleX=g.scaleX,c.scaleY=g.scaleY,e.scaleX<0?(c.scaleX*=-1,e.root.rotation=a(o(g.rotationNormalized)-180,0,360)):e.root.rotation=a(o(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(c.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*o(g.rotationNormalized):e.root.rotation+=2*o(g.rotationNormalized)),c.updateWorldTransform(),f.drawSkeleton(c,e.preMultipliedAlpha),l&&(e.scrollFactorX=d,e.scrollFactorY=p,c.color.a=v),u.drawDebug||e.drawDebug){var M=c.x,y=c.y;c.x=0,c.y=0,f.drawSkeletonDebug(c,e.preMultipliedAlpha),c.x=M,c.y=y}f.end(),t.pipelines.rebind()}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ +var n=i(0),r=i(259),s=i(344),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s){r.call(this,t,i,n,s),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=o},function(t,e,i){ +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(260),r=i(13),s=i(0),o=i(311),a=i(59),h=i(57),l=i(29),u=i(341),c=i(343),f=i(3),d=new s({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,n=[null],r=this.list.slice(),s=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=d},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Matrix:i(261),Add:i(270),AddAt:i(271),BringToTop:i(272),CountAllMatching:i(273),Each:i(274),EachInRange:i(275),FindClosestInSorted:i(276),Flatten:i(277),GetAll:i(278),GetFirst:i(279),GetRandom:i(280),MoveDown:i(281),MoveTo:i(282),MoveUp:i(283),MoveAbove:i(284),MoveBelow:i(285),NumberArray:i(286),NumberArrayStep:i(287),QuickSelect:i(288),Range:i(289),Remove:i(290),RemoveAt:i(291),RemoveBetween:i(292),RemoveRandomElement:i(293),Replace:i(294),RotateLeft:i(62),RotateRight:i(63),SafeRange:i(5),SendToBack:i(295),SetAll:i(296),Shuffle:i(64),SortByDigits:i(297),SpliceOne:i(11),StableSort:i(298),Swap:i(310)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={CheckMatrix:i(27),MatrixToString:i(262),ReverseColumns:i(264),ReverseRows:i(265),Rotate180:i(266),RotateLeft:i(267),RotateMatrix:i(17),RotateRight:i(268),Translate:i(269),TransposeMatrix:i(61)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(263),r=i(27);t.exports=function(t){var e="";if(!r(t))return 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(r-s+1).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 + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(17);t.exports=function(t){return n(t,180)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(17);t.exports=function(t){return n(t,90)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(17);t.exports=function(t){return n(t,-90)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(62),r=i(63);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):r(t,i)),0!==e)for(var s=0;s0){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>s&&(e.splice(s),o=s);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var o=0;if(n(t,r,s))for(var a=r;a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s)){var o,a=[null];for(o=5;oe.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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=function(t,e){void 0===e&&(e=[]);for(var n=0;n + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var o=[];if(n(t,r,s))for(var a=r;a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var o=r;o0){var n=t[i-1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=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=t.indexOf(e);if(-1!==i&&ir||(t.splice(n,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},function(t,e){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n=e;r--)o?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)o?s.push(i+r.toString()+n):s.push(r);return s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(43);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],s=Math.max(n((e-t)/(i||1)),0),o=0;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var r=function(t,e,s,o,a){for(void 0===s&&(s=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>s;){if(o-s>600){var h=o-s+1,l=e-s+1,u=Math.log(h),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),d=Math.max(s,Math.floor(e-l*c/h+f)),p=Math.min(o,Math.floor(e+(h-l)*c/h+f));r(t,e,d,p,a)}var v=t[e],g=s,m=o;for(i(t,s,e),a(t[o],v)>0&&i(t,s,o);g0;)m--}0===a(t[s],v)?i(t,s,m):i(t,++m,o),m<=e&&(s=m+1),e<=m&&(o=m-1)}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(8),r=i(64),s=function(t,e,i){for(var n=[],r=0;r + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(11);t.exports=function(t,e,i,r){var s;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(n(t,s),i&&i.call(r,e),e):null;for(var o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(s=t.indexOf(h))&&(n(t,s),a.push(h),i&&i.call(r,h)),o--}return a}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(11);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var s=n(t,e);return i&&i.call(r,s),s}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(r)for(var h=0;h + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(11);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return n(t,r)}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(5);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var o=r;o + * @author Angry Bytes (and contributors) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(299);function r(t,e){return String(t).localeCompare(e)}function s(t,e,i,n){var r,s,o,a,h,l=t.length,u=0,c=2*i;for(r=0;rl&&(s=l),o>l&&(o=l),a=r,h=s;;)if(a + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={os:i(28),browser:i(18),features:i(301),input:i(305),audio:i(306),video:i(307),fullscreen:i(308),canvasFeatures:i(309)}},function(t,e){var i,n,r=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h,l=[],u=!1,c=-1;function f(){u&&h&&(u=!1,h.length?l=h.concat(l):c=-1,l.length&&d())}function d(){if(!u){var t=a(f);u=!0;for(var e=l.length;e;){for(h=l,l=[];++c1)for(var i=1;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(28),r=i(18),s=i(65),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=s.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=s.create2D(this),n=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,s.remove(t),s.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(r.ie||r.firefox||r.chrome)&&(o.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n={VERSION:"3.60.0-beta.18",BlendModes:i(13),ScaleModes:i(303),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(18),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(18),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var n=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(n||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(n)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(n.edge)r.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(10===s&&o>=11||s>10)&&(r.dolby=!0)}}}catch(t){}return r}()},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return i;var t=document.createElement("video"),e=!!t.canPlayType,n=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(n,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(n,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType("video/x-m4v").replace(n,"")&&(i.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(n,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(n,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(n,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return i;var t,e="Fullscreen",n="FullScreen",r=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;t + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n,r,s,o=i(65),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(s=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(s,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+r},s.src=n+"AP804Oa6"+r,!1),a.supportInverseAlpha=function(){var t=o.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),n=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return o.remove(this),n}()),a)},function(t,e){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +t.exports={Alpha:i(312),AlphaSingle:i(313),BlendMode:i(314),ComputedSize:i(51),Crop:i(315),Depth:i(52),Flip:i(53),FX:i(316),GetBounds:i(317),Mask:i(326),Origin:i(331),PathFollower:i(332),Pipeline:i(335),ScrollFactor:i(54),Size:i(337),Texture:i(338),TextureCrop:i(339),Tint:i(340),ToJSON:i(58),Transform:i(55),TransformMatrix:i(26),Visible:i(56)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(1),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(1),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(13),r={_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=r},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.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=i},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=i},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(29),r=i(42),s=i(3),o={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new 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,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,s,o,a,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,s=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,s=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,o,h),t.y=Math.min(i,s,a,l),t.width=Math.max(e,r,o,h)-t.x,t.height=Math.max(i,s,a,l)-t.y,t}};t.exports=o},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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(66),r=i(67);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=r(t)/i);for(var o=0;o + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(321),s=i(322),o=i(30),a=i(324),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 r(this,t,e)},getPoints:function(t,e,i){return s(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,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +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){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(323),r=i(12);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(12);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(12);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(327),r=i(330),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,s){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new n(this.scene,t,e,i,r,s)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=s},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(328),s=new n({initialize:function(t,e,i,n,r,s){e||(e=t.sys.make.image({x:i,y:n,key:r,frame:s,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,n,r){return new s(this.scene,t,e,i,n,r)})),t.exports=s},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(0),r=i(329),s=i(23),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},r.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={},n={},r={register:function(t,e,n,r){void 0===r&&(r=!1),i[t]={plugin:e,mapping:n,custom:r}},registerCustom:function(t,e,i,r){n[t]={plugin:e,mapping:i,data:r}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var n=t.maskStack[t.maskStack.length-1];n.mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=i},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(21),r=i(333),s=i(8),o=i(334),a=i(3),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=s(t,"from",0),t.to=s(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=s(t,"rotationOffset",0);var l=s(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===o.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var s=this.x,a=this.y;this.setPosition(r.x,r.y);var h=this.x-s,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}};t.exports=h},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(336),r=i(11),s={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var n=i.get(t);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){var o=s.get(t);o&&(this.pipeline=o),e&&(this.pipelineData=i?n(e):e)}return this},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){Array.isArray(t)||(t=[t]);for(var o=0;o0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,n=[],r=0;r=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),r(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=s},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i=function(t){var e,n,r;if("object"!=typeof t||null===t)return t;for(r in e=Array.isArray(t)?[]:{},t)n=t[r],e[r]=i(n);return e};t.exports=i},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(68),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(68),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},function(t,e){ +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var i={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this.tintFill||16777215!==this.tintTopLeft||16777215!==this.tintTopRight||16777215!==this.tintBottomLeft||16777215!==this.tintBottomRight}}};t.exports=i},function(t,e,i){ +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(2),r=n,s=n;r=i(342),t.exports={renderWebGL:r,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list,s=r.length;if(0!==s){var o=e.localTransform;n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(29);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=Math.min(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-r,a=Math.max(t.bottom,e.bottom)-s;return i.setTo(r,s,o,a)}},function(t,e,i){ +/** + * @author Richard Davey + * @copyright 2022 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ +var n=i(2),r=i(2);n=i(345),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){var r=e.plugin.sceneRenderer,s=e.list;if(0!==s.length){i.addToRenderList(e);var o=e.localTransform;n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var a=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ +// shim for using process in browser +var process = module.exports = {}; -/** - * 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'; +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; /***/ }), -/***/ "../../../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 ***! - \***************************************************/ +/***/ "../../../src/const.js": +/*!*************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/const.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * @namespace Phaser.Core.Events + * Global constants. + * + * @ignore */ -module.exports = { +var CONST = { - 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") + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.60.0-beta.18', + + BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ "../../../src/renderer/BlendModes.js"), + + ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ "../../../src/renderer/ScaleModes.js"), + + /** + * This setting will auto-detect if the browser is capable of suppporting WebGL. + * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer. + * + * @name Phaser.AUTO + * @const + * @type {number} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports + * WebGL or not. + * + * @name Phaser.CANVAS + * @const + * @type {number} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is + * no fallback to Canvas with this setting, so you should trap it and display a suitable + * message to the user. + * + * @name Phaser.WEBGL + * @const + * @type {number} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still + * absolutely relies on the DOM being present and available. This mode is meant for unit testing, + * not for running Phaser on the server, which is something you really shouldn't do. + * + * @name Phaser.HEADLESS + * @const + * @type {number} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {number} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {number} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {number} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {number} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {number} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {number} + * @since 3.0.0 + */ + RIGHT: 8 }; +module.exports = CONST; + /***/ }), /***/ "../../../src/data/DataManager.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/data/DataManager.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1193,6 +1040,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.0.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @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. * @@ -1231,6 +1081,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to increase the value for. * @param {*} [data] - The value to increase for the given key. * @@ -1270,6 +1123,9 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to toggle the value for. * * @return {Phaser.Data.DataManager} This DataManager object. @@ -1645,32 +1501,33 @@ module.exports = DataManager; /***/ }), /***/ "../../../src/data/events/CHANGE_DATA_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * a change data event from a Game Object you would use: `sprite.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 + * @type {string} * @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. @@ -1682,31 +1539,32 @@ module.exports = 'changedata'; /***/ }), /***/ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`, + * the change of a specific data item from a Game Object you would use: `sprite.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')`. + * then you can listen for `sprite.on('changedata-gold')`. * * @event Phaser.Data.Events#CHANGE_DATA_KEY + * @type {string} * @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. @@ -1717,15 +1575,15 @@ module.exports = 'changedata-'; /***/ }), /***/ "../../../src/data/events/DESTROY_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/DESTROY_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1735,6 +1593,7 @@ module.exports = 'changedata-'; * The Data Manager will listen for the destroy event from its parent, and then close itself down. * * @event Phaser.Data.Events#DESTROY + * @type {string} * @since 3.50.0 */ module.exports = 'destroy'; @@ -1743,29 +1602,30 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/data/events/REMOVE_DATA_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. + * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`. * * @event Phaser.Data.Events#REMOVE_DATA + * @type {string} * @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. @@ -1776,29 +1636,30 @@ module.exports = 'removedata'; /***/ }), /***/ "../../../src/data/events/SET_DATA_EVENT.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. + * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`. * * @event Phaser.Data.Events#SET_DATA + * @type {string} * @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. @@ -1809,15 +1670,15 @@ module.exports = 'setdata'; /***/ }), /***/ "../../../src/data/events/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/index.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1838,22 +1699,1557 @@ module.exports = { /***/ }), -/***/ "../../../src/display/mask/BitmapMask.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/display/mask/BitmapMask.js ***! - \*********************************************************/ +/***/ "../../../src/device/Audio.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); + +/** + * Determines the audio playback capabilities of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.audio` from within any Scene. + * + * @typedef {object} Phaser.Device.Audio + * @since 3.0.0 + * + * @property {boolean} audioData - Can this device play HTML Audio tags? + * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files? + * @property {boolean} m4a - Can this device can play m4a files. + * @property {boolean} aac - Can this device can play aac files. + * @property {boolean} flac - Can this device can play flac files. + * @property {boolean} mp3 - Can this device play mp3 files? + * @property {boolean} ogg - Can this device play ogg files? + * @property {boolean} opus - Can this device play opus files? + * @property {boolean} wav - Can this device play wav files? + * @property {boolean} webAudio - Does this device have the Web Audio API? + * @property {boolean} webm - Can this device play webm files? + */ +var Audio = { + + flac: false, + aac: false, + audioData: false, + dolby: false, + m4a: false, + mp3: false, + ogg: false, + opus: false, + wav: false, + webAudio: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Audio; + } + + Audio.audioData = !!(window['Audio']); + + Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']); + + var audioElement = document.createElement('audio'); + var result = !!audioElement.canPlayType; + + try + { + if (result) + { + var CanPlay = function (type1, type2) + { + var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, ''); + + if (type2) + { + return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, '')); + } + else + { + return Boolean(canPlayType1); + } + }; + + // wav Mimetypes accepted: + // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + + Audio.ogg = CanPlay('ogg; codecs="vorbis"'); + Audio.opus = CanPlay('ogg; codecs="opus"', 'opus'); + Audio.mp3 = CanPlay('mpeg'); + Audio.wav = CanPlay('wav'); + Audio.m4a = CanPlay('x-m4a'); + Audio.aac = CanPlay('aac'); + Audio.flac = CanPlay('flac', 'x-flac'); + Audio.webm = CanPlay('webm; codecs="vorbis"'); + + if (audioElement.canPlayType('audio/mp4; codecs="ec-3"') !== '') + { + if (Browser.edge) + { + Audio.dolby = true; + } + else if (Browser.safari && Browser.safariVersion >= 9) + { + if ((/Mac OS X (\d+)_(\d+)/).test(navigator.userAgent)) + { + var major = parseInt(RegExp.$1, 10); + var minor = parseInt(RegExp.$2, 10); + + if ((major === 10 && minor >= 11) || major > 10) + { + Audio.dolby = true; + } + } + } + } + } + } + catch (e) + { + // Nothing to do here + } + + return Audio; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Browser.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"); + +/** + * Determines the browser type and version running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.browser` from within any Scene. + * + * @typedef {object} Phaser.Device.Browser + * @since 3.0.0 + * + * @property {boolean} chrome - Set to true if running in Chrome. + * @property {boolean} edge - Set to true if running in Microsoft Edge browser. + * @property {boolean} firefox - Set to true if running in Firefox. + * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge). + * @property {boolean} mobileSafari - Set to true if running in Mobile Safari. + * @property {boolean} opera - Set to true if running in Opera. + * @property {boolean} safari - Set to true if running in Safari. + * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle) + * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+) + * @property {number} chromeVersion - If running in Chrome this will contain the major version number. + * @property {number} firefoxVersion - If running in Firefox this will contain the major version number. + * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion. + * @property {number} safariVersion - If running in Safari this will contain the major version number. + * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx} + */ +var Browser = { + + chrome: false, + chromeVersion: 0, + edge: false, + firefox: false, + firefoxVersion: 0, + ie: false, + ieVersion: 0, + mobileSafari: false, + opera: false, + safari: false, + safariVersion: 0, + silk: false, + trident: false, + tridentVersion: 0, + es2019: false + +}; + +function init () +{ + var ua = navigator.userAgent; + + if ((/Edg\/\d+/).test(ua)) + { + Browser.edge = true; + Browser.es2019 = true; + } + else if ((/OPR/).test(ua)) { + Browser.opera = true; + Browser.es2019 = true; + } + else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) + { + Browser.chrome = true; + Browser.chromeVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.chromeVersion > 69); + } + else if ((/Firefox\D+(\d+)/).test(ua)) + { + Browser.firefox = true; + Browser.firefoxVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.firefoxVersion > 10); + } + else if ((/AppleWebKit/).test(ua) && OS.iOS) + { + Browser.mobileSafari = true; + } + else if ((/MSIE (\d+\.\d+);/).test(ua)) + { + Browser.ie = true; + Browser.ieVersion = parseInt(RegExp.$1, 10); + } + else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) + { + Browser.safari = true; + Browser.safariVersion = parseInt(RegExp.$1, 10); + Browser.es2019 = (Browser.safariVersion > 10); + } + else if ((/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/).test(ua)) + { + Browser.ie = true; + Browser.trident = true; + Browser.tridentVersion = parseInt(RegExp.$1, 10); + Browser.ieVersion = parseInt(RegExp.$3, 10); + } + + // Silk gets its own if clause because its ua also contains 'Safari' + if ((/Silk/).test(ua)) + { + Browser.silk = true; + } + + return Browser; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/CanvasFeatures.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "../../../src/display/canvas/CanvasPool.js"); + +/** + * Determines the canvas features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.canvasFeatures` from within any Scene. + * + * @typedef {object} Phaser.Device.CanvasFeatures + * @since 3.0.0 + * + * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha. + * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes. + */ +var CanvasFeatures = { + + supportInverseAlpha: false, + supportNewBlendModes: false + +}; + +function checkBlendMode () +{ + var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/'; + var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=='; + + var magenta = new Image(); + + magenta.onload = function () + { + var yellow = new Image(); + + yellow.onload = function () + { + var canvas = CanvasPool.create2D(yellow, 6); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.globalCompositeOperation = 'multiply'; + + context.drawImage(magenta, 0, 0); + context.drawImage(yellow, 2, 0); + + if (!context.getImageData(2, 0, 1, 1)) + { + return false; + } + + var data = context.getImageData(2, 0, 1, 1).data; + + CanvasPool.remove(yellow); + + CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0); + }; + + yellow.src = pngHead + '/wCKxvRF' + pngEnd; + }; + + magenta.src = pngHead + 'AP804Oa6' + pngEnd; + + return false; +} + +function checkInverseAlpha () +{ + var canvas = CanvasPool.create2D(this, 2); + var context = canvas.getContext('2d', { willReadFrequently: true }); + + context.fillStyle = 'rgba(10, 20, 30, 0.5)'; + + // Draw a single pixel + context.fillRect(0, 0, 1, 1); + + // Get the color values + var s1 = context.getImageData(0, 0, 1, 1); + + if (s1 === null) + { + return false; + } + + // Plot them to x2 + context.putImageData(s1, 1, 0); + + // Get those values + var s2 = context.getImageData(1, 0, 1, 1); + + var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]); + + CanvasPool.remove(this); + + // Compare and return + return result; +} + +function init () +{ + if (typeof importScripts !== 'function' && document !== undefined) + { + CanvasFeatures.supportNewBlendModes = checkBlendMode(); + CanvasFeatures.supportInverseAlpha = checkInverseAlpha(); + } + + return CanvasFeatures; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Features.js": +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Features.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var OS = __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"); +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); +var CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "../../../src/display/canvas/CanvasPool.js"); + +/** + * Determines the features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.features` from within any Scene. + * + * @typedef {object} Phaser.Device.Features + * @since 3.0.0 + * + * @property {boolean} canvas - Is canvas available? + * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap. + * @property {boolean} file - Is file available? + * @property {boolean} fileSystem - Is fileSystem available? + * @property {boolean} getUserMedia - Does the device support the getUserMedia API? + * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays) + * @property {boolean} localStorage - Is localStorage available? + * @property {boolean} pointerLock - Is Pointer Lock available? + * @property {boolean} stableSort - Is Array.sort stable? + * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views? + * @property {boolean} vibration - Does the device support the Vibration API? + * @property {boolean} webGL - Is webGL available? + * @property {boolean} worker - Is worker available? + */ +var Features = { + + canvas: false, + canvasBitBltShift: null, + file: false, + fileSystem: false, + getUserMedia: true, + littleEndian: false, + localStorage: false, + pointerLock: false, + stableSort: false, + support32bit: false, + vibration: false, + webGL: false, + worker: false + +}; + +// Check Little or Big Endian system. +// @author Matt DesLauriers (@mattdesl) +function checkIsLittleEndian () +{ + var a = new ArrayBuffer(4); + var b = new Uint8Array(a); + var c = new Uint32Array(a); + + b[0] = 0xa1; + b[1] = 0xb2; + b[2] = 0xc3; + b[3] = 0xd4; + + if (c[0] === 0xd4c3b2a1) + { + return true; + } + + if (c[0] === 0xa1b2c3d4) + { + return false; + } + else + { + // Could not determine endianness + return null; + } +} + +function init () +{ + if (typeof importScripts === 'function') + { + return Features; + } + + Features.canvas = !!window['CanvasRenderingContext2D']; + + try + { + Features.localStorage = !!localStorage.getItem; + } + catch (error) + { + Features.localStorage = false; + } + + Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; + Features.fileSystem = !!window['requestFileSystem']; + + var isUint8 = false; + + var testWebGL = function () + { + if (window['WebGLRenderingContext']) + { + try + { + var canvas = CanvasPool.createWebGL(this); + + var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); + + var canvas2D = CanvasPool.create2D(this); + + var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true }); + + // Can't be done on a webgl context + var image = ctx2D.createImageData(1, 1); + + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) + isUint8 = image.data instanceof Uint8ClampedArray; + + CanvasPool.remove(canvas); + CanvasPool.remove(canvas2D); + + return !!ctx; + } + catch (e) + { + return false; + } + } + + return false; + }; + + Features.webGL = testWebGL(); + + Features.worker = !!window['Worker']; + + Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document; + + navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia; + + window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL; + + Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL; + + // Older versions of firefox (< 21) apparently claim support but user media does not actually work + if (Browser.firefox && Browser.firefoxVersion < 21) + { + Features.getUserMedia = false; + } + + // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it + // is safer to not try and use the fast copy-over method. + if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome)) + { + Features.canvasBitBltShift = true; + } + + // Known not to work + if (Browser.safari || Browser.mobileSafari) + { + Features.canvasBitBltShift = false; + } + + navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; + + if (navigator.vibrate) + { + Features.vibration = true; + } + + if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined') + { + Features.littleEndian = checkIsLittleEndian(); + } + + Features.support32bit = ( + typeof ArrayBuffer !== 'undefined' && + typeof Uint8ClampedArray !== 'undefined' && + typeof Int32Array !== 'undefined' && + Features.littleEndian !== null && + isUint8 + ); + + return Features; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Fullscreen.js": +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the full screen support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.fullscreen` from within any Scene. + * + * @typedef {object} Phaser.Device.Fullscreen + * @since 3.0.0 + * + * @property {boolean} available - Does the browser support the Full Screen API? + * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode? + * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it. + * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it. + */ +var Fullscreen = { + + available: false, + cancel: '', + keyboard: false, + request: '' + +}; + +/** +* Checks for support of the Full Screen API. +* +* @ignore +*/ +function init () +{ + if (typeof importScripts === 'function') + { + return Fullscreen; + } + + var i; + + var suffix1 = 'Fullscreen'; + var suffix2 = 'FullScreen'; + + var fs = [ + 'request' + suffix1, + 'request' + suffix2, + 'webkitRequest' + suffix1, + 'webkitRequest' + suffix2, + 'msRequest' + suffix1, + 'msRequest' + suffix2, + 'mozRequest' + suffix2, + 'mozRequest' + suffix1 + ]; + + for (i = 0; i < fs.length; i++) + { + if (document.documentElement[fs[i]]) + { + Fullscreen.available = true; + Fullscreen.request = fs[i]; + break; + } + } + + var cfs = [ + 'cancel' + suffix2, + 'exit' + suffix1, + 'webkitCancel' + suffix2, + 'webkitExit' + suffix1, + 'msCancel' + suffix2, + 'msExit' + suffix1, + 'mozCancel' + suffix2, + 'mozExit' + suffix1 + ]; + + if (Fullscreen.available) + { + for (i = 0; i < cfs.length; i++) + { + if (document[cfs[i]]) + { + Fullscreen.cancel = cfs[i]; + break; + } + } + } + + // Keyboard Input? + // Safari 5.1 says it supports fullscreen keyboard, but is lying. + if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\/5\.1(?:\.\d+)? Safari\//).test(navigator.userAgent)) + { + Fullscreen.keyboard = true; + } + + Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } }); + + return Fullscreen; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/Input.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Input.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Browser = __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"); + +/** + * Determines the input support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.input` from within any Scene. + * + * @typedef {object} Phaser.Device.Input + * @since 3.0.0 + * + * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll' + * @property {boolean} gamepads - Is navigator.getGamepads available? + * @property {boolean} mspointer - Is mspointer available? + * @property {boolean} touch - Is touch available? + */ +var Input = { + + gamepads: false, + mspointer: false, + touch: false, + wheelEvent: null + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Input; + } + + if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1)) + { + Input.touch = true; + } + + if (navigator.msPointerEnabled || navigator.pointerEnabled) + { + Input.mspointer = true; + } + + if (navigator.getGamepads) + { + Input.gamepads = true; + } + + // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel + if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window)) + { + // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+ + Input.wheelEvent = 'wheel'; + } + else if ('onmousewheel' in window) + { + // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7. + Input.wheelEvent = 'mousewheel'; + } + else if (Browser.firefox && 'MouseScrollEvent' in window) + { + // FF prior to 17. This should probably be scrubbed. + Input.wheelEvent = 'DOMMouseScroll'; + } + + return Input; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/OS.js": +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/OS.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the operating system of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.os` from within any Scene. + * + * @typedef {object} Phaser.Device.OS + * @since 3.0.0 + * + * @property {boolean} android - Is running on android? + * @property {boolean} chromeOS - Is running on chromeOS? + * @property {boolean} cordova - Is the game running under Apache Cordova? + * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK? + * @property {boolean} desktop - Is running on a desktop? + * @property {boolean} ejecta - Is the game running under Ejecta? + * @property {boolean} electron - Is the game running under GitHub Electron? + * @property {boolean} iOS - Is running on iOS? + * @property {boolean} iPad - Is running on iPad? + * @property {boolean} iPhone - Is running on iPhone? + * @property {boolean} kindle - Is running on an Amazon Kindle? + * @property {boolean} linux - Is running on linux? + * @property {boolean} macOS - Is running on macOS? + * @property {boolean} node - Is the game running under Node.js? + * @property {boolean} nodeWebkit - Is the game running under Node-Webkit? + * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView + * @property {boolean} windows - Is running on windows? + * @property {boolean} windowsPhone - Is running on a Windows Phone? + * @property {number} iOSVersion - If running in iOS this will contain the major version number. + * @property {number} pixelRatio - PixelRatio of the host device? + */ +var OS = { + + android: false, + chromeOS: false, + cordova: false, + crosswalk: false, + desktop: false, + ejecta: false, + electron: false, + iOS: false, + iOSVersion: 0, + iPad: false, + iPhone: false, + kindle: false, + linux: false, + macOS: false, + node: false, + nodeWebkit: false, + pixelRatio: 1, + webApp: false, + windows: false, + windowsPhone: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return OS; + } + + var ua = navigator.userAgent; + + if ((/Windows/).test(ua)) + { + OS.windows = true; + } + else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua))) + { + // Because iOS 13 identifies as Mac OS: + if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2) + { + OS.iOS = true; + OS.iPad = true; + + (navigator.appVersion).match(/Version\/(\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + } + else + { + OS.macOS = true; + } + } + else if ((/Android/).test(ua)) + { + OS.android = true; + } + else if ((/Linux/).test(ua)) + { + OS.linux = true; + } + else if ((/iP[ao]d|iPhone/i).test(ua)) + { + OS.iOS = true; + + (navigator.appVersion).match(/OS (\d+)/); + + OS.iOSVersion = parseInt(RegExp.$1, 10); + + OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1; + OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1; + } + else if ((/Kindle/).test(ua) || (/\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua)) + { + OS.kindle = true; + + // This will NOT detect early generations of Kindle Fire, I think there is no reliable way... + // E.g. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true" + } + else if ((/CrOS/).test(ua)) + { + OS.chromeOS = true; + } + + if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua)) + { + OS.android = false; + OS.iOS = false; + OS.macOS = false; + OS.windows = true; + OS.windowsPhone = true; + } + + var silk = (/Silk/).test(ua); + + if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS) + { + OS.desktop = true; + } + + // Windows Phone / Table reset + if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua)))) + { + OS.desktop = false; + } + + // WebApp mode in iOS + if (navigator.standalone) + { + OS.webApp = true; + } + + if (typeof importScripts !== 'function') + { + if (window.cordova !== undefined) + { + OS.cordova = true; + } + + if (window.ejecta !== undefined) + { + OS.ejecta = true; + } + } + + if (typeof process !== 'undefined' && process.versions && process.versions.node) + { + OS.node = true; + } + + if (OS.node && typeof process.versions === 'object') + { + OS.nodeWebkit = !!process.versions['node-webkit']; + + OS.electron = !!process.versions.electron; + } + + if ((/Crosswalk/).test(ua)) + { + OS.crosswalk = true; + } + + OS.pixelRatio = window['devicePixelRatio'] || 1; + + return OS; +} + +module.exports = init(); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/process/browser.js */ "../../../node_modules/process/browser.js"))) + +/***/ }), + +/***/ "../../../src/device/Video.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/Video.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determines the video support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.video` from within any Scene. + * + * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix. + * + * @typedef {object} Phaser.Device.Video + * @since 3.0.0 + * + * @property {boolean} h264 - Can this device play h264 mp4 video files? + * @property {boolean} hls - Can this device play hls video files? + * @property {boolean} mp4 - Can this device play h264 mp4 video files? + * @property {boolean} m4v - Can this device play m4v (typically mp4) video files? + * @property {boolean} ogg - Can this device play ogg video files? + * @property {boolean} vp9 - Can this device play vp9 video files? + * @property {boolean} webm - Can this device play webm video files? + */ +var Video = { + + h264: false, + hls: false, + mp4: false, + m4v: false, + ogg: false, + vp9: false, + webm: false + +}; + +function init () +{ + if (typeof importScripts === 'function') + { + return Video; + } + + var videoElement = document.createElement('video'); + var result = !!videoElement.canPlayType; + var no = /^no$/; + + try + { + if (result) + { + if (videoElement.canPlayType('video/ogg; codecs="theora"').replace(no, '')) + { + Video.ogg = true; + } + + if (videoElement.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(no, '')) + { + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + Video.h264 = true; + Video.mp4 = true; + } + + if (videoElement.canPlayType('video/x-m4v').replace(no, '')) + { + Video.m4v = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp8, vorbis"').replace(no, '')) + { + Video.webm = true; + } + + if (videoElement.canPlayType('video/webm; codecs="vp9"').replace(no, '')) + { + Video.vp9 = true; + } + + if (videoElement.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(no, '')) + { + Video.hls = true; + } + } + } + catch (e) + { + // Nothing to do + } + + return Video; +} + +module.exports = init(); + + +/***/ }), + +/***/ "../../../src/device/index.js": +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/device/index.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// This singleton is instantiated as soon as Phaser loads, +// before a Phaser.Game instance has even been created. +// Which means all instances of Phaser Games can share it, +// without having to re-poll the device all over again + +/** + * @namespace Phaser.Device + * @since 3.0.0 + */ + +/** + * @typedef {object} Phaser.DeviceConf + * + * @property {Phaser.Device.OS} os - The OS Device functions. + * @property {Phaser.Device.Browser} browser - The Browser Device functions. + * @property {Phaser.Device.Features} features - The Features Device functions. + * @property {Phaser.Device.Input} input - The Input Device functions. + * @property {Phaser.Device.Audio} audio - The Audio Device functions. + * @property {Phaser.Device.Video} video - The Video Device functions. + * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions. + * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions. + */ + +module.exports = { + + os: __webpack_require__(/*! ./OS */ "../../../src/device/OS.js"), + browser: __webpack_require__(/*! ./Browser */ "../../../src/device/Browser.js"), + features: __webpack_require__(/*! ./Features */ "../../../src/device/Features.js"), + input: __webpack_require__(/*! ./Input */ "../../../src/device/Input.js"), + audio: __webpack_require__(/*! ./Audio */ "../../../src/device/Audio.js"), + video: __webpack_require__(/*! ./Video */ "../../../src/device/Video.js"), + fullscreen: __webpack_require__(/*! ./Fullscreen */ "../../../src/device/Fullscreen.js"), + canvasFeatures: __webpack_require__(/*! ./CanvasFeatures */ "../../../src/device/CanvasFeatures.js") + +}; + + +/***/ }), + +/***/ "../../../src/display/canvas/CanvasPool.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(/*! ../../const */ "../../../src/const.js"); +var Smoothing = __webpack_require__(/*! ./Smoothing */ "../../../src/display/canvas/Smoothing.js"); + +// The pool into which the canvas elements are placed. +var pool = []; + +// Automatically apply smoothing(false) to created Canvas elements +var _disableContextSmoothing = false; + +/** + * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements. + * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, + * which is useless for some of the Phaser pipelines / renderer. + * + * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created. + * Which means all instances of Phaser Games on the same page can share the one single pool. + * + * @namespace Phaser.Display.Canvas.CanvasPool + * @since 3.0.0 + */ +var CanvasPool = function () +{ + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent? + * + * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool + */ + var create = function (parent, width, height, canvasType, selfParent) + { + if (width === undefined) { width = 1; } + if (height === undefined) { height = 1; } + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + if (selfParent === undefined) { selfParent = false; } + + var canvas; + var container = first(canvasType); + + if (container === null) + { + container = { + parent: parent, + canvas: document.createElement('canvas'), + type: canvasType + }; + + if (canvasType === CONST.CANVAS) + { + pool.push(container); + } + + canvas = container.canvas; + } + else + { + container.parent = parent; + + canvas = container.canvas; + } + + if (selfParent) + { + container.parent = canvas; + } + + canvas.width = width; + canvas.height = height; + + if (_disableContextSmoothing && canvasType === CONST.CANVAS) + { + Smoothing.disable(canvas.getContext('2d')); + } + + return canvas; + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.create2D + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created canvas. + */ + var create2D = function (parent, width, height) + { + return create(parent, width, height, CONST.CANVAS); + }; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * + * @function Phaser.Display.Canvas.CanvasPool.createWebGL + * @since 3.0.0 + * + * @param {*} parent - The parent of the Canvas object. + * @param {number} [width=1] - The width of the Canvas. + * @param {number} [height=1] - The height of the Canvas. + * + * @return {HTMLCanvasElement} The created WebGL canvas. + */ + var createWebGL = function (parent, width, height) + { + return create(parent, width, height, CONST.WEBGL); + }; + + /** + * Gets the first free canvas index from the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.first + * @since 3.0.0 + * + * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. + * + * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases. + */ + var first = function (canvasType) + { + if (canvasType === undefined) { canvasType = CONST.CANVAS; } + + if (canvasType === CONST.WEBGL) + { + return null; + } + + for (var i = 0; i < pool.length; i++) + { + var container = pool[i]; + + if (!container.parent && container.type === canvasType) + { + return container; + } + } + + return null; + }; + + /** + * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use. + * The canvas has its width and height set to 1, and its parent attribute nulled. + * + * @function Phaser.Display.Canvas.CanvasPool.remove + * @since 3.0.0 + * + * @param {*} parent - The canvas or the parent of the canvas to free. + */ + var remove = function (parent) + { + // Check to see if the parent is a canvas object + var isCanvas = parent instanceof HTMLCanvasElement; + + pool.forEach(function (container) + { + if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent)) + { + container.parent = null; + container.canvas.width = 1; + container.canvas.height = 1; + } + }); + }; + + /** + * Gets the total number of used canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.total + * @since 3.0.0 + * + * @return {number} The number of used canvases. + */ + var total = function () + { + var c = 0; + + pool.forEach(function (container) + { + if (container.parent) + { + c++; + } + }); + + return c; + }; + + /** + * Gets the total number of free canvas elements in the pool. + * + * @function Phaser.Display.Canvas.CanvasPool.free + * @since 3.0.0 + * + * @return {number} The number of free canvases. + */ + var free = function () + { + return pool.length - total(); + }; + + /** + * Disable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing + * @since 3.0.0 + */ + var disableSmoothing = function () + { + _disableContextSmoothing = true; + }; + + /** + * Enable context smoothing on any new Canvas element created. + * + * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing + * @since 3.0.0 + */ + var enableSmoothing = function () + { + _disableContextSmoothing = false; + }; + + return { + create2D: create2D, + create: create, + createWebGL: createWebGL, + disableSmoothing: disableSmoothing, + enableSmoothing: enableSmoothing, + first: first, + free: free, + pool: pool, + remove: remove, + total: total + }; +}; + +// If we export the called function here, it'll only be invoked once (not every time it's required). +module.exports = CanvasPool(); + + +/***/ }), + +/***/ "../../../src/display/canvas/Smoothing.js": +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Browser specific prefix, so not going to change between contexts, only between browsers +var prefix = ''; + +/** + * @namespace Phaser.Display.Canvas.Smoothing + * @since 3.0.0 + */ +var Smoothing = function () +{ + /** + * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set. + * + * @function Phaser.Display.Canvas.Smoothing.getPrefix + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check. + * + * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported. + */ + var getPrefix = function (context) + { + var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ]; + + for (var i = 0; i < vendors.length; i++) + { + var s = vendors[i] + 'mageSmoothingEnabled'; + + if (s in context) + { + return s; + } + } + + return null; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.enable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var enable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = true; + } + + return context; + }; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * + * @function Phaser.Display.Canvas.Smoothing.disable + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing. + * + * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context. + */ + var disable = function (context) + { + if (prefix === '') + { + prefix = getPrefix(context); + } + + if (prefix) + { + context[prefix] = false; + } + + return context; + }; + + /** + * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`. + * Returns null if no smoothing prefix is available. + * + * @function Phaser.Display.Canvas.Smoothing.isEnabled + * @since 3.0.0 + * + * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check. + * + * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported. + */ + var isEnabled = function (context) + { + return (prefix !== null) ? context[prefix] : null; + }; + + return { + disable: disable, + enable: enable, + getPrefix: getPrefix, + isEnabled: isEnabled + }; + +}; + +module.exports = Smoothing(); + + +/***/ }), + +/***/ "../../../src/display/mask/BitmapMask.js": +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); -var GameEvents = __webpack_require__(/*! ../../core/events */ "../../../src/core/events/index.js"); -var RenderEvents = __webpack_require__(/*! ../../renderer/events */ "../../../src/renderer/events/index.js"); +var GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ "../../../src/gameobjects/GameObjectFactory.js"); /** * @classdesc @@ -1861,7 +3257,7 @@ var RenderEvents = __webpack_require__(/*! ../../renderer/events */ "../../../sr * 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). + * A Bitmap Mask can use any Game Object or Dynamic Texture 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. @@ -1890,87 +3286,38 @@ var RenderEvents = __webpack_require__(/*! ../../renderer/events */ "../../../sr * @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. + * @param {Phaser.Scene} scene - The Scene to which this mask is being added. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. */ var BitmapMask = new Class({ initialize: - function BitmapMask (scene, renderable) + function BitmapMask (scene, maskObject, x, y, texture, frame) { - var renderer = scene.sys.renderer; + if (!maskObject) + { + maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false }); + } /** - * 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. + * The Game Object that is used as the mask. Must use a texture, such as a Sprite. * * @name Phaser.Display.Masks.BitmapMask#bitmapMask - * @type {Phaser.GameObjects.GameObject} + * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} * @since 3.0.0 */ - this.bitmapMask = renderable; - - /** - * The texture used for the masks 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; + this.bitmapMask = maskObject; /** * 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 @@ -1980,7 +3327,7 @@ var BitmapMask = new Class({ this.invertAlpha = false; /** - * Is this mask a stencil mask? + * Is this mask a stencil mask? This is false by default and should not be changed. * * @name Phaser.Display.Masks.BitmapMask#isStencil * @type {boolean} @@ -1988,92 +3335,23 @@ var BitmapMask = new Class({ * @since 3.17.0 */ this.isStencil = false; - - this.createMask(); - - scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this); - - if (renderer) - { - renderer.on(RenderEvents.RESIZE, this.createMask, this); - } }, /** - * Creates the WebGL Texture2D objects and Framebuffers required for this - * mask. If this mask has already been created, then `clearMask` is called first. + * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use. * - * @method Phaser.Display.Masks.BitmapMask#createMask - * @since 3.50.0 - */ - createMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl) - { - return; - } - - if (this.mainTexture) - { - this.clearMask(); - } - - 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); - }, - - /** - * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes - * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references. + * If a Game Object it must have a texture, such as a Sprite. * - * This is called when this mask is destroyed, or if you try to creat a new - * mask from this object when one is already set. - * - * @method Phaser.Display.Masks.BitmapMask#clearMask - * @since 3.50.0 - */ - clearMask: function () - { - var renderer = this.renderer; - - if (!renderer || !renderer.gl || !this.mainTexture) - { - return; - } - - 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; - }, - - /** - * Sets a new masking Game Object for the Bitmap Mask. + * You can update the source of the mask as often as you like. * * @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. + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite. */ - setBitmap: function (renderable) + setBitmap: function (maskObject) { - this.bitmapMask = renderable; + this.bitmapMask = maskObject; }, /** @@ -2102,10 +3380,12 @@ var BitmapMask = new Class({ * @since 3.0.0 * * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget. */ - postRenderWebGL: function (renderer, camera) + postRenderWebGL: function (renderer, camera, renderTarget) { - renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget); }, /** @@ -2147,35 +3427,71 @@ var BitmapMask = new Class({ */ destroy: function () { - this.clearMask(); - - if (this.renderer) - { - this.renderer.off(RenderEvents.RESIZE, this.createMask, this); - } - this.bitmapMask = null; - this.prevFramebuffer = null; - this.renderer = null; } }); +/** + * 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, or Dynamic Texture, 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. + * + * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however, + * combine Geometry Masks and Blend Modes together. + * + * 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. + * + * @method Phaser.GameObjects.GameObjectFactory#bitmapMask + * @since 3.60.0 + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + * + * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created. + */ +GameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame) +{ + return new BitmapMask(this.scene, maskObject, x, y, key, frame); +}); + module.exports = BitmapMask; /***/ }), /***/ "../../../src/display/mask/GeometryMask.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/display/mask/GeometryMask.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2492,15 +3808,15 @@ module.exports = GeometryMask; /***/ }), /***/ "../../../src/gameobjects/BuildGameObject.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2625,15 +3941,15 @@ module.exports = BuildGameObject; /***/ }), /***/ "../../../src/gameobjects/GameObject.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/GameObject.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2967,6 +4283,9 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#setData * @since 3.0.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @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. * @@ -2997,6 +4316,9 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#incData * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to increase the value for. * @param {*} [data] - The value to increase for the given key. * @@ -3027,6 +4349,9 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#toggleData * @since 3.23.0 * + * @generic {any} T + * @genericUse {(string|T)} - [key] + * * @param {(string|object)} key - The key to toggle the value for. * * @return {this} This GameObject. @@ -3137,10 +4462,7 @@ var GameObject = new Class({ */ disableInteractive: function () { - if (this.input) - { - this.input.enabled = false; - } + this.scene.sys.input.disable(this); return this; }, @@ -3247,7 +4569,9 @@ var GameObject = new Class({ */ willRender: function (camera) { - return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); + var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true; + + return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); }, /** @@ -3397,7 +4721,7 @@ var GameObject = new Class({ { var displayList = this.displayList || this.scene.sys.displayList; - if (displayList.exists(this)) + if (displayList && displayList.exists(this)) { displayList.remove(this, true); @@ -3454,8 +4778,10 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#destroy * @fires Phaser.GameObjects.Events#DESTROY * @since 3.0.0 + * + * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not. */ - destroy: function () + destroy: function (fromScene) { // This Game Object has already been destroyed if (!this.scene || this.ignoreDestroy) @@ -3463,12 +4789,14 @@ var GameObject = new Class({ return; } + if (fromScene === undefined) { fromScene = false; } + if (this.preDestroy) { this.preDestroy.call(this); } - this.emit(Events.DESTROY, this); + this.emit(Events.DESTROY, this, fromScene); this.removeAllListeners(); @@ -3524,16 +4852,254 @@ module.exports = GameObject; /***/ }), -/***/ "../../../src/gameobjects/GetCalcMatrix.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/GetCalcMatrix.js ***! - \***********************************************************/ +/***/ "../../../src/gameobjects/GameObjectFactory.js": +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "../../../src/plugins/PluginCache.js"); +var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene/events/index.js"); + +/** + * @classdesc + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. + * + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. + * + * @class GameObjectFactory + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. + */ +var GameObjectFactory = new Class({ + + initialize: + + function GameObjectFactory (scene) + { + /** + * The Scene to which this Game Object Factory belongs. + * + * @name Phaser.GameObjects.GameObjectFactory#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + + /** + * A reference to the Scene.Systems. + * + * @name Phaser.GameObjects.GameObjectFactory#systems + * @type {Phaser.Scenes.Systems} + * @protected + * @since 3.0.0 + */ + 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. + * + * @name Phaser.GameObjects.GameObjectFactory#displayList + * @type {Phaser.GameObjects.DisplayList} + * @protected + * @since 3.0.0 + */ + this.displayList; + + /** + * A reference to the Scene Update List. + * + * @name Phaser.GameObjects.GameObjectFactory#updateList + * @type {Phaser.GameObjects.UpdateList} + * @protected + * @since 3.0.0 + */ + this.updateList; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); + }, + + /** + * This method is called automatically, only once, when the Scene is first created. + * Do not invoke it directly. + * + * @method Phaser.GameObjects.GameObjectFactory#boot + * @private + * @since 3.5.1 + */ + boot: function () + { + this.displayList = this.systems.displayList; + this.updateList = this.systems.updateList; + + this.events.once(SceneEvents.DESTROY, this.destroy, this); + }, + + /** + * This method is called automatically by the Scene when it is starting up. + * It is responsible for creating local systems, properties and listening for Scene events. + * Do not invoke it directly. + * + * @method Phaser.GameObjects.GameObjectFactory#start + * @private + * @since 3.5.0 + */ + start: function () + { + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * Adds an existing Game Object to this Scene. + * + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * + * @method Phaser.GameObjects.GameObjectFactory#existing + * @since 3.0.0 + * + * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was added. + */ + existing: function (child) + { + if (child.renderCanvas || child.renderWebGL) + { + this.displayList.add(child); + } + + // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event: + // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway. + if (child.preUpdate) + { + this.updateList.add(child); + } + + return child; + }, + + /** + * 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.GameObjectFactory#shutdown + * @private + * @since 3.0.0 + */ + shutdown: function () + { + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + }, + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + * + * @method Phaser.GameObjects.GameObjectFactory#destroy + * @private + * @since 3.0.0 + */ + destroy: function () + { + this.shutdown(); + + this.events.off(SceneEvents.START, this.start, this); + + this.scene = null; + this.systems = null; + this.events = null; + + this.displayList = null; + this.updateList = null; + } + +}); + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can register a custom GameObject factory in the GameObjectFactory, + * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order + * to be called when you call to Phaser.Scene.add[ factoryType ] method. + * + * @method Phaser.GameObjects.GameObjectFactory.register + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method. + * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method. + */ +GameObjectFactory.register = function (factoryType, factoryFunction) +{ + if (!GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + GameObjectFactory.prototype[factoryType] = factoryFunction; + } +}; + +/** + * Static method called directly by the Game Object factory functions. + * With this method you can remove a custom GameObject factory registered in the GameObjectFactory, + * providing a its `factoryType`. + * + * @method Phaser.GameObjects.GameObjectFactory.remove + * @static + * @since 3.0.0 + * + * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory. + */ +GameObjectFactory.remove = function (factoryType) +{ + if (GameObjectFactory.prototype.hasOwnProperty(factoryType)) + { + delete GameObjectFactory.prototype[factoryType]; + } +}; + +PluginCache.register('GameObjectFactory', GameObjectFactory, 'add'); + +module.exports = GameObjectFactory; + + +/***/ }), + +/***/ "../../../src/gameobjects/GetCalcMatrix.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GetCalcMatrix.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3601,15 +5167,15 @@ module.exports = GetCalcMatrix; /***/ }), /***/ "../../../src/gameobjects/components/Alpha.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Alpha.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3901,15 +5467,15 @@ module.exports = Alpha; /***/ }), /***/ "../../../src/gameobjects/components/AlphaSingle.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/AlphaSingle.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4016,15 +5582,15 @@ module.exports = AlphaSingle; /***/ }), /***/ "../../../src/gameobjects/components/BlendMode.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/BlendMode.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4042,7 +5608,7 @@ var BlendMode = { /** * Private internal value. Holds the current blend mode. - * + * * @name Phaser.GameObjects.Components.BlendMode#_blendMode * @type {number} * @private @@ -4058,6 +5624,7 @@ var BlendMode = { * * Under WebGL only the following Blend Modes are available: * + * * NORMAL * * ADD * * MULTIPLY * * SCREEN @@ -4073,7 +5640,7 @@ var BlendMode = { * are used. * * @name Phaser.GameObjects.Components.BlendMode#blendMode - * @type {(Phaser.BlendModes|string)} + * @type {(Phaser.BlendModes|string|number)} * @since 3.0.0 */ blendMode: { @@ -4107,6 +5674,7 @@ var BlendMode = { * * Under WebGL only the following Blend Modes are available: * + * * NORMAL * * ADD * * MULTIPLY * * SCREEN @@ -4124,7 +5692,7 @@ var BlendMode = { * @method Phaser.GameObjects.Components.BlendMode#setBlendMode * @since 3.0.0 * - * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST. + * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number. * * @return {this} This Game Object instance. */ @@ -4143,22 +5711,22 @@ module.exports = BlendMode; /***/ }), /***/ "../../../src/gameobjects/components/ComputedSize.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 */ @@ -4167,11 +5735,11 @@ 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 @@ -4180,11 +5748,11 @@ var ComputedSize = { /** * 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 @@ -4193,11 +5761,11 @@ var ComputedSize = { /** * 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 @@ -4218,11 +5786,11 @@ var ComputedSize = { /** * 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 @@ -4243,21 +5811,21 @@ var ComputedSize = { /** * 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) @@ -4270,15 +5838,15 @@ var ComputedSize = { /** * 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) @@ -4297,15 +5865,15 @@ module.exports = ComputedSize; /***/ }), /***/ "../../../src/gameobjects/components/Crop.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Crop.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4349,24 +5917,24 @@ var Crop = { /** * 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. * @@ -4411,7 +5979,7 @@ var Crop = { * @method Phaser.GameObjects.Components.Crop#resetCropObject * @private * @since 3.12.0 - * + * * @return {object} The crop object. */ resetCropObject: function () @@ -4427,15 +5995,15 @@ module.exports = Crop; /***/ }), /***/ "../../../src/gameobjects/components/Depth.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Depth.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4461,7 +6029,7 @@ var Depth = { _depth: 0, /** - * The depth of this Game Object within the Scene. + * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type. * * 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. @@ -4508,7 +6076,7 @@ var Depth = { * @method Phaser.GameObjects.Components.Depth#setDepth * @since 3.0.0 * - * @param {number} value - The depth of this Game Object. + * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type. * * @return {this} This Game Object instance. */ @@ -4528,23 +6096,130 @@ module.exports = Depth; /***/ }), -/***/ "../../../src/gameobjects/components/Flip.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Flip.js ***! - \*************************************************************/ +/***/ "../../../src/gameobjects/components/FX.js": +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the FX values of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.FX + * @webglOnly + * @since 3.60.0 + */ + +var FX = { + + /** + * The amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @name Phaser.GameObjects.Components.FX#fxPadding + * @type {number} + * @default 0 + * @since 3.60.0 + */ + fxPadding: 0, + + /** + * Sets the amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * @method Phaser.GameObjects.Components.FX#setFXPadding + * @webglOnly + * @since 3.60.0 + * + * @param {number} [padding=0] - The amount of padding to add to the texture. + * + * @return {this} This Game Object instance. + */ + setFXPadding: function (padding) + { + if (padding === undefined) { padding = 0; } + + this.fxPadding = padding; + + return this; + }, + + /** + * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `copySprite` method. + * + * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFXCopy + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFXCopy: function () + { + }, + + /** + * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `drawSprite` method. + * + * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFX + * @webglOnly + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback. + */ + onFX: function () + { + } + +}; + +module.exports = FX; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Flip.js": +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 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 */ @@ -4553,11 +6228,11 @@ 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 @@ -4567,11 +6242,11 @@ var Flip = { /** * 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 @@ -4581,14 +6256,14 @@ var Flip = { /** * 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 () @@ -4600,10 +6275,10 @@ var Flip = { /** * 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 () @@ -4615,16 +6290,16 @@ var Flip = { /** * 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) @@ -4636,12 +6311,12 @@ var Flip = { /** * 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) @@ -4653,17 +6328,17 @@ var Flip = { /** * 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) @@ -4676,7 +6351,7 @@ var Flip = { /** * 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 * @@ -4698,15 +6373,15 @@ module.exports = Flip; /***/ }), /***/ "../../../src/gameobjects/components/GetBounds.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/GetBounds.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4993,7 +6668,7 @@ var GetBounds = { var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy; - // Instead of doing a check if parent container is + // Instead of doing a check if parent container is // defined per corner we only do it once. if (this.parentContainer) { @@ -5062,15 +6737,15 @@ module.exports = GetBounds; /***/ }), /***/ "../../../src/gameobjects/components/Mask.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Mask.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5149,7 +6824,7 @@ var Mask = { /** * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, - * including this one. + * including this one, or a Dynamic Texture. * * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. * @@ -5159,24 +6834,32 @@ var Mask = { * * 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. + * a Bitmap Mask from any renderable texture-based 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. + * @generic {Phaser.GameObjects.GameObject} G + * @generic {Phaser.Textures.DynamicTexture} T + * @genericUse {(G|T|null)} [maskObject] + * + * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. + * @param {number} [x] - If creating a Game Object, the horizontal position in the world. + * @param {number} [y] - If creating a Game Object, the vertical position in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. + * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. * * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. */ - createBitmapMask: function (renderable) + createBitmapMask: function (maskObject, x, y, texture, frame) { - if (renderable === undefined && (this.texture || this.shader)) + if (maskObject === undefined && (this.texture || this.shader || this.geom)) { // eslint-disable-next-line consistent-this - renderable = this; + maskObject = this; } - return new BitmapMask(this.scene, renderable); + return new BitmapMask(this.scene, maskObject, x, y, texture, frame); }, /** @@ -5193,13 +6876,17 @@ var Mask = { * @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. + * @generic {Phaser.GameObjects.Graphics} G + * @generic {Phaser.GameObjects.Shape} S + * @genericUse {(G|S)} [graphics] + * + * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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') + if (graphics === undefined && (this.type === 'Graphics' || this.geom)) { // eslint-disable-next-line consistent-this graphics = this; @@ -5216,15 +6903,15 @@ module.exports = Mask; /***/ }), /***/ "../../../src/gameobjects/components/Origin.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Origin.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5424,15 +7111,15 @@ module.exports = Origin; /***/ }), /***/ "../../../src/gameobjects/components/PathFollower.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/PathFollower.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5662,7 +7349,7 @@ var PathFollower = { 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; + tweenData.setTargetValue(); }; } @@ -5683,6 +7370,8 @@ var PathFollower = { this.pathDelta.reset(); + config.persist = true; + this.pathTween = this.scene.sys.tweens.addCounter(config); // The starting point of the path, relative to this follower @@ -5799,7 +7488,7 @@ var PathFollower = { if (tweenData.state === TWEEN_CONST.COMPLETE) { - this.path.getPoint(1, pathVector); + this.path.getPoint(tweenData.end, pathVector); pathDelta.add(pathVector); pathVector.add(this.pathOffset); @@ -5856,20 +7545,19 @@ module.exports = PathFollower; /***/ }), /***/ "../../../src/gameobjects/components/Pipeline.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Pipeline.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var DeepCopy = __webpack_require__(/*! ../../utils/object/DeepCopy */ "../../../src/utils/object/DeepCopy.js"); -var PIPELINE_CONST = __webpack_require__(/*! ../../renderer/webgl/pipelines/const */ "../../../src/renderer/webgl/pipelines/const.js"); var SpliceOne = __webpack_require__(/*! ../../utils/array/SpliceOne */ "../../../src/utils/array/SpliceOne.js"); /** @@ -5924,7 +7612,7 @@ var Pipeline = { * If you modify this array directly, be sure to set the * `hasPostPipeline` property accordingly. * - * @name Phaser.GameObjects.Components.Pipeline#postPipeline + * @name Phaser.GameObjects.Components.Pipeline#postPipelines * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]} * @webglOnly * @since 3.50.0 @@ -5950,14 +7638,12 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set. + * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ initPipeline: function (pipeline) { - if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; } - var renderer = this.scene.sys.renderer; if (!renderer) @@ -5972,6 +7658,11 @@ var Pipeline = { if (pipelines) { + if (pipeline === undefined) + { + pipeline = pipelines.default; + } + var instance = pipelines.get(pipeline); if (instance) @@ -6046,7 +7737,7 @@ var Pipeline = { * If you call this method multiple times, the new pipelines will be appended to any existing * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required. * - * You can optionally also sets the `pipelineData` property, if the parameter is given. + * You can optionally also set the `pipelineData` property, if the parameter is given. * * Both the pipeline and post pipelines share the pipeline data object together. * @@ -6146,6 +7837,8 @@ var Pipeline = { */ getPostPipeline: function (pipeline) { + var isString = (typeof pipeline === 'string'); + var pipelines = this.postPipelines; var results = []; @@ -6154,7 +7847,7 @@ var Pipeline = { { var instance = pipelines[i]; - if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline) + if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline)) { results.push(instance); } @@ -6284,15 +7977,15 @@ module.exports = Pipeline; /***/ }), /***/ "../../../src/gameobjects/components/ScrollFactor.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6316,7 +8009,7 @@ var ScrollFactor = { * 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 @@ -6340,7 +8033,7 @@ var ScrollFactor = { * 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 @@ -6364,7 +8057,7 @@ var ScrollFactor = { * 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 @@ -6396,21 +8089,21 @@ module.exports = ScrollFactor; /***/ }), /***/ "../../../src/gameobjects/components/Size.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Size.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 */ @@ -6419,7 +8112,7 @@ var Size = { /** * A property indicating that a Game Object has this component. - * + * * @name Phaser.GameObjects.Components.Size#_sizeComponent * @type {boolean} * @private @@ -6430,11 +8123,11 @@ var Size = { /** * 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 @@ -6443,11 +8136,11 @@ var Size = { /** * 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 @@ -6456,11 +8149,11 @@ var Size = { /** * 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 @@ -6481,11 +8174,11 @@ var Size = { /** * 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 @@ -6506,20 +8199,20 @@ var Size = { /** * 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) @@ -6529,26 +8222,34 @@ var Size = { this.width = frame.realWidth; this.height = frame.realHeight; + var input = this.input; + + if (input && !input.customHitArea) + { + input.hitArea.width = this.width; + input.hitArea.height = this.height; + } + 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) @@ -6561,15 +8262,15 @@ var Size = { /** * 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) @@ -6588,18 +8289,20 @@ module.exports = Size; /***/ }), /***/ "../../../src/gameobjects/components/Texture.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Texture.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js ***! + \**************************************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Frame = __webpack_require__(/*! ../../textures/Frame */ "../../../src/textures/Frame.js"); + // bitmask flag for GameObject.renderMask var _FLAG = 8; // 1000 @@ -6663,17 +8366,19 @@ var Texture = { /** * Sets the frame this Game Object will use to render with. * - * The Frame has to belong to the current Texture being used. + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. * - * It can be either a string or an index. + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. * * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. * * @method Phaser.GameObjects.Components.Texture#setFrame * @since 3.0.0 * - * @param {(string|number)} frame - The name or index of the frame within the Texture. + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. * @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? * @@ -6684,7 +8389,16 @@ var Texture = { if (updateSize === undefined) { updateSize = true; } if (updateOrigin === undefined) { updateOrigin = true; } - this.frame = this.texture.get(frame); + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + this.frame = this.texture.get(frame); + } if (!this.frame.cutWidth || !this.frame.cutHeight) { @@ -6723,18 +8437,20 @@ module.exports = Texture; /***/ }), /***/ "../../../src/gameobjects/components/TextureCrop.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/TextureCrop.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js ***! + \******************************************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Frame = __webpack_require__(/*! ../../textures/Frame */ "../../../src/textures/Frame.js"); + // bitmask flag for GameObject.renderMask var _FLAG = 8; // 1000 @@ -6857,17 +8573,19 @@ var TextureCrop = { /** * Sets the frame this Game Object will use to render with. * - * The Frame has to belong to the current Texture being used. + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. * - * It can be either a string or an index. + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. * * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. * * @method Phaser.GameObjects.Components.TextureCrop#setFrame * @since 3.0.0 * - * @param {(string|number)} frame - The name or index of the frame within the Texture. + * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance. * @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? * @@ -6878,7 +8596,16 @@ var TextureCrop = { if (updateSize === undefined) { updateSize = true; } if (updateOrigin === undefined) { updateOrigin = true; } - this.frame = this.texture.get(frame); + if (frame instanceof Frame) + { + this.texture = this.scene.sys.textures.get(frame.texture.key); + + this.frame = frame; + } + else + { + this.frame = this.texture.get(frame); + } if (!this.frame.cutWidth || !this.frame.cutHeight) { @@ -6936,15 +8663,15 @@ module.exports = TextureCrop; /***/ }), /***/ "../../../src/gameobjects/components/Tint.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Tint.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7178,15 +8905,15 @@ module.exports = Tint; /***/ }), /***/ "../../../src/gameobjects/components/ToJSON.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7244,15 +8971,15 @@ module.exports = ToJSON; /***/ }), /***/ "../../../src/gameobjects/components/Transform.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Transform.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7275,6 +9002,17 @@ var _FLAG = 4; // 0100 var Transform = { + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Transform#hasTransformComponent + * @type {boolean} + * @readonly + * @default true + * @since 3.60.0 + */ + hasTransformComponent: true, + /** * Private internal value. Holds the horizontal scale value. * @@ -7860,15 +9598,15 @@ module.exports = Transform; /***/ }), /***/ "../../../src/gameobjects/components/TransformMatrix.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7936,6 +9674,15 @@ var TransformMatrix = new Class({ scaleY: 1, rotation: 0 }; + + /** + * The temporary quad value cache. + * + * @name Phaser.GameObjects.Components.TransformMatrix#quad + * @type {Float32Array} + * @since 3.60.0 + */ + this.quad = new Float32Array(8); }, /** @@ -8327,14 +10074,14 @@ var TransformMatrix = new Class({ var sourceE = source[4]; var sourceF = source[5]; - var destinationMatrix = (out === undefined) ? this : out; + var destinationMatrix = (out === undefined) ? matrix : out.matrix; - 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; + destinationMatrix[0] = (sourceA * localA) + (sourceB * localC); + destinationMatrix[1] = (sourceA * localB) + (sourceB * localD); + destinationMatrix[2] = (sourceC * localA) + (sourceD * localC); + destinationMatrix[3] = (sourceC * localB) + (sourceD * localD); + destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF; return destinationMatrix; }, @@ -8423,16 +10170,16 @@ var TransformMatrix = new Class({ }, /** - * Transform a point using this Matrix. + * Transform a point in to the local space of 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. + * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in. * - * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. + * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates. */ transformPoint: function (x, y, point) { @@ -8764,6 +10511,61 @@ var TransformMatrix = new Class({ return output; }, + /** + * Performs the 8 calculations required to create the vertices of + * a quad based on this matrix and the given x/y/xw/yh values. + * + * The result is stored in `TransformMatrix.quad`, which is returned + * from this method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setQuad + * @since 3.60.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} xw - The xw value. + * @param {number} yh - The yh value. + * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. + * + * @return {Float32Array} The quad Float32Array. + */ + setQuad: function (x, y, xw, yh, roundPixels, quad) + { + if (quad === undefined) { quad = this.quad; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var e = matrix[4]; + var f = matrix[5]; + + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; + + if (roundPixels) + { + quad.forEach(function (value, index) + { + quad[index] = Math.round(value); + }); + } + + return quad; + }, + /** * Returns the X component of this matrix multiplied by the given values. * This is the same as `x * a + y * c + e`. @@ -8874,6 +10676,7 @@ var TransformMatrix = new Class({ destroy: function () { this.matrix = null; + this.quad = null; this.decomposedMatrix = null; } @@ -8885,15 +10688,15 @@ module.exports = TransformMatrix; /***/ }), /***/ "../../../src/gameobjects/components/Visible.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Visible.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8903,7 +10706,7 @@ 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 */ @@ -8912,7 +10715,7 @@ var Visible = { /** * Private internal value. Holds the visible value. - * + * * @name Phaser.GameObjects.Components.Visible#_visible * @type {boolean} * @private @@ -8923,9 +10726,9 @@ var Visible = { /** * 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 @@ -8955,14 +10758,14 @@ var Visible = { /** * 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) @@ -8979,15 +10782,15 @@ module.exports = Visible; /***/ }), /***/ "../../../src/gameobjects/components/index.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/index.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9004,6 +10807,7 @@ module.exports = { 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"), + FX: __webpack_require__(/*! ./FX */ "../../../src/gameobjects/components/FX.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"), @@ -9025,16 +10829,16 @@ module.exports = { /***/ }), /***/ "../../../src/gameobjects/container/Container.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/Container.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9059,7 +10863,7 @@ var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/V * * 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 + * The transform point 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. * @@ -9477,18 +11281,16 @@ var Container = new Class({ if (this.exclusive) { - gameObject.removeFromDisplayList(); - if (gameObject.parentContainer) { gameObject.parentContainer.remove(gameObject); } - var displayList = this.displayList || this.scene.sys.displayList; - - gameObject.addToDisplayList(displayList); - gameObject.parentContainer = this; + + gameObject.removeFromDisplayList(); + + gameObject.addedToScene(); } }, @@ -9503,14 +11305,14 @@ var Container = new Class({ */ removeHandler: function (gameObject) { - gameObject.off(Events.DESTROY, this.remove); + gameObject.off(Events.DESTROY, this.remove, this); if (this.exclusive) { - gameObject.removeFromDisplayList(); - gameObject.parentContainer = null; + gameObject.removedFromScene(); + gameObject.addToDisplayList(); } }, @@ -9522,10 +11324,10 @@ var Container = new Class({ * @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. + * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed. + * @param {Phaser.Types.Math.Vector2Like} [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. + * @return {Phaser.Types.Math.Vector2Like} The transformed point. */ pointToContainer: function (source, output) { @@ -9537,7 +11339,8 @@ var Container = new Class({ } else { - output = new Vector2(source.x, source.y); + output.x = source.x; + output.y = source.y; } var tempMatrix = this.tempTransformMatrix; @@ -9575,6 +11378,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#add * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. @@ -9596,6 +11402,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#addAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * @param {number} [index=0] - The position to insert the Game Object/s at. * @@ -9614,6 +11423,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAt * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} 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. @@ -9629,6 +11441,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getIndex * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. * * @return {number} The index of the Game Object in this Container, or -1 if not found. @@ -9677,6 +11492,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getByName * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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. @@ -9692,6 +11510,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getRandom * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @param {number} [startIndex=0] - An optional start index. * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from. * @@ -9715,6 +11536,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getFirst * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -9745,6 +11569,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#getAll * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T[]} - [$return] + * * @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 {number} [startIndex=0] - An optional start index to search from. @@ -9787,6 +11614,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#swap * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. * @@ -9810,6 +11640,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveTo * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. * @param {number} index - The new position of the Game Object in this Container. * @@ -9822,6 +11655,52 @@ var Container = new Class({ return this; }, + /** + * Moves a Game Object above another one within this Container. + * + * These 2 Game Objects must already be children of this Container. + * + * @method Phaser.GameObjects.Container#moveAbove + * @since 3.55.0 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * + * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object. + * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. + * + * @return {this} This Container instance. + */ + moveAbove: function (child1, child2) + { + ArrayUtils.MoveAbove(this.list, child1, child2); + + return this; + }, + + /** + * Moves a Game Object below another one within this Container. + * + * These 2 Game Objects must already be children of this Container. + * + * @method Phaser.GameObjects.Container#moveBelow + * @since 3.55.0 + * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child1,child2] + * + * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object. + * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object. + * + * @return {this} This Container instance. + */ + moveBelow: function (child1, child2) + { + ArrayUtils.MoveBelow(this.list, child1, child2); + + return this; + }, + /** * Removes the given Game Object, or array of Game Objects, from this Container. * @@ -9832,6 +11711,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#remove * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {(T|T[])} - [child] + * * @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. * @@ -9925,14 +11807,25 @@ var Container = new Class({ */ removeAll: function (destroyChild) { - var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + var list = this.list; if (destroyChild) { - for (var i = 0; i < removed.length; i++) + for (var i = 0; i < list.length; i++) { - removed[i].destroy(); + if (list[i] && list[i].scene) + { + list[i].off(Events.DESTROY, this.remove, this); + + list[i].destroy(); + } } + + this.list = []; + } + else + { + ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this); } return this; @@ -9945,6 +11838,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#bringToTop * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. * * @return {this} This Container instance. @@ -9963,6 +11859,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#sendToBack * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. * * @return {this} This Container instance. @@ -9980,6 +11879,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveUp * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -9997,6 +11899,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#moveDown * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * * @return {this} This Container instance. @@ -10045,6 +11950,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#replace * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [oldChild,newChild] + * * @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. @@ -10077,6 +11985,9 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#exists * @since 3.4.0 * + * @generic {Phaser.GameObjects.GameObject} T + * @genericUse {T} - [child] + * * @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. @@ -10390,21 +12301,22 @@ module.exports = Container; /***/ }), /***/ "../../../src/gameobjects/container/ContainerRender.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerRender.js ***! - \***********************************************************************/ +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 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"); +var NOOP = __webpack_require__(/*! ../../utils/NOOP */ "../../../src/utils/NOOP.js"); +var renderWebGL = NOOP; +var renderCanvas = NOOP; if (true) { @@ -10425,16 +12337,16 @@ module.exports = { /***/ }), /***/ "../../../src/gameobjects/container/ContainerWebGLRenderer.js": -/*!******************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! - \******************************************************************************/ +/*!****************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10454,6 +12366,8 @@ module.exports = { */ var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix) { + camera.addToRenderList(container); + var children = container.list; var childCount = children.length; @@ -10462,8 +12376,6 @@ var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix return; } - camera.addToRenderList(container); - var transformMatrix = container.localTransform; if (parentMatrix) @@ -10557,7 +12469,7 @@ var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); // Render - child.renderWebGL(renderer, child, camera, transformMatrix); + child.renderWebGL(renderer, child, camera, transformMatrix, container); // Restore original values @@ -10582,15 +12494,15 @@ module.exports = ContainerWebGLRenderer; /***/ }), /***/ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! - \*************************************************************************/ +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! + \***********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10602,6 +12514,7 @@ module.exports = ContainerWebGLRenderer; * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. * * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @type {string} * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. @@ -10613,29 +12526,31 @@ module.exports = 'addedtoscene'; /***/ }), /***/ "../../../src/gameobjects/events/DESTROY_EVENT.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. + * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not. */ module.exports = 'destroy'; @@ -10643,15 +12558,15 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js": -/*!*****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! - \*****************************************************************************/ +/*!***************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! + \***************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10663,6 +12578,7 @@ module.exports = 'destroy'; * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. * * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @type {string} * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. @@ -10674,35 +12590,36 @@ module.exports = 'removedfromscene'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! - \*************************************************************************/ +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! + \***********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback. */ module.exports = 'complete'; @@ -10711,30 +12628,31 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. * @param {number} width - The width of the video. * @param {number} height - The height of the video. @@ -10745,28 +12663,29 @@ module.exports = 'created'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js": -/*!**********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! - \**********************************************************************/ +/*!********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! + \********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @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. */ @@ -10776,35 +12695,36 @@ module.exports = 'error'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped. */ module.exports = 'loop'; @@ -10813,31 +12733,32 @@ module.exports = 'loop'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback. */ module.exports = 'play'; @@ -10846,28 +12767,29 @@ module.exports = 'play'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! - \***********************************************************************/ +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! + \*********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking. */ module.exports = 'seeked'; @@ -10876,29 +12798,30 @@ module.exports = 'seeked'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking. */ module.exports = 'seeking'; @@ -10907,29 +12830,30 @@ module.exports = 'seeking'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_STOP_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback. */ module.exports = 'stop'; @@ -10938,29 +12862,30 @@ module.exports = 'stop'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out. */ module.exports = 'timeout'; @@ -10969,29 +12894,30 @@ module.exports = 'timeout'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! - \*************************************************************************/ +/*!***********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! + \***********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * @type {string} * @since 3.20.0 - * + * * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. */ module.exports = 'unlocked'; @@ -11000,15 +12926,15 @@ module.exports = 'unlocked'; /***/ }), /***/ "../../../src/gameobjects/events/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11038,15 +12964,15 @@ module.exports = { /***/ }), /***/ "../../../src/geom/const.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/geom/const.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/const.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11054,7 +12980,7 @@ var GEOM_CONST = { /** * A Circle Geometry object type. - * + * * @name Phaser.Geom.CIRCLE * @type {number} * @since 3.19.0 @@ -11063,7 +12989,7 @@ var GEOM_CONST = { /** * An Ellipse Geometry object type. - * + * * @name Phaser.Geom.ELLIPSE * @type {number} * @since 3.19.0 @@ -11072,7 +12998,7 @@ var GEOM_CONST = { /** * A Line Geometry object type. - * + * * @name Phaser.Geom.LINE * @type {number} * @since 3.19.0 @@ -11081,7 +13007,7 @@ var GEOM_CONST = { /** * A Point Geometry object type. - * + * * @name Phaser.Geom.POINT * @type {number} * @since 3.19.0 @@ -11090,7 +13016,7 @@ var GEOM_CONST = { /** * A Polygon Geometry object type. - * + * * @name Phaser.Geom.POLYGON * @type {number} * @since 3.19.0 @@ -11099,7 +13025,7 @@ var GEOM_CONST = { /** * A Rectangle Geometry object type. - * + * * @name Phaser.Geom.RECTANGLE * @type {number} * @since 3.19.0 @@ -11108,7 +13034,7 @@ var GEOM_CONST = { /** * A Triangle Geometry object type. - * + * * @name Phaser.Geom.TRIANGLE * @type {number} * @since 3.19.0 @@ -11123,15 +13049,15 @@ module.exports = GEOM_CONST; /***/ }), /***/ "../../../src/geom/line/GetPoint.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/GetPoint.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11167,15 +13093,15 @@ module.exports = GetPoint; /***/ }), /***/ "../../../src/geom/line/GetPoints.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/GetPoints.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11237,15 +13163,15 @@ module.exports = GetPoints; /***/ }), /***/ "../../../src/geom/line/Length.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Length.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11270,15 +13196,15 @@ module.exports = Length; /***/ }), /***/ "../../../src/geom/line/Line.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Line.js ***! - \************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11612,15 +13538,15 @@ module.exports = Line; /***/ }), /***/ "../../../src/geom/line/Random.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Random.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11657,15 +13583,15 @@ module.exports = Random; /***/ }), /***/ "../../../src/geom/point/Point.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/point/Point.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11755,15 +13681,15 @@ module.exports = Point; /***/ }), /***/ "../../../src/geom/rectangle/Contains.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Contains.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11795,15 +13721,15 @@ module.exports = Contains; /***/ }), /***/ "../../../src/geom/rectangle/GetPoint.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoint.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11812,9 +13738,9 @@ var Point = __webpack_require__(/*! ../point/Point */ "../../../src/geom/point/P /** * 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 @@ -11881,24 +13807,21 @@ module.exports = GetPoint; /***/ }), /***/ "../../../src/geom/rectangle/GetPoints.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoints.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. * @@ -11940,15 +13863,15 @@ module.exports = GetPoints; /***/ }), /***/ "../../../src/geom/rectangle/Perimeter.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Perimeter.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11973,15 +13896,15 @@ module.exports = Perimeter; /***/ }), /***/ "../../../src/geom/rectangle/Random.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Random.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12016,15 +13939,15 @@ module.exports = Random; /***/ }), /***/ "../../../src/geom/rectangle/Rectangle.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Rectangle.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12131,9 +14054,9 @@ var Rectangle = new Class({ /** * 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 @@ -12532,15 +14455,15 @@ module.exports = Rectangle; /***/ }), /***/ "../../../src/geom/rectangle/Union.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Union.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12579,15 +14502,15 @@ module.exports = Union; /***/ }), /***/ "../../../src/loader/File.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/File.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/File.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12646,6 +14569,11 @@ var File = new Class({ */ this.type = GetFastValue(fileConfig, 'type', false); + if (!this.type) + { + throw new Error('Invalid File type: ' + this.type); + } + /** * Unique cache key (unique within its file type) * @@ -12662,9 +14590,9 @@ var File = new Class({ this.key = loader.prefix + loadKey; } - if (!this.type || !this.key) + if (!this.key) { - throw new Error('Invalid Loader.' + this.type + ' key'); + throw new Error('Invalid File key: ' + this.key); } var url = GetFastValue(fileConfig, 'url'); @@ -12673,7 +14601,7 @@ var File = new Class({ { url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)) + else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) { url = loader.path + url; } @@ -12897,7 +14825,12 @@ var File = new Class({ */ onLoad: function (xhr, event) { - var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0)); + var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme) + { + return xhr.responseURL.indexOf(scheme) === 0; + }); + + var localFileOk = (isLocalFile && event.target.status === 0); var success = !(event.target && event.target.status !== 200) || localFileOk; @@ -12994,6 +14927,9 @@ var File = new Class({ */ onProcessError: function () { + // eslint-disable-next-line no-console + console.error('Failed to process file: %s "%s"', this.type, this.key); + this.state = CONST.FILE_ERRORED; if (this.multiFile) @@ -13028,12 +14964,10 @@ var File = new Class({ */ addToCache: function () { - if (this.cache) + if (this.cache && this.data) { this.cache.add(this.key, this.data); } - - this.pendingDestroy(); }, /** @@ -13047,6 +14981,11 @@ var File = new Class({ */ pendingDestroy: function (data) { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + if (data === undefined) { data = this.data; } var key = this.key; @@ -13056,6 +14995,8 @@ var File = new Class({ this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data); this.loader.flagForRemoval(this); + + this.state = CONST.FILE_PENDING_DESTROY; }, /** @@ -13134,15 +15075,15 @@ module.exports = File; /***/ }), /***/ "../../../src/loader/FileTypesManager.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/FileTypesManager.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13156,13 +15097,13 @@ var FileTypesManager = { /** * Static method called when a LoaderPlugin is created. - * + * * Loops through the local types object and injects all of them as * properties into the LoaderPlugin instance. * * @method Phaser.Loader.FileTypesManager.install * @since 3.0.0 - * + * * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into. */ install: function (loader) @@ -13175,12 +15116,12 @@ var FileTypesManager = { /** * Static method called directly by the File Types. - * + * * The key is a reference to the function used to load the files via the Loader, i.e. `image`. * * @method Phaser.Loader.FileTypesManager.register * @since 3.0.0 - * + * * @param {string} key - The key that will be used as the method name in the LoaderPlugin. * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked. */ @@ -13208,15 +15149,15 @@ module.exports = FileTypesManager; /***/ }), /***/ "../../../src/loader/GetURL.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/GetURL.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13238,7 +15179,7 @@ var GetURL = function (file, baseURL) return false; } - if (file.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)) + if (file.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)) { return file.url; } @@ -13254,15 +15195,15 @@ module.exports = GetURL; /***/ }), /***/ "../../../src/loader/MergeXHRSettings.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/MergeXHRSettings.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13307,19 +15248,21 @@ module.exports = MergeXHRSettings; /***/ }), /***/ "../../../src/loader/MultiFile.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/MultiFile.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var CONST = __webpack_require__(/*! ./const */ "../../../src/loader/const.js"); +var Events = __webpack_require__(/*! ./events */ "../../../src/loader/events/index.js"); /** * @classdesc @@ -13401,6 +15344,15 @@ var MultiFile = new Class({ */ this.files = finalFiles; + /** + * The current state of the file. One of the FILE_CONST values. + * + * @name Phaser.Loader.MultiFile#state + * @type {number} + * @since 3.60.0 + */ + this.state = CONST.FILE_PENDING; + /** * The completion status of this MultiFile. * @@ -13546,7 +15498,57 @@ var MultiFile = new Class({ if (index !== -1) { this.failed++; + + // eslint-disable-next-line no-console + console.error('File failed: %s "%s" (via %s "%s")', this.type, this.key, file.type, file.key); } + }, + + /** + * Called once all children of this multi file have been added to their caches and is now + * ready for deletion from the Loader. + * + * It will emit a `filecomplete` event from the LoaderPlugin. + * + * @method Phaser.Loader.MultiFile#pendingDestroy + * @fires Phaser.Loader.Events#FILE_COMPLETE + * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE + * @since 3.60.0 + */ + pendingDestroy: function () + { + if (this.state === CONST.FILE_PENDING_DESTROY) + { + return; + } + + var key = this.key; + var type = this.type; + + this.loader.emit(Events.FILE_COMPLETE, key, type); + this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type); + + this.loader.flagForRemoval(this); + + for (var i = 0; i < this.files.length; i++) + { + this.files[i].pendingDestroy(); + } + + this.state = CONST.FILE_PENDING_DESTROY; + }, + + /** + * Destroy this Multi File and any references it holds. + * + * @method Phaser.Loader.MultiFile#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.loader = null; + this.files = null; + this.config = null; } }); @@ -13557,15 +15559,15 @@ module.exports = MultiFile; /***/ }), /***/ "../../../src/loader/XHRLoader.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/XHRLoader.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13643,15 +15645,15 @@ module.exports = XHRLoader; /***/ }), /***/ "../../../src/loader/XHRSettings.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/XHRSettings.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13718,15 +15720,15 @@ module.exports = XHRSettings; /***/ }), /***/ "../../../src/loader/const.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/const.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/const.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13734,7 +15736,7 @@ var FILE_CONST = { /** * The Loader is idle. - * + * * @name Phaser.Loader.LOADER_IDLE * @type {number} * @since 3.0.0 @@ -13743,7 +15745,7 @@ var FILE_CONST = { /** * The Loader is actively loading. - * + * * @name Phaser.Loader.LOADER_LOADING * @type {number} * @since 3.0.0 @@ -13752,7 +15754,7 @@ var FILE_CONST = { /** * The Loader is processing files is has loaded. - * + * * @name Phaser.Loader.LOADER_PROCESSING * @type {number} * @since 3.0.0 @@ -13761,7 +15763,7 @@ var FILE_CONST = { /** * The Loader has completed loading and processing. - * + * * @name Phaser.Loader.LOADER_COMPLETE * @type {number} * @since 3.0.0 @@ -13770,7 +15772,7 @@ var FILE_CONST = { /** * The Loader is shutting down. - * + * * @name Phaser.Loader.LOADER_SHUTDOWN * @type {number} * @since 3.0.0 @@ -13779,7 +15781,7 @@ var FILE_CONST = { /** * The Loader has been destroyed. - * + * * @name Phaser.Loader.LOADER_DESTROYED * @type {number} * @since 3.0.0 @@ -13787,8 +15789,8 @@ var FILE_CONST = { LOADER_DESTROYED: 5, /** - * File is in the load queue but not yet started - * + * File is in the load queue but not yet started. + * * @name Phaser.Loader.FILE_PENDING * @type {number} * @since 3.0.0 @@ -13797,7 +15799,7 @@ var FILE_CONST = { /** * File has been started to load by the loader (onLoad called) - * + * * @name Phaser.Loader.FILE_LOADING * @type {number} * @since 3.0.0 @@ -13805,8 +15807,8 @@ var FILE_CONST = { FILE_LOADING: 11, /** - * File has loaded successfully, awaiting processing - * + * File has loaded successfully, awaiting processing. + * * @name Phaser.Loader.FILE_LOADED * @type {number} * @since 3.0.0 @@ -13814,8 +15816,8 @@ var FILE_CONST = { FILE_LOADED: 12, /** - * File failed to load - * + * File failed to load. + * * @name Phaser.Loader.FILE_FAILED * @type {number} * @since 3.0.0 @@ -13824,7 +15826,7 @@ var FILE_CONST = { /** * File is being processed (onProcess callback) - * + * * @name Phaser.Loader.FILE_PROCESSING * @type {number} * @since 3.0.0 @@ -13833,7 +15835,7 @@ var FILE_CONST = { /** * The File has errored somehow during processing. - * + * * @name Phaser.Loader.FILE_ERRORED * @type {number} * @since 3.0.0 @@ -13842,7 +15844,7 @@ var FILE_CONST = { /** * File has finished processing. - * + * * @name Phaser.Loader.FILE_COMPLETE * @type {number} * @since 3.0.0 @@ -13850,8 +15852,8 @@ var FILE_CONST = { FILE_COMPLETE: 17, /** - * File has been destroyed - * + * File has been destroyed. + * * @name Phaser.Loader.FILE_DESTROYED * @type {number} * @since 3.0.0 @@ -13859,13 +15861,22 @@ var FILE_CONST = { FILE_DESTROYED: 18, /** - * File was populated from local data and doesn't need an HTTP request - * + * File was populated from local data and doesn't need an HTTP request. + * * @name Phaser.Loader.FILE_POPULATED * @type {number} * @since 3.0.0 */ - FILE_POPULATED: 19 + FILE_POPULATED: 19, + + /** + * File is pending being destroyed. + * + * @name Phaser.Loader.FILE_PENDING_DESTROY + * @type {number} + * @since 3.60.0 + */ + FILE_PENDING_DESTROY: 20 }; @@ -13875,30 +15886,31 @@ module.exports = FILE_CONST; /***/ }), /***/ "../../../src/loader/events/ADD_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Add File Event. - * + * * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue. - * + * * Listen to it from a Scene using: `this.load.on('addfile', listener)`. - * + * * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them. * * @event Phaser.Loader.Events#ADD + * @type {string} * @since 3.0.0 - * + * * @param {string} key - The unique key of the file that was added to the Loader. * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`. * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. @@ -13910,29 +15922,30 @@ module.exports = 'addfile'; /***/ }), /***/ "../../../src/loader/events/COMPLETE_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Complete Event. - * + * * This event is dispatched when the Loader has fully processed everything in the load queue. * By this point every loaded file will now be in its associated cache and ready for use. - * + * * Listen to it from a Scene using: `this.load.on('complete', listener)`. * * @event Phaser.Loader.Events#COMPLETE + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. * @param {number} totalComplete - The total number of files that successfully loaded. * @param {number} totalFailed - The total number of files that failed to load. @@ -13943,33 +15956,36 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/loader/events/FILE_COMPLETE_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Complete Event. - * - * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * + * + * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading. + * * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`. - * + * + * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads. + * * 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. * * @event Phaser.Loader.Events#FILE_COMPLETE + * @type {string} * @since 3.0.0 - * + * * @param {string} key - The key of the file that just loaded and finished processing. * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} data - The raw data the file contained. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ module.exports = 'filecomplete'; @@ -13977,25 +15993,25 @@ module.exports = 'filecomplete'; /***/ }), /***/ "../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! - \***********************************************************************/ +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! + \*********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Complete Event. - * + * * This event is dispatched by the Loader Plugin when any file in the queue finishes loading. - * + * * It uses a special dynamic event name constructed from the key and type of the file. - * + * * For example, if you have loaded an `image` with a key of `monster`, you can listen for it * using the following: * @@ -14006,29 +16022,32 @@ module.exports = 'filecomplete'; * ``` * * Or, if you have loaded a texture `atlas` with a key of `Level1`: - * + * * ```javascript - * this.load.on('filecomplete-atlas-Level1', function (key, type, data) { + * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) { * // Your handler code * }); * ``` - * + * * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`: - * + * * ```javascript * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) { * // Your handler code * }); * ``` - * + * + * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads. + * * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event. * * @event Phaser.Loader.Events#FILE_KEY_COMPLETE + * @type {string} * @since 3.0.0 - * + * * @param {string} key - The key of the file that just loaded and finished processing. * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`. - * @param {any} data - The raw data the file contained. + * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined. */ module.exports = 'filecomplete-'; @@ -14036,28 +16055,29 @@ module.exports = 'filecomplete-'; /***/ }), /***/ "../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Error Event. - * + * * This event is dispatched by the Loader Plugin when a file fails to load. - * + * * Listen to it from a Scene using: `this.load.on('loaderror', listener)`. * * @event Phaser.Loader.Events#FILE_LOAD_ERROR + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.File} file - A reference to the File which errored during load. */ module.exports = 'loaderror'; @@ -14066,29 +16086,30 @@ module.exports = 'loaderror'; /***/ }), /***/ "../../../src/loader/events/FILE_LOAD_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Event. - * + * * This event is dispatched by the Loader Plugin when a file finishes loading, * but _before_ it is processed and added to the internal Phaser caches. - * + * * Listen to it from a Scene using: `this.load.on('load', listener)`. * * @event Phaser.Loader.Events#FILE_LOAD + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.File} file - A reference to the File which just finished loading. */ module.exports = 'load'; @@ -14097,29 +16118,30 @@ module.exports = 'load'; /***/ }), /***/ "../../../src/loader/events/FILE_PROGRESS_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The File Load Progress Event. - * + * * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen. - * + * * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`. * * @event Phaser.Loader.Events#FILE_PROGRESS + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.File} file - A reference to the File which errored during load. * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is. */ @@ -14129,32 +16151,33 @@ module.exports = 'fileprogress'; /***/ }), /***/ "../../../src/loader/events/POST_PROCESS_EVENT.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! - \******************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Post Process Event. - * + * * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue. * It is dispatched before the internal lists are cleared and each File is destroyed. - * + * * Use this hook to perform any last minute processing of files that can only happen once the * Loader has completed, but prior to it emitting the `complete` event. - * + * * Listen to it from a Scene using: `this.load.on('postprocess', listener)`. * * @event Phaser.Loader.Events#POST_PROCESS + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. */ module.exports = 'postprocess'; @@ -14163,28 +16186,29 @@ module.exports = 'postprocess'; /***/ }), /***/ "../../../src/loader/events/PROGRESS_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Progress Event. - * + * * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading. - * + * * Listen to it from a Scene using: `this.load.on('progress', listener)`. * * @event Phaser.Loader.Events#PROGRESS + * @type {string} * @since 3.0.0 - * + * * @param {number} progress - The current progress of the load. A value between 0 and 1. */ module.exports = 'progress'; @@ -14193,30 +16217,31 @@ module.exports = 'progress'; /***/ }), /***/ "../../../src/loader/events/START_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/START_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * The Loader Plugin Start Event. - * + * * This event is dispatched when the Loader starts running. At this point load progress is zero. - * + * * This event is dispatched even if there aren't any files in the load queue. - * + * * Listen to it from a Scene using: `this.load.on('start', listener)`. * * @event Phaser.Loader.Events#START + * @type {string} * @since 3.0.0 - * + * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event. */ module.exports = 'start'; @@ -14225,15 +16250,15 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/loader/events/index.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/index.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14260,15 +16285,15 @@ module.exports = { /***/ }), /***/ "../../../src/loader/filetypes/ImageFile.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14278,6 +16303,7 @@ var File = __webpack_require__(/*! ../File */ "../../../src/loader/File.js"); var FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "../../../src/loader/FileTypesManager.js"); var GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "../../../src/utils/object/GetFastValue.js"); var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "../../../src/utils/object/IsPlainObject.js"); +var GetURL = __webpack_require__(/*! ../GetURL */ "../../../src/loader/GetURL.js"); /** * @classdesc @@ -14352,6 +16378,14 @@ var ImageFile = new Class({ loader.addFile(normalMap); } + + this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement'; + + if (this.useImageElementLoad) + { + this.load = this.loadImage; + this.onProcess = this.onProcessImage; + } }, /** @@ -14388,6 +16422,70 @@ var ImageFile = new Class({ File.createObjectURL(this.data, this.xhrLoader.response, 'image/png'); }, + /** + * Handles image load processing. + * + * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage + * @private + * @since 3.60.0 + */ + onProcessImage: function () + { + var result = this.state; + + this.state = CONST.FILE_PROCESSING; + + if (result === CONST.FILE_LOADED) + { + this.onProcessComplete(); + } + else + { + this.onProcessError(); + } + }, + + /** + * Loads the image using either XHR or an Image tag. + * + * @method Phaser.Loader.FileTypes.ImageFile#loadImage + * @private + * @since 3.60.0 + */ + loadImage: function () + { + this.state = CONST.FILE_LOADING; + + this.src = GetURL(this, this.loader.baseURL); + + if (this.src.indexOf('data:') === 0) + { + console.warn('Local data URIs are not supported: ' + this.key); + } + else + { + this.data = new Image(); + + this.data.crossOrigin = this.crossOrigin; + + var _this = this; + + this.data.onload = function () + { + _this.state = CONST.FILE_LOADED; + + _this.loader.nextFile(_this, true); + }; + + this.data.onerror = function () + { + _this.loader.nextFile(_this, false); + }; + + this.data.src = this.src; + } + }, + /** * Adds this file to its target cache upon successful loading and processing. * @@ -14396,29 +16494,35 @@ var ImageFile = new Class({ */ addToCache: function () { - var texture; + // Check if we have a linked normal map var linkFile = this.linkFile; - if (linkFile && linkFile.state === CONST.FILE_COMPLETE) + if (linkFile) { - if (this.type === 'image') + // We do, but has it loaded? + if (linkFile.state >= CONST.FILE_COMPLETE) { - texture = this.cache.addImage(this.key, this.data, linkFile.data); - } - else - { - texture = this.cache.addImage(linkFile.key, linkFile.data, this.data); + // Both files have loaded + if (this.type === 'normalMap') + { + // linkFile.data = Image + // this.data = Normal Map + this.cache.addImage(this.key, linkFile.data, this.data); + } + else + { + // linkFile.data = Normal Map + // this.data = Image + this.cache.addImage(this.key, this.data, linkFile.data); + } } - this.pendingDestroy(texture); - - linkFile.pendingDestroy(texture); + // Nothing to do here, we'll use the linkFile `addToCache` call + // to process this pair } - else if (!linkFile) + else { - texture = this.cache.addImage(this.key, this.data); - - this.pendingDestroy(texture); + this.cache.addImage(this.key, this.data); } } @@ -14502,6 +16606,10 @@ var ImageFile = new Class({ * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. * Normal maps are a WebGL only feature. * + * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs. + * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images + * via the Image tag instead. + * * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser. * It is available in the default build but can be excluded from custom builds. * @@ -14539,15 +16647,15 @@ module.exports = ImageFile; /***/ }), /***/ "../../../src/loader/filetypes/JSONFile.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14616,9 +16724,9 @@ var JSONFile = new Class({ File.call(this, loader, fileConfig); + // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it. 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); @@ -14651,8 +16759,6 @@ var JSONFile = new Class({ } catch (e) { - console.warn('Invalid JSON: ' + this.key); - this.onProcessError(); throw e; @@ -14785,15 +16891,15 @@ module.exports = JSONFile; /***/ }), /***/ "../../../src/loader/filetypes/TextFile.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/TextFile.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14969,15 +17075,15 @@ module.exports = TextFile; /***/ }), /***/ "../../../src/math/Average.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Average.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Average.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15009,15 +17115,15 @@ module.exports = Average; /***/ }), /***/ "../../../src/math/Bernstein.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Bernstein.js ***! - \************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15045,15 +17151,15 @@ module.exports = Bernstein; /***/ }), /***/ "../../../src/math/Between.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Between.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Between.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15079,15 +17185,15 @@ module.exports = Between; /***/ }), /***/ "../../../src/math/CatmullRom.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/CatmullRom.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15121,15 +17227,15 @@ module.exports = CatmullRom; /***/ }), /***/ "../../../src/math/CeilTo.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/CeilTo.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15163,15 +17269,15 @@ module.exports = CeilTo; /***/ }), /***/ "../../../src/math/Clamp.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Clamp.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15198,15 +17304,15 @@ module.exports = Clamp; /***/ }), /***/ "../../../src/math/DegToRad.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/DegToRad.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15233,15 +17339,15 @@ module.exports = DegToRad; /***/ }), /***/ "../../../src/math/Difference.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Difference.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15267,15 +17373,15 @@ module.exports = Difference; /***/ }), /***/ "../../../src/math/Euler.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Euler.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15555,15 +17661,15 @@ module.exports = Euler; /***/ }), /***/ "../../../src/math/Factorial.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Factorial.js ***! - \************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15600,15 +17706,15 @@ module.exports = Factorial; /***/ }), /***/ "../../../src/math/FloatBetween.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/FloatBetween.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15634,15 +17740,15 @@ module.exports = FloatBetween; /***/ }), /***/ "../../../src/math/FloorTo.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/FloorTo.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15676,15 +17782,15 @@ module.exports = FloorTo; /***/ }), /***/ "../../../src/math/FromPercent.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/FromPercent.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15715,15 +17821,15 @@ module.exports = FromPercent; /***/ }), /***/ "../../../src/math/GetSpeed.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/GetSpeed.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15753,15 +17859,15 @@ module.exports = GetSpeed; /***/ }), /***/ "../../../src/math/IsEven.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/IsEven.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15789,15 +17895,15 @@ module.exports = IsEven; /***/ }), /***/ "../../../src/math/IsEvenStrict.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/IsEvenStrict.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15823,15 +17929,15 @@ module.exports = IsEvenStrict; /***/ }), /***/ "../../../src/math/Linear.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Linear.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15855,18 +17961,57 @@ var Linear = function (p0, p1, t) module.exports = Linear; +/***/ }), + +/***/ "../../../src/math/LinearXY.js": +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Interpolates two given Vectors and returns a new Vector between them. + * + * Does not modify either of the passed Vectors. + * + * @function Phaser.Math.LinearXY + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} vector1 - Starting vector + * @param {Phaser.Math.Vector2} vector2 - Ending vector + * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. + * + * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2. + */ +var LinearXY = function (vector1, vector2, t) +{ + if (t === undefined) { t = 0; } + + return vector1.clone().lerp(vector2, t); +}; + +module.exports = LinearXY; + + /***/ }), /***/ "../../../src/math/Matrix3.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Matrix3.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16456,15 +18601,15 @@ module.exports = Matrix3; /***/ }), /***/ "../../../src/math/Matrix4.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Matrix4.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18254,15 +20399,15 @@ module.exports = Matrix4; /***/ }), /***/ "../../../src/math/MaxAdd.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/MaxAdd.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18286,18 +20431,64 @@ var MaxAdd = function (value, amount, max) module.exports = MaxAdd; +/***/ }), + +/***/ "../../../src/math/Median.js": +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Median.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the median of the given values. The values are sorted and the middle value is returned. + * In case of an even number of values, the average of the two middle values is returned. + * + * @function Phaser.Math.Median + * @since 3.54.0 + * + * @param {number[]} values - The values to average. + * + * @return {number} The median value. + */ +var Median = function (values) +{ + var valuesNum = values.length; + if (valuesNum === 0) + { + return 0; + } + + values.sort(function (a, b) { return a - b; }); + + var halfIndex = Math.floor(valuesNum / 2); + + return valuesNum % 2 === 0 + ? (values[halfIndex] + values[halfIndex - 1]) / 2 + : values[halfIndex]; +}; + +module.exports = Median; + + /***/ }), /***/ "../../../src/math/MinSub.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/MinSub.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18324,15 +20515,15 @@ module.exports = MinSub; /***/ }), /***/ "../../../src/math/Percent.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Percent.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18388,15 +20579,15 @@ module.exports = Percent; /***/ }), /***/ "../../../src/math/Quaternion.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Quaternion.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19442,15 +21633,15 @@ module.exports = Quaternion; /***/ }), /***/ "../../../src/math/RadToDeg.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RadToDeg.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19477,15 +21668,15 @@ module.exports = RadToDeg; /***/ }), /***/ "../../../src/math/RandomXY.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXY.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19522,15 +21713,15 @@ module.exports = RandomXY; /***/ }), /***/ "../../../src/math/RandomXYZ.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXYZ.js ***! - \************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19566,15 +21757,15 @@ module.exports = RandomXYZ; /***/ }), /***/ "../../../src/math/RandomXYZW.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXYZW.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19607,15 +21798,15 @@ module.exports = RandomXYZW; /***/ }), /***/ "../../../src/math/Rotate.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Rotate.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19647,15 +21838,15 @@ module.exports = Rotate; /***/ }), /***/ "../../../src/math/RotateAround.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateAround.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19696,15 +21887,15 @@ module.exports = RotateAround; /***/ }), /***/ "../../../src/math/RotateAroundDistance.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateAroundDistance.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19742,15 +21933,15 @@ module.exports = RotateAroundDistance; /***/ }), /***/ "../../../src/math/RotateTo.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateTo.js ***! - \***********************************************/ +/*!*********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19784,15 +21975,15 @@ module.exports = RotateTo; /***/ }), /***/ "../../../src/math/RotateVec3.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateVec3.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19837,15 +22028,15 @@ module.exports = RotateVec3; /***/ }), /***/ "../../../src/math/RoundAwayFromZero.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RoundAwayFromZero.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19871,31 +22062,31 @@ module.exports = RoundAwayFromZero; /***/ }), /***/ "../../../src/math/RoundTo.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RoundTo.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -19928,15 +22119,15 @@ module.exports = RoundTo; /***/ }), /***/ "../../../src/math/SinCosTableGenerator.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SinCosTableGenerator.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19986,15 +22177,15 @@ module.exports = SinCosTableGenerator; /***/ }), /***/ "../../../src/math/SmoothStep.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SmoothStep.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20038,15 +22229,15 @@ module.exports = SmoothStep; /***/ }), /***/ "../../../src/math/SmootherStep.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SmootherStep.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20082,15 +22273,15 @@ module.exports = SmootherStep; /***/ }), /***/ "../../../src/math/ToXY.js": -/*!*******************************************!*\ - !*** D:/wamp/www/phaser/src/math/ToXY.js ***! - \*******************************************/ +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20098,9 +22289,9 @@ var Vector2 = __webpack_require__(/*! ./Vector2 */ "../../../src/math/Vector2.js /** * 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 @@ -20132,11 +22323,9 @@ var ToXY = function (index, width, height, out) { x = index; } - - out.set(x, y); } - return out; + return out.set(x, y); }; module.exports = ToXY; @@ -20145,15 +22334,15 @@ module.exports = ToXY; /***/ }), /***/ "../../../src/math/TransformXY.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/TransformXY.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20205,15 +22394,15 @@ module.exports = TransformXY; /***/ }), /***/ "../../../src/math/Vector2.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector2.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20234,8 +22423,8 @@ var FuzzyEqual = __webpack_require__(/*! ../math/fuzzy/Equal */ "../../../src/ma * @constructor * @since 3.0.0 * - * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties. - * @param {number} [y] - The y component. + * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties. + * @param {number} [y=x] - The y component. */ var Vector2 = new Class({ @@ -20296,7 +22485,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#copy * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to copy the components from. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20392,7 +22581,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#equals * @since 3.0.0 * - * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector. * * @return {boolean} Whether the given Vector is equal to this Vector. */ @@ -20407,7 +22596,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#fuzzyEquals * @since 3.23.0 * - * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {Phaser.Types.Math.Vector2Like} 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`. @@ -20460,7 +22649,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#add * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20478,7 +22667,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#subtract * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20498,7 +22687,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#multiply * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20544,7 +22733,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#divide * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by. * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -20578,7 +22767,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#distance * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to. * * @return {number} The distance from this Vector to the given Vector. */ @@ -20596,7 +22785,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#distanceSq * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to. * * @return {number} The distance from this Vector to the given Vector, squared. */ @@ -20724,7 +22913,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#dot * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2. * * @return {number} The dot product of this Vector and the given Vector. */ @@ -20739,7 +22928,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#cross * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2. * * @return {number} The cross product of this Vector and the given Vector. */ @@ -20756,7 +22945,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#lerp * @since 3.0.0 * - * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards. + * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards. * @param {number} [t=0] - The interpolation percentage, between 0 and 1. * * @return {Phaser.Math.Vector2} This Vector2. @@ -20904,6 +23093,23 @@ var Vector2 = new Class({ var sin = Math.sin(delta); return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); + }, + + /** + * Project this Vector onto another. + * + * @method Phaser.Math.Vector2#project + * @since 3.60.0 + * + * @param {Phaser.Math.Vector2} src - The vector to project onto. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + project: function (src) + { + var scalar = this.dot(src) / src.dot(src); + + return this.copy(src).scale(scalar); } }); @@ -20986,15 +23192,15 @@ module.exports = Vector2; /***/ }), /***/ "../../../src/math/Vector3.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector3.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22037,15 +24243,15 @@ module.exports = Vector3; /***/ }), /***/ "../../../src/math/Vector4.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector4.js ***! - \**********************************************/ +/*!********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22583,15 +24789,15 @@ module.exports = Vector4; /***/ }), /***/ "../../../src/math/Within.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Within.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Within.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22618,20 +24824,20 @@ module.exports = Within; /***/ }), /***/ "../../../src/math/Wrap.js": -/*!*******************************************!*\ - !*** D:/wamp/www/phaser/src/math/Wrap.js ***! - \*******************************************/ +/*!*****************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Wrap the given `value` between `min` and `max. + * Wrap the given `value` between `min` and `max`. * * @function Phaser.Math.Wrap * @since 3.0.0 @@ -22655,15 +24861,15 @@ module.exports = Wrap; /***/ }), /***/ "../../../src/math/angle/Between.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Between.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22691,15 +24897,15 @@ module.exports = Between; /***/ }), /***/ "../../../src/math/angle/BetweenPoints.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenPoints.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22727,15 +24933,15 @@ module.exports = BetweenPoints; /***/ }), /***/ "../../../src/math/angle/BetweenPointsY.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22764,15 +24970,15 @@ module.exports = BetweenPointsY; /***/ }), /***/ "../../../src/math/angle/BetweenY.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenY.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22803,15 +25009,15 @@ module.exports = BetweenY; /***/ }), /***/ "../../../src/math/angle/CounterClockwise.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/CounterClockwise.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22853,15 +25059,15 @@ module.exports = CounterClockwise; /***/ }), /***/ "../../../src/math/angle/Normalize.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Normalize.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22895,16 +25101,16 @@ module.exports = Normalize; /***/ }), /***/ "../../../src/math/angle/Random.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Random.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22929,16 +25135,16 @@ module.exports = Random; /***/ }), /***/ "../../../src/math/angle/RandomDegrees.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/RandomDegrees.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/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. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22963,15 +25169,15 @@ module.exports = RandomDegrees; /***/ }), /***/ "../../../src/math/angle/Reverse.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Reverse.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22998,15 +25204,15 @@ module.exports = Reverse; /***/ }), /***/ "../../../src/math/angle/RotateTo.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/RotateTo.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23070,15 +25276,15 @@ module.exports = RotateTo; /***/ }), /***/ "../../../src/math/angle/ShortestBetween.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/ShortestBetween.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23122,15 +25328,15 @@ module.exports = ShortestBetween; /***/ }), /***/ "../../../src/math/angle/Wrap.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Wrap.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23159,15 +25365,15 @@ module.exports = Wrap; /***/ }), /***/ "../../../src/math/angle/WrapDegrees.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/WrapDegrees.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23196,15 +25402,15 @@ module.exports = WrapDegrees; /***/ }), /***/ "../../../src/math/angle/index.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/index.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23234,15 +25440,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/const.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/const.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/const.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23250,7 +25456,7 @@ var MATH_CONST = { /** * The value of PI * 2. - * + * * @name Phaser.Math.PI2 * @type {number} * @since 3.0.0 @@ -23259,7 +25465,7 @@ var MATH_CONST = { /** * The value of PI * 0.5. - * + * * @name Phaser.Math.TAU * @type {number} * @since 3.0.0 @@ -23268,7 +25474,7 @@ var MATH_CONST = { /** * An epsilon value (1.0e-6) - * + * * @name Phaser.Math.EPSILON * @type {number} * @since 3.0.0 @@ -23277,7 +25483,7 @@ var MATH_CONST = { /** * For converting degrees to radians (PI / 180) - * + * * @name Phaser.Math.DEG_TO_RAD * @type {number} * @since 3.0.0 @@ -23286,7 +25492,7 @@ var MATH_CONST = { /** * For converting radians to degrees (180 / PI) - * + * * @name Phaser.Math.RAD_TO_DEG * @type {number} * @since 3.0.0 @@ -23296,7 +25502,7 @@ var MATH_CONST = { /** * 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 @@ -23306,7 +25512,7 @@ var MATH_CONST = { /** * 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 @@ -23316,7 +25522,7 @@ var MATH_CONST = { /** * 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 @@ -23331,15 +25537,15 @@ module.exports = MATH_CONST; /***/ }), /***/ "../../../src/math/distance/DistanceBetween.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetween.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23370,15 +25576,15 @@ module.exports = DistanceBetween; /***/ }), /***/ "../../../src/math/distance/DistanceBetweenPoints.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23407,15 +25613,15 @@ module.exports = DistanceBetweenPoints; /***/ }), /***/ "../../../src/math/distance/DistanceBetweenPointsSquared.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! - \****************************************************************************/ +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! + \**************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23444,15 +25650,15 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), /***/ "../../../src/math/distance/DistanceChebyshev.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23483,15 +25689,15 @@ module.exports = ChebyshevDistance; /***/ }), /***/ "../../../src/math/distance/DistancePower.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistancePower.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23522,15 +25728,15 @@ module.exports = DistancePower; /***/ }), /***/ "../../../src/math/distance/DistanceSnake.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceSnake.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author samme - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23561,15 +25767,15 @@ module.exports = SnakeDistance; /***/ }), /***/ "../../../src/math/distance/DistanceSquared.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceSquared.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23600,15 +25806,15 @@ module.exports = DistanceSquared; /***/ }), /***/ "../../../src/math/distance/index.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/index.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23632,15 +25838,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/back/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/In.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23668,15 +25874,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/back/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/InOut.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23713,15 +25919,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/back/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/Out.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23749,15 +25955,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/back/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/index.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23777,15 +25983,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/bounce/In.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/In.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23827,15 +26033,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/bounce/InOut.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/InOut.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23896,15 +26102,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/bounce/Out.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/Out.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23944,15 +26150,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/bounce/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23972,15 +26178,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/circular/In.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/In.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24005,15 +26211,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/circular/InOut.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/InOut.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24045,15 +26251,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/circular/Out.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/Out.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24078,15 +26284,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/circular/index.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/index.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24106,15 +26312,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/cubic/In.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/In.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24139,15 +26345,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/cubic/InOut.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/InOut.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24179,15 +26385,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/cubic/Out.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/Out.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24212,15 +26418,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/cubic/index.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/index.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24240,15 +26446,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/elastic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/In.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24300,15 +26506,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/elastic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/InOut.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24367,15 +26573,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/elastic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/Out.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24427,15 +26633,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/elastic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/index.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24455,15 +26661,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/expo/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/In.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24488,15 +26694,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/expo/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/InOut.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24528,15 +26734,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/expo/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/Out.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24561,15 +26767,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/expo/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/index.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24589,15 +26795,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/index.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24626,15 +26832,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/linear/Linear.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/linear/Linear.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24659,15 +26865,15 @@ module.exports = Linear; /***/ }), /***/ "../../../src/math/easing/linear/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/linear/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24677,15 +26883,15 @@ 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/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24710,15 +26916,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quadratic/InOut.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24750,15 +26956,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quadratic/Out.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/Out.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24783,15 +26989,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quadratic/index.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/index.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24811,15 +27017,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/quartic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/In.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24844,15 +27050,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quartic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/InOut.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24884,15 +27090,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quartic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/Out.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24917,15 +27123,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quartic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/index.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24945,15 +27151,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/quintic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/In.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24978,15 +27184,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quintic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/InOut.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25018,15 +27224,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quintic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/Out.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25051,15 +27257,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quintic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/index.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25079,15 +27285,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/sine/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/In.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25123,15 +27329,15 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/sine/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/InOut.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25167,15 +27373,15 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/sine/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/Out.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25211,15 +27417,15 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/sine/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/index.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25239,15 +27445,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/stepped/Stepped.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25286,15 +27492,15 @@ module.exports = Stepped; /***/ }), /***/ "../../../src/math/easing/stepped/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/stepped/index.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25308,15 +27514,15 @@ module.exports = __webpack_require__(/*! ./Stepped */ "../../../src/math/easing/ /***/ }), /***/ "../../../src/math/fuzzy/Ceil.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Ceil.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25344,15 +27550,15 @@ module.exports = Ceil; /***/ }), /***/ "../../../src/math/fuzzy/Equal.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Equal.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25383,15 +27589,15 @@ module.exports = Equal; /***/ }), /***/ "../../../src/math/fuzzy/Floor.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Floor.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25419,15 +27625,15 @@ module.exports = Floor; /***/ }), /***/ "../../../src/math/fuzzy/GreaterThan.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25458,15 +27664,15 @@ module.exports = GreaterThan; /***/ }), /***/ "../../../src/math/fuzzy/LessThan.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/LessThan.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25497,15 +27703,15 @@ module.exports = LessThan; /***/ }), /***/ "../../../src/math/fuzzy/index.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/index.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25527,15 +27733,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/index.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/index.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/index.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25578,7 +27784,9 @@ var PhaserMath = { IsEven: __webpack_require__(/*! ./IsEven */ "../../../src/math/IsEven.js"), IsEvenStrict: __webpack_require__(/*! ./IsEvenStrict */ "../../../src/math/IsEvenStrict.js"), Linear: __webpack_require__(/*! ./Linear */ "../../../src/math/Linear.js"), + LinearXY: __webpack_require__(/*! ./LinearXY */ "../../../src/math/LinearXY.js"), MaxAdd: __webpack_require__(/*! ./MaxAdd */ "../../../src/math/MaxAdd.js"), + Median: __webpack_require__(/*! ./Median */ "../../../src/math/Median.js"), MinSub: __webpack_require__(/*! ./MinSub */ "../../../src/math/MinSub.js"), Percent: __webpack_require__(/*! ./Percent */ "../../../src/math/Percent.js"), RadToDeg: __webpack_require__(/*! ./RadToDeg */ "../../../src/math/RadToDeg.js"), @@ -25622,15 +27830,15 @@ module.exports = PhaserMath; /***/ }), /***/ "../../../src/math/interpolation/BezierInterpolation.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25666,15 +27874,15 @@ module.exports = BezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/CatmullRomInterpolation.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! - \****************************************************************************/ +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! + \**************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25728,15 +27936,15 @@ module.exports = CatmullRomInterpolation; /***/ }), /***/ "../../../src/math/interpolation/CubicBezierInterpolation.js": -/*!*****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! - \*****************************************************************************/ +/*!***************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! + \***************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25803,15 +28011,15 @@ module.exports = CubicBezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/LinearInterpolation.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25855,15 +28063,15 @@ module.exports = LinearInterpolation; /***/ }), /***/ "../../../src/math/interpolation/QuadraticBezierInterpolation.js": -/*!*********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! - \*********************************************************************************/ +/*!*******************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! + \*******************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25919,15 +28127,15 @@ module.exports = QuadraticBezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/SmoothStepInterpolation.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! - \****************************************************************************/ +/*!**************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! + \**************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25957,15 +28165,15 @@ module.exports = SmoothStepInterpolation; /***/ }), /***/ "../../../src/math/interpolation/SmootherStepInterpolation.js": -/*!******************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! - \******************************************************************************/ +/*!****************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! + \****************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25995,15 +28203,15 @@ module.exports = SmootherStepInterpolation; /***/ }), /***/ "../../../src/math/interpolation/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26027,15 +28235,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/pow2/GetPowerOfTwo.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26062,15 +28270,15 @@ module.exports = GetPowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/IsSizePowerOfTwo.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26097,15 +28305,15 @@ module.exports = IsSizePowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/IsValuePowerOfTwo.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26130,15 +28338,15 @@ module.exports = IsValuePowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/index.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/index.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26158,15 +28366,15 @@ module.exports = { /***/ }), /***/ "../../../src/math/random-data-generator/RandomDataGenerator.js": -/*!********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! - \********************************************************************************/ +/*!******************************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! + \******************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26175,13 +28383,13 @@ var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Cla /** * @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. * @@ -26513,7 +28721,7 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 - * + * * @generic T * @genericUse {T[]} - [array] * @genericUse {T} - [$return] @@ -26673,15 +28881,15 @@ module.exports = RandomDataGenerator; /***/ }), /***/ "../../../src/math/snap/SnapCeil.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapCeil.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26722,15 +28930,15 @@ module.exports = SnapCeil; /***/ }), /***/ "../../../src/math/snap/SnapFloor.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapFloor.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26771,15 +28979,15 @@ module.exports = SnapFloor; /***/ }), /***/ "../../../src/math/snap/SnapTo.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapTo.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26819,15 +29027,15 @@ module.exports = SnapTo; /***/ }), /***/ "../../../src/math/snap/index.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/index.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26847,15 +29055,15 @@ module.exports = { /***/ }), /***/ "../../../src/plugins/BasePlugin.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/plugins/BasePlugin.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2020 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -26979,18 +29187,232 @@ var BasePlugin = new Class({ module.exports = BasePlugin; +/***/ }), + +/***/ "../../../src/plugins/PluginCache.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Contains the plugins that Phaser uses globally and locally. +// These are the source objects, not instantiated. +var corePlugins = {}; + +// Contains the plugins that the dev has loaded into their game +// These are the source objects, not instantiated. +var customPlugins = {}; + +var PluginCache = {}; + +/** + * @namespace Phaser.Plugins.PluginCache + */ + +/** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * + * @method Phaser.Plugins.PluginCache.register + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin? + */ +PluginCache.register = function (key, plugin, mapping, custom) +{ + if (custom === undefined) { custom = false; } + + corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom }; +}; + +/** + * Stores a custom plugin in the global plugin cache. + * The key must be unique, within the scope of the cache. + * + * @method Phaser.Plugins.PluginCache.registerCustom + * @since 3.8.0 + * + * @param {string} key - A reference used to get this plugin from the plugin cache. + * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated. + * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param {?any} data - A value to be passed to the plugin's `init` method. + */ +PluginCache.registerCustom = function (key, plugin, mapping, data) +{ + customPlugins[key] = { plugin: plugin, mapping: mapping, data: data }; +}; + +/** + * Checks if the given key is already being used in the core plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCore + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`. + */ +PluginCache.hasCore = function (key) +{ + return corePlugins.hasOwnProperty(key); +}; + +/** + * Checks if the given key is already being used in the custom plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCustom + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`. + */ +PluginCache.hasCustom = function (key) +{ + return customPlugins.hasOwnProperty(key); +}; + +/** + * Returns the core plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCore + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to get. + * + * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object. + */ +PluginCache.getCore = function (key) +{ + return corePlugins[key]; +}; + +/** + * Returns the custom plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object. + */ +PluginCache.getCustom = function (key) +{ + return customPlugins[key]; +}; + +/** + * Returns an object from the custom cache based on the given key that can be instantiated. + * + * @method Phaser.Plugins.PluginCache.getCustomClass + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {function} The custom plugin object. + */ +PluginCache.getCustomClass = function (key) +{ + return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null; +}; + +/** + * Removes a core plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.remove + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to remove. + */ +PluginCache.remove = function (key) +{ + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } +}; + +/** + * Removes a custom plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.removeCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to remove. + */ +PluginCache.removeCustom = function (key) +{ + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } +}; + +/** + * Removes all Core Plugins. + * + * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. + * So be sure you only call this if you do not wish to run Phaser again. + * + * @method Phaser.Plugins.PluginCache.destroyCorePlugins + * @since 3.12.0 + */ +PluginCache.destroyCorePlugins = function () +{ + for (var key in corePlugins) + { + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } + } +}; + +/** + * Removes all Custom Plugins. + * + * @method Phaser.Plugins.PluginCache.destroyCustomPlugins + * @since 3.12.0 + */ +PluginCache.destroyCustomPlugins = function () +{ + for (var key in customPlugins) + { + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } + } +}; + +module.exports = PluginCache; + + /***/ }), /***/ "../../../src/plugins/ScenePlugin.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/plugins/ScenePlugin.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2020 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -27012,6 +29434,7 @@ var SceneEvents = __webpack_require__(/*! ../scene/events */ "../../../src/scene * * @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. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. */ var ScenePlugin = new Class({ @@ -27019,7 +29442,7 @@ var ScenePlugin = new Class({ initialize: - function ScenePlugin (scene, pluginManager) + function ScenePlugin (scene, pluginManager, pluginKey) { BasePlugin.call(this, pluginManager); @@ -27049,6 +29472,19 @@ var ScenePlugin = new Class({ */ this.systems = scene.sys; + /** + * The key under which this plugin was installed into the Scene Systems. + * + * 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#pluginKey + * @type {string} + * @readonly + * @since 3.54.0 + */ + this.pluginKey = pluginKey; + scene.sys.events.once(SceneEvents.BOOT, this.boot, this); }, @@ -27093,7 +29529,7 @@ var ScenePlugin = new Class({ /** * Game instance has been destroyed. - * + * * You must release everything in here, all references, all objects, free it all up. * * @method Phaser.Plugins.ScenePlugin#destroy @@ -27115,21 +29551,21 @@ module.exports = ScenePlugin; /***/ }), /***/ "../../../src/renderer/BlendModes.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/BlendModes.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Phaser Blend Modes. - * + * * @namespace Phaser.BlendModes * @since 3.0.0 */ @@ -27138,7 +29574,7 @@ module.exports = { /** * Skips the Blend Mode check in the renderer. - * + * * @name Phaser.BlendModes.SKIP_CHECK * @type {number} * @const @@ -27149,7 +29585,7 @@ module.exports = { /** * 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 {number} * @const @@ -27160,7 +29596,7 @@ module.exports = { /** * Add blend mode. For Canvas and WebGL. * Where both shapes overlap the color is determined by adding color values. - * + * * @name Phaser.BlendModes.ADD * @type {number} * @const @@ -27171,7 +29607,7 @@ module.exports = { /** * 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 {number} * @const @@ -27182,7 +29618,7 @@ module.exports = { /** * 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 {number} * @const @@ -27193,7 +29629,7 @@ module.exports = { /** * 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 {number} * @const @@ -27204,7 +29640,7 @@ module.exports = { /** * Darken blend mode. For Canvas only. * Retains the darkest pixels of both layers. - * + * * @name Phaser.BlendModes.DARKEN * @type {number} * @const @@ -27215,7 +29651,7 @@ module.exports = { /** * Lighten blend mode. For Canvas only. * Retains the lightest pixels of both layers. - * + * * @name Phaser.BlendModes.LIGHTEN * @type {number} * @const @@ -27226,7 +29662,7 @@ module.exports = { /** * Color Dodge blend mode. For Canvas only. * Divides the bottom layer by the inverted top layer. - * + * * @name Phaser.BlendModes.COLOR_DODGE * @type {number} * @const @@ -27237,7 +29673,7 @@ module.exports = { /** * 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 {number} * @const @@ -27248,7 +29684,7 @@ module.exports = { /** * 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 {number} * @const @@ -27259,7 +29695,7 @@ module.exports = { /** * 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 {number} * @const @@ -27270,7 +29706,7 @@ module.exports = { /** * 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 {number} * @const @@ -27281,7 +29717,7 @@ module.exports = { /** * Exclusion blend mode. For Canvas only. * Like difference, but with lower contrast. - * + * * @name Phaser.BlendModes.EXCLUSION * @type {number} * @const @@ -27292,7 +29728,7 @@ module.exports = { /** * 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 {number} * @const @@ -27303,7 +29739,7 @@ module.exports = { /** * 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 {number} * @const @@ -27314,7 +29750,7 @@ module.exports = { /** * 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 {number} * @const @@ -27325,7 +29761,7 @@ module.exports = { /** * 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 {number} * @const @@ -27335,7 +29771,7 @@ module.exports = { /** * Alpha erase blend mode. For Canvas and WebGL. - * + * * @name Phaser.BlendModes.ERASE * @type {number} * @const @@ -27346,7 +29782,7 @@ module.exports = { /** * 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 {number} * @const @@ -27357,7 +29793,7 @@ module.exports = { /** * 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 {number} * @const @@ -27368,7 +29804,7 @@ module.exports = { /** * 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 {number} * @const @@ -27379,7 +29815,7 @@ module.exports = { /** * Destination-over blend mode. For Canvas only. * New shapes are drawn behind the existing canvas content. - * + * * @name Phaser.BlendModes.DESTINATION_OVER * @type {number} * @const @@ -27390,7 +29826,7 @@ module.exports = { /** * 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 {number} * @const @@ -27401,7 +29837,7 @@ module.exports = { /** * 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 {number} * @const @@ -27412,7 +29848,7 @@ module.exports = { /** * 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 {number} * @const @@ -27423,7 +29859,7 @@ module.exports = { /** * Lighten blend mode. For Canvas only. * Where both shapes overlap the color is determined by adding color values. - * + * * @name Phaser.BlendModes.LIGHTER * @type {number} * @const @@ -27434,7 +29870,7 @@ module.exports = { /** * Copy blend mode. For Canvas only. * Only the new shape is shown. - * + * * @name Phaser.BlendModes.COPY * @type {number} * @const @@ -27445,7 +29881,7 @@ module.exports = { /** * Xor blend mode. For Canvas only. * Shapes are made transparent where both overlap and drawn normal everywhere else. - * + * * @name Phaser.BlendModes.XOR * @type {number} * @const @@ -27458,272 +29894,75 @@ module.exports = { /***/ }), -/***/ "../../../src/renderer/events/POST_RENDER_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/events/POST_RENDER_EVENT.js ***! - \*******************************************************************/ +/***/ "../../../src/renderer/ScaleModes.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * The Post-Render Event. + * Phaser Scale Modes. * - * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes, - * has completed, but before any pending snap shots have been taken. - * - * @event Phaser.Renderer.Events#POST_RENDER - * @since 3.50.0 - */ -module.exports = 'postrender'; - - -/***/ }), - -/***/ "../../../src/renderer/events/PRE_RENDER_EVENT.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/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} + * @namespace Phaser.ScaleModes + * @since 3.0.0 */ -/** - * The Pre-Render Event. - * - * This event is dispatched by the Phaser Renderer. This happens right at the start of the render - * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been - * reset ready for the render. - * - * @event Phaser.Renderer.Events#PRE_RENDER - * @since 3.50.0 - */ -module.exports = 'prerender'; +var ScaleModes = { + /** + * Default Scale Mode (Linear). + * + * @name Phaser.ScaleModes.DEFAULT + * @type {number} + * @readonly + * @since 3.0.0 + */ + DEFAULT: 0, -/***/ }), + /** + * Linear Scale Mode. + * + * @name Phaser.ScaleModes.LINEAR + * @type {number} + * @readonly + * @since 3.0.0 + */ + LINEAR: 0, -/***/ "../../../src/renderer/events/RENDER_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/events/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 Render Event. - * - * This event is dispatched by the Phaser Renderer for every camera in every Scene. - * - * It is dispatched before any of the children in the Scene have been rendered. - * - * @event Phaser.Renderer.Events#RENDER - * @since 3.50.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered. - */ -module.exports = 'render'; - - -/***/ }), - -/***/ "../../../src/renderer/events/RESIZE_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/events/RESIZE_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 Renderer Resize Event. - * - * This event is dispatched by the Phaser Renderer when it is resized, usually as a result - * of the Scale Manager resizing. - * - * @event Phaser.Renderer.Events#RESIZE - * @since 3.50.0 - * - * @param {number} width - The new width of the renderer. - * @param {number} height - The new height of the renderer. - */ -module.exports = 'resize'; - - -/***/ }), - -/***/ "../../../src/renderer/events/index.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/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.Renderer.Events - */ - -module.exports = { - - POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "../../../src/renderer/events/POST_RENDER_EVENT.js"), - PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "../../../src/renderer/events/PRE_RENDER_EVENT.js"), - RENDER: __webpack_require__(/*! ./RENDER_EVENT */ "../../../src/renderer/events/RENDER_EVENT.js"), - RESIZE: __webpack_require__(/*! ./RESIZE_EVENT */ "../../../src/renderer/events/RESIZE_EVENT.js") + /** + * Nearest Scale Mode. + * + * @name Phaser.ScaleModes.NEAREST + * @type {number} + * @readonly + * @since 3.0.0 + */ + NEAREST: 1 }; - -/***/ }), - -/***/ "../../../src/renderer/webgl/pipelines/const.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/webgl/pipelines/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 PIPELINE_CONST = { - - /** - * The Bitmap Mask Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', - - /** - * The Light 2D Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - LIGHT_PIPELINE: 'Light2D', - - /** - * The Point Light Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POINTLIGHT_PIPELINE: 'PointLightPipeline', - - /** - * The Single Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - SINGLE_PIPELINE: 'SinglePipeline', - - /** - * The Multi Texture Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - MULTI_PIPELINE: 'MultiPipeline', - - /** - * The Rope Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - ROPE_PIPELINE: 'RopePipeline', - - /** - * The Graphics and Shapes Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - GRAPHICS_PIPELINE: 'GraphicsPipeline', - - /** - * The Post FX Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - POSTFX_PIPELINE: 'PostFXPipeline', - - /** - * The Utility Pipeline. - * - * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE - * @type {string} - * @const - * @since 3.50.0 - */ - UTILITY_PIPELINE: 'UtilityPipeline' -}; - -module.exports = PIPELINE_CONST; +module.exports = ScaleModes; /***/ }), /***/ "../../../src/scale/events/RESIZE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27736,6 +29975,7 @@ module.exports = PIPELINE_CONST; * scaling your own game content. * * @event Phaser.Scale.Events#RESIZE + * @type {string} * @since 3.16.1 * * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. @@ -27750,15 +29990,15 @@ module.exports = 'resize'; /***/ }), /***/ "../../../src/scene/events/ADDED_TO_SCENE_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27767,9 +30007,10 @@ module.exports = 'resize'; * * 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)`. + * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`. * * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @type {string} * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. @@ -27781,28 +30022,29 @@ module.exports = 'addedtoscene'; /***/ }), /***/ "../../../src/scene/events/BOOT_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('boot', listener)`. + * * @event Phaser.Scenes.Events#BOOT + * @type {string} * @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'; @@ -27811,32 +30053,33 @@ module.exports = 'boot'; /***/ }), /***/ "../../../src/scene/events/CREATE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('create', listener)`. + * * @event Phaser.Scenes.Events#CREATE + * @type {string} * @since 3.17.0 - * + * * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. */ module.exports = 'create'; @@ -27845,30 +30088,31 @@ module.exports = 'create'; /***/ }), /***/ "../../../src/scene/events/DESTROY_EVENT.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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'; @@ -27877,29 +30121,30 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/scene/events/PAUSE_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('pause', listener)`. + * * @event Phaser.Scenes.Events#PAUSE + * @type {string} * @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. */ @@ -27909,25 +30154,25 @@ module.exports = 'pause'; /***/ }), /***/ "../../../src/scene/events/POST_UPDATE_EVENT.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -27935,13 +30180,14 @@ module.exports = 'pause'; * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`. - * + * Listen to it from a Scene using `this.events.on('postupdate', listener)`. + * * A Scene will only run its step if it is active. - * + * * @event Phaser.Scenes.Events#POST_UPDATE + * @type {string} * @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. @@ -27952,9 +30198,9 @@ module.exports = 'postupdate'; /***/ }), /***/ "../../../src/scene/events/PRE_RENDER_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/PRE_RENDER_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27978,12 +30224,14 @@ module.exports = 'postupdate'; * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to this event from a Scene using `this.scene.events.on('prerender', listener)`. + * Listen to this event from a Scene using `this.events.on('prerender', listener)`. * * A Scene will only render if it is visible. + * * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered. * * @event Phaser.Scenes.Events#PRE_RENDER + * @type {string} * @since 3.53.0 * * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. @@ -27994,25 +30242,25 @@ module.exports = 'prerender'; /***/ }), /***/ "../../../src/scene/events/PRE_UPDATE_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -28020,13 +30268,14 @@ module.exports = 'prerender'; * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`. - * + * Listen to it from a Scene using `this.events.on('preupdate', listener)`. + * * A Scene will only run its step if it is active. - * + * * @event Phaser.Scenes.Events#PRE_UPDATE + * @type {string} * @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. @@ -28037,30 +30286,31 @@ module.exports = 'preupdate'; /***/ }), /***/ "../../../src/scene/events/READY_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/READY_EVENT.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('ready', listener)`. + * * @event Phaser.Scenes.Events#READY + * @type {string} * @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. */ @@ -28070,15 +30320,15 @@ module.exports = 'ready'; /***/ }), /***/ "../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! - \***********************************************************************/ +/*!*********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! + \*********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28087,9 +30337,10 @@ module.exports = 'ready'; * * 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)`. + * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`. * * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @type {string} * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. @@ -28101,25 +30352,25 @@ module.exports = 'removedfromscene'; /***/ }), /***/ "../../../src/scene/events/RENDER_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -28127,14 +30378,16 @@ module.exports = 'removedfromscene'; * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to it from a Scene using `this.scene.events.on('render', listener)`. + * Listen to it from a Scene using `this.events.on('render', listener)`. * * A Scene will only render if it is visible. + * * By the time this event is dispatched, the Scene will have already been rendered. - * + * * @event Phaser.Scenes.Events#RENDER + * @type {string} * @since 3.0.0 - * + * * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. */ module.exports = 'render'; @@ -28143,29 +30396,30 @@ module.exports = 'render'; /***/ }), /***/ "../../../src/scene/events/RESUME_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('resume', listener)`. + * * @event Phaser.Scenes.Events#RESUME + * @type {string} * @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. */ @@ -28175,32 +30429,33 @@ module.exports = 'resume'; /***/ }), /***/ "../../../src/scene/events/SHUTDOWN_EVENT.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28210,29 +30465,30 @@ module.exports = 'shutdown'; /***/ }), /***/ "../../../src/scene/events/SLEEP_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('sleep', listener)`. + * * @event Phaser.Scenes.Events#SLEEP + * @type {string} * @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. */ @@ -28242,28 +30498,29 @@ module.exports = 'sleep'; /***/ }), /***/ "../../../src/scene/events/START_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/START_EVENT.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('start', listener)`. + * * @event Phaser.Scenes.Events#START + * @type {string} * @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'; @@ -28272,39 +30529,40 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! - \************************************************************************/ +/*!**********************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! + \**********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @since 3.5.0 - * + * * @param {Phaser.Scene} scene -The Scene on which the transitioned completed. */ module.exports = 'transitioncomplete'; @@ -28313,39 +30571,40 @@ module.exports = 'transitioncomplete'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_INIT_EVENT.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28355,36 +30614,37 @@ module.exports = 'transitioninit'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_OUT_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28394,42 +30654,43 @@ module.exports = 'transitionout'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_START_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! - \*********************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28439,37 +30700,38 @@ module.exports = 'transitionstart'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_WAKE_EVENT.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.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 + * @type {string} * @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. */ @@ -28479,39 +30741,40 @@ module.exports = 'transitionwake'; /***/ }), /***/ "../../../src/scene/events/UPDATE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 + * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped. * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER} * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} * - * Listen to it from a Scene using `this.scene.events.on('update', listener)`. - * + * Listen to it from a Scene using `this.events.on('update', listener)`. + * * A Scene will only run its step if it is active. - * + * * @event Phaser.Scenes.Events#UPDATE + * @type {string} * @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. @@ -28522,29 +30785,30 @@ module.exports = 'update'; /***/ }), /***/ "../../../src/scene/events/WAKE_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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)`. - * + * + * Listen to it from a Scene using `this.events.on('wake', listener)`. + * * @event Phaser.Scenes.Events#WAKE + * @type {string} * @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. */ @@ -28554,15 +30818,15 @@ module.exports = 'wake'; /***/ }), /***/ "../../../src/scene/events/index.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/index.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28598,18 +30862,880 @@ module.exports = { }; +/***/ }), + +/***/ "../../../src/textures/Frame.js": +/*!**********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var Clamp = __webpack_require__(/*! ../math/Clamp */ "../../../src/math/Clamp.js"); +var Extend = __webpack_require__(/*! ../utils/object/Extend */ "../../../src/utils/object/Extend.js"); + +/** + * @classdesc + * A Frame is a section of a Texture. + * + * @class Frame + * @memberof Phaser.Textures + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of. + * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture. + * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of. + * @param {number} x - The x coordinate of the top-left of this Frame. + * @param {number} y - The y coordinate of the top-left of this Frame. + * @param {number} width - The width of this Frame. + * @param {number} height - The height of this Frame. + */ +var Frame = new Class({ + + initialize: + + function Frame (texture, name, sourceIndex, x, y, width, height) + { + /** + * The Texture this Frame is a part of. + * + * @name Phaser.Textures.Frame#texture + * @type {Phaser.Textures.Texture} + * @since 3.0.0 + */ + this.texture = texture; + + /** + * The name of this Frame. + * The name is unique within the Texture. + * + * @name Phaser.Textures.Frame#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The TextureSource this Frame is part of. + * + * @name Phaser.Textures.Frame#source + * @type {Phaser.Textures.TextureSource} + * @since 3.0.0 + */ + this.source = texture.source[sourceIndex]; + + /** + * The index of the TextureSource in the Texture sources array. + * + * @name Phaser.Textures.Frame#sourceIndex + * @type {number} + * @since 3.0.0 + */ + this.sourceIndex = sourceIndex; + + /** + * A reference to the Texture Source WebGL Texture that this Frame is using. + * + * @name Phaser.Textures.Frame#glTexture + * @type {?WebGLTexture} + * @default null + * @since 3.11.0 + */ + this.glTexture = this.source.glTexture; + + /** + * X position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutX + * @type {number} + * @since 3.0.0 + */ + this.cutX; + + /** + * Y position within the source image to cut from. + * + * @name Phaser.Textures.Frame#cutY + * @type {number} + * @since 3.0.0 + */ + this.cutY; + + /** + * The width of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutWidth + * @type {number} + * @since 3.0.0 + */ + this.cutWidth; + + /** + * The height of the area in the source image to cut. + * + * @name Phaser.Textures.Frame#cutHeight + * @type {number} + * @since 3.0.0 + */ + this.cutHeight; + + /** + * The X rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The Y rendering offset of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The rendering width of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#width + * @type {number} + * @since 3.0.0 + */ + this.width; + + /** + * The rendering height of this Frame, taking trim into account. + * + * @name Phaser.Textures.Frame#height + * @type {number} + * @since 3.0.0 + */ + this.height; + + /** + * Half the width, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfWidth + * @type {number} + * @since 3.0.0 + */ + this.halfWidth; + + /** + * Half the height, floored. + * Precalculated for the renderer. + * + * @name Phaser.Textures.Frame#halfHeight + * @type {number} + * @since 3.0.0 + */ + this.halfHeight; + + /** + * The x center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerX + * @type {number} + * @since 3.0.0 + */ + this.centerX; + + /** + * The y center of this frame, floored. + * + * @name Phaser.Textures.Frame#centerY + * @type {number} + * @since 3.0.0 + */ + this.centerY; + + /** + * The horizontal pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotX = 0; + + /** + * The vertical pivot point of this Frame. + * + * @name Phaser.Textures.Frame#pivotY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.pivotY = 0; + + /** + * Does this Frame have a custom pivot point? + * + * @name Phaser.Textures.Frame#customPivot + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.customPivot = false; + + /** + * **CURRENTLY UNSUPPORTED** + * + * Is this frame is rotated or not in the Texture? + * Rotation allows you to use rotated frames in texture atlas packing. + * It has nothing to do with Sprite rotation. + * + * @name Phaser.Textures.Frame#rotated + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.rotated = false; + + /** + * Over-rides the Renderer setting. + * -1 = use Renderer Setting + * 0 = No rounding + * 1 = Round + * + * @name Phaser.Textures.Frame#autoRound + * @type {number} + * @default -1 + * @since 3.0.0 + */ + this.autoRound = -1; + + /** + * Any Frame specific custom data can be stored here. + * + * @name Phaser.Textures.Frame#customData + * @type {object} + * @since 3.0.0 + */ + this.customData = {}; + + /** + * WebGL UV u0 value. + * + * @name Phaser.Textures.Frame#u0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u0 = 0; + + /** + * WebGL UV v0 value. + * + * @name Phaser.Textures.Frame#v0 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v0 = 0; + + /** + * WebGL UV u1 value. + * + * @name Phaser.Textures.Frame#u1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.u1 = 0; + + /** + * WebGL UV v1 value. + * + * @name Phaser.Textures.Frame#v1 + * @type {number} + * @default 0 + * @since 3.11.0 + */ + this.v1 = 0; + + /** + * The un-modified source frame, trim and UV data. + * + * @name Phaser.Textures.Frame#data + * @type {object} + * @private + * @since 3.0.0 + */ + this.data = { + cut: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + trim: false, + sourceSize: { + w: 0, + h: 0 + }, + spriteSourceSize: { + x: 0, + y: 0, + w: 0, + h: 0, + r: 0, + b: 0 + }, + radius: 0, + drawImage: { + x: 0, + y: 0, + width: 0, + height: 0 + } + }; + + this.setSize(width, height, x, y); + }, + + /** + * Sets the width, height, x and y of this Frame. + * + * This is called automatically by the constructor + * and should rarely be changed on-the-fly. + * + * @method Phaser.Textures.Frame#setSize + * @since 3.7.0 + * + * @param {number} width - The width of the frame before being trimmed. + * @param {number} height - The height of the frame before being trimmed. + * @param {number} [x=0] - The x coordinate of the top-left of this Frame. + * @param {number} [y=0] - The y coordinate of the top-left of this Frame. + * + * @return {this} This Frame object. + */ + setSize: function (width, height, x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.cutX = x; + this.cutY = y; + this.cutWidth = width; + this.cutHeight = height; + + this.width = width; + this.height = height; + + this.halfWidth = Math.floor(width * 0.5); + this.halfHeight = Math.floor(height * 0.5); + + this.centerX = Math.floor(width / 2); + this.centerY = Math.floor(height / 2); + + var data = this.data; + var cut = data.cut; + + cut.x = x; + cut.y = y; + cut.w = width; + cut.h = height; + cut.r = x + width; + cut.b = y + height; + + data.sourceSize.w = width; + data.sourceSize.h = height; + + data.spriteSourceSize.w = width; + data.spriteSourceSize.h = height; + + data.radius = 0.5 * Math.sqrt(width * width + height * height); + + var drawImage = data.drawImage; + + drawImage.x = x; + drawImage.y = y; + drawImage.width = width; + drawImage.height = height; + + return this.updateUVs(); + }, + + /** + * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data. + * + * @method Phaser.Textures.Frame#setTrim + * @since 3.0.0 + * + * @param {number} actualWidth - The width of the frame before being trimmed. + * @param {number} actualHeight - The height of the frame before being trimmed. + * @param {number} destX - The destination X position of the trimmed frame for display. + * @param {number} destY - The destination Y position of the trimmed frame for display. + * @param {number} destWidth - The destination width of the trimmed frame for display. + * @param {number} destHeight - The destination height of the trimmed frame for display. + * + * @return {this} This Frame object. + */ + setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight) + { + var data = this.data; + var ss = data.spriteSourceSize; + + // Store actual values + + data.trim = true; + + data.sourceSize.w = actualWidth; + data.sourceSize.h = actualHeight; + + ss.x = destX; + ss.y = destY; + ss.w = destWidth; + ss.h = destHeight; + ss.r = destX + destWidth; + ss.b = destY + destHeight; + + // Adjust properties + this.x = destX; + this.y = destY; + + this.width = destWidth; + this.height = destHeight; + + this.halfWidth = destWidth * 0.5; + this.halfHeight = destHeight * 0.5; + + this.centerX = Math.floor(destWidth / 2); + this.centerY = Math.floor(destHeight / 2); + + return this.updateUVs(); + }, + + /** + * Takes a crop data object and, based on the rectangular region given, calculates the + * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. + * + * This is called directly by the Game Object Texture Components `setCrop` method. + * Please use that method to crop a Game Object. + * + * @method Phaser.Textures.Frame#setCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. + * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height. + * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width. + * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + setCropUVs: function (crop, x, y, width, height, flipX, flipY) + { + // Clamp the input values + + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + var rw = this.realWidth; + var rh = this.realHeight; + + x = Clamp(x, 0, rw); + y = Clamp(y, 0, rh); + + width = Clamp(width, 0, rw - x); + height = Clamp(height, 0, rh - y); + + var ox = cx + x; + var oy = cy + y; + var ow = width; + var oh = height; + + var data = this.data; + + if (data.trim) + { + var ss = data.spriteSourceSize; + + // Need to check for intersection between the cut area and the crop area + // If there is none, we set UV to be empty, otherwise set it to be the intersection area + + width = Clamp(width, 0, cw - x); + height = Clamp(height, 0, ch - y); + + var cropRight = x + width; + var cropBottom = y + height; + + var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom); + + if (intersects) + { + var ix = Math.max(ss.x, x); + var iy = Math.max(ss.y, y); + var iw = Math.min(ss.r, cropRight) - ix; + var ih = Math.min(ss.b, cropBottom) - iy; + + ow = iw; + oh = ih; + + if (flipX) + { + ox = cx + (cw - (ix - ss.x) - iw); + } + else + { + ox = cx + (ix - ss.x); + } + + if (flipY) + { + oy = cy + (ch - (iy - ss.y) - ih); + } + else + { + oy = cy + (iy - ss.y); + } + + x = ix; + y = iy; + + width = iw; + height = ih; + } + else + { + ox = 0; + oy = 0; + ow = 0; + oh = 0; + } + } + else + { + if (flipX) + { + ox = cx + (cw - x - width); + } + + if (flipY) + { + oy = cy + (ch - y - height); + } + } + + var tw = this.source.width; + var th = this.source.height; + + // Map the given coordinates into UV space, clamping to the 0-1 range. + + crop.u0 = Math.max(0, ox / tw); + crop.v0 = Math.max(0, oy / th); + crop.u1 = Math.min(1, (ox + ow) / tw); + crop.v1 = Math.min(1, (oy + oh) / th); + + crop.x = x; + crop.y = y; + + crop.cx = ox; + crop.cy = oy; + crop.cw = ow; + crop.ch = oh; + + crop.width = width; + crop.height = height; + + crop.flipX = flipX; + crop.flipY = flipY; + + return crop; + }, + + /** + * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object. + * Called automatically by `setFrame`. + * + * @method Phaser.Textures.Frame#updateCropUVs + * @since 3.11.0 + * + * @param {object} crop - The crop data object. This is the `GameObject._crop` property. + * @param {boolean} flipX - Does the parent Game Object have flipX set? + * @param {boolean} flipY - Does the parent Game Object have flipY set? + * + * @return {object} The updated crop data object. + */ + updateCropUVs: function (crop, flipX, flipY) + { + return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY); + }, + + /** + * Directly sets the canvas and WebGL UV data for this frame. + * + * Use this if you need to override the values that are generated automatically + * when the Frame is created. + * + * @method Phaser.Textures.Frame#setUVs + * @since 3.50.0 + * + * @param {number} width - Width of this frame for the Canvas data. + * @param {number} height - Height of this frame for the Canvas data. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * + * @return {this} This Frame object. + */ + setUVs: function (width, height, u0, v0, u1, v1) + { + // Canvas data + + var cd = this.data.drawImage; + + cd.width = width; + cd.height = height; + + // WebGL data + + this.u0 = u0; + this.v0 = v0; + + this.u1 = u1; + this.v1 = v1; + + return this; + }, + + /** + * Updates the internal WebGL UV cache and the drawImage cache. + * + * @method Phaser.Textures.Frame#updateUVs + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVs: function () + { + var cx = this.cutX; + var cy = this.cutY; + var cw = this.cutWidth; + var ch = this.cutHeight; + + // Canvas data + + var cd = this.data.drawImage; + + cd.width = cw; + cd.height = ch; + + // WebGL data + + var tw = this.source.width; + var th = this.source.height; + + this.u0 = cx / tw; + this.v0 = cy / th; + + this.u1 = (cx + cw) / tw; + this.v1 = (cy + ch) / th; + + return this; + }, + + /** + * Updates the internal WebGL UV cache. + * + * @method Phaser.Textures.Frame#updateUVsInverted + * @since 3.0.0 + * + * @return {this} This Frame object. + */ + updateUVsInverted: function () + { + var tw = this.source.width; + var th = this.source.height; + + this.u0 = (this.cutX + this.cutHeight) / tw; + this.v0 = this.cutY / th; + + this.u1 = this.cutX / tw; + this.v1 = (this.cutY + this.cutWidth) / th; + + return this; + }, + + /** + * Clones this Frame into a new Frame object. + * + * @method Phaser.Textures.Frame#clone + * @since 3.0.0 + * + * @return {Phaser.Textures.Frame} A clone of this Frame. + */ + clone: function () + { + var clone = new Frame(this.texture, this.name, this.sourceIndex); + + clone.cutX = this.cutX; + clone.cutY = this.cutY; + clone.cutWidth = this.cutWidth; + clone.cutHeight = this.cutHeight; + + clone.x = this.x; + clone.y = this.y; + + clone.width = this.width; + clone.height = this.height; + + clone.halfWidth = this.halfWidth; + clone.halfHeight = this.halfHeight; + + clone.centerX = this.centerX; + clone.centerY = this.centerY; + + clone.rotated = this.rotated; + + clone.data = Extend(true, clone.data, this.data); + + clone.updateUVs(); + + return clone; + }, + + /** + * Destroys this Frame by nulling its reference to the parent Texture and and data objects. + * + * @method Phaser.Textures.Frame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.source = null; + this.texture = null; + this.glTexture = null; + this.customData = null; + this.data = null; + }, + + /** + * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realWidth + * @type {number} + * @readonly + * @since 3.0.0 + */ + realWidth: { + + get: function () + { + return this.data.sourceSize.w; + } + + }, + + /** + * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + * + * @name Phaser.Textures.Frame#realHeight + * @type {number} + * @readonly + * @since 3.0.0 + */ + realHeight: { + + get: function () + { + return this.data.sourceSize.h; + } + + }, + + /** + * The radius of the Frame (derived from sqrt(w * w + h * h) / 2) + * + * @name Phaser.Textures.Frame#radius + * @type {number} + * @readonly + * @since 3.0.0 + */ + radius: { + + get: function () + { + return this.data.radius; + } + + }, + + /** + * Is the Frame trimmed or not? + * + * @name Phaser.Textures.Frame#trimmed + * @type {boolean} + * @readonly + * @since 3.0.0 + */ + trimmed: { + + get: function () + { + return this.data.trim; + } + + }, + + /** + * The Canvas drawImage data object. + * + * @name Phaser.Textures.Frame#canvasData + * @type {object} + * @readonly + * @since 3.0.0 + */ + canvasData: { + + get: function () + { + return this.data.drawImage; + } + + } + +}); + +module.exports = Frame; + + /***/ }), /***/ "../../../src/tweens/builders/GetBoolean.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/tweens/builders/GetBoolean.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28621,9 +31747,9 @@ module.exports = { * * @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. + * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. * - * @return {*} The retrieved value. + * @return {boolean} The retrieved value. */ var GetBoolean = function (source, key, defaultValue) { @@ -28647,106 +31773,116 @@ module.exports = GetBoolean; /***/ }), /***/ "../../../src/tweens/tween/const.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/tweens/tween/const.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +/** + * Phaser Tween States. + * + * @namespace Phaser.Tweens.States + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + +/** + * Phaser Tween state constants. + * + * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType + * @memberof Phaser.Tweens + * @since 3.60.0 + */ + var TWEEN_CONST = { /** * TweenData state. - * - * @name Phaser.Tweens.CREATED + * + * @name Phaser.Tweens.States.CREATED * @type {number} + * @const * @since 3.0.0 */ CREATED: 0, - /** - * TweenData state. - * - * @name Phaser.Tweens.INIT - * @type {number} - * @since 3.0.0 - */ - INIT: 1, + // 1 used to be INIT prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.DELAY + * + * @name Phaser.Tweens.States.DELAY * @type {number} + * @const * @since 3.0.0 */ DELAY: 2, - /** - * TweenData state. - * - * @name Phaser.Tweens.OFFSET_DELAY - * @type {number} - * @since 3.0.0 - */ - OFFSET_DELAY: 3, + // 3 used to be OFFSET_DELAY prior to 3.60 /** * TweenData state. - * - * @name Phaser.Tweens.PENDING_RENDER + * + * @name Phaser.Tweens.States.PENDING_RENDER * @type {number} + * @const * @since 3.0.0 */ PENDING_RENDER: 4, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_FORWARD + * + * @name Phaser.Tweens.States.PLAYING_FORWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_FORWARD: 5, /** * TweenData state. - * - * @name Phaser.Tweens.PLAYING_BACKWARD + * + * @name Phaser.Tweens.States.PLAYING_BACKWARD * @type {number} + * @const * @since 3.0.0 */ PLAYING_BACKWARD: 6, /** * TweenData state. - * - * @name Phaser.Tweens.HOLD_DELAY + * + * @name Phaser.Tweens.States.HOLD_DELAY * @type {number} + * @const * @since 3.0.0 */ HOLD_DELAY: 7, /** * TweenData state. - * - * @name Phaser.Tweens.REPEAT_DELAY + * + * @name Phaser.Tweens.States.REPEAT_DELAY * @type {number} + * @const * @since 3.0.0 */ REPEAT_DELAY: 8, /** * TweenData state. - * - * @name Phaser.Tweens.COMPLETE + * + * @name Phaser.Tweens.States.COMPLETE * @type {number} + * @const * @since 3.0.0 */ COMPLETE: 9, @@ -28754,67 +31890,110 @@ var TWEEN_CONST = { // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_ADD + * Tween state. The Tween has been created but has not yet been added to the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING * @type {number} + * @const * @since 3.0.0 */ - PENDING_ADD: 20, + PENDING: 20, /** - * Tween state. - * - * @name Phaser.Tweens.PAUSED + * Tween state. The Tween is active within the Tween Manager. This means it is either playing, + * or was playing and is currently paused, but in both cases it's still being processed by + * the Tween Manager, so is considered 'active'. + * + * @name Phaser.Tweens.States.ACTIVE * @type {number} + * @const * @since 3.0.0 */ - PAUSED: 21, + ACTIVE: 21, /** - * Tween state. - * - * @name Phaser.Tweens.LOOP_DELAY + * Tween state. The Tween is waiting for a loop countdown to elapse. + * + * @name Phaser.Tweens.States.LOOP_DELAY * @type {number} + * @const * @since 3.0.0 */ LOOP_DELAY: 22, /** - * Tween state. - * - * @name Phaser.Tweens.ACTIVE + * Tween state. The Tween is waiting for a complete delay to elapse. + * + * @name Phaser.Tweens.States.COMPLETE_DELAY * @type {number} + * @const * @since 3.0.0 */ - ACTIVE: 23, + COMPLETE_DELAY: 23, /** - * Tween state. - * - * @name Phaser.Tweens.COMPLETE_DELAY + * Tween state. The Tween is waiting for a starting delay to elapse. + * + * @name Phaser.Tweens.States.START_DELAY * @type {number} + * @const * @since 3.0.0 */ - COMPLETE_DELAY: 24, + START_DELAY: 24, /** - * Tween state. - * - * @name Phaser.Tweens.PENDING_REMOVE + * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager. + * + * @name Phaser.Tweens.States.PENDING_REMOVE * @type {number} + * @const * @since 3.0.0 */ PENDING_REMOVE: 25, /** - * Tween state. - * - * @name Phaser.Tweens.REMOVED + * Tween state. The Tween has been removed from the Tween Manager. + * + * @name Phaser.Tweens.States.REMOVED * @type {number} + * @const * @since 3.0.0 */ - REMOVED: 26 + REMOVED: 26, + + /** + * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation, + * so will not be automatically removed by the Tween Manager. + * + * @name Phaser.Tweens.States.FINISHED + * @type {number} + * @const + * @since 3.60.0 + */ + FINISHED: 27, + + /** + * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager. + * + * @name Phaser.Tweens.States.DESTROYED + * @type {number} + * @const + * @since 3.60.0 + */ + DESTROYED: 28, + + /** + * A large integer value used for 'infinite' style countdowns. + * + * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not + * supported on IE. + * + * @name Phaser.Tweens.States.MAX + * @type {number} + * @const + * @since 3.60.0 + */ + MAX: 999999999999 }; @@ -28824,15 +32003,15 @@ module.exports = TWEEN_CONST; /***/ }), /***/ "../../../src/utils/Class.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/utils/Class.js ***! - \*********************************************/ +/*!*******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29085,15 +32264,15 @@ module.exports = Class; /***/ }), /***/ "../../../src/utils/NOOP.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/utils/NOOP.js ***! - \********************************************/ +/*!******************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29117,15 +32296,15 @@ module.exports = NOOP; /***/ }), /***/ "../../../src/utils/array/Add.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Add.js ***! - \*************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29239,30 +32418,30 @@ module.exports = Add; /***/ }), /***/ "../../../src/utils/array/AddAt.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/AddAt.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 @@ -29366,15 +32545,15 @@ module.exports = AddAt; /***/ }), /***/ "../../../src/utils/array/BringToTop.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/BringToTop.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29409,15 +32588,15 @@ module.exports = BringToTop; /***/ }), /***/ "../../../src/utils/array/CountAllMatching.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/CountAllMatching.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29466,15 +32645,15 @@ module.exports = CountAllMatching; /***/ }), /***/ "../../../src/utils/array/Each.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Each.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29517,15 +32696,15 @@ module.exports = Each; /***/ }), /***/ "../../../src/utils/array/EachInRange.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/EachInRange.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29578,15 +32757,15 @@ module.exports = EachInRange; /***/ }), /***/ "../../../src/utils/array/FindClosestInSorted.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/FindClosestInSorted.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29664,18 +32843,66 @@ var FindClosestInSorted = function (value, array, key) module.exports = FindClosestInSorted; +/***/ }), + +/***/ "../../../src/utils/array/Flatten.js": +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes an array and flattens it, returning a shallow-copy flattened array. + * + * @function Phaser.Utils.Array.Flatten + * @since 3.60.0 + * + * @param {array} array - The array to flatten. + * @param {array} [output] - An array to hold the results in. + * + * @return {array} The flattened output array. + */ +var Flatten = function (array, output) +{ + if (output === undefined) { output = []; } + + for (var i = 0; i < array.length; i++) + { + if (Array.isArray(array[i])) + { + Flatten(array[i], output); + } + else + { + output.push(array[i]); + } + } + + return output; +}; + +module.exports = Flatten; + + /***/ }), /***/ "../../../src/utils/array/GetAll.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetAll.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29734,15 +32961,15 @@ module.exports = GetAll; /***/ }), /***/ "../../../src/utils/array/GetFirst.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetFirst.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29798,15 +33025,15 @@ module.exports = GetFirst; /***/ }), /***/ "../../../src/utils/array/GetRandom.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetRandom.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29837,16 +33064,154 @@ module.exports = GetRandom; /***/ }), -/***/ "../../../src/utils/array/MoveDown.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveDown.js ***! - \******************************************************/ +/***/ "../../../src/utils/array/MoveAbove.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element above another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveAbove + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move above base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveAbove = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex > baseIndex) + { + // item1 is already above item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === array.length - 1) + { + array.push(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveAbove; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveBelow.js": +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element below another one in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveBelow + * @since 3.55.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The element to move below base element. + * @param {*} item2 - The base element. + * + * + * @return {array} The input array. + */ +var MoveBelow = function (array, item1, item2) +{ + if (item1 === item2) + { + return array; + } + + var currentIndex = array.indexOf(item1); + var baseIndex = array.indexOf(item2); + + if (currentIndex < 0 || baseIndex < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + if (currentIndex < baseIndex) + { + // item1 is already below item2 + return array; + } + + // Remove + array.splice(currentIndex, 1); + + // Add in new location + if (baseIndex === 0) + { + array.unshift(item1); + } + else + { + array.splice(baseIndex, 0, item1); + } + + return array; +}; + +module.exports = MoveBelow; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveDown.js": +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29885,15 +33250,15 @@ module.exports = MoveDown; /***/ }), /***/ "../../../src/utils/array/MoveTo.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveTo.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29937,15 +33302,15 @@ module.exports = MoveTo; /***/ }), /***/ "../../../src/utils/array/MoveUp.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveUp.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29984,15 +33349,15 @@ module.exports = MoveUp; /***/ }), /***/ "../../../src/utils/array/NumberArray.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/NumberArray.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30082,15 +33447,15 @@ module.exports = NumberArray; /***/ }), /***/ "../../../src/utils/array/NumberArrayStep.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/NumberArrayStep.js ***! - \*************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30104,7 +33469,7 @@ var RoundAwayFromZero = __webpack_require__(/*! ../../math/RoundAwayFromZero */ * * 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] @@ -30164,15 +33529,15 @@ module.exports = NumberArrayStep; /***/ }), /***/ "../../../src/utils/array/QuickSelect.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/QuickSelect.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30291,15 +33656,15 @@ module.exports = QuickSelect; /***/ }), /***/ "../../../src/utils/array/Range.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Range.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30329,29 +33694,29 @@ var BuildChunk = function (a, b, qty) * * 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 * @@ -30434,15 +33799,15 @@ module.exports = Range; /***/ }), /***/ "../../../src/utils/array/Remove.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Remove.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30528,15 +33893,15 @@ module.exports = Remove; /***/ }), /***/ "../../../src/utils/array/RemoveAt.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveAt.js ***! - \******************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30544,9 +33909,9 @@ var SpliceOne = __webpack_require__(/*! ./SpliceOne */ "../../../src/utils/array /** * 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 @@ -30584,15 +33949,15 @@ module.exports = RemoveAt; /***/ }), /***/ "../../../src/utils/array/RemoveBetween.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveBetween.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30600,9 +33965,9 @@ var SafeRange = __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array /** * 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 @@ -30652,15 +34017,15 @@ module.exports = RemoveBetween; /***/ }), /***/ "../../../src/utils/array/RemoveRandomElement.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveRandomElement.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30695,15 +34060,15 @@ module.exports = RemoveRandomElement; /***/ }), /***/ "../../../src/utils/array/Replace.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Replace.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30744,15 +34109,15 @@ module.exports = Replace; /***/ }), /***/ "../../../src/utils/array/RotateLeft.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RotateLeft.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30789,15 +34154,15 @@ module.exports = RotateLeft; /***/ }), /***/ "../../../src/utils/array/RotateRight.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RotateRight.js ***! - \*********************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30834,21 +34199,21 @@ module.exports = RotateRight; /***/ }), /***/ "../../../src/utils/array/SafeRange.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SafeRange.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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 * @@ -30866,8 +34231,7 @@ var SafeRange = function (array, startIndex, endIndex, throwError) if (startIndex < 0 || startIndex > len || startIndex >= endIndex || - endIndex > len || - startIndex + endIndex > len) + endIndex > len) { if (throwError) { @@ -30888,15 +34252,15 @@ module.exports = SafeRange; /***/ }), /***/ "../../../src/utils/array/SendToBack.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SendToBack.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30931,15 +34295,15 @@ module.exports = SendToBack; /***/ }), /***/ "../../../src/utils/array/SetAll.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SetAll.js ***! - \****************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30991,15 +34355,15 @@ module.exports = SetAll; /***/ }), /***/ "../../../src/utils/array/Shuffle.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Shuffle.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31037,15 +34401,15 @@ module.exports = Shuffle; /***/ }), /***/ "../../../src/utils/array/SortByDigits.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SortByDigits.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31080,15 +34444,15 @@ module.exports = SortByDigits; /***/ }), /***/ "../../../src/utils/array/SpliceOne.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SpliceOne.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31131,19 +34495,21 @@ module.exports = SpliceOne; /***/ }), /***/ "../../../src/utils/array/StableSort.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/StableSort.js ***! - \********************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js ***! + \******************************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey * @author Angry Bytes (and contributors) - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Device = __webpack_require__(/*! ../../device */ "../../../src/device/index.js"); + /** * The comparator function. * @@ -31295,6 +34661,17 @@ var StableSort = function (array, compare) { if (compare === undefined) { compare = Compare; } + // Short-circuit when there's nothing to sort. + if (!array || array.length < 2) + { + return array; + } + + if (Device.features.stableSort) + { + return array.sort(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. @@ -31312,15 +34689,15 @@ module.exports = StableSort; /***/ }), /***/ "../../../src/utils/array/Swap.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Swap.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31342,7 +34719,7 @@ var Swap = function (array, item1, item2) { if (item1 === item2) { - return; + return array; } var index1 = array.indexOf(item1); @@ -31365,15 +34742,15 @@ module.exports = Swap; /***/ }), /***/ "../../../src/utils/array/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/index.js ***! - \***************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31392,12 +34769,15 @@ module.exports = { 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"), + Flatten: __webpack_require__(/*! ./Flatten */ "../../../src/utils/array/Flatten.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"), + MoveAbove: __webpack_require__(/*! ./MoveAbove */ "../../../src/utils/array/MoveAbove.js"), + MoveBelow: __webpack_require__(/*! ./MoveBelow */ "../../../src/utils/array/MoveBelow.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"), @@ -31424,15 +34804,15 @@ module.exports = { /***/ }), /***/ "../../../src/utils/array/matrix/CheckMatrix.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/CheckMatrix.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31440,7 +34820,7 @@ module.exports = { * 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. This is an example matrix: + * have the same length. This is an example matrix: * * ``` * [ @@ -31465,7 +34845,7 @@ module.exports = { */ var CheckMatrix = function (matrix) { - if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0])) + if (!Array.isArray(matrix) || !Array.isArray(matrix[0])) { return false; } @@ -31491,15 +34871,15 @@ module.exports = CheckMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/MatrixToString.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/MatrixToString.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31591,15 +34971,15 @@ module.exports = MatrixToString; /***/ }), /***/ "../../../src/utils/array/matrix/ReverseColumns.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseColumns.js ***! - \*******************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31641,15 +35021,15 @@ module.exports = ReverseColumns; /***/ }), /***/ "../../../src/utils/array/matrix/ReverseRows.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseRows.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31696,15 +35076,15 @@ module.exports = ReverseRows; /***/ }), /***/ "../../../src/utils/array/matrix/Rotate180.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/Rotate180.js ***! - \**************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31748,15 +35128,15 @@ module.exports = Rotate180; /***/ }), /***/ "../../../src/utils/array/matrix/RotateLeft.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateLeft.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31800,15 +35180,15 @@ module.exports = RotateLeft; /***/ }), /***/ "../../../src/utils/array/matrix/RotateMatrix.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateMatrix.js ***! - \*****************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31891,15 +35271,15 @@ module.exports = RotateMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/RotateRight.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateRight.js ***! - \****************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31943,15 +35323,15 @@ module.exports = RotateRight; /***/ }), /***/ "../../../src/utils/array/matrix/TranslateMatrix.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/TranslateMatrix.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32037,15 +35417,15 @@ module.exports = TranslateMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/TransposeMatrix.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/TransposeMatrix.js ***! - \********************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32104,15 +35484,15 @@ module.exports = TransposeMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/index.js ***! - \**********************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32139,15 +35519,15 @@ module.exports = { /***/ }), /***/ "../../../src/utils/object/DeepCopy.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/DeepCopy.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32193,15 +35573,15 @@ module.exports = DeepCopy; /***/ }), /***/ "../../../src/utils/object/Extend.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/Extend.js ***! - \*****************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32299,15 +35679,15 @@ module.exports = Extend; /***/ }), /***/ "../../../src/utils/object/GetAdvancedValue.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js ***! - \***************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32318,7 +35698,7 @@ var GetValue = __webpack_require__(/*! ./GetValue */ "../../../src/utils/object/ * Retrieves a value from an object. Allows for more advanced selection options, including: * * Allowed types: - * + * * Implicit * { * x: 4 @@ -32343,7 +35723,7 @@ var GetValue = __webpack_require__(/*! ./GetValue */ "../../../src/utils/object/ * { * x: { randFloat: [min, max] } * } - * + * * * @function Phaser.Utils.Objects.GetAdvancedValue * @since 3.0.0 @@ -32391,15 +35771,15 @@ module.exports = GetAdvancedValue; /***/ }), /***/ "../../../src/utils/object/GetFastValue.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetFastValue.js ***! - \***********************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32439,69 +35819,116 @@ module.exports = GetFastValue; /***/ }), /***/ "../../../src/utils/object/GetValue.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetValue.js ***! - \*******************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 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. + * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found. + * + * The key is a string, which can be split based on the use of the period character. + * + * For example: + * + * ```javascript + * const source = { + * lives: 3, + * render: { + * screen: { + * width: 1024 + * } + * } + * } + * + * const lives = GetValue(source, 'lives', 1); + * const width = GetValue(source, 'render.screen.width', 800); + * const height = GetValue(source, 'render.screen.height', 600); + * ``` + * + * In the code above, `lives` will be 3 because it's defined at the top level of `source`. + * The `width` value will be 1024 because it can be found inside the `render.screen` object. + * The `height` value will be 600, the default value, because it is missing from the `render.screen` object. * * @function Phaser.Utils.Objects.GetValue * @since 3.0.0 * - * @param {object} source - The object to retrieve the value from. + * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked. * @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. + * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used. * * @return {*} The value of the requested key. */ -var GetValue = function (source, key, defaultValue) +var GetValue = function (source, key, defaultValue, altSource) { - if (!source || typeof source === 'number') + if ((!source && !altSource) || typeof source === 'number') { return defaultValue; } - else if (source.hasOwnProperty(key)) + else if (source && source.hasOwnProperty(key)) { return source[key]; } + else if (altSource && altSource.hasOwnProperty(key)) + { + return altSource[key]; + } else if (key.indexOf('.') !== -1) { var keys = key.split('.'); - var parent = source; - var value = defaultValue; + var parentA = source; + var parentB = altSource; + var valueA = defaultValue; + var valueB = defaultValue; + var valueAFound = true; + var valueBFound = true; // Use for loop here so we can break early for (var i = 0; i < keys.length; i++) { - if (parent.hasOwnProperty(keys[i])) + if (parentA && parentA.hasOwnProperty(keys[i])) { - // Yes it has a key property, let's carry on down - value = parent[keys[i]]; - - parent = parent[keys[i]]; + // Yes parentA has a key property, let's carry on down + valueA = parentA[keys[i]]; + parentA = parentA[keys[i]]; } else { - // Can't go any further, so reset to default - value = defaultValue; - break; + valueAFound = false; + } + + if (parentB && parentB.hasOwnProperty(keys[i])) + { + // Yes parentB has a key property, let's carry on down + valueB = parentB[keys[i]]; + parentB = parentB[keys[i]]; + } + else + { + valueBFound = false; } } - return value; + if (valueAFound) + { + return valueA; + } + else if (valueBFound) + { + return valueB; + } + else + { + return defaultValue; + } } else { @@ -32515,15 +35942,15 @@ module.exports = GetValue; /***/ }), /***/ "../../../src/utils/object/IsPlainObject.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/IsPlainObject.js ***! - \************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32544,7 +35971,7 @@ var IsPlainObject = function (obj) // - Any object or value whose internal [[Class]] property is not "[object Object]" // - DOM nodes // - window - if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) + if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) { return false; } @@ -32576,15 +36003,15 @@ module.exports = IsPlainObject; /***/ }), /***/ "../../../src/utils/string/Pad.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/string/Pad.js ***! - \**************************************************/ +/*!************************************************************************************!*\ + !*** /Users/justintien/workspace/github/justintien/phaser/src/utils/string/Pad.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32597,13 +36024,13 @@ module.exports = IsPlainObject; * 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**` @@ -32615,7 +36042,7 @@ module.exports = IsPlainObject; * @param {number} [len=0] - The number of characters to be added. * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). - * + * * @return {string} The padded string. */ var Pad = function (str, len, pad, dir) @@ -32665,7 +36092,7 @@ module.exports = Pad; /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -32930,7 +36357,7 @@ module.exports = SpineFile; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -32945,9 +36372,6 @@ var SpineGameObject = __webpack_require__(/*! ./gameobject/SpineGameObject */ ". var SpineContainer = __webpack_require__(/*! ./container/SpineContainer */ "./container/SpineContainer.js"); var NOOP = __webpack_require__(/*! ../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); -// Plugin specific instance of the Spine Scene Renderer -var sceneRenderer; - /** * @classdesc * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. @@ -33000,6 +36424,17 @@ var sceneRenderer; * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any * subsequent Scenes. * + * ## A note about inlined data: + * + * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader + * at all. Instead, call the functions directly as required: + * + * scene.cache.json.add + * scene.cache.custom.spine.add + * scene.textures.addBase64 + * + * ## Using the plugin + * * 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 @@ -33051,6 +36486,7 @@ var sceneRenderer; * * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. + * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems. */ var SpinePlugin = new Class({ @@ -33058,9 +36494,9 @@ var SpinePlugin = new Class({ initialize: - function SpinePlugin (scene, pluginManager) + function SpinePlugin (scene, pluginManager, pluginKey) { - ScenePlugin.call(this, scene, pluginManager); + ScenePlugin.call(this, scene, pluginManager, pluginKey); var game = pluginManager.game; @@ -33240,11 +36676,10 @@ var SpinePlugin = new Class({ }; } - var _this = this; - var add = function (x, y, key, animationName, loop) { - var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop); + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop); this.displayList.add(spineGO); this.updateList.add(spineGO); @@ -33260,7 +36695,8 @@ var SpinePlugin = new Class({ var animationName = GetValue(config, 'animationName', null); var loop = GetValue(config, 'loop', false); - var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop); + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop); if (addToScene !== undefined) { @@ -33290,7 +36726,8 @@ var SpinePlugin = new Class({ var addContainer = function (x, y, children) { - var spineGO = new SpineContainer(this.scene, _this, x, y, children); + var spinePlugin = this.scene.sys[pluginKey]; + var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children); this.displayList.add(spineGO); @@ -33305,7 +36742,8 @@ var SpinePlugin = new Class({ var y = GetValue(config, 'y', 0); var children = GetValue(config, 'children', null); - var container = new SpineContainer(this.scene, _this, x, y, children); + var spinePlugin = this.scene.sys[pluginKey]; + var container = new SpineContainer(this.scene, spinePlugin, x, y, children); if (addToScene !== undefined) { @@ -33390,14 +36828,18 @@ var SpinePlugin = new Class({ } }; + var sceneRenderer = this.renderer.spineSceneRenderer; + if (!sceneRenderer) { sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); sceneRenderer.batcher.setBlendMode = setBlendMode; sceneRenderer.shapes.setBlendMode = setBlendMode; + + this.renderer.spineSceneRenderer = sceneRenderer; } - // All share the same instance + // All scene share the same instance this.sceneRenderer = sceneRenderer; this.skeletonRenderer = sceneRenderer.skeletonRenderer; this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer; @@ -33568,12 +37010,14 @@ var SpinePlugin = new Class({ * @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. - * + * @param {object} [settings] - An external Settings configuration object { prefix: '' } + * * @return {Phaser.Loader.LoaderPlugin} The Loader instance. */ - spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) + spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings) { var multifile; + settings = settings || {}; if (Array.isArray(key)) { @@ -33581,6 +37025,9 @@ var SpinePlugin = new Class({ { multifile = new SpineFile(this, key[i]); + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + this.addFile(multifile.files); } } @@ -33588,6 +37035,9 @@ var SpinePlugin = new Class({ { multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + this.addFile(multifile.files); } @@ -34063,12 +37513,14 @@ var SpinePlugin = new Class({ this.pluginManager = null; + var sceneRenderer = this.renderer.spineSceneRenderer; + if (sceneRenderer) { sceneRenderer.dispose(); - sceneRenderer = null; } + this.renderer.spineSceneRenderer = null; this.sceneRenderer = null; } @@ -34157,7 +37609,7 @@ module.exports = SpinePlugin; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -34264,7 +37716,7 @@ module.exports = SpineContainer; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34298,7 +37750,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34429,7 +37881,7 @@ module.exports = SpineContainerWebGLRenderer; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34453,7 +37905,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34477,7 +37929,7 @@ module.exports = 'dispose'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34501,7 +37953,7 @@ module.exports = 'end'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34525,7 +37977,7 @@ module.exports = 'event'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34549,7 +38001,7 @@ module.exports = 'interrupted'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34573,7 +38025,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34604,7 +38056,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -34670,9 +38122,10 @@ var SpineGameObjectRender = __webpack_require__(/*! ./SpineGameObjectRender */ " * ``` * * 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. + * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup + * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable + * to get an accurate bounds. You can 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 @@ -34683,6 +38136,7 @@ var SpineGameObjectRender = __webpack_require__(/*! ./SpineGameObjectRender */ " * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. * * @class SpineGameObject + * @extends Phaser.GameObjects.GameObject * @constructor * @since 3.19.0 * @@ -35116,9 +38570,9 @@ var SpineGameObject = new Class({ * @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. * @param {boolean} [loop=false] - Should the animation, if set, loop or not? + * @param {object} [skeletonJSON] - The JSON data for the Skeleton. * * @return {this} This Game Object. */ @@ -36224,7 +39678,7 @@ module.exports = SpineGameObject; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -36261,7 +39715,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -36405,7 +39859,7 @@ module.exports = SpineGameObjectWebGLDirect; /** * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. + * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -36564,6 +40018,8 @@ var __extends = (this && this.__extends) || (function () { return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); @@ -37254,7 +40710,7 @@ var spine; .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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; return AttachmentTimeline; }()); @@ -38054,7 +41510,7 @@ var spine; var slot = slots[i]; if (slot.attachmentState == setupState) { var attachmentName = slot.data.attachmentName; - slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); } } this.unkeyedState += 2; @@ -38167,7 +41623,7 @@ var spine; 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); + slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); if (attachments) slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; }; @@ -38797,9 +42253,9 @@ var spine; _this.toLoad--; _this.loaded++; }, function (state, responseText) { - _this.errors[path] = "Couldn't load binary " + path + ": status " + status + ", " + responseText; + _this.errors[path] = "Couldn't load binary ".concat(path, ": status ").concat(status, ", ").concat(responseText); if (error) - error(path, "Couldn't load binary " + path + ": status " + status + ", " + responseText); + error(path, "Couldn't load binary ".concat(path, ": status ").concat(status, ", ").concat(responseText)); _this.toLoad--; _this.loaded++; }); @@ -38817,9 +42273,9 @@ var spine; _this.toLoad--; _this.loaded++; }, function (state, responseText) { - _this.errors[path] = "Couldn't load text " + path + ": status " + status + ", " + responseText; + _this.errors[path] = "Couldn't load text ".concat(path, ": status ").concat(status, ", ").concat(responseText); if (error) - error(path, "Couldn't load text " + path + ": status " + status + ", " + responseText); + error(path, "Couldn't load text ".concat(path, ": status ").concat(status, ", ").concat(responseText)); _this.toLoad--; _this.loaded++; }); @@ -38842,11 +42298,11 @@ var spine; success(path, img); }; img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; + _this.errors[path] = "Couldn't load image ".concat(path); _this.toLoad--; _this.loaded++; if (error) - error(path, "Couldn't load image " + path); + error(path, "Couldn't load image ".concat(path)); }; if (this.rawDataUris[path]) path = this.rawDataUris[path]; @@ -38873,9 +42329,9 @@ var spine; } catch (e) { var ex = e; - _this.errors[path] = "Couldn't load texture atlas " + path + ": " + ex.message; + _this.errors[path] = "Couldn't load texture atlas ".concat(path, ": ").concat(ex.message); if (error) - error(path, "Couldn't load texture atlas " + path + ": " + ex.message); + error(path, "Couldn't load texture atlas ".concat(path, ": ").concat(ex.message)); _this.toLoad--; _this.loaded++; return; @@ -38898,17 +42354,17 @@ var spine; } catch (e) { var ex = e; - _this.errors[path] = "Couldn't load texture atlas " + path + ": " + ex.message; + _this.errors[path] = "Couldn't load texture atlas ".concat(path, ": ").concat(ex.message); if (error) - error(path, "Couldn't load texture atlas " + path + ": " + ex.message); + error(path, "Couldn't load texture atlas ".concat(path, ": ").concat(ex.message)); _this.toLoad--; _this.loaded++; } } else { - _this.errors[path] = "Couldn't load texture atlas page " + imagePath + "} of atlas " + path; + _this.errors[path] = "Couldn't load texture atlas page ".concat(imagePath, "} of atlas ").concat(path); if (error) - error(path, "Couldn't load texture atlas page " + imagePath + " of atlas " + path); + error(path, "Couldn't load texture atlas page ".concat(imagePath, " of atlas ").concat(path)); _this.toLoad--; _this.loaded++; } @@ -38917,9 +42373,9 @@ var spine; pageLoadError = true; pagesLoaded.count++; if (pagesLoaded.count == atlasPages.length) { - _this.errors[path] = "Couldn't load texture atlas page " + imagePath + "} of atlas " + path; + _this.errors[path] = "Couldn't load texture atlas page ".concat(imagePath, "} of atlas ").concat(path); if (error) - error(path, "Couldn't load texture atlas page " + imagePath + " of atlas " + path); + error(path, "Couldn't load texture atlas page ".concat(imagePath, " of atlas ").concat(path)); _this.toLoad--; _this.loaded++; } @@ -38930,9 +42386,9 @@ var spine; _loop_1(atlasPage); } }, function (state, responseText) { - _this.errors[path] = "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText; + _this.errors[path] = "Couldn't load texture atlas ".concat(path, ": status ").concat(status, ", ").concat(responseText); if (error) - error(path, "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText); + error(path, "Couldn't load texture atlas ".concat(path, ": status ").concat(status, ", ").concat(responseText)); _this.toLoad--; _this.loaded++; }); @@ -40098,7 +43554,7 @@ var spine; _this.rawAssets[path] = request.responseText; } else { - _this.errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + _this.errors[path] = "Couldn't load text ".concat(path, ": status ").concat(request.status, ", ").concat(request.responseText); } } }; @@ -40118,7 +43574,7 @@ var spine; _this.rawAssets[path] = JSON.parse(request.responseText); } else { - _this.errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + _this.errors[path] = "Couldn't load text ".concat(path, ": status ").concat(request.status, ", ").concat(request.responseText); } } }; @@ -40155,7 +43611,7 @@ var spine; _this.rawAssets[path] = img_1; }; img_1.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; + _this.errors[path] = "Couldn't load image ".concat(path); }; img_1.src = path; } @@ -42809,7 +46265,7 @@ var spine; return spine.BlendMode.Multiply; if (str == "screen") return spine.BlendMode.Screen; - throw new Error("Unknown blend mode: " + str); + throw new Error("Unknown blend mode: ".concat(str)); }; SkeletonJson.positionModeFromString = function (str) { str = str.toLowerCase(); @@ -42817,7 +46273,7 @@ var spine; return spine.PositionMode.Fixed; if (str == "percent") return spine.PositionMode.Percent; - throw new Error("Unknown position mode: " + str); + throw new Error("Unknown position mode: ".concat(str)); }; SkeletonJson.spacingModeFromString = function (str) { str = str.toLowerCase(); @@ -42827,7 +46283,7 @@ var spine; return spine.SpacingMode.Fixed; if (str == "percent") return spine.SpacingMode.Percent; - throw new Error("Unknown position mode: " + str); + throw new Error("Unknown position mode: ".concat(str)); }; SkeletonJson.rotateModeFromString = function (str) { str = str.toLowerCase(); @@ -42837,7 +46293,7 @@ var spine; return spine.RotateMode.Chain; if (str == "chainscale") return spine.RotateMode.ChainScale; - throw new Error("Unknown rotate mode: " + str); + throw new Error("Unknown rotate mode: ".concat(str)); }; SkeletonJson.transformModeFromString = function (str) { str = str.toLowerCase(); @@ -42851,7 +46307,7 @@ var spine; return spine.TransformMode.NoScale; if (str == "noscaleorreflection") return spine.TransformMode.NoScaleOrReflection; - throw new Error("Unknown transform mode: " + str); + throw new Error("Unknown transform mode: ".concat(str)); }; return SkeletonJson; }()); @@ -43116,7 +46572,7 @@ var spine; case "mipmaplinearnearest": return TextureFilter.MipMapLinearNearest; case "mipmapnearestlinear": return TextureFilter.MipMapNearestLinear; case "mipmaplinearlinear": return TextureFilter.MipMapLinearLinear; - default: throw new Error("Unknown texture filter " + text); + default: throw new Error("Unknown texture filter ".concat(text)); } }; Texture.wrapFromString = function (text) { @@ -43124,7 +46580,7 @@ var spine; case "mirroredtepeat": return TextureWrap.MirroredRepeat; case "clamptoedge": return TextureWrap.ClampToEdge; case "repeat": return TextureWrap.Repeat; - default: throw new Error("Unknown texture wrap " + text); + default: throw new Error("Unknown texture wrap ".concat(text)); } }; return Texture; @@ -46086,14 +49542,14 @@ var spine; var gl = this.context.gl; var location = gl.getUniformLocation(this.program, uniform); if (!location && !gl.isContextLost()) - throw new Error("Couldn't find location for uniform " + uniform); + throw new Error("Couldn't find location for uniform ".concat(uniform)); return location; }; Shader.prototype.getAttributeLocation = function (attribute) { var gl = this.context.gl; var location = gl.getAttribLocation(this.program, attribute); if (location == -1 && !gl.isContextLost()) - throw new Error("Couldn't find location for attribute " + attribute); + throw new Error("Couldn't find location for attribute ".concat(attribute)); return location; }; Shader.prototype.dispose = function () { @@ -46113,17 +49569,17 @@ var spine; } }; Shader.newColoredTextured = function (context) { - 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"; + var vs = "\n\t\t\t\tattribute vec4 ".concat(Shader.POSITION, ";\n\t\t\t\tattribute vec4 ").concat(Shader.COLOR, ";\n\t\t\t\tattribute vec2 ").concat(Shader.TEXCOORDS, ";\n\t\t\t\tuniform mat4 ").concat(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 = ").concat(Shader.COLOR, ";\n\t\t\t\t\tv_texCoords = ").concat(Shader.TEXCOORDS, ";\n\t\t\t\t\tgl_Position = ").concat(Shader.MVP_MATRIX, " * ").concat(Shader.POSITION, ";\n\t\t\t\t}\n\t\t\t"); 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"; return new Shader(context, vs, fs); }; Shader.newTwoColoredTextured = function (context) { - 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"; + var vs = "\n\t\t\t\tattribute vec4 ".concat(Shader.POSITION, ";\n\t\t\t\tattribute vec4 ").concat(Shader.COLOR, ";\n\t\t\t\tattribute vec4 ").concat(Shader.COLOR2, ";\n\t\t\t\tattribute vec2 ").concat(Shader.TEXCOORDS, ";\n\t\t\t\tuniform mat4 ").concat(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 = ").concat(Shader.COLOR, ";\n\t\t\t\t\tv_dark = ").concat(Shader.COLOR2, ";\n\t\t\t\t\tv_texCoords = ").concat(Shader.TEXCOORDS, ";\n\t\t\t\t\tgl_Position = ").concat(Shader.MVP_MATRIX, " * ").concat(Shader.POSITION, ";\n\t\t\t\t}\n\t\t\t"); 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"; return new Shader(context, vs, fs); }; Shader.newColored = function (context) { - 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"; + var vs = "\n\t\t\t\tattribute vec4 ".concat(Shader.POSITION, ";\n\t\t\t\tattribute vec4 ").concat(Shader.COLOR, ";\n\t\t\t\tuniform mat4 ").concat(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 = ").concat(Shader.COLOR, ";\n\t\t\t\t\tgl_Position = ").concat(Shader.MVP_MATRIX, " * ").concat(Shader.POSITION, ";\n\t\t\t\t}\n\t\t\t"); 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"; return new Shader(context, vs, fs); }; @@ -47030,7 +50486,7 @@ var spine; function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) { if (contextConfig === void 0) { contextConfig = { alpha: "true" }; } this.restorables = new Array(); - if (canvasOrContext instanceof HTMLCanvasElement || canvasOrContext instanceof EventTarget) { + if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) { this.setupCanvas(canvasOrContext, contextConfig); } else { diff --git a/plugins/spine/dist/SpineWebGLPluginDebug.js.map b/plugins/spine/dist/SpineWebGLPluginDebug.js.map index fb3bdaa2c..62c9ffa32 100644 --- a/plugins/spine/dist/SpineWebGLPluginDebug.js.map +++ b/plugins/spine/dist/SpineWebGLPluginDebug.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/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/DESTROY_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/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/GetCalcMatrix.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/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/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/Euler.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/renderer/events/POST_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/renderer/events/PRE_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/renderer/events/RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/renderer/events/RESIZE_EVENT.js","webpack:///D:/wamp/www/phaser/src/renderer/events/index.js","webpack:///D:/wamp/www/phaser/src/renderer/webgl/pipelines/const.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_RENDER_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/SortByDigits.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/TranslateMatrix.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/DeepCopy.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/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/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-webgl.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;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;;;;;;;;;;;;ACdA;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,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,mBAAmB,mBAAO,CAAC,oEAAuB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;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;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5TA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACx3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,4FAA8B;;AAE5D;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChEA;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,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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;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;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,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,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,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;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;;;;;;;;;;;;AC9IA;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,eAAe,mBAAO,CAAC,0EAA6B;AACpD,qBAAqB,mBAAO,CAAC,4FAAsC;AACnE,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qCAAqC,0CAA0C;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AChaA;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,gBAAgB;AAC/B;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,gBAAgB;AAC/B,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,gBAAgB;AAC/B;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,gBAAgB;AAC/B,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;AC5lBA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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;;;;;;;;;;;;AClCA;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACz0CA;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,KAAsB;AAC1B,EAEC;;AAED;;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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjJA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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,OAAO;AAClB,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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;;;;;;;;;;;;AC/hBA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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,uBAAuB;AAC9C;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;;;;;;;;;;;;AC9OA;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,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;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;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;;;;;;;;;;;;AC1OA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACnFA;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,OAAO;AACnB;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;;;;;;;;;;;;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,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;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;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,8EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,4EAAoB;AAC5C,YAAY,mBAAO,CAAC,oEAAgB;AACpC,YAAY,mBAAO,CAAC,oEAAgB;;AAEpC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnGA;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;AACA;;;;;;;;;;;;ACvBA;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC9BA;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzKA;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,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AC/CA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,wCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;;AAE5C;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,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;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,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;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;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;;;;;;;;;;;;AC/rCA;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;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;;;;;;;;;;;;AC/FA;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,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvHA;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;ACxkDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1IA;;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;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;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;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,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iEAAiE,OAAO;AACxE;AACA;AACA,iBAAiB;AACjB;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":"SpineWebGLPluginDebug.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\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(Events.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 {number}\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 Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @since 3.50.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 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 DESTROY: require('./DESTROY_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 Class = require('../../utils/Class');\r\nvar GameEvents = require('../../core/events');\r\nvar RenderEvents = require('../../renderer/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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\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.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 masks 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 * 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.\r\n * 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 this.createMask();\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, this.createMask, this);\r\n\r\n if (renderer)\r\n {\r\n renderer.on(RenderEvents.RESIZE, this.createMask, this);\r\n }\r\n },\r\n\r\n /**\r\n * Creates the WebGL Texture2D objects and Framebuffers required for this\r\n * mask. If this mask has already been created, then `clearMask` is called first.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#createMask\r\n * @since 3.50.0\r\n */\r\n createMask: function ()\r\n {\r\n var renderer = this.renderer;\r\n\r\n if (!renderer || !renderer.gl)\r\n {\r\n return;\r\n }\r\n\r\n if (this.mainTexture)\r\n {\r\n this.clearMask();\r\n }\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\r\n /**\r\n * Deletes the `mainTexture` and `maskTexture` WebGL Textures and deletes\r\n * the `mainFramebuffer` and `maskFramebuffer` too, nulling all references.\r\n *\r\n * This is called when this mask is destroyed, or if you try to creat a new\r\n * mask from this object when one is already set.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#clearMask\r\n * @since 3.50.0\r\n */\r\n clearMask: function ()\r\n {\r\n var renderer = this.renderer;\r\n\r\n if (!renderer || !renderer.gl || !this.mainTexture)\r\n {\r\n return;\r\n }\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 this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\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.BITMAPMASK_PIPELINE.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.BITMAPMASK_PIPELINE.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.clearMask();\r\n\r\n if (this.renderer)\r\n {\r\n this.renderer.off(RenderEvents.RESIZE, this.createMask, this);\r\n }\r\n \r\n this.bitmapMask = 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 * This is a WebGL only feature.\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 *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\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 current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\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 current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.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, 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","/**\r\n * @author Richard 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 ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\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 change 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 {(number|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 {number}\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 {number}\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 Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * 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.\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 * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\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 {this} This GameObject.\r\n */\r\n incData: 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.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\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.\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 * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\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 {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\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 * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\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)} [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.\r\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.\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 (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, 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 * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\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 {number[]} 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));\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 if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\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 destroy: function ()\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 this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\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\r\n this.body = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\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 {number} 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 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TransformMatrix = require('./components/TransformMatrix');\r\n\r\nvar tempMatrix1 = new TransformMatrix();\r\nvar tempMatrix2 = new TransformMatrix();\r\nvar tempMatrix3 = new TransformMatrix();\r\n\r\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\r\n\r\n/**\r\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\r\n * the parent matrix if provided.\r\n *\r\n * Note that the object this results contains _references_ to the Transform Matrices,\r\n * not new instances of them. Therefore, you should use their values immediately, or\r\n * copy them to your own matrix, as they will be replaced as soon as another Game\r\n * Object is rendered.\r\n *\r\n * @function Phaser.GameObjects.GetCalcMatrix\r\n * @memberof Phaser.GameObjects\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\r\n *\r\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\r\n */\r\nvar GetCalcMatrix = function (src, camera, parentMatrix)\r\n{\r\n var camMatrix = tempMatrix1;\r\n var spriteMatrix = tempMatrix2;\r\n var calcMatrix = tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, 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 else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = GetCalcMatrix;\r\n","/**\r\n * @author Richard 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 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 {number}\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 {number}\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 if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\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 {number} 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 * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 {number}\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","/**\r\n * @author Richard 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 DeepCopy = require('../../utils/object/DeepCopy');\r\nvar PIPELINE_CONST = require('../../renderer/webgl/pipelines/const');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#postPipeline\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n if (pipeline === undefined) { pipeline = PIPELINE_CONST.MULTI_PIPELINE; }\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n this.postPipelines = [];\r\n this.pipelineData = {};\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * Both the pipeline and post pipelines share the same pipeline data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * Both the pipeline and post pipelines share the pipeline data object together.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * Both the pipeline and post pipelines share the pipeline data object together.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((typeof pipeline === 'string' && instance.name === pipeline) || instance instanceof pipeline)\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetPostPipelines, resetData)\r\n {\r\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetPostPipelines)\r\n {\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n }\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (typeof pipeline === 'string' && instance.name === pipeline) ||\r\n (typeof pipeline !== 'string' && instance instanceof pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @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|number)} [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|number)} 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|number)} [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|number)} 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\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\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","/**\r\n * @author Richard 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('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\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 *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\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 {number}\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, PI/2 is down, +-PI is left\r\n * and -PI/2 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 * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.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 * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\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 * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.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} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\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 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 * @namespace Phaser.GameObjects.Components\n */\n\nmodule.exports = {\n\n Alpha: require('./Alpha'),\n AlphaSingle: require('./AlphaSingle'),\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","/**\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 ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\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.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\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 Container.\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.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\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 Container.\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.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.clearAlpha();\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} 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 output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.removeFromDisplayList();\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n gameObject.addToDisplayList(displayList);\r\n\r\n gameObject.parentContainer = this;\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\r\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.\r\n *\r\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output = new Vector2(source.x, source.y);\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\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.Container#setScrollFactor\r\n * @since 3.4.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 * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\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\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 {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, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n var childCount = children.length;\r\n\r\n if (childCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\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 renderer.pipelines.preBatch(container);\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 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) ? (children[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, 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 renderer.pipelines.postBatch(container);\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 {number} width - The width of the video.\r\n * @param {number} 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number} 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 {number}\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 {number} 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[])} [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 {number}\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 {number} 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 {number}\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 {number} 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('Invalid Loader.' + this.type + ' key');\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\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 {number}\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 = finalFiles;\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 {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.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 {number}\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 < finalFiles.length; i++)\r\n {\r\n finalFiles[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 {number} [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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} 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","/**\r\n * @author Richard 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 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 {(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.\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 try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n console.warn('Invalid JSON: ' + this.key);\r\n\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\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#ADD\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 {(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.\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 {this} 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 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 type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\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 {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} 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 {number} [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 {number} 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\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.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 Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @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 {number} [place=0] - The place to round to.\r\n * @param {number} [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 + min;\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 {number} 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\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\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\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 /**\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 {this} 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 * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\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 {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\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 {this} 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 {this} 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 {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\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 {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\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 {this} 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 this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\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 {this} 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 return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\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 {this} 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 {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\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 {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 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 // 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 return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\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 return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\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 {this} This Matrix4.\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 return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\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 {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\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 return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\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 {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\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 return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\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 {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\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 return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\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 {this} 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 {this} 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)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.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 var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\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 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 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\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 Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\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=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - 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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.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 * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\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 x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\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 w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\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 return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\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 if (update)\r\n {\r\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\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 return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\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 return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\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 return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\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 this.onChangeCallback(this);\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 return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\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 return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\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 return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\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 this.onChangeCallback(this);\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 {number} 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 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [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 {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 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\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 * @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 Euler: require('./Euler'),\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 {number} 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 Post-Render Event.\r\n *\r\n * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes,\r\n * has completed, but before any pending snap shots have been taken.\r\n *\r\n * @event Phaser.Renderer.Events#POST_RENDER\r\n * @since 3.50.0\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 Pre-Render Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer. This happens right at the start of the render\r\n * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been\r\n * reset ready for the render.\r\n *\r\n * @event Phaser.Renderer.Events#PRE_RENDER\r\n * @since 3.50.0\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 Render Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer for every camera in every Scene.\r\n *\r\n * It is dispatched before any of the children in the Scene have been rendered.\r\n *\r\n * @event Phaser.Renderer.Events#RENDER\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered.\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 Renderer Resize Event.\r\n *\r\n * This event is dispatched by the Phaser Renderer when it is resized, usually as a result\r\n * of the Scale Manager resizing.\r\n *\r\n * @event Phaser.Renderer.Events#RESIZE\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - The new width of the renderer.\r\n * @param {number} height - The new height of the renderer.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @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.Renderer.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n POST_RENDER: require('./POST_RENDER_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESIZE: require('./RESIZE_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 PIPELINE_CONST = {\r\n\r\n /**\r\n * The Bitmap Mask Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n BITMAPMASK_PIPELINE: 'BitmapMaskPipeline',\r\n\r\n /**\r\n * The Light 2D Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n LIGHT_PIPELINE: 'Light2D',\r\n\r\n /**\r\n * The Point Light Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.POINTLIGHT_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n POINTLIGHT_PIPELINE: 'PointLightPipeline',\r\n\r\n /**\r\n * The Single Texture Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n SINGLE_PIPELINE: 'SinglePipeline',\r\n\r\n /**\r\n * The Multi Texture Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n MULTI_PIPELINE: 'MultiPipeline',\r\n\r\n /**\r\n * The Rope Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n ROPE_PIPELINE: 'RopePipeline',\r\n\r\n /**\r\n * The Graphics and Shapes Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.GRAPHICS_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n GRAPHICS_PIPELINE: 'GraphicsPipeline',\r\n\r\n /**\r\n * The Post FX Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.POSTFX_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n POSTFX_PIPELINE: 'PostFXPipeline',\r\n\r\n /**\r\n * The Utility Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.UTILITY_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n UTILITY_PIPELINE: 'UtilityPipeline'\r\n};\r\n\r\nmodule.exports = PIPELINE_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 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.\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} 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [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 samme\r\n * @copyright 2021 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-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.scene.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @since 3.53.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 = '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 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [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.\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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [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","/**\r\n * @author Richard Davey \r\n * @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.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\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_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_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 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 * @ignore\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 * @ignore\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 {number} [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 {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} 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 {number} startIndex - The start index to search from.\r\n * @param {number} 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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [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 {number} [startIndex=0] - An optional start index.\r\n * @param {number} [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 {number} 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","/**\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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard 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 {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [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 var removed = [];\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 removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\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 {number} 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 {number} startIndex - The start index to remove from.\r\n * @param {number} 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 {number} [start=0] - The array index to start the search from.\r\n * @param {number} [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 {number} [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 {number} [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 {number} startIndex - The start index.\r\n * @param {number} 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 {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [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","/**\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 array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @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 {number} 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 * @author Angry Bytes (and contributors)\r\n * @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 comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\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\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\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\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\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 {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @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","/**\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\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 * 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)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 Translate: require('./TranslateMatrix'),\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\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard 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 {number} [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 {number} [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","/**\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|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 * @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\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\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 + '!' + i,\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', file.src.match(/^.*\\//))[0];\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 = textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\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 var textureManager = this.loader.textureManager;\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.replace(/![\\d]$/, '');\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 if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\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 2020 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\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n// Plugin specific instance of the Spine Scene Renderer\r\nvar sceneRenderer;\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 * Find more details about Spine itself at http://esotericsoftware.com/.\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.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\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 two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\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 preMultipliedAlpha 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 * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\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 var addContainer = function (x, y, children)\r\n {\r\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var container = new SpineContainer(this.scene, _this, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\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 this.game.events.once('destroy', this.gameDestroy, 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 // 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 if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n }\r\n\r\n // All share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = 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(atlasEntry.prefix + 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(atlasEntry.prefix + 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 preMultipliedAlpha 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#ADD\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} [preMultipliedAlpha=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.setViewport(viewportWidth, 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 if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\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 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.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n sceneRenderer = null;\r\n }\r\n\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\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 2020 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 Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.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 {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\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 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","/**\r\n * @author Richard Davey \r\n * @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 SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.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 {SpineContainer} container - The Game Object being rendered in this call.\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 SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\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 if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var rendererNextType = renderer.nextTypeMatch;\r\n\r\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\r\n renderer.nextTypeMatch = true;\r\n renderer.newType = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (child.willRender(camera, container))\r\n {\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.preRenderWebGL(renderer, child, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.postRenderWebGL(renderer, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n }\r\n }\r\n\r\n renderer.nextTypeMatch = rendererNextType;\r\n\r\n if (!rendererNextType)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\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 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","/**\r\n * @author Richard Davey \r\n * @copyright 2020 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 = -1;\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 * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\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 the animation specified by the track index 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(trackIndex);\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 if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\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","/**\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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Directly 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#renderDirect\r\n * @since 3.50.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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\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 // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLDirect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\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 Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\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 isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n };\r\n img_1.src = 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 var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\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 (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\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 else {\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 };\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(this.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(this.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(this.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(this.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 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 if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (canvasOrContext instanceof HTMLCanvasElement || canvasOrContext instanceof EventTarget) {\r\n this.setupCanvas(canvasOrContext, contextConfig);\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.setupCanvas = function (canvas, contextConfig) {\r\n var _this = this;\r\n this.gl = (canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas;\r\n canvas.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas.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 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-webgl.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/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GetCalcMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.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/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-webgl.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,4FAA8B;;AAE5D;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChEA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,wCAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;ACxtCA;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;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;;;;;;;;;;;;AC/FA;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,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvHA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1IA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;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,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,yGAAyG;AACzG;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,iBAAiB;AACjB;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;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;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,+EAA+E,mDAAmD,uDAAuD,sDAAsD,+BAA+B,mCAAmC,0BAA0B,gDAAgD,wDAAwD,wFAAwF,WAAW;AACthB,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,+EAA+E,mDAAmD,oDAAoD,uDAAuD,sDAAsD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,gDAAgD,gDAAgD,wDAAwD,wFAAwF,WAAW;AACxpB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,+EAA+E,mDAAmD,sDAAsD,+BAA+B,0BAA0B,gDAAgD,wFAAwF,WAAW;AACpY,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,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iEAAiE,OAAO;AACxE;AACA;AACA,iBAAiB;AACjB;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":"SpineWebGLPluginDebug.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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TransformMatrix = require('./components/TransformMatrix');\n\nvar tempMatrix1 = new TransformMatrix();\nvar tempMatrix2 = new TransformMatrix();\nvar tempMatrix3 = new TransformMatrix();\n\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\n\n/**\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\n * the parent matrix if provided.\n *\n * Note that the object this results contains _references_ to the Transform Matrices,\n * not new instances of them. Therefore, you should use their values immediately, or\n * copy them to your own matrix, as they will be replaced as soon as another Game\n * Object is rendered.\n *\n * @function Phaser.GameObjects.GetCalcMatrix\n * @memberof Phaser.GameObjects\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\n *\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\n */\nvar GetCalcMatrix = function (src, camera, parentMatrix)\n{\n var camMatrix = tempMatrix1;\n var spriteMatrix = tempMatrix2;\n var calcMatrix = tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, 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 else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n }\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n return result;\n};\n\nmodule.exports = GetCalcMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\n\n var children = container.list;\n var childCount = children.length;\n\n if (childCount === 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 renderer.pipelines.preBatch(container);\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 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) ? (children[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, camera, transformMatrix, container);\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 renderer.pipelines.postBatch(container);\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 // 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n sceneRenderer.batcher.setBlendMode = setBlendMode;\n sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * \n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 2022 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 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 {SpineContainer} container - The Game Object being rendered in this call.\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, 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.pipelines.rebind();\n }\n\n return;\n }\n\n camera.addToRenderList(container);\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 if (renderer.newType)\n {\n // flush + clear if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var rendererNextType = renderer.nextTypeMatch;\n\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\n renderer.nextTypeMatch = true;\n renderer.newType = false;\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (child.willRender(camera, container))\n {\n var mask = child.mask;\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.preRenderWebGL(renderer, child, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.postRenderWebGL(renderer, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n }\n }\n\n renderer.nextTypeMatch = rendererNextType;\n\n if (!rendererNextType)\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Directly 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#renderDirect\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 {SpineGameObject} src - The Game Object being rendered in this call.\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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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 // 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.pipelines.rebind();\n};\n\nmodule.exports = SpineGameObjectWebGLDirect;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (renderer.newType)\n {\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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.pipelines.rebind();\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 if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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.setAttachment(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.setAttachment(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.setAttachment(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path);\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \".concat(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 \".concat(path, \": \").concat(ex.message);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(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 \".concat(path, \": \").concat(ex.message);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\n _this.toLoad--;\n _this.loaded++;\n }\n }\n else {\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\n if (error)\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(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 \".concat(imagePath, \"} of atlas \").concat(path);\n if (error)\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(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 \".concat(path, \": status \").concat(status, \", \").concat(responseText);\n if (error)\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(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 \".concat(path, \": status \").concat(request.status, \", \").concat(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 \".concat(path, \": status \").concat(request.status, \", \").concat(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 isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\n if (isWebWorker) {\n var options = { mode: \"cors\" };\n fetch(path, options).then(function (response) {\n if (!response.ok) {\n _this.errors[path] = \"Couldn't load image \" + path;\n }\n return response.blob();\n }).then(function (blob) {\n return createImageBitmap(blob, {\n premultiplyAlpha: 'none',\n colorSpaceConversion: 'none'\n });\n }).then(function (bitmap) {\n _this.rawAssets[path] = bitmap;\n });\n }\n else {\n var img_1 = new Image();\n img_1.crossOrigin = \"anonymous\";\n img_1.onload = function (ev) {\n _this.rawAssets[path] = img_1;\n };\n img_1.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \".concat(path);\n };\n img_1.src = path;\n }\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 var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\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 (isWebWorker) {\n if (rawAsset instanceof ImageBitmap) {\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\n }\n else {\n clientAssets.assets[path] = rawAsset;\n }\n }\n else {\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 };\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: \".concat(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: \".concat(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: \".concat(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: \".concat(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: \".concat(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 \".concat(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 \".concat(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(this.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(this.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(this.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(this.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 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 \".concat(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 \".concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_dark = \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(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 = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(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 if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\n this.restorables = new Array();\n if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) {\n this.setupCanvas(canvasOrContext, contextConfig);\n }\n else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n ManagedWebGLRenderingContext.prototype.setupCanvas = function (canvas, contextConfig) {\n var _this = this;\n this.gl = (canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig));\n this.canvas = canvas;\n canvas.addEventListener(\"webglcontextlost\", function (e) {\n var event = e;\n if (e) {\n e.preventDefault();\n }\n });\n canvas.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 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-webgl.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/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index acbdf1bf9..70c5ee8a9 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -653,12 +653,14 @@ var SpinePlugin = new Class({ * @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. - * + * @param {object} [settings] - An external Settings configuration object { prefix: '' } + * * @return {Phaser.Loader.LoaderPlugin} The Loader instance. */ - spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) + spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings) { var multifile; + settings = settings || {}; if (Array.isArray(key)) { @@ -666,6 +668,9 @@ var SpinePlugin = new Class({ { multifile = new SpineFile(this, key[i]); + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + this.addFile(multifile.files); } } @@ -673,6 +678,9 @@ var SpinePlugin = new Class({ { multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings); + // Support prefix key + multifile.prefix = multifile.prefix || settings.prefix || ''; + this.addFile(multifile.files); } diff --git a/plugins/spine4.1/dist/SpineCanvasPlugin.js b/plugins/spine4.1/dist/SpineCanvasPlugin.js index e31b29ebb..ce4bad8dc 100644 --- a/plugins/spine4.1/dist/SpineCanvasPlugin.js +++ b/plugins/spine4.1/dist/SpineCanvasPlugin.js @@ -24620,35 +24620,33 @@ var SpinePlugin = new Class({ return null; } - var gl = this.gl; - var i; - var atlasPage; - var realTextureKey; - - if (this.isWebGL) + if (!this.spineTextures.has(atlasKey)) { - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - } + var gl = this.gl; + var i; + var atlasPage; + var realTextureKey; - for (i = 0; i < atlas.pages.length; i ++) - { - atlasPage = atlas.pages[i]; - realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; if (this.isWebGL) { - atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); } - else + + for (i = 0; i < atlas.pages.length; i ++) { - atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + atlasPage = atlas.pages[i]; + realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; + if (this.isWebGL) + { + atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + } + else + { + atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + } } - } - - var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey; - - if (!this.spineTextures.has(spineTextureKey)) - { - this.spineTextures.add(spineTextureKey, atlas); + + this.spineTextures.add(atlasKey, atlas); } var preMultipliedAlpha = atlasData.preMultipliedAlpha; diff --git a/plugins/spine4.1/dist/SpineCanvasPlugin.min.js b/plugins/spine4.1/dist/SpineCanvasPlugin.min.js index 56325e59f..40bf0282f 100644 --- a/plugins/spine4.1/dist/SpineCanvasPlugin.min.js +++ b/plugins/spine4.1/dist/SpineCanvasPlugin.min.js @@ -220,7 +220,7 @@ var n=i(0),s=i(4),r=i(17),a=new n({initialize:function(t,e,i,n,s,r,a){this.textu * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var n=i(70),s=i(0),r=i(7),a=i(184),o=i(185),h={canvas:i(46),webgl:i(46)},l=i(209),u=i(225),c=i(256),d=i(1),f=new s({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var s=e.game;this.isWebGL=2===s.config.renderType,this.cache=s.cache.addCustom("spine"),this.spineTextures=s.cache.addCustom("spineTextures"),this.json=s.cache.json,this.textures=s.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=s.renderer,this.gl=s.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=s.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:s.scale.width,height:s.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,n,s,r){var a=this.scene.sys[i],o=new u(this.scene,a,t,e,n,s,r);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var s=r(t,"key",null),a=r(t,"animationName",null),o=r(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,s,a,o);void 0!==e&&(t.add=e),n(this.scene,l,t);var c=r(t,"skinName",!1);c&&l.setSkinByName(c);var d=r(t,"slotName",!1),f=r(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,n){var s=this.scene.sys[i],r=new c(this.scene,s,t,e,n);return this.displayList.add(r),r}),(function(t,e){void 0===t&&(t={});var s=r(t,"x",0),a=r(t,"y",0),o=r(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,s,a,o);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.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 i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var s=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(s.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var s=this.textures,r=this.sceneRenderer.context.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(r,s.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,s,r,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h * @copyright 2013-2023 Photon Storm Ltd. diff --git a/plugins/spine4.1/dist/SpineCanvasPluginDebug.js b/plugins/spine4.1/dist/SpineCanvasPluginDebug.js index c80cf148a..486696d29 100644 --- a/plugins/spine4.1/dist/SpineCanvasPluginDebug.js +++ b/plugins/spine4.1/dist/SpineCanvasPluginDebug.js @@ -37208,35 +37208,33 @@ var SpinePlugin = new Class({ return null; } - var gl = this.gl; - var i; - var atlasPage; - var realTextureKey; - - if (this.isWebGL) + if (!this.spineTextures.has(atlasKey)) { - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - } + var gl = this.gl; + var i; + var atlasPage; + var realTextureKey; - for (i = 0; i < atlas.pages.length; i ++) - { - atlasPage = atlas.pages[i]; - realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; if (this.isWebGL) { - atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); } - else + + for (i = 0; i < atlas.pages.length; i ++) { - atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + atlasPage = atlas.pages[i]; + realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; + if (this.isWebGL) + { + atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + } + else + { + atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + } } - } - - var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey; - - if (!this.spineTextures.has(spineTextureKey)) - { - this.spineTextures.add(spineTextureKey, atlas); + + this.spineTextures.add(atlasKey, atlas); } var preMultipliedAlpha = atlasData.preMultipliedAlpha; diff --git a/plugins/spine4.1/dist/SpineCanvasPluginDebug.js.map b/plugins/spine4.1/dist/SpineCanvasPluginDebug.js.map index e126bc09d..b6d402ef4 100644 --- a/plugins/spine4.1/dist/SpineCanvasPluginDebug.js.map +++ b/plugins/spine4.1/dist/SpineCanvasPluginDebug.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/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:///./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:///./runtimes/spine-canvas.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;;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;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,kBAAkB,mBAAO,CAAC,+CAAa;AACvC,iBAAiB,mBAAO,CAAC,8CAAY;AACrC;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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;AACA;AACA;AACA;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;ACjuCA;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;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;;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAGC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA,sDAAsD,iBAAiB,cAAc;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC7E;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;AACjD;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA,GAAG,oBAAoB;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,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,OAAO;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,6BAA6B,iBAAiB;AAC9C;AACA,aAAa;AACb;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA,WAAW;AACX,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;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,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,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;AACpB;AACA;AACA;AACA;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;AACA;AACA;AACA;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;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;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;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wDAAwD,KAAK,WAAW,OAAO,IAAI,aAAa;AAChG,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA,SAAS;AACT,iDAAiD,yDAAyD;AAC1G,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,yEAAyE,KAAK,eAAe,UAAU;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,KAAK,IAAI,UAAU;AACrF;AACA,OAAO;AACP,+DAA+D,KAAK,WAAW,OAAO,IAAI,aAAa;AACvG,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,8CAA8C,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;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,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc,EAAE;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,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,EAAE;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;;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;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;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,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,qBAAqB,eAAe;AACpC;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;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,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;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;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;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;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;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;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,qBAAqB,2BAA2B;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;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,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,kDAAkD,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO;AACP,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;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;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,EAAE;AACzF;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,kDAAkD,SAAS;AAC3D;AACA,sDAAsD,WAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,qBAAqB;AACrB,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;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,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,6CAA6C,SAAS;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,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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,OAAO;AAClD;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;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;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;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,QAAQ;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;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,8BAA8B,sBAAsB;AACpD;AACA;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,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;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,8CAA8C,OAAO;AACrD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,OAAO;AACjF;AACA;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;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,kDAAkD,aAAa,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA,oDAAoD,wBAAwB,qBAAqB,mBAAmB;AACpH;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB,qBAAqB,mBAAmB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,4BAA4B,mBAAmB;AAC5G;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,4BAA4B,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,uBAAuB,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,uBAAuB,mBAAmB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,sDAAsD,SAAS,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA,+DAA+D,eAAe,YAAY,aAAa;AACvG;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,sEAAsE,eAAe,YAAY,aAAa;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,iEAAiE,eAAe,YAAY,aAAa;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,YAAY,aAAa;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,OAAO;AAChF;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,2CAA2C,OAAO;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,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,sBAAsB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;;AAEA,CAAC","file":"SpineCanvasPluginDebug.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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\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, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = [ content[0] ];\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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 SpineCanvas = require('SpineCanvas');\nvar SpineWebgl = require('SpineWebgl');\nvar Spine = {\n canvas: SpineCanvas,\n webgl: SpineWebgl\n};\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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 this.runtime.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 this.runtime.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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n \n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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 this.runtime.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new this.runtime.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new this.runtime.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 this.runtime.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 var gl = this.gl;\n var i;\n var atlasPage;\n var realTextureKey;\n\n if (this.isWebGL)\n {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n }\n\n for (i = 0; i < atlas.pages.length; i ++)\n {\n atlasPage = atlas.pages[i];\n realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;\n if (this.isWebGL)\n {\n atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));\n }\n else\n {\n atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));\n }\n }\n\n var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;\n\n if (!this.spineTextures.has(spineTextureKey))\n {\n this.spineTextures.add(spineTextureKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new this.runtime.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new this.runtime.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 this.runtime.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 this.runtime.AnimationStateData(skeleton.data);\n\n var state = new this.runtime.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 this.runtime.Vector2();\n var size = new this.runtime.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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 {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, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\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, 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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 {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, 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 camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n camera.addToRenderList(src);\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 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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\n\"use strict\";\nvar spine = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // spine-canvas/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n AlphaTimeline: () => AlphaTimeline,\n Animation: () => Animation,\n AnimationState: () => AnimationState,\n AnimationStateAdapter: () => AnimationStateAdapter,\n AnimationStateData: () => AnimationStateData,\n AssetManager: () => AssetManager,\n AssetManagerBase: () => AssetManagerBase,\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\n Attachment: () => Attachment,\n AttachmentTimeline: () => AttachmentTimeline,\n BinaryInput: () => BinaryInput,\n BlendMode: () => BlendMode,\n Bone: () => Bone,\n BoneData: () => BoneData,\n BoundingBoxAttachment: () => BoundingBoxAttachment,\n CURRENT: () => CURRENT,\n CanvasTexture: () => CanvasTexture,\n ClippingAttachment: () => ClippingAttachment,\n Color: () => Color,\n ConstraintData: () => ConstraintData,\n CurveTimeline: () => CurveTimeline,\n CurveTimeline1: () => CurveTimeline1,\n CurveTimeline2: () => CurveTimeline2,\n DebugUtils: () => DebugUtils,\n DeformTimeline: () => DeformTimeline,\n Downloader: () => Downloader,\n DrawOrderTimeline: () => DrawOrderTimeline,\n Event: () => Event,\n EventData: () => EventData,\n EventQueue: () => EventQueue,\n EventTimeline: () => EventTimeline,\n EventType: () => EventType,\n FIRST: () => FIRST,\n FakeTexture: () => FakeTexture,\n HOLD_FIRST: () => HOLD_FIRST,\n HOLD_MIX: () => HOLD_MIX,\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\n IkConstraint: () => IkConstraint,\n IkConstraintData: () => IkConstraintData,\n IkConstraintTimeline: () => IkConstraintTimeline,\n IntSet: () => IntSet,\n Interpolation: () => Interpolation,\n MathUtils: () => MathUtils,\n MeshAttachment: () => MeshAttachment,\n MixBlend: () => MixBlend,\n MixDirection: () => MixDirection,\n PathAttachment: () => PathAttachment,\n PathConstraint: () => PathConstraint,\n PathConstraintData: () => PathConstraintData,\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\n PointAttachment: () => PointAttachment,\n Pool: () => Pool,\n PositionMode: () => PositionMode,\n Pow: () => Pow,\n PowOut: () => PowOut,\n RGB2Timeline: () => RGB2Timeline,\n RGBA2Timeline: () => RGBA2Timeline,\n RGBATimeline: () => RGBATimeline,\n RGBTimeline: () => RGBTimeline,\n RegionAttachment: () => RegionAttachment,\n RotateMode: () => RotateMode,\n RotateTimeline: () => RotateTimeline,\n SETUP: () => SETUP,\n SUBSEQUENT: () => SUBSEQUENT,\n ScaleTimeline: () => ScaleTimeline,\n ScaleXTimeline: () => ScaleXTimeline,\n ScaleYTimeline: () => ScaleYTimeline,\n SequenceTimeline: () => SequenceTimeline,\n ShearTimeline: () => ShearTimeline,\n ShearXTimeline: () => ShearXTimeline,\n ShearYTimeline: () => ShearYTimeline,\n Skeleton: () => Skeleton,\n SkeletonBinary: () => SkeletonBinary,\n SkeletonBounds: () => SkeletonBounds,\n SkeletonClipping: () => SkeletonClipping,\n SkeletonData: () => SkeletonData,\n SkeletonJson: () => SkeletonJson,\n SkeletonRenderer: () => SkeletonRenderer,\n Skin: () => Skin,\n SkinEntry: () => SkinEntry,\n Slot: () => Slot,\n SlotData: () => SlotData,\n SpacingMode: () => SpacingMode,\n StringSet: () => StringSet,\n Texture: () => Texture,\n TextureAtlas: () => TextureAtlas,\n TextureAtlasPage: () => TextureAtlasPage,\n TextureAtlasRegion: () => TextureAtlasRegion,\n TextureFilter: () => TextureFilter,\n TextureRegion: () => TextureRegion,\n TextureWrap: () => TextureWrap,\n TimeKeeper: () => TimeKeeper,\n Timeline: () => Timeline,\n TrackEntry: () => TrackEntry,\n TransformConstraint: () => TransformConstraint,\n TransformConstraintData: () => TransformConstraintData,\n TransformConstraintTimeline: () => TransformConstraintTimeline,\n TransformMode: () => TransformMode,\n TranslateTimeline: () => TranslateTimeline,\n TranslateXTimeline: () => TranslateXTimeline,\n TranslateYTimeline: () => TranslateYTimeline,\n Triangulator: () => Triangulator,\n Utils: () => Utils,\n Vector2: () => Vector2,\n VertexAttachment: () => VertexAttachment,\n WindowedMean: () => WindowedMean\n });\n\n // spine-core/src/Utils.ts\n var IntSet = class {\n constructor() {\n this.array = new Array();\n }\n add(value) {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n contains(value) {\n return this.array[value | 0] != void 0;\n }\n remove(value) {\n this.array[value | 0] = void 0;\n }\n clear() {\n this.array.length = 0;\n }\n };\n var StringSet = class {\n constructor() {\n this.entries = {};\n this.size = 0;\n }\n add(value) {\n let contains = this.entries[value];\n this.entries[value] = true;\n if (!contains) {\n this.size++;\n return true;\n }\n return false;\n }\n addAll(values) {\n let oldSize = this.size;\n for (var i = 0, n = values.length; i < n; i++)\n this.add(values[i]);\n return oldSize != this.size;\n }\n contains(value) {\n return this.entries[value];\n }\n clear() {\n this.entries = {};\n this.size = 0;\n }\n };\n var _Color = class {\n constructor(r = 0, g = 0, b = 0, a = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n set(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this.clamp();\n }\n setFromColor(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 setFromString(hex) {\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n return this;\n }\n add(r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n return this.clamp();\n }\n clamp() {\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 static rgba8888ToColor(color, value) {\n color.r = ((value & 4278190080) >>> 24) / 255;\n color.g = ((value & 16711680) >>> 16) / 255;\n color.b = ((value & 65280) >>> 8) / 255;\n color.a = (value & 255) / 255;\n }\n static rgb888ToColor(color, value) {\n color.r = ((value & 16711680) >>> 16) / 255;\n color.g = ((value & 65280) >>> 8) / 255;\n color.b = (value & 255) / 255;\n }\n static fromString(hex) {\n return new _Color().setFromString(hex);\n }\n };\n var Color = _Color;\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 var _MathUtils = class {\n static clamp(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n }\n static cosDeg(degrees) {\n return Math.cos(degrees * _MathUtils.degRad);\n }\n static sinDeg(degrees) {\n return Math.sin(degrees * _MathUtils.degRad);\n }\n static signum(value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n static toInt(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n static cbrt(x) {\n let y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n }\n static randomTriangular(min, max) {\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n static randomTriangularWith(min, max, mode) {\n let u = Math.random();\n let 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 static isPowerOfTwo(value) {\n return value && (value & value - 1) === 0;\n }\n };\n var MathUtils = _MathUtils;\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 var Interpolation = class {\n apply(start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n }\n };\n var Pow = class extends Interpolation {\n constructor(power) {\n super();\n this.power = 2;\n this.power = power;\n }\n applyInternal(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 };\n var PowOut = class extends Pow {\n constructor(power) {\n super(power);\n }\n applyInternal(a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n };\n var _Utils = class {\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n static arrayFill(array, fromIndex, toIndex, value) {\n for (let i = fromIndex; i < toIndex; i++)\n array[i] = value;\n }\n static setArraySize(array, size, value = 0) {\n let oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n }\n static ensureArrayCapacity(array, size, value = 0) {\n if (array.length >= size)\n return array;\n return _Utils.setArraySize(array, size, value);\n }\n static newArray(size, defaultValue) {\n let array = new Array(size);\n for (let i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n }\n static newFloatArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Float32Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static newShortArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Int16Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static toFloatArray(array) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n static toSinglePrecision(value) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n static webkit602BugfixHelper(alpha, blend) {\n }\n static contains(array, element, identity = true) {\n for (var i = 0; i < array.length; i++)\n if (array[i] == element)\n return true;\n return false;\n }\n static enumValue(type, name) {\n return type[name[0].toUpperCase() + name.slice(1)];\n }\n };\n var Utils = _Utils;\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\n var DebugUtils = class {\n static logBones(skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let 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 };\n var Pool = class {\n constructor(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n obtain() {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n free(item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n }\n freeAll(items) {\n for (let i = 0; i < items.length; i++)\n this.free(items[i]);\n }\n clear() {\n this.items.length = 0;\n }\n };\n var Vector2 = class {\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n length() {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n normalize() {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n };\n var TimeKeeper = class {\n constructor() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1e3;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n update() {\n let now = Date.now() / 1e3;\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 };\n var WindowedMean = class {\n constructor(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 hasEnoughData() {\n return this.addedValues >= this.values.length;\n }\n addValue(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 getMean() {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++)\n mean += this.values[i];\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n return 0;\n }\n };\n\n // spine-core/src/attachments/Attachment.ts\n var Attachment = class {\n constructor(name) {\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n };\n var _VertexAttachment = class extends Attachment {\n constructor(name) {\n super(name);\n this.id = _VertexAttachment.nextID++;\n this.bones = null;\n this.vertices = [];\n this.worldVerticesLength = 0;\n this.timelineAttachment = this;\n }\n computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (!bones) {\n if (deformArray.length > 0)\n vertices = deformArray;\n let bone = slot.bone;\n let x = bone.worldX;\n let y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\n let vx = vertices[v2], vy = vertices[v2 + 1];\n worldVertices2[w] = vx * a + vy * b + x;\n worldVertices2[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let 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 worldVertices2[w] = wx;\n worldVertices2[w + 1] = wy;\n }\n } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let 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 worldVertices2[w] = wx;\n worldVertices2[w + 1] = wy;\n }\n }\n }\n copyTo(attachment) {\n if (this.bones) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n if (this.vertices) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.timelineAttachment = this.timelineAttachment;\n }\n };\n var VertexAttachment = _VertexAttachment;\n VertexAttachment.nextID = 0;\n\n // spine-core/src/attachments/Sequence.ts\n var _Sequence = class {\n constructor(count) {\n this.id = _Sequence.nextID();\n this.start = 0;\n this.digits = 0;\n this.setupIndex = 0;\n this.regions = new Array(count);\n }\n copy() {\n let copy = new _Sequence(this.regions.length);\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\n copy.start = this.start;\n copy.digits = this.digits;\n copy.setupIndex = this.setupIndex;\n return copy;\n }\n apply(slot, attachment) {\n let index = slot.sequenceIndex;\n if (index == -1)\n index = this.setupIndex;\n if (index >= this.regions.length)\n index = this.regions.length - 1;\n let region = this.regions[index];\n if (attachment.region != region) {\n attachment.region = region;\n attachment.updateRegion();\n }\n }\n getPath(basePath, index) {\n let result = basePath;\n let frame = (this.start + index).toString();\n for (let i = this.digits - frame.length; i > 0; i--)\n result += \"0\";\n result += frame;\n return result;\n }\n static nextID() {\n return _Sequence._nextID++;\n }\n };\n var Sequence = _Sequence;\n Sequence._nextID = 0;\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\n return SequenceMode2;\n })(SequenceMode || {});\n var SequenceModeValues = [\n 0 /* hold */,\n 1 /* once */,\n 2 /* loop */,\n 3 /* pingpong */,\n 4 /* onceReverse */,\n 5 /* loopReverse */,\n 6 /* pingpongReverse */\n ];\n\n // spine-core/src/Animation.ts\n var Animation = class {\n constructor(name, timelines, duration) {\n this.timelines = [];\n this.timelineIds = new StringSet();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n this.setTimelines(timelines);\n this.duration = duration;\n }\n setTimelines(timelines) {\n if (!timelines)\n throw new Error(\"timelines cannot be null.\");\n this.timelines = timelines;\n this.timelineIds.clear();\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds.addAll(timelines[i].getPropertyIds());\n }\n hasTimeline(ids) {\n for (let i = 0; i < ids.length; i++)\n if (this.timelineIds.contains(ids[i]))\n return true;\n return false;\n }\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (!skeleton)\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 let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n };\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\n return MixBlend2;\n })(MixBlend || {});\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\n return MixDirection2;\n })(MixDirection || {});\n var Property = {\n rotate: 0,\n x: 1,\n y: 2,\n scaleX: 3,\n scaleY: 4,\n shearX: 5,\n shearY: 6,\n rgb: 7,\n alpha: 8,\n rgb2: 9,\n attachment: 10,\n deform: 11,\n event: 12,\n drawOrder: 13,\n ikConstraint: 14,\n transformConstraint: 15,\n pathConstraintPosition: 16,\n pathConstraintSpacing: 17,\n pathConstraintMix: 18,\n sequence: 19\n };\n var Timeline = class {\n constructor(frameCount, propertyIds) {\n this.propertyIds = propertyIds;\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\n }\n getPropertyIds() {\n return this.propertyIds;\n }\n getFrameEntries() {\n return 1;\n }\n getFrameCount() {\n return this.frames.length / this.getFrameEntries();\n }\n getDuration() {\n return this.frames[this.frames.length - this.getFrameEntries()];\n }\n static search1(frames, time) {\n let n = frames.length;\n for (let i = 1; i < n; i++)\n if (frames[i] > time)\n return i - 1;\n return n - 1;\n }\n static search(frames, time, step) {\n let n = frames.length;\n for (let i = step; i < n; i += step)\n if (frames[i] > time)\n return i - step;\n return n - step;\n }\n };\n var CurveTimeline = class extends Timeline {\n constructor(frameCount, bezierCount, propertyIds) {\n super(frameCount, propertyIds);\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\n this.curves[frameCount - 1] = 1;\n }\n setLinear(frame) {\n this.curves[frame] = 0;\n }\n setStepped(frame) {\n this.curves[frame] = 1;\n }\n shrink(bezierCount) {\n let size = this.getFrameCount() + bezierCount * 18;\n if (this.curves.length > size) {\n let newCurves = Utils.newFloatArray(size);\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\n this.curves = newCurves;\n }\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = value1 + dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getBezierValue(time, frameIndex, valueOffset, i) {\n let curves = this.curves;\n if (curves[i] > time) {\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n frameIndex += this.getFrameEntries();\n let x = curves[n - 2], y = curves[n - 1];\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\n }\n };\n var CurveTimeline1 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId) {\n super(frameCount, bezierCount, [propertyId]);\n }\n getFrameEntries() {\n return 2;\n }\n setFrame(frame, time, value) {\n frame <<= 1;\n this.frames[frame] = time;\n this.frames[frame + 1] = value;\n }\n getCurveValue(time) {\n let frames = this.frames;\n let i = frames.length - 2;\n for (let ii = 2; ii <= i; ii += 2) {\n if (frames[ii] > time) {\n i = ii - 2;\n break;\n }\n }\n let curveType = this.curves[i >> 1];\n switch (curveType) {\n case 0:\n let before = frames[i], value = frames[i + 1];\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\n case 1:\n return frames[i + 1];\n }\n return this.getBezierValue(time, i, 1, curveType - 2);\n }\n };\n var CurveTimeline2 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\n }\n getFrameEntries() {\n return 3;\n }\n setFrame(frame, time, value1, value2) {\n frame *= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = value1;\n this.frames[frame + 2] = value2;\n }\n };\n var RotateTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n return;\n case 1 /* first */:\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\n }\n return;\n }\n let r = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n r += bone.data.rotation - bone.rotation;\n case 3 /* add */:\n bone.rotation += r * alpha;\n }\n }\n };\n var TranslateTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.x + \"|\" + boneIndex,\n Property.y + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n };\n var TranslateXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n break;\n case 3 /* add */:\n bone.x += x * alpha;\n }\n }\n };\n var TranslateYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case 3 /* add */:\n bone.y += y * alpha;\n }\n }\n };\n var ScaleTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.scaleX + \"|\" + boneIndex,\n Property.scaleY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let x, y;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n x *= bone.data.scaleX;\n y *= bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ScaleXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time) * bone.data.scaleX;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleX += x - bone.data.scaleX;\n else\n bone.scaleX = x;\n } else {\n let bx = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n }\n }\n }\n };\n var ScaleYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time) * bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleY += y - bone.data.scaleY;\n else\n bone.scaleY = y;\n } else {\n let by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n by = bone.data.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = bone.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ShearTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.shearX + \"|\" + boneIndex,\n Property.shearY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n };\n var ShearXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n break;\n case 3 /* add */:\n bone.shearX += x * alpha;\n }\n }\n };\n var ShearYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case 3 /* add */:\n bone.shearY += y * alpha;\n }\n }\n };\n var RGBATimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 5;\n }\n setFrame(frame, time, r, g, b, a) {\n frame *= 5;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.setFromColor(setup);\n return;\n case 1 /* first */:\n color.add(\n (setup.r - color.r) * alpha,\n (setup.g - color.g) * alpha,\n (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha\n );\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0;\n let i = Timeline.search(frames, time, 5);\n let curveType = this.curves[i / 5];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n let t = (time - before) / (frames[i + 5] - before);\n r += (frames[i + 5 + 1] - r) * t;\n g += (frames[i + 5 + 2] - g) * t;\n b += (frames[i + 5 + 3] - b) * t;\n a += (frames[i + 5 + 4] - a) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n }\n if (alpha == 1)\n color.set(r, g, b, a);\n else {\n if (blend == 0 /* 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 };\n var RGBTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, r, g, b) {\n frame <<= 2;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n return;\n case 1 /* first */:\n color.r += (setup.r - color.r) * alpha;\n color.g += (setup.g - color.g) * alpha;\n color.b += (setup.b - color.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n r += (frames[i + 4 + 1] - r) * t;\n g += (frames[i + 4 + 2] - g) * t;\n b += (frames[i + 4 + 3] - b) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (alpha == 1) {\n color.r = r;\n color.g = g;\n color.b = b;\n } else {\n if (blend == 0 /* setup */) {\n let setup = slot.data.color;\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n }\n color.r += (r - color.r) * alpha;\n color.g += (g - color.g) * alpha;\n color.b += (b - color.b) * alpha;\n }\n }\n };\n var AlphaTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let color = slot.color;\n if (time < this.frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.a = setup.a;\n return;\n case 1 /* first */:\n color.a += (setup.a - color.a) * alpha;\n }\n return;\n }\n let a = this.getCurveValue(time);\n if (alpha == 1)\n color.a = a;\n else {\n if (blend == 0 /* setup */)\n color.a = slot.data.color.a;\n color.a += (a - color.a) * alpha;\n }\n }\n };\n var RGBA2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 8;\n }\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\n frame <<= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n this.frames[frame + 5] = r2;\n this.frames[frame + 6] = g2;\n this.frames[frame + 7] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.setFromColor(setupLight);\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.add(\n (setupLight.r - light.r) * alpha,\n (setupLight.g - light.g) * alpha,\n (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha\n );\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 8);\n let curveType = this.curves[i >> 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n let t = (time - before) / (frames[i + 8] - before);\n r += (frames[i + 8 + 1] - r) * t;\n g += (frames[i + 8 + 2] - g) * t;\n b += (frames[i + 8 + 3] - b) * t;\n a += (frames[i + 8 + 4] - a) * t;\n r2 += (frames[i + 8 + 5] - r2) * t;\n g2 += (frames[i + 8 + 6] - g2) * t;\n b2 += (frames[i + 8 + 7] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\n }\n if (alpha == 1) {\n light.set(r, g, b, a);\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n light.setFromColor(slot.data.color);\n let setupDark = slot.data.darkColor;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var RGB2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, r, g, b, r2, g2, b2) {\n frame *= 7;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = r2;\n this.frames[frame + 5] = g2;\n this.frames[frame + 6] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.r += (setupLight.r - light.r) * alpha;\n light.g += (setupLight.g - light.g) * alpha;\n light.b += (setupLight.b - light.b) * alpha;\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n r += (frames[i + 7 + 1] - r) * t;\n g += (frames[i + 7 + 2] - g) * t;\n b += (frames[i + 7 + 3] - b) * t;\n r2 += (frames[i + 7 + 4] - r2) * t;\n g2 += (frames[i + 7 + 5] - g2) * t;\n b2 += (frames[i + 7 + 6] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (alpha == 1) {\n light.r = r;\n light.g = g;\n light.b = b;\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.r += (r - light.r) * alpha;\n light.g += (g - light.g) * alpha;\n light.b += (b - light.b) * alpha;\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var AttachmentTimeline = class extends Timeline {\n constructor(frameCount, slotIndex) {\n super(frameCount, [\n Property.attachment + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachmentNames = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, attachmentName) {\n this.frames[frame] = time;\n this.attachmentNames[frame] = attachmentName;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\n }\n setAttachment(skeleton, slot, attachmentName) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n };\n var DeformTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex, attachment) {\n super(frameCount, bezierCount, [\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n this.vertices = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, vertices) {\n this.frames[frame] = time;\n this.vertices[frame] = vertices;\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getCurvePercent(time, frame) {\n let curves = this.curves;\n let i = curves[frame];\n switch (i) {\n case 0:\n let x2 = this.frames[frame];\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\n case 1:\n return 0;\n }\n i -= 2;\n if (curves[i] > time) {\n let x2 = this.frames[frame];\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n let x = curves[n - 2], y = curves[n - 1];\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.getAttachment();\n if (!slotAttachment)\n return;\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\n return;\n let deform = slot.deform;\n if (deform.length == 0)\n blend = 0 /* setup */;\n let vertices = this.vertices;\n let vertexCount = vertices[0].length;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n deform.length = 0;\n return;\n case 1 /* first */:\n if (alpha == 1) {\n deform.length = 0;\n return;\n }\n deform.length = vertexCount;\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n deform.length = vertexCount;\n if (time >= frames[frames.length - 1]) {\n let lastVertices = vertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] - setupVertices[i2];\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2];\n }\n } else\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let setup = setupVertices[i2];\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] = lastVertices[i2] * alpha;\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] * alpha;\n }\n }\n }\n return;\n }\n let frame = Timeline.search1(frames, time);\n let percent = this.getCurvePercent(time, frame);\n let prevVertices = vertices[frame];\n let nextVertices = vertices[frame + 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2], setup = setupVertices[i2];\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\n }\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n };\n var _EventTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _EventTimeline.propertyIds);\n this.events = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, event) {\n this.frames[frame] = event.time;\n this.events[frame] = event;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (!firedEvents)\n return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n let i = 0;\n if (lastTime < frames[0])\n i = 0;\n else {\n i = Timeline.search1(frames, lastTime) + 1;\n let frameTime = frames[i];\n while (i > 0) {\n if (frames[i - 1] != frameTime)\n break;\n i--;\n }\n }\n for (; i < frameCount && time >= frames[i]; i++)\n firedEvents.push(this.events[i]);\n }\n };\n var EventTimeline = _EventTimeline;\n EventTimeline.propertyIds = [\"\" + Property.event];\n var _DrawOrderTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _DrawOrderTimeline.propertyIds);\n this.drawOrders = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, drawOrder) {\n this.frames[frame] = time;\n this.drawOrders[frame] = drawOrder;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n let idx = Timeline.search1(this.frames, time);\n let drawOrderToSetupIndex = this.drawOrders[idx];\n if (!drawOrderToSetupIndex)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n else {\n let drawOrder = skeleton.drawOrder;\n let slots = skeleton.slots;\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n };\n var DrawOrderTimeline = _DrawOrderTimeline;\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\n var IkConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, ikConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.ikConstraint + \"|\" + ikConstraintIndex\n ]);\n this.ikConstraintIndex = 0;\n this.ikConstraintIndex = ikConstraintIndex;\n }\n getFrameEntries() {\n return 6;\n }\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\n frame *= 6;\n this.frames[frame] = time;\n this.frames[frame + 1] = mix;\n this.frames[frame + 2] = softness;\n this.frames[frame + 3] = bendDirection;\n this.frames[frame + 4] = compress ? 1 : 0;\n this.frames[frame + 5] = stretch ? 1 : 0;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* 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 1 /* 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 let mix = 0, softness = 0;\n let i = Timeline.search(frames, time, 6);\n let curveType = this.curves[i / 6];\n switch (curveType) {\n case 0:\n let before = frames[i];\n mix = frames[i + 1];\n softness = frames[i + 2];\n let t = (time - before) / (frames[i + 6] - before);\n mix += (frames[i + 6 + 1] - mix) * t;\n softness += (frames[i + 6 + 2] - softness) * t;\n break;\n case 1:\n mix = frames[i + 1];\n softness = frames[i + 2];\n break;\n default:\n mix = this.getBezierValue(time, i, 1, curveType - 2);\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n if (blend == 0 /* setup */) {\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\n if (direction == 1 /* mixOut */) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n } else {\n constraint.mix += (mix - constraint.mix) * alpha;\n constraint.softness += (softness - constraint.softness) * alpha;\n if (direction == 0 /* mixIn */) {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n }\n }\n };\n var TransformConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, transformConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.transformConstraint + \"|\" + transformConstraintIndex\n ]);\n this.transformConstraintIndex = 0;\n this.transformConstraintIndex = transformConstraintIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\n let frames = this.frames;\n frame *= 7;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n frames[frame + 4] = mixScaleX;\n frames[frame + 5] = mixScaleY;\n frames[frame + 6] = mixShearY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\n }\n return;\n }\n let rotate, x, y, scaleX, scaleY, shearY;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n rotate += (frames[i + 7 + 1] - rotate) * t;\n x += (frames[i + 7 + 2] - x) * t;\n y += (frames[i + 7 + 3] - y) * t;\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\n shearY += (frames[i + 7 + 6] - shearY) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\n }\n }\n };\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.position = constraint.data.position;\n return;\n case 1 /* first */:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n let position = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n };\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.spacing = constraint.data.spacing;\n return;\n case 1 /* first */:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n let spacing = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n };\n var PathConstraintMixTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\n ]);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, mixRotate, mixX, mixY) {\n let frames = this.frames;\n frame <<= 2;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = constraint.data.mixRotate;\n constraint.mixX = constraint.data.mixX;\n constraint.mixY = constraint.data.mixY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\n }\n return;\n }\n let rotate, x, y;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n rotate += (frames[i + 4 + 1] - rotate) * t;\n x += (frames[i + 4 + 2] - x) * t;\n y += (frames[i + 4 + 3] - y) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n }\n }\n };\n var _SequenceTimeline = class extends Timeline {\n constructor(frameCount, slotIndex, attachment) {\n super(frameCount, [\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\n ]);\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n }\n getFrameEntries() {\n return _SequenceTimeline.ENTRIES;\n }\n getSlotIndex() {\n return this.slotIndex;\n }\n getAttachment() {\n return this.attachment;\n }\n setFrame(frame, time, mode, index, delay) {\n let frames = this.frames;\n frame *= _SequenceTimeline.ENTRIES;\n frames[frame] = time;\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\n frames[frame + _SequenceTimeline.DELAY] = delay;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.attachment;\n let attachment = this.attachment;\n if (slotAttachment != attachment) {\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\n return;\n }\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n slot.sequenceIndex = -1;\n return;\n }\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\n let before = frames[i];\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\n let delay = frames[i + _SequenceTimeline.DELAY];\n if (!this.attachment.sequence)\n return;\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\n let mode = SequenceModeValues[modeAndIndex & 15];\n if (mode != 0 /* hold */) {\n index += (time - before) / delay + 1e-5 | 0;\n switch (mode) {\n case 1 /* once */:\n index = Math.min(count - 1, index);\n break;\n case 2 /* loop */:\n index %= count;\n break;\n case 3 /* pingpong */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : index % n;\n if (index >= count)\n index = n - index;\n break;\n }\n case 4 /* onceReverse */:\n index = Math.max(count - 1 - index, 0);\n break;\n case 5 /* loopReverse */:\n index = count - 1 - index % count;\n break;\n case 6 /* pingpongReverse */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : (index + count - 1) % n;\n if (index >= count)\n index = n - index;\n }\n }\n }\n slot.sequenceIndex = index;\n }\n };\n var SequenceTimeline = _SequenceTimeline;\n SequenceTimeline.ENTRIES = 3;\n SequenceTimeline.MODE = 1;\n SequenceTimeline.DELAY = 2;\n\n // spine-core/src/AnimationState.ts\n var _AnimationState = class {\n constructor(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 StringSet();\n this.animationsChanged = false;\n this.trackEntryPool = new Pool(() => new TrackEntry());\n this.data = data;\n }\n static emptyAnimation() {\n return _AnimationState._emptyAnimation;\n }\n update(delta) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (!current)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n let 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 let next = current.next;\n if (next) {\n let 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) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\n tracks[i] = null;\n this.queue.end(current);\n this.clearNext(current);\n continue;\n }\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from)\n from.mixingTo = null;\n while (from) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n }\n updateMixingFrom(to, delta) {\n let from = to.mixingFrom;\n if (!from)\n return true;\n let 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)\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 apply(skeleton) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\n let current = tracks[i2];\n if (!current || current.delay > 0)\n continue;\n applied = true;\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\n let mix = current.alpha;\n if (current.mixingFrom)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && !current.next)\n mix = 0;\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\n let applyEvents = events;\n if (current.reverse) {\n applyTime = current.animation.duration - applyTime;\n applyEvents = null;\n }\n let timelines = current.animation.timelines;\n let timelineCount = timelines.length;\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\n for (let ii = 0; ii < timelineCount; ii++) {\n Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\n }\n } else {\n let timelineMode = current.timelineMode;\n let shortestRotation = current.shortestRotation;\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n current.timelinesRotation.length = timelineCount << 1;\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline2 = timelines[ii];\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\n } else if (timeline2 instanceof AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\n } else {\n Utils.webkit602BugfixHelper(mix, blend);\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* 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 + 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.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n }\n applyMixingFrom(to, skeleton, blend) {\n let from = to.mixingFrom;\n if (from.mixingFrom)\n this.applyMixingFrom(from, skeleton, blend);\n let mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == 1 /* first */)\n blend = 0 /* setup */;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != 1 /* first */)\n blend = from.mixBlend;\n }\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let timelines = from.animation.timelines;\n let timelineCount = timelines.length;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\n let events = null;\n if (from.reverse)\n applyTime = from.animation.duration - applyTime;\n else if (mix < from.eventThreshold)\n events = this.events;\n if (blend == 3 /* add */) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n let shortestRotation = from.shortestRotation;\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n from.timelinesRotation.length = timelineCount << 1;\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = 1 /* mixOut */;\n let timelineBlend;\n let alpha = 0;\n switch (timelineMode[i]) {\n case SUBSEQUENT:\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaMix;\n break;\n case HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case HOLD_FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = 0 /* setup */;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (!shortestRotation && timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\n else {\n Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\n direction = 0 /* mixIn */;\n timeline.apply(skeleton, animationLast, applyTime, 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 applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n if (time < timeline.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n } else\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + SETUP;\n }\n setAttachment(skeleton, slot, attachmentName, attachments) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n if (attachments)\n slot.attachmentState = this.unkeyedState + CURRENT;\n }\n applyRotateTimeline(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, 0 /* mixIn */);\n return;\n }\n let bone = skeleton.bones[timeline.boneIndex];\n if (!bone.active)\n return;\n let frames = timeline.frames;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case 1 /* first */:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\n r2 = bone.data.rotation + timeline.getCurveValue(time);\n }\n let total = 0, diff = r2 - r1;\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n let current = diff > 0, dir = lastTotal >= 0;\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n bone.rotation = r1 + total * alpha;\n }\n queueEvents(entry, animationTime) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped)\n break;\n if (event.time > animationEnd)\n continue;\n this.queue.event(entry, event);\n }\n let 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 let event = events[i];\n if (event.time < animationStart)\n continue;\n this.queue.event(entry, event);\n }\n }\n clearTracks() {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let 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 clearTrack(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n let current = this.tracks[trackIndex];\n if (!current)\n return;\n this.queue.end(current);\n this.clearNext(current);\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (!from)\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 setCurrent(index, current, interrupt) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n current.previous = null;\n if (from) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom && 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 setAnimation(trackIndex, animationName, loop = false) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n setAnimationWith(trackIndex, animation, loop = false) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.clearNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.clearNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let last = this.expandToIndex(trackIndex);\n if (last) {\n while (last.next)\n last = last.next;\n }\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n if (!last) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n entry.previous = last;\n if (delay <= 0)\n delay += last.getTrackComplete() - entry.mixDuration;\n }\n entry.delay = delay;\n return entry;\n }\n setEmptyAnimation(trackIndex, mixDuration = 0) {\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\n if (delay <= 0)\n entry.delay += entry.mixDuration - mixDuration;\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n setEmptyAnimations(mixDuration = 0) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n expandToIndex(index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n trackEntry(trackIndex, animation, loop, last) {\n let entry = this.trackEntryPool.obtain();\n entry.reset();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.reverse = false;\n entry.shortestRotation = 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.mixTime = 0;\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\n entry.interruptAlpha = 1;\n entry.totalAlpha = 0;\n entry.mixBlend = 2 /* replace */;\n return entry;\n }\n clearNext(entry) {\n let next = entry.next;\n while (next) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n _animationsChanged() {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let entry = tracks[i];\n if (!entry)\n continue;\n while (entry.mixingFrom)\n entry = entry.mixingFrom;\n do {\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry);\n }\n }\n computeHold(entry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n timelineMode.length = timelinesCount;\n let timelineHoldMix = entry.timelineHoldMix;\n timelineHoldMix.length = 0;\n let propertyIDs = this.propertyIDs;\n if (to && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++)\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\n return;\n }\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let ids = timeline.getPropertyIds();\n if (!propertyIDs.addAll(ids))\n timelineMode[i] = SUBSEQUENT;\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\n timelineMode[i] = FIRST;\n } else {\n for (let next = to.mixingTo; next; next = next.mixingTo) {\n if (next.animation.hasTimeline(ids))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = HOLD_MIX;\n timelineHoldMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = HOLD_FIRST;\n }\n }\n }\n getCurrent(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n }\n addListener(listener) {\n if (!listener)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n }\n clearListeners() {\n this.listeners.length = 0;\n }\n clearListenerNotifications() {\n this.queue.clear();\n }\n };\n var AnimationState = _AnimationState;\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\n var TrackEntry = class {\n constructor() {\n this.animation = null;\n this.previous = null;\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.listener = null;\n this.trackIndex = 0;\n this.loop = false;\n this.holdPrevious = false;\n this.reverse = false;\n this.shortestRotation = false;\n this.eventThreshold = 0;\n this.attachmentThreshold = 0;\n this.drawOrderThreshold = 0;\n this.animationStart = 0;\n this.animationEnd = 0;\n this.animationLast = 0;\n this.nextAnimationLast = 0;\n this.delay = 0;\n this.trackTime = 0;\n this.trackLast = 0;\n this.nextTrackLast = 0;\n this.trackEnd = 0;\n this.timeScale = 0;\n this.alpha = 0;\n this.mixTime = 0;\n this.mixDuration = 0;\n this.interruptAlpha = 0;\n this.totalAlpha = 0;\n this.mixBlend = 2 /* replace */;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n reset() {\n this.next = null;\n this.previous = 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 getAnimationTime() {\n if (this.loop) {\n let 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 setAnimationLast(animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n isComplete() {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n resetRotationDirections() {\n this.timelinesRotation.length = 0;\n }\n getTrackComplete() {\n let duration = this.animationEnd - this.animationStart;\n if (duration != 0) {\n if (this.loop)\n return duration * (1 + (this.trackTime / duration | 0));\n if (this.trackTime < duration)\n return duration;\n }\n return this.trackTime;\n }\n };\n var EventQueue = class {\n constructor(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n start(entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n interrupt(entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n end(entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n dispose(entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n complete(entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n event(entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n drain() {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n let objects = this.objects;\n let listeners = this.animState.listeners;\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i];\n let entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener && entry.listener.start)\n entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.start)\n listener.start(entry);\n }\n break;\n case EventType.interrupt:\n if (entry.listener && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.interrupt)\n listener.interrupt(entry);\n }\n break;\n case EventType.end:\n if (entry.listener && entry.listener.end)\n entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.end)\n listener.end(entry);\n }\n case EventType.dispose:\n if (entry.listener && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.dispose)\n listener.dispose(entry);\n }\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener && entry.listener.complete)\n entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.complete)\n listener.complete(entry);\n }\n break;\n case EventType.event:\n let event = objects[i++ + 2];\n if (entry.listener && entry.listener.event)\n entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.event)\n listener.event(entry, event);\n }\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n }\n clear() {\n this.objects.length = 0;\n }\n };\n var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"start\"] = 0] = \"start\";\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\n EventType2[EventType2[\"end\"] = 2] = \"end\";\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\n EventType2[EventType2[\"event\"] = 5] = \"event\";\n return EventType2;\n })(EventType || {});\n var AnimationStateAdapter = class {\n start(entry) {\n }\n interrupt(entry) {\n }\n end(entry) {\n }\n dispose(entry) {\n }\n complete(entry) {\n }\n event(entry, event) {\n }\n };\n var SUBSEQUENT = 0;\n var FIRST = 1;\n var HOLD_SUBSEQUENT = 2;\n var HOLD_FIRST = 3;\n var HOLD_MIX = 4;\n var SETUP = 1;\n var CURRENT = 2;\n\n // spine-core/src/AnimationStateData.ts\n var AnimationStateData = class {\n constructor(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (!skeletonData)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n setMix(fromName, toName, duration) {\n let from = this.skeletonData.findAnimation(fromName);\n if (!from)\n throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (!to)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n setMixWith(from, to, duration) {\n if (!from)\n throw new Error(\"from cannot be null.\");\n if (!to)\n throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n getMix(from, to) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === void 0 ? this.defaultMix : value;\n }\n };\n\n // spine-core/src/attachments/BoundingBoxAttachment.ts\n var BoundingBoxAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/attachments/ClippingAttachment.ts\n var ClippingAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.endSlot = null;\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\n }\n copy() {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/Texture.ts\n var Texture = class {\n constructor(image) {\n this._image = image;\n }\n getImage() {\n return this._image;\n }\n };\n var TextureFilter = /* @__PURE__ */ ((TextureFilter3) => {\n TextureFilter3[TextureFilter3[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter3[TextureFilter3[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter3[TextureFilter3[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter3[TextureFilter3[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter3[TextureFilter3[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter3[TextureFilter3[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter3[TextureFilter3[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n return TextureFilter3;\n })(TextureFilter || {});\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\n return TextureWrap3;\n })(TextureWrap || {});\n var TextureRegion = class {\n constructor() {\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.degrees = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n };\n var FakeTexture = class extends Texture {\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-core/src/TextureAtlas.ts\n var TextureAtlas = class {\n constructor(atlasText) {\n this.pages = new Array();\n this.regions = new Array();\n let reader = new TextureAtlasReader(atlasText);\n let entry = new Array(4);\n let pageFields = {};\n pageFields[\"size\"] = (page2) => {\n page2.width = parseInt(entry[1]);\n page2.height = parseInt(entry[2]);\n };\n pageFields[\"format\"] = () => {\n };\n pageFields[\"filter\"] = (page2) => {\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\n };\n pageFields[\"repeat\"] = (page2) => {\n if (entry[1].indexOf(\"x\") != -1)\n page2.uWrap = 10497 /* Repeat */;\n if (entry[1].indexOf(\"y\") != -1)\n page2.vWrap = 10497 /* Repeat */;\n };\n pageFields[\"pma\"] = (page2) => {\n page2.pma = entry[1] == \"true\";\n };\n var regionFields = {};\n regionFields[\"xy\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n };\n regionFields[\"size\"] = (region) => {\n region.width = parseInt(entry[1]);\n region.height = parseInt(entry[2]);\n };\n regionFields[\"bounds\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n region.width = parseInt(entry[3]);\n region.height = parseInt(entry[4]);\n };\n regionFields[\"offset\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n };\n regionFields[\"orig\"] = (region) => {\n region.originalWidth = parseInt(entry[1]);\n region.originalHeight = parseInt(entry[2]);\n };\n regionFields[\"offsets\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n region.originalWidth = parseInt(entry[3]);\n region.originalHeight = parseInt(entry[4]);\n };\n regionFields[\"rotate\"] = (region) => {\n let value = entry[1];\n if (value == \"true\")\n region.degrees = 90;\n else if (value != \"false\")\n region.degrees = parseInt(value);\n };\n regionFields[\"index\"] = (region) => {\n region.index = parseInt(entry[1]);\n };\n let line = reader.readLine();\n while (line && line.trim().length == 0)\n line = reader.readLine();\n while (true) {\n if (!line || line.trim().length == 0)\n break;\n if (reader.readEntry(entry, line) == 0)\n break;\n line = reader.readLine();\n }\n let page = null;\n let names = null;\n let values = null;\n while (true) {\n if (line === null)\n break;\n if (line.trim().length == 0) {\n page = null;\n line = reader.readLine();\n } else if (!page) {\n page = new TextureAtlasPage(line.trim());\n while (true) {\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\n break;\n let field = pageFields[entry[0]];\n if (field)\n field(page);\n }\n this.pages.push(page);\n } else {\n let region = new TextureAtlasRegion(page, line);\n while (true) {\n let count = reader.readEntry(entry, line = reader.readLine());\n if (count == 0)\n break;\n let field = regionFields[entry[0]];\n if (field)\n field(region);\n else {\n if (!names)\n names = [];\n if (!values)\n values = [];\n names.push(entry[0]);\n let entryValues = [];\n for (let i = 0; i < count; i++)\n entryValues.push(parseInt(entry[i + 1]));\n values.push(entryValues);\n }\n }\n if (region.originalWidth == 0 && region.originalHeight == 0) {\n region.originalWidth = region.width;\n region.originalHeight = region.height;\n }\n if (names && names.length > 0 && values && values.length > 0) {\n region.names = names;\n region.values = values;\n names = null;\n values = null;\n }\n region.u = region.x / page.width;\n region.v = region.y / page.height;\n if (region.degrees == 90) {\n region.u2 = (region.x + region.height) / page.width;\n region.v2 = (region.y + region.width) / page.height;\n } else {\n region.u2 = (region.x + region.width) / page.width;\n region.v2 = (region.y + region.height) / page.height;\n }\n this.regions.push(region);\n }\n }\n }\n findRegion(name) {\n for (let 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 setTextures(assetManager, pathPrefix = \"\") {\n for (let page of this.pages)\n page.setTexture(assetManager.get(pathPrefix + page.name));\n }\n dispose() {\n var _a;\n for (let i = 0; i < this.pages.length; i++) {\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\n }\n }\n };\n var TextureAtlasReader = class {\n constructor(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n readLine() {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n readEntry(entry, line) {\n if (!line)\n return 0;\n line = line.trim();\n if (line.length == 0)\n return 0;\n let colon = line.indexOf(\":\");\n if (colon == -1)\n return 0;\n entry[0] = line.substr(0, colon).trim();\n for (let i = 1, lastMatch = colon + 1; ; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) {\n entry[i] = line.substr(lastMatch).trim();\n return i;\n }\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n if (i == 4)\n return 4;\n }\n }\n };\n var TextureAtlasPage = class {\n constructor(name) {\n this.minFilter = 9728 /* Nearest */;\n this.magFilter = 9728 /* Nearest */;\n this.uWrap = 33071 /* ClampToEdge */;\n this.vWrap = 33071 /* ClampToEdge */;\n this.texture = null;\n this.width = 0;\n this.height = 0;\n this.pma = false;\n this.name = name;\n }\n setTexture(texture) {\n this.texture = texture;\n texture.setFilters(this.minFilter, this.magFilter);\n texture.setWraps(this.uWrap, this.vWrap);\n }\n };\n var TextureAtlasRegion = class extends TextureRegion {\n constructor(page, name) {\n super();\n this.x = 0;\n this.y = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n this.index = 0;\n this.degrees = 0;\n this.names = null;\n this.values = null;\n this.page = page;\n this.name = name;\n }\n };\n\n // spine-core/src/attachments/MeshAttachment.ts\n var MeshAttachment = class extends VertexAttachment {\n constructor(name, path) {\n super(name);\n this.region = null;\n this.regionUVs = [];\n this.uvs = [];\n this.triangles = [];\n this.color = new Color(1, 1, 1, 1);\n this.width = 0;\n this.height = 0;\n this.hullLength = 0;\n this.edges = [];\n this.parentMesh = null;\n this.sequence = null;\n this.tempColor = new Color(0, 0, 0, 0);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let regionUVs = this.regionUVs;\n if (!this.uvs || this.uvs.length != regionUVs.length)\n this.uvs = Utils.newFloatArray(regionUVs.length);\n let uvs = this.uvs;\n let n = this.uvs.length;\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof TextureAtlasRegion) {\n let region = this.region, image = region.page.texture.getImage();\n let textureWidth = image.width, textureHeight = image.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 (let 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 (let 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 (let 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 } else if (!this.region) {\n u = v = 0;\n width = height = 1;\n } else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (let 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 getParentMesh() {\n return this.parentMesh;\n }\n setParentMesh(parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh) {\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 copy() {\n if (this.parentMesh)\n return this.newLinkedMesh();\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n if (this.edges) {\n copy.edges = new Array(this.edges.length);\n 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 computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n super.computeWorldVertices(slot, start, count, worldVertices2, offset, stride);\n }\n newLinkedMesh() {\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n copy.timelineAttachment = this.timelineAttachment;\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\n if (copy.region != null)\n copy.updateRegion();\n return copy;\n }\n };\n\n // spine-core/src/attachments/PathAttachment.ts\n var PathAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.lengths = [];\n this.closed = false;\n this.constantSpeed = false;\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n 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 };\n\n // spine-core/src/attachments/PointAttachment.ts\n var PointAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.color = new Color(0.38, 0.94, 0, 1);\n }\n computeWorldPosition(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 computeWorldRotation(bone) {\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * bone.a + sin * bone.b;\n let y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n copy() {\n let copy = new PointAttachment(this.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 };\n\n // spine-core/src/attachments/RegionAttachment.ts\n var _RegionAttachment = class extends Attachment {\n constructor(name, path) {\n super(name);\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 Color(1, 1, 1, 1);\n this.rendererObject = null;\n this.region = null;\n this.sequence = null;\n this.offset = Utils.newFloatArray(8);\n this.uvs = Utils.newFloatArray(8);\n this.tempColor = new Color(1, 1, 1, 1);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let region = this.region;\n let uvs = this.uvs;\n if (region == null) {\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n uvs[4] = 1;\n uvs[5] = 1;\n uvs[6] = 1;\n uvs[7] = 0;\n return;\n }\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let x = this.x, y = this.y;\n let localXCos = localX * cos + x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[0] = localXCos - localYSin;\n offset[1] = localYCos + localXSin;\n offset[2] = localXCos - localY2Sin;\n offset[3] = localY2Cos + localXSin;\n offset[4] = localX2Cos - localY2Sin;\n offset[5] = localY2Cos + localX2Sin;\n offset[6] = localX2Cos - localYSin;\n offset[7] = localYCos + localX2Sin;\n if (region.degrees == 90) {\n uvs[0] = region.u2;\n uvs[1] = region.v2;\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 } 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 computeWorldVertices(slot, worldVertices2, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n let bone = slot.bone;\n let vertexOffset = this.offset;\n let x = bone.worldX, y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[0];\n offsetY = vertexOffset[1];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[2];\n offsetY = vertexOffset[3];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[4];\n offsetY = vertexOffset[5];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[6];\n offsetY = vertexOffset[7];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n }\n copy() {\n let copy = new _RegionAttachment(this.name, this.path);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\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 Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n return copy;\n }\n };\n var RegionAttachment = _RegionAttachment;\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\n // spine-core/src/AtlasAttachmentLoader.ts\n var AtlasAttachmentLoader = class {\n constructor(atlas) {\n this.atlas = atlas;\n }\n loadSequence(name, basePath, sequence) {\n let regions = sequence.regions;\n for (let i = 0, n = regions.length; i < n; i++) {\n let path = sequence.getPath(basePath, i);\n let region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\n regions[i] = region;\n regions[i].renderObject = regions[i];\n }\n }\n newRegionAttachment(skin, name, path, sequence) {\n let attachment = new RegionAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newMeshAttachment(skin, name, path, sequence) {\n let attachment = new MeshAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newBoundingBoxAttachment(skin, name) {\n return new BoundingBoxAttachment(name);\n }\n newPathAttachment(skin, name) {\n return new PathAttachment(name);\n }\n newPointAttachment(skin, name) {\n return new PointAttachment(name);\n }\n newClippingAttachment(skin, name) {\n return new ClippingAttachment(name);\n }\n };\n\n // spine-core/src/BoneData.ts\n var BoneData = class {\n constructor(index, name, parent) {\n this.index = 0;\n this.parent = null;\n this.length = 0;\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 Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n };\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n return TransformMode2;\n })(TransformMode || {});\n\n // spine-core/src/Bone.ts\n var Bone = class {\n constructor(data, skeleton, parent) {\n this.parent = null;\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.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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 isActive() {\n return this.active;\n }\n update() {\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\n }\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n updateWorldTransformWith(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 let parent = this.parent;\n if (!parent) {\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n let sx = skeleton.scaleX;\n let sy = skeleton.scaleY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n let 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 0 /* Normal */: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = 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 1 /* OnlyTranslation */: {\n let rotationY = rotation + 90 + shearY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case 2 /* NoRotationOrReflection */: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 1e-4) {\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) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = 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 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 1e-5)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = 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 setToSetupPose() {\n let 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 getWorldRotationX() {\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\n }\n getWorldRotationY() {\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\n }\n getWorldScaleX() {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n }\n getWorldScaleY() {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n }\n updateAppliedTransform() {\n let parent = this.parent;\n if (!parent) {\n this.ax = this.worldX - this.skeleton.x;\n this.ay = this.worldY - this.skeleton.y;\n this.arotation = Math.atan2(this.c, this.a) * 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) * MathUtils.radDeg;\n return;\n }\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n let pid = 1 / (pa * pd - pb * pc);\n let 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 let ia = pid * pd;\n let id = pid * pa;\n let ib = pid * pb;\n let ic = pid * pc;\n let ra = ia * this.a - ib * this.c;\n let rb = ia * this.b - ib * this.d;\n let rc = id * this.c - ic * this.a;\n let rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 1e-4) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\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) * MathUtils.radDeg;\n }\n }\n worldToLocal(world) {\n let invDet = 1 / (this.a * this.d - this.b * this.c);\n let x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = x * this.d * invDet - y * this.b * invDet;\n world.y = y * this.a * invDet - x * this.c * invDet;\n return world;\n }\n localToWorld(local) {\n let 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 worldToLocalRotation(worldRotation) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\n }\n localToWorldRotation(localRotation) {\n localRotation -= this.rotation - this.shearX;\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\n }\n rotateWorld(degrees) {\n let a = this.a, b = this.b, c = this.c, d = this.d;\n let cos = MathUtils.cosDeg(degrees), sin = 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 }\n };\n\n // spine-core/src/ConstraintData.ts\n var ConstraintData = class {\n constructor(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n };\n\n // spine-core/src/AssetManagerBase.ts\n var AssetManagerBase = class {\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\n this.pathPrefix = \"\";\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n this.downloader = downloader;\n }\n start(path) {\n this.toLoad++;\n return this.pathPrefix + path;\n }\n success(callback, path, asset) {\n this.toLoad--;\n this.loaded++;\n this.assets[path] = asset;\n if (callback)\n callback(path, asset);\n }\n error(callback, path, message) {\n this.toLoad--;\n this.loaded++;\n this.errors[path] = message;\n if (callback)\n callback(path, message);\n }\n loadAll() {\n let promise = new Promise((resolve, reject) => {\n let check = () => {\n if (this.isLoadingComplete()) {\n if (this.hasErrors())\n reject(this.errors);\n else\n resolve(this);\n return;\n }\n requestAnimationFrame(check);\n };\n requestAnimationFrame(check);\n });\n return promise;\n }\n setRawDataURI(path, data) {\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\n }\n loadBinary(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadBinary(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\n });\n }\n loadText(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadText(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\n });\n }\n loadJson(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadJson(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\n });\n }\n loadTexture(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\n let isWebWorker = !isBrowser;\n if (isWebWorker) {\n fetch(path, { mode: \"cors\" }).then((response) => {\n if (response.ok)\n return response.blob();\n this.error(error, path, `Couldn't load image: ${path}`);\n return null;\n }).then((blob) => {\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\n }).then((bitmap) => {\n if (bitmap)\n this.success(success, path, this.textureLoader(bitmap));\n });\n } else {\n let image = new Image();\n image.crossOrigin = \"anonymous\";\n image.onload = () => {\n this.success(success, path, this.textureLoader(image));\n };\n image.onerror = () => {\n this.error(error, path, `Couldn't load image: ${path}`);\n };\n if (this.downloader.rawDataUris[path])\n path = this.downloader.rawDataUris[path];\n image.src = path;\n }\n }\n loadTextureAtlas(path, success = () => {\n }, error = () => {\n }, fileAlias) {\n let index = path.lastIndexOf(\"/\");\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\n path = this.start(path);\n this.downloader.downloadText(path, (atlasText) => {\n try {\n let atlas = new TextureAtlas(atlasText);\n let toLoad = atlas.pages.length, abort = false;\n for (let page of atlas.pages) {\n this.loadTexture(\n !fileAlias ? parent + page.name : fileAlias[page.name],\n (imagePath, texture) => {\n if (!abort) {\n page.setTexture(texture);\n if (--toLoad == 0)\n this.success(success, path, atlas);\n }\n },\n (imagePath, message) => {\n if (!abort)\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\n abort = true;\n }\n );\n }\n } catch (e) {\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\n }\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\n });\n }\n get(path) {\n return this.assets[this.pathPrefix + path];\n }\n require(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset)\n return asset;\n let error = this.errors[path];\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\n }\n remove(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n delete this.assets[path];\n return asset;\n }\n removeAll() {\n for (let key in this.assets) {\n let asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n }\n isLoadingComplete() {\n return this.toLoad == 0;\n }\n getToLoad() {\n return this.toLoad;\n }\n getLoaded() {\n return this.loaded;\n }\n dispose() {\n this.removeAll();\n }\n hasErrors() {\n return Object.keys(this.errors).length > 0;\n }\n getErrors() {\n return this.errors;\n }\n };\n var Downloader = class {\n constructor() {\n this.callbacks = {};\n this.rawDataUris = {};\n }\n dataUriToString(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx != -1) {\n base64Idx += \"base64,\".length;\n return atob(dataUri.substr(base64Idx));\n } else {\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\n }\n }\n base64ToUint8Array(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n }\n dataUriToUint8Array(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx == -1)\n throw new Error(\"Not a binary data URI.\");\n base64Idx += \"base64,\".length;\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\n }\n downloadText(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToString(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.open(\"GET\", url, true);\n let done = () => {\n this.finish(url, request.status, request.responseText);\n };\n request.onload = done;\n request.onerror = done;\n request.send();\n }\n downloadJson(url, success, error) {\n this.downloadText(url, (data) => {\n success(JSON.parse(data));\n }, error);\n }\n downloadBinary(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n let onerror = () => {\n this.finish(url, request.status, request.response);\n };\n request.onload = () => {\n if (request.status == 200 || request.status == 0)\n this.finish(url, 200, new Uint8Array(request.response));\n else\n onerror();\n };\n request.onerror = onerror;\n request.send();\n }\n start(url, success, error) {\n let callbacks = this.callbacks[url];\n try {\n if (callbacks)\n return true;\n this.callbacks[url] = callbacks = [];\n } finally {\n callbacks.push(success, error);\n }\n }\n finish(url, status, data) {\n let callbacks = this.callbacks[url];\n delete this.callbacks[url];\n let args = status == 200 || status == 0 ? [data] : [status, data];\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\n callbacks[i].apply(null, args);\n }\n };\n\n // spine-core/src/Event.ts\n var Event = class {\n constructor(time, data) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.time = 0;\n this.volume = 0;\n this.balance = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n };\n\n // spine-core/src/EventData.ts\n var EventData = class {\n constructor(name) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.audioPath = null;\n this.volume = 0;\n this.balance = 0;\n this.name = name;\n }\n };\n\n // spine-core/src/IkConstraint.ts\n var IkConstraint = class {\n constructor(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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find bone ${data.target.name}`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mix == 0)\n return;\n let target = this.target;\n let 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.data.uniform, this.softness, this.mix);\n break;\n }\n }\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\n let p = bone.parent;\n if (!p)\n throw new Error(\"IK bone must have parent.\");\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case 1 /* OnlyTranslation */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case 2 /* NoRotationOrReflection */:\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n let sa = pa / bone.skeleton.scaleX;\n let 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) * MathUtils.radDeg;\n default:\n let x = targetX - p.worldX, y = targetY - p.worldY;\n let 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) * 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 let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(\n bone.ax,\n bone.ay,\n bone.arotation + rotationIK * alpha,\n sx,\n sy,\n bone.ashearX,\n bone.ashearY\n );\n }\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\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 } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n let u = Math.abs(psx - psy) <= 1e-4;\n if (!u || stretch) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n let pp = parent.parent;\n if (!pp)\n throw new Error(\"IK parent must itself have a parent.\");\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 1e-4) {\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 let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) * 0.5;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let 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:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1) {\n cos = -1;\n a2 = Math.PI * bendDir;\n } else if (cos > 1) {\n cos = 1;\n a2 = 0;\n if (stretch) {\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n sx *= a;\n if (uniform)\n sy *= a;\n }\n } else\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 } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) * 0.5;\n let r0 = q / c2, r1 = c / q;\n let 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 let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let 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) * 0.5) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * 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, sy, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * 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 };\n\n // spine-core/src/IkConstraintData.ts\n var IkConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/PathConstraintData.ts\n var PathConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.positionMode = PositionMode.Fixed;\n this.spacingMode = SpacingMode.Fixed;\n this.rotateMode = RotateMode.Chain;\n this.offsetRotation = 0;\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n }\n set target(slotData) {\n this._target = slotData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"SlotData not set.\");\n else\n return this._target;\n }\n };\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\n return PositionMode2;\n })(PositionMode || {});\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\n return SpacingMode2;\n })(SpacingMode || {});\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\n return RotateMode2;\n })(RotateMode || {});\n\n // spine-core/src/PathConstraint.ts\n var _PathConstraint = class {\n constructor(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findSlot(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}`);\n this.target = target;\n this.position = data.position;\n this.spacing = data.spacing;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n }\n isActive() {\n return this.active;\n }\n update() {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment))\n return;\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\n return;\n let data = this.data;\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\n let bones = this.bones;\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\n let spacing = this.spacing;\n switch (data.spacingMode) {\n case 2 /* Percent */:\n if (scale) {\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon)\n lengths[i] = 0;\n else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n lengths[i] = Math.sqrt(x * x + y * y);\n }\n }\n }\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\n break;\n case 3 /* Proportional */:\n let sum = 0;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = length;\n sum += length;\n }\n }\n if (sum > 0) {\n sum = spacesCount / sum * spacing;\n for (let i = 1; i < spacesCount; i++)\n spaces[i] *= sum;\n }\n break;\n default:\n let lengthSpacing = data.spacingMode == 0 /* Length */;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n }\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = data.rotateMode == 1 /* Chain */;\n else {\n tip = false;\n let p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * mixX;\n bone.worldY += (boneY - bone.worldY) * mixY;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (mixRotate > 0) {\n let 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 let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\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.updateAppliedTransform();\n }\n }\n computeWorldPositions(path, spacesCount, tangents) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\n let closed2 = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed2 ? 1 : 2;\n let pathLength2 = lengths[curveCount];\n if (this.data.positionMode == 1 /* Percent */)\n position *= pathLength2;\n let multiplier2;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier2 = pathLength2;\n break;\n case 3 /* Proportional */:\n multiplier2 = pathLength2 / spacesCount;\n break;\n default:\n multiplier2 = 1;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier2;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength2;\n if (p < 0)\n p += pathLength2;\n curve = 0;\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 } else if (p > pathLength2) {\n if (prevCurve != _PathConstraint.AFTER) {\n prevCurve = _PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = lengths[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed2 && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(\n p,\n world[0],\n world[1],\n world[2],\n world[3],\n world[4],\n world[5],\n world[6],\n world[7],\n out,\n o,\n tangents || i > 0 && space == 0\n );\n }\n return out;\n }\n if (closed2) {\n verticesLength += 2;\n world = 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 } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let 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 (this.data.positionMode == 1 /* Percent */)\n position *= pathLength;\n let multiplier;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier = pathLength;\n break;\n case 3 /* Proportional */:\n multiplier = pathLength / spacesCount;\n break;\n default:\n multiplier = 1;\n }\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = curves[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n let 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) * 6e-3;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\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 let length = segments[segment];\n if (p > length)\n continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - 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 addBeforePosition(p, temp, i, out, o) {\n let 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 addAfterPosition(p, temp, i, out, o) {\n let 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 addCurvePosition(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 let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let 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 < 1e-3)\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 };\n var PathConstraint = _PathConstraint;\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 1e-5;\n\n // spine-core/src/Slot.ts\n var Slot = class {\n constructor(data, bone) {\n this.darkColor = null;\n this.attachment = null;\n this.attachmentState = 0;\n this.sequenceIndex = -1;\n this.deform = new Array();\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!bone)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = !data.darkColor ? null : new Color();\n this.setToSetupPose();\n }\n getSkeleton() {\n return this.bone.skeleton;\n }\n getAttachment() {\n return this.attachment;\n }\n setAttachment(attachment) {\n if (this.attachment == attachment)\n return;\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\n this.deform.length = 0;\n }\n this.attachment = attachment;\n this.sequenceIndex = -1;\n }\n setToSetupPose() {\n this.color.setFromColor(this.data.color);\n if (this.darkColor)\n this.darkColor.setFromColor(this.data.darkColor);\n if (!this.data.attachmentName)\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 };\n\n // spine-core/src/TransformConstraint.ts\n var TransformConstraint = class {\n constructor(data, skeleton) {\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 0;\n this.temp = new Vector2();\n this.active = false;\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n this.mixScaleX = data.mixScaleX;\n this.mixScaleY = data.mixScaleY;\n this.mixShearY = data.mixShearY;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\n return;\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n applyAbsoluteWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * mixX;\n bone.worldY += (temp.y - bone.worldY) * mixY;\n }\n if (mixScaleX != 0) {\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n if (s != 0)\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n if (s != 0)\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let b = bone.b, d = bone.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyRelativeWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * mixX;\n bone.worldY += temp.y * mixY;\n }\n if (mixScaleX != 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n let b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyAbsoluteLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation;\n if (mixRotate != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n rotation += r * mixRotate;\n }\n let x = bone.ax, y = bone.ay;\n x += (target.ax - x + this.data.offsetX) * mixX;\n y += (target.ay - y + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (mixScaleX != 0 && scaleX != 0)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\n if (mixScaleY != 0 && scaleY != 0)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\n let shearY = bone.ashearY;\n if (mixShearY != 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n shearY += r * mixShearY;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n applyRelativeLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n };\n\n // spine-core/src/Skeleton.ts\n var _Skeleton = class {\n constructor(data) {\n this._updateCache = new Array();\n this.skin = null;\n this.scaleX = 1;\n this._scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone;\n if (!boneData.parent)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n get scaleY() {\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\n }\n set scaleY(scaleY) {\n this._scaleY = scaleY;\n }\n updateCache() {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone);\n }\n }\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n sortIkConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let target = constraint.target;\n this.sortBone(target);\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length == 1) {\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n } else {\n let child = constrained[constrained.length - 1];\n this.sortBone(child);\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n child.sorted = true;\n }\n }\n sortPathConstraint(constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortTransformConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n this.sortBone(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n sortPathConstraintAttachmentWith(attachment, slotBone) {\n if (!(attachment instanceof PathAttachment))\n return;\n let pathBones = attachment.bones;\n if (!pathBones)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n for (let i = 0, n = pathBones.length; i < n; ) {\n let nn = pathBones[i++];\n nn += i;\n while (i < nn)\n this.sortBone(bones[pathBones[i++]]);\n }\n }\n }\n sortBone(bone) {\n if (!bone)\n return;\n if (bone.sorted)\n return;\n let parent = bone.parent;\n if (parent)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n sortReset(bones) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let 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 updateWorldTransform() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[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 }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n updateWorldTransformWith(parent) {\n let rootBone = this.getRootBone();\n if (!rootBone)\n throw new Error(\"Root bone must not be null.\");\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++) {\n let updatable = updateCache[i];\n if (updatable != rootBone)\n updatable.update();\n }\n }\n setToSetupPose() {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n setBonesToSetupPose() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let 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 let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n }\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n }\n }\n setSlotsToSetupPose() {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n getRootBone() {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n }\n setSkinByName(skinName) {\n let skin = this.data.findSkin(skinName);\n if (!skin)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n setSkin(newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin) {\n if (this.skin)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name) {\n let attachment = newSkin.getAttachment(i, name);\n if (attachment)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n getAttachmentByName(slotName, attachmentName) {\n let slot = this.data.findSlot(slotName);\n if (!slot)\n throw new Error(`Can't find slot with name ${slotName}`);\n return this.getAttachment(slot.index, attachmentName);\n }\n getAttachment(slotIndex, attachmentName) {\n if (!attachmentName)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin) {\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment)\n return attachment;\n }\n if (this.data.defaultSkin)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n setAttachment(slotName, attachmentName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment = null;\n if (attachmentName) {\n attachment = this.getAttachment(i, attachmentName);\n if (!attachment)\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 findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n getBoundsRect() {\n let offset = new Vector2();\n let size = new Vector2();\n this.getBounds(offset, size);\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\n }\n getBounds(offset, size, temp = new Array(2)) {\n if (!offset)\n throw new Error(\"offset cannot be null.\");\n if (!size)\n throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n let verticesLength = 0;\n let vertices = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let 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 };\n var Skeleton = _Skeleton;\n Skeleton.yDown = false;\n\n // spine-core/src/SkeletonData.ts\n var SkeletonData = class {\n constructor() {\n this.name = null;\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.defaultSkin = null;\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.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n this.version = null;\n this.hash = null;\n this.fps = 0;\n this.imagesPath = null;\n this.audioPath = null;\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n }\n findSkin(skinName) {\n if (!skinName)\n throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n }\n findEvent(eventDataName) {\n if (!eventDataName)\n throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName)\n return event;\n }\n return null;\n }\n findAnimation(animationName) {\n if (!animationName)\n throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n }\n findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n };\n\n // spine-core/src/Skin.ts\n var SkinEntry = class {\n constructor(slotIndex = 0, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n };\n var Skin = class {\n constructor(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n setAttachment(slotIndex, name, attachment) {\n if (!attachment)\n throw new Error(\"attachment cannot be null.\");\n let 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 addSkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n copySkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (!attachment.attachment)\n continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n getAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n removeAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary)\n delete dictionary[name];\n }\n getAttachments() {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n getAttachmentsForSlot(slotIndex, attachments) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n clear() {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n attachAll(skeleton, oldSkin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n };\n\n // spine-core/src/SlotData.ts\n var SlotData = class {\n constructor(index, name, boneData) {\n this.index = 0;\n this.color = new Color(1, 1, 1, 1);\n this.darkColor = null;\n this.attachmentName = null;\n this.blendMode = BlendMode.Normal;\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n if (!boneData)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n };\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\n return BlendMode3;\n })(BlendMode || {});\n\n // spine-core/src/TransformConstraintData.ts\n var TransformConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/SkeletonBinary.ts\n var SkeletonBinary = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(binary) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n skeletonData.name = \"\";\n let input = new BinaryInput(binary);\n let lowHash = input.readInt32();\n let highHash = input.readInt32();\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n let nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n let n = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let str = input.readString();\n if (!str)\n throw new Error(\"String in string table must not be null.\");\n input.strings.push(str);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Bone name must not be null.\");\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n let data = new BoneData(i, name, parent);\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 = input.readInt(true);\n data.skinRequired = input.readBoolean();\n if (nonessential)\n Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let slotName = input.readString();\n if (!slotName)\n throw new Error(\"Slot name must not be null.\");\n let boneData = skeletonData.bones[input.readInt(true)];\n let data = new SlotData(i, slotName, boneData);\n Color.rgba8888ToColor(data.color, input.readInt32());\n let darkColor = input.readInt32();\n if (darkColor != -1)\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = input.readInt(true);\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"IK constraint data name must not be null.\");\n let data = new IkConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Transform constraint data name must not be null.\");\n let data = new TransformConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n data.mixScaleX = input.readFloat();\n data.mixScaleY = input.readFloat();\n data.mixShearY = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Path constraint data name must not be null.\");\n let data = new PathConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 = input.readInt(true);\n data.spacingMode = input.readInt(true);\n data.rotateMode = input.readInt(true);\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n let i = skeletonData.skins.length;\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++) {\n let skin = this.readSkin(input, skeletonData, false, nonessential);\n if (!skin)\n throw new Error(\"readSkin() should not have returned null.\");\n skeletonData.skins[i] = skin;\n }\n }\n n = this.linkedMeshes.length;\n for (let i = 0; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(\"Not skin found for linked mesh.\");\n if (!linkedMesh.parent)\n throw new Error(\"Linked mesh parent must not be null\");\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let eventName = input.readStringRef();\n if (!eventName)\n throw new Error();\n let data = new EventData(eventName);\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) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let animationName = input.readString();\n if (!animationName)\n throw new Error(\"Animatio name must not be null.\");\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\n }\n return skeletonData;\n }\n readSkin(input, skeletonData, defaultSkin, nonessential) {\n let skin = null;\n let slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new Skin(\"default\");\n } else {\n let skinName = input.readStringRef();\n if (!skinName)\n throw new Error(\"Skin name must not be null.\");\n skin = new Skin(skinName);\n skin.bones.length = input.readInt(true);\n for (let i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (let 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 (let i = 0; i < slotCount; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let name = input.readStringRef();\n if (!name)\n throw new Error(\"Attachment name must not be null\");\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n if (attachment)\n skin.setAttachment(slotIndex, name, attachment);\n }\n }\n return skin;\n }\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n let scale = this.scale;\n let name = input.readStringRef();\n if (!name)\n name = attachmentName;\n switch (input.readByte()) {\n case AttachmentType.Region: {\n let path = input.readStringRef();\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let scaleX = input.readFloat();\n let scaleY = input.readFloat();\n let width = input.readFloat();\n let height = input.readFloat();\n let color = input.readInt32();\n let sequence = this.readSequence(input);\n if (!path)\n path = name;\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\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 Color.rgba8888ToColor(region.color, color);\n region.sequence = sequence;\n if (sequence == null)\n region.updateRegion();\n return region;\n }\n case AttachmentType.BoundingBox: {\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case AttachmentType.Mesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let vertexCount = input.readInt(true);\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\n let triangles = this.readShortArray(input);\n let vertices = this.readVertices(input, vertexCount);\n let hullLength = input.readInt(true);\n let sequence = this.readSequence(input);\n let edges = [];\n let width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n 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 if (sequence == null)\n mesh.updateRegion();\n mesh.hullLength = hullLength << 1;\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case AttachmentType.LinkedMesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let skinName = input.readStringRef();\n let parent = input.readStringRef();\n let inheritTimelines = input.readBoolean();\n let sequence = this.readSequence(input);\n let width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n Color.rgba8888ToColor(mesh.color, color);\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\n return mesh;\n }\n case AttachmentType.Path: {\n let closed2 = input.readBoolean();\n let constantSpeed = input.readBoolean();\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n let color = nonessential ? input.readInt32() : 0;\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = closed2;\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 Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case AttachmentType.Point: {\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let color = nonessential ? input.readInt32() : 0;\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case AttachmentType.Clipping: {\n let endSlotIndex = input.readInt(true);\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\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 Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n }\n readSequence(input) {\n if (!input.readBoolean())\n return null;\n let sequence = new Sequence(input.readInt(true));\n sequence.start = input.readInt(true);\n sequence.digits = input.readInt(true);\n sequence.setupIndex = input.readInt(true);\n return sequence;\n }\n readVertices(input, vertexCount) {\n let scale = this.scale;\n let verticesLength = vertexCount << 1;\n let vertices = new Vertices();\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n let weights = new Array();\n let bonesArray = new Array();\n for (let i = 0; i < vertexCount; i++) {\n let boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n }\n readFloatArray(input, n, scale) {\n let array = new Array(n);\n if (scale == 1) {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat();\n } else {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n }\n readShortArray(input) {\n let n = input.readInt(true);\n let array = new Array(n);\n for (let i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n }\n readAnimation(input, name, skeletonData) {\n input.readInt(true);\n let timelines = new Array();\n let scale = this.scale;\n let tempColor1 = new Color();\n let tempColor2 = new Color();\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case SLOT_ATTACHMENT: {\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\n for (let frame = 0; frame < frameCount; frame++)\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n a = a2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let na = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n a = na;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_ALPHA: {\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n }\n time = time2;\n a = a2;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let boneIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\n switch (type) {\n case BONE_ROTATE:\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_TRANSLATE:\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEX:\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEY:\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_SCALE:\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEX:\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEY:\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEAR:\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARX:\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARY:\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixShearY = mixShearY2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true);\n let data = skeletonData.pathConstraints[index];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n switch (input.readByte()) {\n case PATH_POSITION:\n timelines.push(readTimeline1(\n input,\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\n data.positionMode == 0 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_SPACING:\n timelines.push(readTimeline1(\n input,\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_MIX:\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n }\n timelines.push(timeline);\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let skin = skeletonData.skins[input.readInt(true)];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let slotIndex = input.readInt(true);\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n let attachmentName = input.readStringRef();\n if (!attachmentName)\n throw new Error(\"attachmentName must not be null.\");\n let attachment = skin.getAttachment(slotIndex, attachmentName);\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case ATTACHMENT_DEFORM: {\n let vertexAttachment = attachment;\n let weighted = vertexAttachment.bones;\n let vertices = vertexAttachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let bezierCount = input.readInt(true);\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\n let time = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let end = input.readInt(true);\n if (end == 0)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat();\n } else {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (let v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frame, time, deform);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n }\n time = time2;\n }\n timelines.push(timeline);\n break;\n }\n case ATTACHMENT_SEQUENCE: {\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\n for (let frame = 0; frame < frameCount; frame++) {\n let time = input.readFloat();\n let modeAndIndex = input.readInt32();\n timeline.setFrame(\n frame,\n time,\n SequenceModeValues[modeAndIndex & 15],\n modeAndIndex >> 4,\n input.readFloat()\n );\n }\n timelines.push(timeline);\n break;\n }\n }\n }\n }\n }\n let drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n let timeline = new DrawOrderTimeline(drawOrderCount);\n let slotCount = skeletonData.slots.length;\n for (let i = 0; i < drawOrderCount; i++) {\n let time = input.readFloat();\n let offsetCount = input.readInt(true);\n let drawOrder = Utils.newArray(slotCount, 0);\n for (let ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsetCount; ii++) {\n let 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 (let 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 }\n let eventCount = input.readInt(true);\n if (eventCount > 0) {\n let timeline = new EventTimeline(eventCount);\n for (let i = 0; i < eventCount; i++) {\n let time = input.readFloat();\n let eventData = skeletonData.events[input.readInt(true)];\n let event = new Event(time, eventData);\n event.intValue = input.readInt(false);\n event.floatValue = input.readFloat();\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event.data.audioPath) {\n event.volume = input.readFloat();\n event.balance = input.readFloat();\n }\n timeline.setFrame(i, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n return new Animation(name, timelines, duration);\n }\n };\n var BinaryInput = class {\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n readByte() {\n return this.buffer.getInt8(this.index++);\n }\n readUnsignedByte() {\n return this.buffer.getUint8(this.index++);\n }\n readShort() {\n let value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n }\n readInt32() {\n let value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n }\n readInt(optimizePositive) {\n let b = this.readByte();\n let result = b & 127;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 7;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 14;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 21;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\n }\n readStringRef() {\n let index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n }\n readString() {\n let byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n let chars = \"\";\n let charCount = 0;\n for (let i = 0; i < byteCount; ) {\n let b = this.readUnsignedByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n }\n readFloat() {\n let value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n }\n readBoolean() {\n return this.readByte() != 0;\n }\n };\n var LinkedMesh = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n var Vertices = class {\n constructor(bones = null, vertices = null) {\n this.bones = bones;\n this.vertices = vertices;\n }\n };\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\n return AttachmentType2;\n })(AttachmentType || {});\n function readTimeline1(input, timeline, scale) {\n let time = input.readFloat(), value = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n }\n time = time2;\n value = value2;\n }\n return timeline;\n }\n function readTimeline2(input, timeline, scale) {\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n }\n return timeline;\n }\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\n }\n var BONE_ROTATE = 0;\n var BONE_TRANSLATE = 1;\n var BONE_TRANSLATEX = 2;\n var BONE_TRANSLATEY = 3;\n var BONE_SCALE = 4;\n var BONE_SCALEX = 5;\n var BONE_SCALEY = 6;\n var BONE_SHEAR = 7;\n var BONE_SHEARX = 8;\n var BONE_SHEARY = 9;\n var SLOT_ATTACHMENT = 0;\n var SLOT_RGBA = 1;\n var SLOT_RGB = 2;\n var SLOT_RGBA2 = 3;\n var SLOT_RGB2 = 4;\n var SLOT_ALPHA = 5;\n var ATTACHMENT_DEFORM = 0;\n var ATTACHMENT_SEQUENCE = 1;\n var PATH_POSITION = 0;\n var PATH_SPACING = 1;\n var PATH_MIX = 2;\n var CURVE_STEPPED = 1;\n var CURVE_BEZIER = 2;\n\n // spine-core/src/SkeletonBounds.ts\n var SkeletonBounds = class {\n constructor() {\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 Pool(() => {\n return Utils.newFloatArray(16);\n });\n }\n update(skeleton, updateAabb) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = 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 } 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 aabbCompute() {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let 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 aabbContainsPoint(x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n aabbIntersectsSegment(x1, y1, x2, y2) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let 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 let m = (y2 - y1) / (x2 - x1);\n let 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 let 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 aabbIntersectsSkeleton(bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n containsPoint(x, y) {\n let polygons = this.polygons;\n for (let 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 containsPointPolygon(polygon, x, y) {\n let vertices = polygon;\n let nn = polygon.length;\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\n let 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 intersectsSegment(x1, y1, x2, y2) {\n let polygons = this.polygons;\n for (let 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 intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\n let vertices = polygon;\n let nn = polygon.length;\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let 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 let 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 getPolygon(boundingBox) {\n if (!boundingBox)\n throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n getWidth() {\n return this.maxX - this.minX;\n }\n getHeight() {\n return this.maxY - this.minY;\n }\n };\n\n // spine-core/src/Triangulator.ts\n var Triangulator = class {\n constructor() {\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 Pool(() => {\n return new Array();\n });\n this.polygonIndicesPool = new Pool(() => {\n return new Array();\n });\n }\n triangulate(verticesArray) {\n let vertices = verticesArray;\n let vertexCount = verticesArray.length >> 1;\n let indices = this.indicesArray;\n indices.length = 0;\n for (let i = 0; i < vertexCount; i++)\n indices[i] = i;\n let isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (let i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n let triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n let previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer:\n if (!isConcave[i]) {\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n let v = indices[ii] << 1;\n let 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 let previousIndex = (vertexCount + i - 1) % vertexCount;\n let 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 decompose(verticesArray, triangles) {\n let vertices = verticesArray;\n let convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n let convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n let polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n let polygon = this.polygonPool.obtain();\n polygon.length = 0;\n let fanBaseIndex = -1, lastWinding = 0;\n for (let i = 0, n = triangles.length; i < n; i += 3) {\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\n let merged = false;\n if (fanBaseIndex == t1) {\n let o = polygon.length - 4;\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n let 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 } 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 (let i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n let firstIndex = polygonIndices[0];\n let lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n let o = polygon.length - 4;\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\n let firstX = polygon[0], firstY = polygon[1];\n let secondX = polygon[2], secondY = polygon[3];\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (let ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n let otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n let otherFirstIndex = otherIndices[0];\n let otherSecondIndex = otherIndices[1];\n let otherLastIndex = otherIndices[2];\n let otherPoly = convexPolygons[ii];\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n let 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 (let 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 static isConcave(index, vertexCount, vertices, indices) {\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n let current = indices[index] << 1;\n let next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(\n vertices[previous],\n vertices[previous + 1],\n vertices[current],\n vertices[current + 1],\n vertices[next],\n vertices[next + 1]\n );\n }\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n }\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\n let px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n }\n };\n\n // spine-core/src/SkeletonClipping.ts\n var SkeletonClipping = class {\n constructor() {\n this.triangulator = new 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 this.clipAttachment = null;\n this.clippingPolygons = null;\n }\n clipStart(slot, clip) {\n if (this.clipAttachment)\n return 0;\n this.clipAttachment = clip;\n let n = clip.worldVerticesLength;\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n let clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\n let polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n }\n clipEndWithSlot(slot) {\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n }\n clipEnd() {\n if (!this.clipAttachment)\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 isClipping() {\n return this.clipAttachment != null;\n }\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n let clippedTriangles = this.clippedTriangles;\n let polygons = this.clippingPolygons;\n let polygonsCount = polygons.length;\n let vertexSize = twoColor ? 12 : 8;\n let index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer:\n for (let i = 0; i < trianglesLength; i += 3) {\n let vertexOffset = triangles[i] << 1;\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (let p = 0; p < polygonsCount; p++) {\n let s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n let clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\n let clipOutputCount = clipOutputLength >> 1;\n let clipOutputItems = this.clipOutput;\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\n let 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 let c0 = x - x3, c1 = y - y3;\n let a = (d0 * c0 + d1 * c1) * d;\n let b = (d4 * c0 + d2 * c1) * d;\n let 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 let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (let 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 } else {\n let clippedVerticesItems = 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 } 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 let clippedTrianglesItems = 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 clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\n let originalOutput = output;\n let clipped = false;\n let input;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\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 let clippingVertices = clippingArea;\n let clippingVerticesLast = clippingArea.length - 4;\n for (let i = 0; ; i += 2) {\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n let inputVertices = input;\n let inputVerticesLength = input.length - 2, outputStart = output.length;\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n let 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 let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n } else {\n output.push(edgeX);\n output.push(edgeY);\n }\n } else if (side2) {\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\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 let temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (let i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n } else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n }\n static makeClockwise(polygon) {\n let vertices = polygon;\n let verticeslength = polygon.length;\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (let 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 (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n let x = vertices[i], y = vertices[i + 1];\n let 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 };\n\n // spine-core/src/SkeletonJson.ts\n var SkeletonJson = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(json) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\n let skeletonMap = root.skeleton;\n if (skeletonMap) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.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 (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n let parent = null;\n let parentName = getValue(boneMap, \"parent\", null);\n if (parentName)\n parent = skeletonData.findBone(parentName);\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = getValue(boneMap, \"length\", 0) * scale;\n data.x = getValue(boneMap, \"x\", 0) * scale;\n data.y = getValue(boneMap, \"y\", 0) * scale;\n data.rotation = getValue(boneMap, \"rotation\", 0);\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\n data.shearX = getValue(boneMap, \"shearX\", 0);\n data.shearY = getValue(boneMap, \"shearY\", 0);\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\n data.skinRequired = getValue(boneMap, \"skin\", false);\n let color = getValue(boneMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let boneData = skeletonData.findBone(slotMap.bone);\n if (!boneData)\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\n let color = getValue(slotMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n let dark = getValue(slotMap, \"dark\", null);\n if (dark)\n data.darkColor = Color.fromString(dark);\n data.attachmentName = getValue(slotMap, \"attachment\", null);\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\n if (!bone)\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let target = skeletonData.findBone(constraintMap.target);\n ;\n if (!target)\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\n data.target = target;\n data.mix = getValue(constraintMap, \"mix\", 1);\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = getValue(constraintMap, \"compress\", false);\n data.stretch = getValue(constraintMap, \"stretch\", false);\n data.uniform = getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findBone(targetName);\n if (!target)\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\n data.target = target;\n data.local = getValue(constraintMap, \"local\", false);\n data.relative = getValue(constraintMap, \"relative\", false);\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findSlot(targetName);\n if (!target)\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\n data.target = target;\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.position = getValue(constraintMap, \"position\", 0);\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i];\n let skin = new Skin(skinMap.name);\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let boneName = skinMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraintName = skinMap.ik[ii];\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraintName = skinMap.transform[ii];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraintName = skinMap.path[ii];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment)\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 (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = getValue(eventMap, \"int\", 0);\n data.floatValue = getValue(eventMap, \"float\", 0);\n data.stringValue = getValue(eventMap, \"string\", \"\");\n data.audioPath = getValue(eventMap, \"audio\", null);\n if (data.audioPath) {\n data.volume = getValue(eventMap, \"volume\", 1);\n data.balance = getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n }\n readAttachment(map, skin, slotIndex, name, skeletonData) {\n let scale = this.scale;\n name = getValue(map, \"name\", name);\n switch (getValue(map, \"type\", \"region\")) {\n case \"region\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\n return null;\n region.path = path;\n region.x = getValue(map, \"x\", 0) * scale;\n region.y = getValue(map, \"y\", 0) * scale;\n region.scaleX = getValue(map, \"scaleX\", 1);\n region.scaleY = getValue(map, \"scaleY\", 1);\n region.rotation = getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n region.sequence = sequence;\n let color = getValue(map, \"color\", null);\n if (color)\n region.color.setFromString(color);\n if (region.region != null)\n region.updateRegion();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n let color = getValue(map, \"color\", null);\n if (color)\n mesh.color.setFromString(color);\n mesh.width = getValue(map, \"width\", 0) * scale;\n mesh.height = getValue(map, \"height\", 0) * scale;\n mesh.sequence = sequence;\n let parent = getValue(map, \"parent\", null);\n if (parent) {\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\n return mesh;\n }\n let uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n if (mesh.region != null)\n mesh.updateRegion();\n mesh.edges = getValue(map, \"edges\", null);\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = getValue(map, \"closed\", false);\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n let color = getValue(map, \"color\", null);\n if (color)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = getValue(map, \"x\", 0) * scale;\n point.y = getValue(map, \"y\", 0) * scale;\n point.rotation = getValue(map, \"rotation\", 0);\n let color = getValue(map, \"color\", null);\n if (color)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\n return null;\n let end = getValue(map, \"end\", null);\n if (end)\n clip.endSlot = skeletonData.findSlot(end);\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n readSequence(map) {\n if (map == null)\n return null;\n let sequence = new Sequence(getValue(map, \"count\", 0));\n sequence.start = getValue(map, \"start\", 1);\n sequence.digits = getValue(map, \"digits\", 0);\n sequence.setupIndex = getValue(map, \"setup\", 0);\n return sequence;\n }\n readVertices(map, attachment, verticesLength) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n; ) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n }\n readAnimation(map, name, skeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotName);\n let slotIndex = slot.index;\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (!timelineMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(frames, slotIndex);\n for (let frame = 0; frame < frames; frame++) {\n let keyMap = timelineMap[frame];\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgba\") {\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb\") {\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"alpha\") {\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\n } else if (timelineName == \"rgba2\") {\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb2\") {\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(\"Bone not found: \" + boneName);\n let boneIndex = bone.index;\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n let frames = timelineMap.length;\n if (frames == 0)\n continue;\n if (timelineName === \"rotate\") {\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\n } else if (timelineName === \"translate\") {\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\n } else if (timelineName === \"translatex\") {\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"translatey\") {\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"scale\") {\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\n } else if (timelineName === \"scalex\") {\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"scaley\") {\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"shear\") {\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\n } else if (timelineName === \"shearx\") {\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n } else if (timelineName === \"sheary\") {\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n }\n }\n }\n }\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let keyMap = constraintMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(\"IK Constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mix = getValue(keyMap, \"mix\", 1);\n let softness = getValue(keyMap, \"softness\", 0) * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\n let nextMap = constraintMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mix2 = getValue(nextMap, \"mix\", 1);\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.transform) {\n for (let constraintName in map.transform) {\n let timelineMap = map.transform[constraintName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Transform constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixScaleX = mixScaleX2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Path constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName === \"position\") {\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"spacing\") {\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.attachments) {\n for (let attachmentsName in map.attachments) {\n let attachmentsMap = map.attachments[attachmentsName];\n let skin = skeletonData.findSkin(attachmentsName);\n if (!skin)\n throw new Error(\"Skin not found: \" + attachmentsName);\n for (let slotMapName in attachmentsMap) {\n let slotMap = attachmentsMap[slotMapName];\n let slot = skeletonData.findSlot(slotMapName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotMapName);\n let slotIndex = slot.index;\n for (let attachmentMapName in slotMap) {\n let attachmentMap = slotMap[attachmentMapName];\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\n for (let timelineMapName in attachmentMap) {\n let timelineMap = attachmentMap[timelineMapName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n if (timelineMapName == \"deform\") {\n let weighted = attachment.bones;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\n let time = getValue(keyMap, \"time\", 0);\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let verticesValue = getValue(keyMap, \"vertices\", null);\n if (!verticesValue)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = getValue(keyMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frame, time, deform);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let curve = keyMap.curve;\n if (curve)\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n time = time2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineMapName == \"sequence\") {\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\n let lastDelay = 0;\n for (let frame = 0; frame < timelineMap.length; frame++) {\n let delay = getValue(keyMap, \"delay\", lastDelay);\n let time = getValue(keyMap, \"time\", 0);\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\n let index = getValue(keyMap, \"index\", 0);\n timeline.setFrame(frame, time, mode, index, delay);\n lastDelay = delay;\n keyMap = timelineMap[frame + 1];\n }\n timelines.push(timeline);\n }\n }\n }\n }\n }\n }\n if (map.drawOrder) {\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\n let slotCount = skeletonData.slots.length;\n let frame = 0;\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\n let drawOrderMap = map.drawOrder[i];\n let drawOrder = null;\n let offsets = getValue(drawOrderMap, \"offsets\", null);\n if (offsets) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsets.length; ii++) {\n let offsetMap = offsets[ii];\n let slot = skeletonData.findSlot(offsetMap.slot);\n if (!slot)\n throw new Error(\"Slot not found: \" + slot);\n let slotIndex = slot.index;\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 (let ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n }\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frame = 0;\n for (let i = 0; i < map.events.length; i++, frame++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (!eventData)\n throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath) {\n event.volume = getValue(eventMap, \"volume\", 1);\n event.balance = getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frame, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n };\n var LinkedMesh2 = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n function readTimeline12(keys, timeline, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\n if (keyMap.curve)\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n time = time2;\n value = value2;\n keyMap = nextMap;\n }\n }\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n keyMap = nextMap;\n }\n }\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n if (curve == \"stepped\") {\n timeline.setStepped(frame);\n return bezier;\n }\n let i = value << 2;\n let cx1 = curve[i];\n let cy1 = curve[i + 1] * scale;\n let cx2 = curve[i + 2];\n let cy2 = curve[i + 3] * scale;\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n return bezier + 1;\n }\n function getValue(map, property, defaultValue) {\n return map[property] !== void 0 ? map[property] : defaultValue;\n }\n\n // spine-core/src/polyfills.ts\n (() => {\n if (typeof Math.fround === \"undefined\") {\n Math.fround = function(array) {\n return function(x) {\n return array[0] = x, array[0];\n };\n }(new Float32Array(1));\n }\n })();\n\n // spine-canvas/src/CanvasTexture.ts\n var CanvasTexture = class extends Texture {\n constructor(image) {\n super(image);\n }\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-canvas/src/AssetManager.ts\n var AssetManager = class extends AssetManagerBase {\n constructor(pathPrefix = \"\", downloader = new Downloader()) {\n super((image) => {\n return new CanvasTexture(image);\n }, pathPrefix, downloader);\n }\n };\n\n // spine-canvas/src/SkeletonRenderer.ts\n var worldVertices = Utils.newFloatArray(8);\n var _SkeletonRenderer = class {\n constructor(context) {\n this.triangleRendering = false;\n this.debugRendering = false;\n this.vertices = Utils.newFloatArray(8 * 1024);\n this.tempColor = new Color();\n this.ctx = context;\n }\n draw(skeleton) {\n if (this.triangleRendering)\n this.drawTriangles(skeleton);\n else\n this.drawImages(skeleton);\n }\n drawImages(skeleton) {\n let ctx = this.ctx;\n let color = this.tempColor;\n let skeletonColor = skeleton.color;\n let drawOrder = skeleton.drawOrder;\n if (this.debugRendering)\n ctx.strokeStyle = \"green\";\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let bone = slot.bone;\n if (!bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof RegionAttachment))\n continue;\n attachment.computeWorldVertices(slot, worldVertices, 0, 2);\n let region = attachment.region;\n let image = region.page.texture.getImage();\n let slotColor = slot.color;\n let regionColor = attachment.color;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r,\n skeletonColor.g * slotColor.g * regionColor.g,\n skeletonColor.b * slotColor.b * regionColor.b,\n skeletonColor.a * slotColor.a * regionColor.a\n );\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 let atlasScale = attachment.width / region.originalWidth;\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\n let w = region.width, h = region.height;\n ctx.translate(w / 2, h / 2);\n if (attachment.region.degrees == 90) {\n let 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 ctx.globalAlpha = color.a;\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 }\n drawTriangles(skeleton) {\n let ctx = this.ctx;\n let color = this.tempColor;\n let skeletonColor = skeleton.color;\n let drawOrder = skeleton.drawOrder;\n let blendMode = null;\n let vertices = this.vertices;\n let triangles = null;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let attachment = slot.getAttachment();\n let texture;\n let region;\n if (attachment instanceof RegionAttachment) {\n let regionAttachment = attachment;\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\n region = regionAttachment.region;\n texture = region.page.texture.getImage();\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n vertices = this.computeMeshVertices(slot, mesh, false);\n triangles = mesh.triangles;\n let region2 = mesh.region.renderObject;\n texture = region2.page.texture.getImage();\n } else\n continue;\n if (texture) {\n if (slot.data.blendMode != blendMode)\n blendMode = slot.data.blendMode;\n let slotColor = slot.color;\n let attachmentColor = attachment.color;\n color.set(\n skeletonColor.r * slotColor.r * attachmentColor.r,\n skeletonColor.g * slotColor.g * attachmentColor.g,\n skeletonColor.b * slotColor.b * attachmentColor.b,\n skeletonColor.a * slotColor.a * attachmentColor.a\n );\n ctx.globalAlpha = color.a;\n for (var j = 0; j < triangles.length; j += 3) {\n let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\n let x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\n let x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\n let 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 drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\n let 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 computeRegionVertices(slot, region, pma) {\n let skeletonColor = slot.bone.skeleton.color;\n let slotColor = slot.color;\n let regionColor = region.color;\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\n let multiplier = pma ? alpha : 1;\n let color = this.tempColor;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\n alpha\n );\n region.computeWorldVertices(slot, this.vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\n let vertices = this.vertices;\n let uvs = region.uvs;\n vertices[RegionAttachment.C1R] = color.r;\n vertices[RegionAttachment.C1G] = color.g;\n vertices[RegionAttachment.C1B] = color.b;\n vertices[RegionAttachment.C1A] = color.a;\n vertices[RegionAttachment.U1] = uvs[0];\n vertices[RegionAttachment.V1] = uvs[1];\n vertices[RegionAttachment.C2R] = color.r;\n vertices[RegionAttachment.C2G] = color.g;\n vertices[RegionAttachment.C2B] = color.b;\n vertices[RegionAttachment.C2A] = color.a;\n vertices[RegionAttachment.U2] = uvs[2];\n vertices[RegionAttachment.V2] = uvs[3];\n vertices[RegionAttachment.C3R] = color.r;\n vertices[RegionAttachment.C3G] = color.g;\n vertices[RegionAttachment.C3B] = color.b;\n vertices[RegionAttachment.C3A] = color.a;\n vertices[RegionAttachment.U3] = uvs[4];\n vertices[RegionAttachment.V3] = uvs[5];\n vertices[RegionAttachment.C4R] = color.r;\n vertices[RegionAttachment.C4G] = color.g;\n vertices[RegionAttachment.C4B] = color.b;\n vertices[RegionAttachment.C4A] = color.a;\n vertices[RegionAttachment.U4] = uvs[6];\n vertices[RegionAttachment.V4] = uvs[7];\n return vertices;\n }\n computeMeshVertices(slot, mesh, pma) {\n let skeletonColor = slot.bone.skeleton.color;\n let slotColor = slot.color;\n let regionColor = mesh.color;\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\n let multiplier = pma ? alpha : 1;\n let color = this.tempColor;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\n alpha\n );\n let vertexCount = mesh.worldVerticesLength / 2;\n let vertices = this.vertices;\n if (vertices.length < mesh.worldVerticesLength)\n this.vertices = vertices = Utils.newFloatArray(mesh.worldVerticesLength);\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\n let uvs = mesh.uvs;\n for (let i = 0, u = 0, v = 2; i < vertexCount; 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 };\n var SkeletonRenderer = _SkeletonRenderer;\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\n return __toCommonJS(src_exports);\n})();\n//# sourceMappingURL=spine-canvas.js.map\n\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/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/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:///./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:///./runtimes/spine-canvas.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;;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;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,kBAAkB,mBAAO,CAAC,+CAAa;AACvC,iBAAiB,mBAAO,CAAC,8CAAY;AACrC;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;AC/tCA;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;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;;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAGC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA,sDAAsD,iBAAiB,cAAc;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC7E;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;AACjD;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA,GAAG,oBAAoB;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,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,OAAO;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,6BAA6B,iBAAiB;AAC9C;AACA,aAAa;AACb;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA,WAAW;AACX,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;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,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,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;AACpB;AACA;AACA;AACA;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;AACA;AACA;AACA;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;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;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;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wDAAwD,KAAK,WAAW,OAAO,IAAI,aAAa;AAChG,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA,SAAS;AACT,iDAAiD,yDAAyD;AAC1G,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,yEAAyE,KAAK,eAAe,UAAU;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,KAAK,IAAI,UAAU;AACrF;AACA,OAAO;AACP,+DAA+D,KAAK,WAAW,OAAO,IAAI,aAAa;AACvG,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,8CAA8C,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;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,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc,EAAE;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,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,EAAE;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;;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;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;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,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,qBAAqB,eAAe;AACpC;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;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,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;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;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;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;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;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;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,qBAAqB,2BAA2B;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;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,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,kDAAkD,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO;AACP,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;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;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,EAAE;AACzF;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,kDAAkD,SAAS;AAC3D;AACA,sDAAsD,WAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,qBAAqB;AACrB,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;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,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,6CAA6C,SAAS;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,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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,OAAO;AAClD;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;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;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;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,QAAQ;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;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,8BAA8B,sBAAsB;AACpD;AACA;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,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;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,8CAA8C,OAAO;AACrD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,OAAO;AACjF;AACA;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;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,kDAAkD,aAAa,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA,oDAAoD,wBAAwB,qBAAqB,mBAAmB;AACpH;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB,qBAAqB,mBAAmB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,4BAA4B,mBAAmB;AAC5G;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,4BAA4B,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,uBAAuB,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,uBAAuB,mBAAmB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,sDAAsD,SAAS,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA,+DAA+D,eAAe,YAAY,aAAa;AACvG;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,sEAAsE,eAAe,YAAY,aAAa;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,iEAAiE,eAAe,YAAY,aAAa;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,YAAY,aAAa;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,OAAO;AAChF;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,2CAA2C,OAAO;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,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,sBAAsB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;;AAEA,CAAC","file":"SpineCanvasPluginDebug.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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\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, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = [ content[0] ];\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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 SpineCanvas = require('SpineCanvas');\nvar SpineWebgl = require('SpineWebgl');\nvar Spine = {\n canvas: SpineCanvas,\n webgl: SpineWebgl\n};\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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 this.runtime.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 this.runtime.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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n \n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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 this.runtime.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new this.runtime.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new this.runtime.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 this.runtime.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 var gl = this.gl;\n var i;\n var atlasPage;\n var realTextureKey;\n\n if (this.isWebGL)\n {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n }\n\n for (i = 0; i < atlas.pages.length; i ++)\n {\n atlasPage = atlas.pages[i];\n realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;\n if (this.isWebGL)\n {\n atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));\n }\n else\n {\n atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));\n }\n }\n \n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new this.runtime.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new this.runtime.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 this.runtime.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 this.runtime.AnimationStateData(skeleton.data);\n\n var state = new this.runtime.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 this.runtime.Vector2();\n var size = new this.runtime.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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 {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, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\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, 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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 {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, 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 camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n camera.addToRenderList(src);\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 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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\n\"use strict\";\nvar spine = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // spine-canvas/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n AlphaTimeline: () => AlphaTimeline,\n Animation: () => Animation,\n AnimationState: () => AnimationState,\n AnimationStateAdapter: () => AnimationStateAdapter,\n AnimationStateData: () => AnimationStateData,\n AssetManager: () => AssetManager,\n AssetManagerBase: () => AssetManagerBase,\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\n Attachment: () => Attachment,\n AttachmentTimeline: () => AttachmentTimeline,\n BinaryInput: () => BinaryInput,\n BlendMode: () => BlendMode,\n Bone: () => Bone,\n BoneData: () => BoneData,\n BoundingBoxAttachment: () => BoundingBoxAttachment,\n CURRENT: () => CURRENT,\n CanvasTexture: () => CanvasTexture,\n ClippingAttachment: () => ClippingAttachment,\n Color: () => Color,\n ConstraintData: () => ConstraintData,\n CurveTimeline: () => CurveTimeline,\n CurveTimeline1: () => CurveTimeline1,\n CurveTimeline2: () => CurveTimeline2,\n DebugUtils: () => DebugUtils,\n DeformTimeline: () => DeformTimeline,\n Downloader: () => Downloader,\n DrawOrderTimeline: () => DrawOrderTimeline,\n Event: () => Event,\n EventData: () => EventData,\n EventQueue: () => EventQueue,\n EventTimeline: () => EventTimeline,\n EventType: () => EventType,\n FIRST: () => FIRST,\n FakeTexture: () => FakeTexture,\n HOLD_FIRST: () => HOLD_FIRST,\n HOLD_MIX: () => HOLD_MIX,\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\n IkConstraint: () => IkConstraint,\n IkConstraintData: () => IkConstraintData,\n IkConstraintTimeline: () => IkConstraintTimeline,\n IntSet: () => IntSet,\n Interpolation: () => Interpolation,\n MathUtils: () => MathUtils,\n MeshAttachment: () => MeshAttachment,\n MixBlend: () => MixBlend,\n MixDirection: () => MixDirection,\n PathAttachment: () => PathAttachment,\n PathConstraint: () => PathConstraint,\n PathConstraintData: () => PathConstraintData,\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\n PointAttachment: () => PointAttachment,\n Pool: () => Pool,\n PositionMode: () => PositionMode,\n Pow: () => Pow,\n PowOut: () => PowOut,\n RGB2Timeline: () => RGB2Timeline,\n RGBA2Timeline: () => RGBA2Timeline,\n RGBATimeline: () => RGBATimeline,\n RGBTimeline: () => RGBTimeline,\n RegionAttachment: () => RegionAttachment,\n RotateMode: () => RotateMode,\n RotateTimeline: () => RotateTimeline,\n SETUP: () => SETUP,\n SUBSEQUENT: () => SUBSEQUENT,\n ScaleTimeline: () => ScaleTimeline,\n ScaleXTimeline: () => ScaleXTimeline,\n ScaleYTimeline: () => ScaleYTimeline,\n SequenceTimeline: () => SequenceTimeline,\n ShearTimeline: () => ShearTimeline,\n ShearXTimeline: () => ShearXTimeline,\n ShearYTimeline: () => ShearYTimeline,\n Skeleton: () => Skeleton,\n SkeletonBinary: () => SkeletonBinary,\n SkeletonBounds: () => SkeletonBounds,\n SkeletonClipping: () => SkeletonClipping,\n SkeletonData: () => SkeletonData,\n SkeletonJson: () => SkeletonJson,\n SkeletonRenderer: () => SkeletonRenderer,\n Skin: () => Skin,\n SkinEntry: () => SkinEntry,\n Slot: () => Slot,\n SlotData: () => SlotData,\n SpacingMode: () => SpacingMode,\n StringSet: () => StringSet,\n Texture: () => Texture,\n TextureAtlas: () => TextureAtlas,\n TextureAtlasPage: () => TextureAtlasPage,\n TextureAtlasRegion: () => TextureAtlasRegion,\n TextureFilter: () => TextureFilter,\n TextureRegion: () => TextureRegion,\n TextureWrap: () => TextureWrap,\n TimeKeeper: () => TimeKeeper,\n Timeline: () => Timeline,\n TrackEntry: () => TrackEntry,\n TransformConstraint: () => TransformConstraint,\n TransformConstraintData: () => TransformConstraintData,\n TransformConstraintTimeline: () => TransformConstraintTimeline,\n TransformMode: () => TransformMode,\n TranslateTimeline: () => TranslateTimeline,\n TranslateXTimeline: () => TranslateXTimeline,\n TranslateYTimeline: () => TranslateYTimeline,\n Triangulator: () => Triangulator,\n Utils: () => Utils,\n Vector2: () => Vector2,\n VertexAttachment: () => VertexAttachment,\n WindowedMean: () => WindowedMean\n });\n\n // spine-core/src/Utils.ts\n var IntSet = class {\n constructor() {\n this.array = new Array();\n }\n add(value) {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n contains(value) {\n return this.array[value | 0] != void 0;\n }\n remove(value) {\n this.array[value | 0] = void 0;\n }\n clear() {\n this.array.length = 0;\n }\n };\n var StringSet = class {\n constructor() {\n this.entries = {};\n this.size = 0;\n }\n add(value) {\n let contains = this.entries[value];\n this.entries[value] = true;\n if (!contains) {\n this.size++;\n return true;\n }\n return false;\n }\n addAll(values) {\n let oldSize = this.size;\n for (var i = 0, n = values.length; i < n; i++)\n this.add(values[i]);\n return oldSize != this.size;\n }\n contains(value) {\n return this.entries[value];\n }\n clear() {\n this.entries = {};\n this.size = 0;\n }\n };\n var _Color = class {\n constructor(r = 0, g = 0, b = 0, a = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n set(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this.clamp();\n }\n setFromColor(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 setFromString(hex) {\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n return this;\n }\n add(r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n return this.clamp();\n }\n clamp() {\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 static rgba8888ToColor(color, value) {\n color.r = ((value & 4278190080) >>> 24) / 255;\n color.g = ((value & 16711680) >>> 16) / 255;\n color.b = ((value & 65280) >>> 8) / 255;\n color.a = (value & 255) / 255;\n }\n static rgb888ToColor(color, value) {\n color.r = ((value & 16711680) >>> 16) / 255;\n color.g = ((value & 65280) >>> 8) / 255;\n color.b = (value & 255) / 255;\n }\n static fromString(hex) {\n return new _Color().setFromString(hex);\n }\n };\n var Color = _Color;\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 var _MathUtils = class {\n static clamp(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n }\n static cosDeg(degrees) {\n return Math.cos(degrees * _MathUtils.degRad);\n }\n static sinDeg(degrees) {\n return Math.sin(degrees * _MathUtils.degRad);\n }\n static signum(value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n static toInt(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n static cbrt(x) {\n let y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n }\n static randomTriangular(min, max) {\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n static randomTriangularWith(min, max, mode) {\n let u = Math.random();\n let 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 static isPowerOfTwo(value) {\n return value && (value & value - 1) === 0;\n }\n };\n var MathUtils = _MathUtils;\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 var Interpolation = class {\n apply(start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n }\n };\n var Pow = class extends Interpolation {\n constructor(power) {\n super();\n this.power = 2;\n this.power = power;\n }\n applyInternal(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 };\n var PowOut = class extends Pow {\n constructor(power) {\n super(power);\n }\n applyInternal(a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n };\n var _Utils = class {\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n static arrayFill(array, fromIndex, toIndex, value) {\n for (let i = fromIndex; i < toIndex; i++)\n array[i] = value;\n }\n static setArraySize(array, size, value = 0) {\n let oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n }\n static ensureArrayCapacity(array, size, value = 0) {\n if (array.length >= size)\n return array;\n return _Utils.setArraySize(array, size, value);\n }\n static newArray(size, defaultValue) {\n let array = new Array(size);\n for (let i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n }\n static newFloatArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Float32Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static newShortArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Int16Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static toFloatArray(array) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n static toSinglePrecision(value) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n static webkit602BugfixHelper(alpha, blend) {\n }\n static contains(array, element, identity = true) {\n for (var i = 0; i < array.length; i++)\n if (array[i] == element)\n return true;\n return false;\n }\n static enumValue(type, name) {\n return type[name[0].toUpperCase() + name.slice(1)];\n }\n };\n var Utils = _Utils;\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\n var DebugUtils = class {\n static logBones(skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let 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 };\n var Pool = class {\n constructor(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n obtain() {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n free(item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n }\n freeAll(items) {\n for (let i = 0; i < items.length; i++)\n this.free(items[i]);\n }\n clear() {\n this.items.length = 0;\n }\n };\n var Vector2 = class {\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n length() {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n normalize() {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n };\n var TimeKeeper = class {\n constructor() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1e3;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n update() {\n let now = Date.now() / 1e3;\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 };\n var WindowedMean = class {\n constructor(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 hasEnoughData() {\n return this.addedValues >= this.values.length;\n }\n addValue(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 getMean() {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++)\n mean += this.values[i];\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n return 0;\n }\n };\n\n // spine-core/src/attachments/Attachment.ts\n var Attachment = class {\n constructor(name) {\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n };\n var _VertexAttachment = class extends Attachment {\n constructor(name) {\n super(name);\n this.id = _VertexAttachment.nextID++;\n this.bones = null;\n this.vertices = [];\n this.worldVerticesLength = 0;\n this.timelineAttachment = this;\n }\n computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (!bones) {\n if (deformArray.length > 0)\n vertices = deformArray;\n let bone = slot.bone;\n let x = bone.worldX;\n let y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\n let vx = vertices[v2], vy = vertices[v2 + 1];\n worldVertices2[w] = vx * a + vy * b + x;\n worldVertices2[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let 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 worldVertices2[w] = wx;\n worldVertices2[w + 1] = wy;\n }\n } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let 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 worldVertices2[w] = wx;\n worldVertices2[w + 1] = wy;\n }\n }\n }\n copyTo(attachment) {\n if (this.bones) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n if (this.vertices) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.timelineAttachment = this.timelineAttachment;\n }\n };\n var VertexAttachment = _VertexAttachment;\n VertexAttachment.nextID = 0;\n\n // spine-core/src/attachments/Sequence.ts\n var _Sequence = class {\n constructor(count) {\n this.id = _Sequence.nextID();\n this.start = 0;\n this.digits = 0;\n this.setupIndex = 0;\n this.regions = new Array(count);\n }\n copy() {\n let copy = new _Sequence(this.regions.length);\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\n copy.start = this.start;\n copy.digits = this.digits;\n copy.setupIndex = this.setupIndex;\n return copy;\n }\n apply(slot, attachment) {\n let index = slot.sequenceIndex;\n if (index == -1)\n index = this.setupIndex;\n if (index >= this.regions.length)\n index = this.regions.length - 1;\n let region = this.regions[index];\n if (attachment.region != region) {\n attachment.region = region;\n attachment.updateRegion();\n }\n }\n getPath(basePath, index) {\n let result = basePath;\n let frame = (this.start + index).toString();\n for (let i = this.digits - frame.length; i > 0; i--)\n result += \"0\";\n result += frame;\n return result;\n }\n static nextID() {\n return _Sequence._nextID++;\n }\n };\n var Sequence = _Sequence;\n Sequence._nextID = 0;\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\n return SequenceMode2;\n })(SequenceMode || {});\n var SequenceModeValues = [\n 0 /* hold */,\n 1 /* once */,\n 2 /* loop */,\n 3 /* pingpong */,\n 4 /* onceReverse */,\n 5 /* loopReverse */,\n 6 /* pingpongReverse */\n ];\n\n // spine-core/src/Animation.ts\n var Animation = class {\n constructor(name, timelines, duration) {\n this.timelines = [];\n this.timelineIds = new StringSet();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n this.setTimelines(timelines);\n this.duration = duration;\n }\n setTimelines(timelines) {\n if (!timelines)\n throw new Error(\"timelines cannot be null.\");\n this.timelines = timelines;\n this.timelineIds.clear();\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds.addAll(timelines[i].getPropertyIds());\n }\n hasTimeline(ids) {\n for (let i = 0; i < ids.length; i++)\n if (this.timelineIds.contains(ids[i]))\n return true;\n return false;\n }\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (!skeleton)\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 let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n };\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\n return MixBlend2;\n })(MixBlend || {});\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\n return MixDirection2;\n })(MixDirection || {});\n var Property = {\n rotate: 0,\n x: 1,\n y: 2,\n scaleX: 3,\n scaleY: 4,\n shearX: 5,\n shearY: 6,\n rgb: 7,\n alpha: 8,\n rgb2: 9,\n attachment: 10,\n deform: 11,\n event: 12,\n drawOrder: 13,\n ikConstraint: 14,\n transformConstraint: 15,\n pathConstraintPosition: 16,\n pathConstraintSpacing: 17,\n pathConstraintMix: 18,\n sequence: 19\n };\n var Timeline = class {\n constructor(frameCount, propertyIds) {\n this.propertyIds = propertyIds;\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\n }\n getPropertyIds() {\n return this.propertyIds;\n }\n getFrameEntries() {\n return 1;\n }\n getFrameCount() {\n return this.frames.length / this.getFrameEntries();\n }\n getDuration() {\n return this.frames[this.frames.length - this.getFrameEntries()];\n }\n static search1(frames, time) {\n let n = frames.length;\n for (let i = 1; i < n; i++)\n if (frames[i] > time)\n return i - 1;\n return n - 1;\n }\n static search(frames, time, step) {\n let n = frames.length;\n for (let i = step; i < n; i += step)\n if (frames[i] > time)\n return i - step;\n return n - step;\n }\n };\n var CurveTimeline = class extends Timeline {\n constructor(frameCount, bezierCount, propertyIds) {\n super(frameCount, propertyIds);\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\n this.curves[frameCount - 1] = 1;\n }\n setLinear(frame) {\n this.curves[frame] = 0;\n }\n setStepped(frame) {\n this.curves[frame] = 1;\n }\n shrink(bezierCount) {\n let size = this.getFrameCount() + bezierCount * 18;\n if (this.curves.length > size) {\n let newCurves = Utils.newFloatArray(size);\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\n this.curves = newCurves;\n }\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = value1 + dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getBezierValue(time, frameIndex, valueOffset, i) {\n let curves = this.curves;\n if (curves[i] > time) {\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n frameIndex += this.getFrameEntries();\n let x = curves[n - 2], y = curves[n - 1];\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\n }\n };\n var CurveTimeline1 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId) {\n super(frameCount, bezierCount, [propertyId]);\n }\n getFrameEntries() {\n return 2;\n }\n setFrame(frame, time, value) {\n frame <<= 1;\n this.frames[frame] = time;\n this.frames[frame + 1] = value;\n }\n getCurveValue(time) {\n let frames = this.frames;\n let i = frames.length - 2;\n for (let ii = 2; ii <= i; ii += 2) {\n if (frames[ii] > time) {\n i = ii - 2;\n break;\n }\n }\n let curveType = this.curves[i >> 1];\n switch (curveType) {\n case 0:\n let before = frames[i], value = frames[i + 1];\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\n case 1:\n return frames[i + 1];\n }\n return this.getBezierValue(time, i, 1, curveType - 2);\n }\n };\n var CurveTimeline2 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\n }\n getFrameEntries() {\n return 3;\n }\n setFrame(frame, time, value1, value2) {\n frame *= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = value1;\n this.frames[frame + 2] = value2;\n }\n };\n var RotateTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n return;\n case 1 /* first */:\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\n }\n return;\n }\n let r = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n r += bone.data.rotation - bone.rotation;\n case 3 /* add */:\n bone.rotation += r * alpha;\n }\n }\n };\n var TranslateTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.x + \"|\" + boneIndex,\n Property.y + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n };\n var TranslateXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n break;\n case 3 /* add */:\n bone.x += x * alpha;\n }\n }\n };\n var TranslateYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case 3 /* add */:\n bone.y += y * alpha;\n }\n }\n };\n var ScaleTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.scaleX + \"|\" + boneIndex,\n Property.scaleY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let x, y;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n x *= bone.data.scaleX;\n y *= bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ScaleXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time) * bone.data.scaleX;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleX += x - bone.data.scaleX;\n else\n bone.scaleX = x;\n } else {\n let bx = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n }\n }\n }\n };\n var ScaleYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time) * bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleY += y - bone.data.scaleY;\n else\n bone.scaleY = y;\n } else {\n let by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n by = bone.data.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = bone.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ShearTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.shearX + \"|\" + boneIndex,\n Property.shearY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n };\n var ShearXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n break;\n case 3 /* add */:\n bone.shearX += x * alpha;\n }\n }\n };\n var ShearYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case 3 /* add */:\n bone.shearY += y * alpha;\n }\n }\n };\n var RGBATimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 5;\n }\n setFrame(frame, time, r, g, b, a) {\n frame *= 5;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.setFromColor(setup);\n return;\n case 1 /* first */:\n color.add(\n (setup.r - color.r) * alpha,\n (setup.g - color.g) * alpha,\n (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha\n );\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0;\n let i = Timeline.search(frames, time, 5);\n let curveType = this.curves[i / 5];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n let t = (time - before) / (frames[i + 5] - before);\n r += (frames[i + 5 + 1] - r) * t;\n g += (frames[i + 5 + 2] - g) * t;\n b += (frames[i + 5 + 3] - b) * t;\n a += (frames[i + 5 + 4] - a) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n }\n if (alpha == 1)\n color.set(r, g, b, a);\n else {\n if (blend == 0 /* 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 };\n var RGBTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, r, g, b) {\n frame <<= 2;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n return;\n case 1 /* first */:\n color.r += (setup.r - color.r) * alpha;\n color.g += (setup.g - color.g) * alpha;\n color.b += (setup.b - color.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n r += (frames[i + 4 + 1] - r) * t;\n g += (frames[i + 4 + 2] - g) * t;\n b += (frames[i + 4 + 3] - b) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (alpha == 1) {\n color.r = r;\n color.g = g;\n color.b = b;\n } else {\n if (blend == 0 /* setup */) {\n let setup = slot.data.color;\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n }\n color.r += (r - color.r) * alpha;\n color.g += (g - color.g) * alpha;\n color.b += (b - color.b) * alpha;\n }\n }\n };\n var AlphaTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let color = slot.color;\n if (time < this.frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.a = setup.a;\n return;\n case 1 /* first */:\n color.a += (setup.a - color.a) * alpha;\n }\n return;\n }\n let a = this.getCurveValue(time);\n if (alpha == 1)\n color.a = a;\n else {\n if (blend == 0 /* setup */)\n color.a = slot.data.color.a;\n color.a += (a - color.a) * alpha;\n }\n }\n };\n var RGBA2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 8;\n }\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\n frame <<= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n this.frames[frame + 5] = r2;\n this.frames[frame + 6] = g2;\n this.frames[frame + 7] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.setFromColor(setupLight);\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.add(\n (setupLight.r - light.r) * alpha,\n (setupLight.g - light.g) * alpha,\n (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha\n );\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 8);\n let curveType = this.curves[i >> 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n let t = (time - before) / (frames[i + 8] - before);\n r += (frames[i + 8 + 1] - r) * t;\n g += (frames[i + 8 + 2] - g) * t;\n b += (frames[i + 8 + 3] - b) * t;\n a += (frames[i + 8 + 4] - a) * t;\n r2 += (frames[i + 8 + 5] - r2) * t;\n g2 += (frames[i + 8 + 6] - g2) * t;\n b2 += (frames[i + 8 + 7] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\n }\n if (alpha == 1) {\n light.set(r, g, b, a);\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n light.setFromColor(slot.data.color);\n let setupDark = slot.data.darkColor;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var RGB2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, r, g, b, r2, g2, b2) {\n frame *= 7;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = r2;\n this.frames[frame + 5] = g2;\n this.frames[frame + 6] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.r += (setupLight.r - light.r) * alpha;\n light.g += (setupLight.g - light.g) * alpha;\n light.b += (setupLight.b - light.b) * alpha;\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n r += (frames[i + 7 + 1] - r) * t;\n g += (frames[i + 7 + 2] - g) * t;\n b += (frames[i + 7 + 3] - b) * t;\n r2 += (frames[i + 7 + 4] - r2) * t;\n g2 += (frames[i + 7 + 5] - g2) * t;\n b2 += (frames[i + 7 + 6] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (alpha == 1) {\n light.r = r;\n light.g = g;\n light.b = b;\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.r += (r - light.r) * alpha;\n light.g += (g - light.g) * alpha;\n light.b += (b - light.b) * alpha;\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var AttachmentTimeline = class extends Timeline {\n constructor(frameCount, slotIndex) {\n super(frameCount, [\n Property.attachment + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachmentNames = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, attachmentName) {\n this.frames[frame] = time;\n this.attachmentNames[frame] = attachmentName;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\n }\n setAttachment(skeleton, slot, attachmentName) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n };\n var DeformTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex, attachment) {\n super(frameCount, bezierCount, [\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n this.vertices = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, vertices) {\n this.frames[frame] = time;\n this.vertices[frame] = vertices;\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getCurvePercent(time, frame) {\n let curves = this.curves;\n let i = curves[frame];\n switch (i) {\n case 0:\n let x2 = this.frames[frame];\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\n case 1:\n return 0;\n }\n i -= 2;\n if (curves[i] > time) {\n let x2 = this.frames[frame];\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n let x = curves[n - 2], y = curves[n - 1];\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.getAttachment();\n if (!slotAttachment)\n return;\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\n return;\n let deform = slot.deform;\n if (deform.length == 0)\n blend = 0 /* setup */;\n let vertices = this.vertices;\n let vertexCount = vertices[0].length;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n deform.length = 0;\n return;\n case 1 /* first */:\n if (alpha == 1) {\n deform.length = 0;\n return;\n }\n deform.length = vertexCount;\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n deform.length = vertexCount;\n if (time >= frames[frames.length - 1]) {\n let lastVertices = vertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] - setupVertices[i2];\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2];\n }\n } else\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let setup = setupVertices[i2];\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] = lastVertices[i2] * alpha;\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] * alpha;\n }\n }\n }\n return;\n }\n let frame = Timeline.search1(frames, time);\n let percent = this.getCurvePercent(time, frame);\n let prevVertices = vertices[frame];\n let nextVertices = vertices[frame + 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2], setup = setupVertices[i2];\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\n }\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n };\n var _EventTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _EventTimeline.propertyIds);\n this.events = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, event) {\n this.frames[frame] = event.time;\n this.events[frame] = event;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (!firedEvents)\n return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n let i = 0;\n if (lastTime < frames[0])\n i = 0;\n else {\n i = Timeline.search1(frames, lastTime) + 1;\n let frameTime = frames[i];\n while (i > 0) {\n if (frames[i - 1] != frameTime)\n break;\n i--;\n }\n }\n for (; i < frameCount && time >= frames[i]; i++)\n firedEvents.push(this.events[i]);\n }\n };\n var EventTimeline = _EventTimeline;\n EventTimeline.propertyIds = [\"\" + Property.event];\n var _DrawOrderTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _DrawOrderTimeline.propertyIds);\n this.drawOrders = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, drawOrder) {\n this.frames[frame] = time;\n this.drawOrders[frame] = drawOrder;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n let idx = Timeline.search1(this.frames, time);\n let drawOrderToSetupIndex = this.drawOrders[idx];\n if (!drawOrderToSetupIndex)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n else {\n let drawOrder = skeleton.drawOrder;\n let slots = skeleton.slots;\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n };\n var DrawOrderTimeline = _DrawOrderTimeline;\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\n var IkConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, ikConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.ikConstraint + \"|\" + ikConstraintIndex\n ]);\n this.ikConstraintIndex = 0;\n this.ikConstraintIndex = ikConstraintIndex;\n }\n getFrameEntries() {\n return 6;\n }\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\n frame *= 6;\n this.frames[frame] = time;\n this.frames[frame + 1] = mix;\n this.frames[frame + 2] = softness;\n this.frames[frame + 3] = bendDirection;\n this.frames[frame + 4] = compress ? 1 : 0;\n this.frames[frame + 5] = stretch ? 1 : 0;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* 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 1 /* 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 let mix = 0, softness = 0;\n let i = Timeline.search(frames, time, 6);\n let curveType = this.curves[i / 6];\n switch (curveType) {\n case 0:\n let before = frames[i];\n mix = frames[i + 1];\n softness = frames[i + 2];\n let t = (time - before) / (frames[i + 6] - before);\n mix += (frames[i + 6 + 1] - mix) * t;\n softness += (frames[i + 6 + 2] - softness) * t;\n break;\n case 1:\n mix = frames[i + 1];\n softness = frames[i + 2];\n break;\n default:\n mix = this.getBezierValue(time, i, 1, curveType - 2);\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n if (blend == 0 /* setup */) {\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\n if (direction == 1 /* mixOut */) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n } else {\n constraint.mix += (mix - constraint.mix) * alpha;\n constraint.softness += (softness - constraint.softness) * alpha;\n if (direction == 0 /* mixIn */) {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n }\n }\n };\n var TransformConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, transformConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.transformConstraint + \"|\" + transformConstraintIndex\n ]);\n this.transformConstraintIndex = 0;\n this.transformConstraintIndex = transformConstraintIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\n let frames = this.frames;\n frame *= 7;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n frames[frame + 4] = mixScaleX;\n frames[frame + 5] = mixScaleY;\n frames[frame + 6] = mixShearY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\n }\n return;\n }\n let rotate, x, y, scaleX, scaleY, shearY;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n rotate += (frames[i + 7 + 1] - rotate) * t;\n x += (frames[i + 7 + 2] - x) * t;\n y += (frames[i + 7 + 3] - y) * t;\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\n shearY += (frames[i + 7 + 6] - shearY) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\n }\n }\n };\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.position = constraint.data.position;\n return;\n case 1 /* first */:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n let position = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n };\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.spacing = constraint.data.spacing;\n return;\n case 1 /* first */:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n let spacing = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n };\n var PathConstraintMixTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\n ]);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, mixRotate, mixX, mixY) {\n let frames = this.frames;\n frame <<= 2;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = constraint.data.mixRotate;\n constraint.mixX = constraint.data.mixX;\n constraint.mixY = constraint.data.mixY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\n }\n return;\n }\n let rotate, x, y;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n rotate += (frames[i + 4 + 1] - rotate) * t;\n x += (frames[i + 4 + 2] - x) * t;\n y += (frames[i + 4 + 3] - y) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n }\n }\n };\n var _SequenceTimeline = class extends Timeline {\n constructor(frameCount, slotIndex, attachment) {\n super(frameCount, [\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\n ]);\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n }\n getFrameEntries() {\n return _SequenceTimeline.ENTRIES;\n }\n getSlotIndex() {\n return this.slotIndex;\n }\n getAttachment() {\n return this.attachment;\n }\n setFrame(frame, time, mode, index, delay) {\n let frames = this.frames;\n frame *= _SequenceTimeline.ENTRIES;\n frames[frame] = time;\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\n frames[frame + _SequenceTimeline.DELAY] = delay;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.attachment;\n let attachment = this.attachment;\n if (slotAttachment != attachment) {\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\n return;\n }\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n slot.sequenceIndex = -1;\n return;\n }\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\n let before = frames[i];\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\n let delay = frames[i + _SequenceTimeline.DELAY];\n if (!this.attachment.sequence)\n return;\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\n let mode = SequenceModeValues[modeAndIndex & 15];\n if (mode != 0 /* hold */) {\n index += (time - before) / delay + 1e-5 | 0;\n switch (mode) {\n case 1 /* once */:\n index = Math.min(count - 1, index);\n break;\n case 2 /* loop */:\n index %= count;\n break;\n case 3 /* pingpong */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : index % n;\n if (index >= count)\n index = n - index;\n break;\n }\n case 4 /* onceReverse */:\n index = Math.max(count - 1 - index, 0);\n break;\n case 5 /* loopReverse */:\n index = count - 1 - index % count;\n break;\n case 6 /* pingpongReverse */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : (index + count - 1) % n;\n if (index >= count)\n index = n - index;\n }\n }\n }\n slot.sequenceIndex = index;\n }\n };\n var SequenceTimeline = _SequenceTimeline;\n SequenceTimeline.ENTRIES = 3;\n SequenceTimeline.MODE = 1;\n SequenceTimeline.DELAY = 2;\n\n // spine-core/src/AnimationState.ts\n var _AnimationState = class {\n constructor(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 StringSet();\n this.animationsChanged = false;\n this.trackEntryPool = new Pool(() => new TrackEntry());\n this.data = data;\n }\n static emptyAnimation() {\n return _AnimationState._emptyAnimation;\n }\n update(delta) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (!current)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n let 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 let next = current.next;\n if (next) {\n let 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) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\n tracks[i] = null;\n this.queue.end(current);\n this.clearNext(current);\n continue;\n }\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from)\n from.mixingTo = null;\n while (from) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n }\n updateMixingFrom(to, delta) {\n let from = to.mixingFrom;\n if (!from)\n return true;\n let 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)\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 apply(skeleton) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\n let current = tracks[i2];\n if (!current || current.delay > 0)\n continue;\n applied = true;\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\n let mix = current.alpha;\n if (current.mixingFrom)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && !current.next)\n mix = 0;\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\n let applyEvents = events;\n if (current.reverse) {\n applyTime = current.animation.duration - applyTime;\n applyEvents = null;\n }\n let timelines = current.animation.timelines;\n let timelineCount = timelines.length;\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\n for (let ii = 0; ii < timelineCount; ii++) {\n Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\n }\n } else {\n let timelineMode = current.timelineMode;\n let shortestRotation = current.shortestRotation;\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n current.timelinesRotation.length = timelineCount << 1;\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline2 = timelines[ii];\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\n } else if (timeline2 instanceof AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\n } else {\n Utils.webkit602BugfixHelper(mix, blend);\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* 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 + 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.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n }\n applyMixingFrom(to, skeleton, blend) {\n let from = to.mixingFrom;\n if (from.mixingFrom)\n this.applyMixingFrom(from, skeleton, blend);\n let mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == 1 /* first */)\n blend = 0 /* setup */;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != 1 /* first */)\n blend = from.mixBlend;\n }\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let timelines = from.animation.timelines;\n let timelineCount = timelines.length;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\n let events = null;\n if (from.reverse)\n applyTime = from.animation.duration - applyTime;\n else if (mix < from.eventThreshold)\n events = this.events;\n if (blend == 3 /* add */) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n let shortestRotation = from.shortestRotation;\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n from.timelinesRotation.length = timelineCount << 1;\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = 1 /* mixOut */;\n let timelineBlend;\n let alpha = 0;\n switch (timelineMode[i]) {\n case SUBSEQUENT:\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaMix;\n break;\n case HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case HOLD_FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = 0 /* setup */;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (!shortestRotation && timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\n else {\n Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\n direction = 0 /* mixIn */;\n timeline.apply(skeleton, animationLast, applyTime, 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 applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n if (time < timeline.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n } else\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + SETUP;\n }\n setAttachment(skeleton, slot, attachmentName, attachments) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n if (attachments)\n slot.attachmentState = this.unkeyedState + CURRENT;\n }\n applyRotateTimeline(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, 0 /* mixIn */);\n return;\n }\n let bone = skeleton.bones[timeline.boneIndex];\n if (!bone.active)\n return;\n let frames = timeline.frames;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case 1 /* first */:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\n r2 = bone.data.rotation + timeline.getCurveValue(time);\n }\n let total = 0, diff = r2 - r1;\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n let current = diff > 0, dir = lastTotal >= 0;\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n bone.rotation = r1 + total * alpha;\n }\n queueEvents(entry, animationTime) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped)\n break;\n if (event.time > animationEnd)\n continue;\n this.queue.event(entry, event);\n }\n let 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 let event = events[i];\n if (event.time < animationStart)\n continue;\n this.queue.event(entry, event);\n }\n }\n clearTracks() {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let 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 clearTrack(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n let current = this.tracks[trackIndex];\n if (!current)\n return;\n this.queue.end(current);\n this.clearNext(current);\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (!from)\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 setCurrent(index, current, interrupt) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n current.previous = null;\n if (from) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom && 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 setAnimation(trackIndex, animationName, loop = false) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n setAnimationWith(trackIndex, animation, loop = false) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.clearNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.clearNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let last = this.expandToIndex(trackIndex);\n if (last) {\n while (last.next)\n last = last.next;\n }\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n if (!last) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n entry.previous = last;\n if (delay <= 0)\n delay += last.getTrackComplete() - entry.mixDuration;\n }\n entry.delay = delay;\n return entry;\n }\n setEmptyAnimation(trackIndex, mixDuration = 0) {\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\n if (delay <= 0)\n entry.delay += entry.mixDuration - mixDuration;\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n setEmptyAnimations(mixDuration = 0) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n expandToIndex(index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n trackEntry(trackIndex, animation, loop, last) {\n let entry = this.trackEntryPool.obtain();\n entry.reset();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.reverse = false;\n entry.shortestRotation = 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.mixTime = 0;\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\n entry.interruptAlpha = 1;\n entry.totalAlpha = 0;\n entry.mixBlend = 2 /* replace */;\n return entry;\n }\n clearNext(entry) {\n let next = entry.next;\n while (next) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n _animationsChanged() {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let entry = tracks[i];\n if (!entry)\n continue;\n while (entry.mixingFrom)\n entry = entry.mixingFrom;\n do {\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry);\n }\n }\n computeHold(entry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n timelineMode.length = timelinesCount;\n let timelineHoldMix = entry.timelineHoldMix;\n timelineHoldMix.length = 0;\n let propertyIDs = this.propertyIDs;\n if (to && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++)\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\n return;\n }\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let ids = timeline.getPropertyIds();\n if (!propertyIDs.addAll(ids))\n timelineMode[i] = SUBSEQUENT;\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\n timelineMode[i] = FIRST;\n } else {\n for (let next = to.mixingTo; next; next = next.mixingTo) {\n if (next.animation.hasTimeline(ids))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = HOLD_MIX;\n timelineHoldMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = HOLD_FIRST;\n }\n }\n }\n getCurrent(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n }\n addListener(listener) {\n if (!listener)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n }\n clearListeners() {\n this.listeners.length = 0;\n }\n clearListenerNotifications() {\n this.queue.clear();\n }\n };\n var AnimationState = _AnimationState;\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\n var TrackEntry = class {\n constructor() {\n this.animation = null;\n this.previous = null;\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.listener = null;\n this.trackIndex = 0;\n this.loop = false;\n this.holdPrevious = false;\n this.reverse = false;\n this.shortestRotation = false;\n this.eventThreshold = 0;\n this.attachmentThreshold = 0;\n this.drawOrderThreshold = 0;\n this.animationStart = 0;\n this.animationEnd = 0;\n this.animationLast = 0;\n this.nextAnimationLast = 0;\n this.delay = 0;\n this.trackTime = 0;\n this.trackLast = 0;\n this.nextTrackLast = 0;\n this.trackEnd = 0;\n this.timeScale = 0;\n this.alpha = 0;\n this.mixTime = 0;\n this.mixDuration = 0;\n this.interruptAlpha = 0;\n this.totalAlpha = 0;\n this.mixBlend = 2 /* replace */;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n reset() {\n this.next = null;\n this.previous = 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 getAnimationTime() {\n if (this.loop) {\n let 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 setAnimationLast(animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n isComplete() {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n resetRotationDirections() {\n this.timelinesRotation.length = 0;\n }\n getTrackComplete() {\n let duration = this.animationEnd - this.animationStart;\n if (duration != 0) {\n if (this.loop)\n return duration * (1 + (this.trackTime / duration | 0));\n if (this.trackTime < duration)\n return duration;\n }\n return this.trackTime;\n }\n };\n var EventQueue = class {\n constructor(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n start(entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n interrupt(entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n end(entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n dispose(entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n complete(entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n event(entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n drain() {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n let objects = this.objects;\n let listeners = this.animState.listeners;\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i];\n let entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener && entry.listener.start)\n entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.start)\n listener.start(entry);\n }\n break;\n case EventType.interrupt:\n if (entry.listener && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.interrupt)\n listener.interrupt(entry);\n }\n break;\n case EventType.end:\n if (entry.listener && entry.listener.end)\n entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.end)\n listener.end(entry);\n }\n case EventType.dispose:\n if (entry.listener && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.dispose)\n listener.dispose(entry);\n }\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener && entry.listener.complete)\n entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.complete)\n listener.complete(entry);\n }\n break;\n case EventType.event:\n let event = objects[i++ + 2];\n if (entry.listener && entry.listener.event)\n entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.event)\n listener.event(entry, event);\n }\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n }\n clear() {\n this.objects.length = 0;\n }\n };\n var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"start\"] = 0] = \"start\";\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\n EventType2[EventType2[\"end\"] = 2] = \"end\";\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\n EventType2[EventType2[\"event\"] = 5] = \"event\";\n return EventType2;\n })(EventType || {});\n var AnimationStateAdapter = class {\n start(entry) {\n }\n interrupt(entry) {\n }\n end(entry) {\n }\n dispose(entry) {\n }\n complete(entry) {\n }\n event(entry, event) {\n }\n };\n var SUBSEQUENT = 0;\n var FIRST = 1;\n var HOLD_SUBSEQUENT = 2;\n var HOLD_FIRST = 3;\n var HOLD_MIX = 4;\n var SETUP = 1;\n var CURRENT = 2;\n\n // spine-core/src/AnimationStateData.ts\n var AnimationStateData = class {\n constructor(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (!skeletonData)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n setMix(fromName, toName, duration) {\n let from = this.skeletonData.findAnimation(fromName);\n if (!from)\n throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (!to)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n setMixWith(from, to, duration) {\n if (!from)\n throw new Error(\"from cannot be null.\");\n if (!to)\n throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n getMix(from, to) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === void 0 ? this.defaultMix : value;\n }\n };\n\n // spine-core/src/attachments/BoundingBoxAttachment.ts\n var BoundingBoxAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/attachments/ClippingAttachment.ts\n var ClippingAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.endSlot = null;\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\n }\n copy() {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/Texture.ts\n var Texture = class {\n constructor(image) {\n this._image = image;\n }\n getImage() {\n return this._image;\n }\n };\n var TextureFilter = /* @__PURE__ */ ((TextureFilter3) => {\n TextureFilter3[TextureFilter3[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter3[TextureFilter3[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter3[TextureFilter3[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter3[TextureFilter3[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter3[TextureFilter3[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter3[TextureFilter3[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter3[TextureFilter3[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n return TextureFilter3;\n })(TextureFilter || {});\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\n return TextureWrap3;\n })(TextureWrap || {});\n var TextureRegion = class {\n constructor() {\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.degrees = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n };\n var FakeTexture = class extends Texture {\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-core/src/TextureAtlas.ts\n var TextureAtlas = class {\n constructor(atlasText) {\n this.pages = new Array();\n this.regions = new Array();\n let reader = new TextureAtlasReader(atlasText);\n let entry = new Array(4);\n let pageFields = {};\n pageFields[\"size\"] = (page2) => {\n page2.width = parseInt(entry[1]);\n page2.height = parseInt(entry[2]);\n };\n pageFields[\"format\"] = () => {\n };\n pageFields[\"filter\"] = (page2) => {\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\n };\n pageFields[\"repeat\"] = (page2) => {\n if (entry[1].indexOf(\"x\") != -1)\n page2.uWrap = 10497 /* Repeat */;\n if (entry[1].indexOf(\"y\") != -1)\n page2.vWrap = 10497 /* Repeat */;\n };\n pageFields[\"pma\"] = (page2) => {\n page2.pma = entry[1] == \"true\";\n };\n var regionFields = {};\n regionFields[\"xy\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n };\n regionFields[\"size\"] = (region) => {\n region.width = parseInt(entry[1]);\n region.height = parseInt(entry[2]);\n };\n regionFields[\"bounds\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n region.width = parseInt(entry[3]);\n region.height = parseInt(entry[4]);\n };\n regionFields[\"offset\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n };\n regionFields[\"orig\"] = (region) => {\n region.originalWidth = parseInt(entry[1]);\n region.originalHeight = parseInt(entry[2]);\n };\n regionFields[\"offsets\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n region.originalWidth = parseInt(entry[3]);\n region.originalHeight = parseInt(entry[4]);\n };\n regionFields[\"rotate\"] = (region) => {\n let value = entry[1];\n if (value == \"true\")\n region.degrees = 90;\n else if (value != \"false\")\n region.degrees = parseInt(value);\n };\n regionFields[\"index\"] = (region) => {\n region.index = parseInt(entry[1]);\n };\n let line = reader.readLine();\n while (line && line.trim().length == 0)\n line = reader.readLine();\n while (true) {\n if (!line || line.trim().length == 0)\n break;\n if (reader.readEntry(entry, line) == 0)\n break;\n line = reader.readLine();\n }\n let page = null;\n let names = null;\n let values = null;\n while (true) {\n if (line === null)\n break;\n if (line.trim().length == 0) {\n page = null;\n line = reader.readLine();\n } else if (!page) {\n page = new TextureAtlasPage(line.trim());\n while (true) {\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\n break;\n let field = pageFields[entry[0]];\n if (field)\n field(page);\n }\n this.pages.push(page);\n } else {\n let region = new TextureAtlasRegion(page, line);\n while (true) {\n let count = reader.readEntry(entry, line = reader.readLine());\n if (count == 0)\n break;\n let field = regionFields[entry[0]];\n if (field)\n field(region);\n else {\n if (!names)\n names = [];\n if (!values)\n values = [];\n names.push(entry[0]);\n let entryValues = [];\n for (let i = 0; i < count; i++)\n entryValues.push(parseInt(entry[i + 1]));\n values.push(entryValues);\n }\n }\n if (region.originalWidth == 0 && region.originalHeight == 0) {\n region.originalWidth = region.width;\n region.originalHeight = region.height;\n }\n if (names && names.length > 0 && values && values.length > 0) {\n region.names = names;\n region.values = values;\n names = null;\n values = null;\n }\n region.u = region.x / page.width;\n region.v = region.y / page.height;\n if (region.degrees == 90) {\n region.u2 = (region.x + region.height) / page.width;\n region.v2 = (region.y + region.width) / page.height;\n } else {\n region.u2 = (region.x + region.width) / page.width;\n region.v2 = (region.y + region.height) / page.height;\n }\n this.regions.push(region);\n }\n }\n }\n findRegion(name) {\n for (let 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 setTextures(assetManager, pathPrefix = \"\") {\n for (let page of this.pages)\n page.setTexture(assetManager.get(pathPrefix + page.name));\n }\n dispose() {\n var _a;\n for (let i = 0; i < this.pages.length; i++) {\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\n }\n }\n };\n var TextureAtlasReader = class {\n constructor(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n readLine() {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n readEntry(entry, line) {\n if (!line)\n return 0;\n line = line.trim();\n if (line.length == 0)\n return 0;\n let colon = line.indexOf(\":\");\n if (colon == -1)\n return 0;\n entry[0] = line.substr(0, colon).trim();\n for (let i = 1, lastMatch = colon + 1; ; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) {\n entry[i] = line.substr(lastMatch).trim();\n return i;\n }\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n if (i == 4)\n return 4;\n }\n }\n };\n var TextureAtlasPage = class {\n constructor(name) {\n this.minFilter = 9728 /* Nearest */;\n this.magFilter = 9728 /* Nearest */;\n this.uWrap = 33071 /* ClampToEdge */;\n this.vWrap = 33071 /* ClampToEdge */;\n this.texture = null;\n this.width = 0;\n this.height = 0;\n this.pma = false;\n this.name = name;\n }\n setTexture(texture) {\n this.texture = texture;\n texture.setFilters(this.minFilter, this.magFilter);\n texture.setWraps(this.uWrap, this.vWrap);\n }\n };\n var TextureAtlasRegion = class extends TextureRegion {\n constructor(page, name) {\n super();\n this.x = 0;\n this.y = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n this.index = 0;\n this.degrees = 0;\n this.names = null;\n this.values = null;\n this.page = page;\n this.name = name;\n }\n };\n\n // spine-core/src/attachments/MeshAttachment.ts\n var MeshAttachment = class extends VertexAttachment {\n constructor(name, path) {\n super(name);\n this.region = null;\n this.regionUVs = [];\n this.uvs = [];\n this.triangles = [];\n this.color = new Color(1, 1, 1, 1);\n this.width = 0;\n this.height = 0;\n this.hullLength = 0;\n this.edges = [];\n this.parentMesh = null;\n this.sequence = null;\n this.tempColor = new Color(0, 0, 0, 0);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let regionUVs = this.regionUVs;\n if (!this.uvs || this.uvs.length != regionUVs.length)\n this.uvs = Utils.newFloatArray(regionUVs.length);\n let uvs = this.uvs;\n let n = this.uvs.length;\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof TextureAtlasRegion) {\n let region = this.region, image = region.page.texture.getImage();\n let textureWidth = image.width, textureHeight = image.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 (let 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 (let 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 (let 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 } else if (!this.region) {\n u = v = 0;\n width = height = 1;\n } else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (let 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 getParentMesh() {\n return this.parentMesh;\n }\n setParentMesh(parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh) {\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 copy() {\n if (this.parentMesh)\n return this.newLinkedMesh();\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n if (this.edges) {\n copy.edges = new Array(this.edges.length);\n 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 computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n super.computeWorldVertices(slot, start, count, worldVertices2, offset, stride);\n }\n newLinkedMesh() {\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n copy.timelineAttachment = this.timelineAttachment;\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\n if (copy.region != null)\n copy.updateRegion();\n return copy;\n }\n };\n\n // spine-core/src/attachments/PathAttachment.ts\n var PathAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.lengths = [];\n this.closed = false;\n this.constantSpeed = false;\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n 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 };\n\n // spine-core/src/attachments/PointAttachment.ts\n var PointAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.color = new Color(0.38, 0.94, 0, 1);\n }\n computeWorldPosition(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 computeWorldRotation(bone) {\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * bone.a + sin * bone.b;\n let y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n copy() {\n let copy = new PointAttachment(this.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 };\n\n // spine-core/src/attachments/RegionAttachment.ts\n var _RegionAttachment = class extends Attachment {\n constructor(name, path) {\n super(name);\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 Color(1, 1, 1, 1);\n this.rendererObject = null;\n this.region = null;\n this.sequence = null;\n this.offset = Utils.newFloatArray(8);\n this.uvs = Utils.newFloatArray(8);\n this.tempColor = new Color(1, 1, 1, 1);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let region = this.region;\n let uvs = this.uvs;\n if (region == null) {\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n uvs[4] = 1;\n uvs[5] = 1;\n uvs[6] = 1;\n uvs[7] = 0;\n return;\n }\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let x = this.x, y = this.y;\n let localXCos = localX * cos + x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[0] = localXCos - localYSin;\n offset[1] = localYCos + localXSin;\n offset[2] = localXCos - localY2Sin;\n offset[3] = localY2Cos + localXSin;\n offset[4] = localX2Cos - localY2Sin;\n offset[5] = localY2Cos + localX2Sin;\n offset[6] = localX2Cos - localYSin;\n offset[7] = localYCos + localX2Sin;\n if (region.degrees == 90) {\n uvs[0] = region.u2;\n uvs[1] = region.v2;\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 } 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 computeWorldVertices(slot, worldVertices2, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n let bone = slot.bone;\n let vertexOffset = this.offset;\n let x = bone.worldX, y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[0];\n offsetY = vertexOffset[1];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[2];\n offsetY = vertexOffset[3];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[4];\n offsetY = vertexOffset[5];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[6];\n offsetY = vertexOffset[7];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n }\n copy() {\n let copy = new _RegionAttachment(this.name, this.path);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\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 Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n return copy;\n }\n };\n var RegionAttachment = _RegionAttachment;\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\n // spine-core/src/AtlasAttachmentLoader.ts\n var AtlasAttachmentLoader = class {\n constructor(atlas) {\n this.atlas = atlas;\n }\n loadSequence(name, basePath, sequence) {\n let regions = sequence.regions;\n for (let i = 0, n = regions.length; i < n; i++) {\n let path = sequence.getPath(basePath, i);\n let region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\n regions[i] = region;\n regions[i].renderObject = regions[i];\n }\n }\n newRegionAttachment(skin, name, path, sequence) {\n let attachment = new RegionAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newMeshAttachment(skin, name, path, sequence) {\n let attachment = new MeshAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newBoundingBoxAttachment(skin, name) {\n return new BoundingBoxAttachment(name);\n }\n newPathAttachment(skin, name) {\n return new PathAttachment(name);\n }\n newPointAttachment(skin, name) {\n return new PointAttachment(name);\n }\n newClippingAttachment(skin, name) {\n return new ClippingAttachment(name);\n }\n };\n\n // spine-core/src/BoneData.ts\n var BoneData = class {\n constructor(index, name, parent) {\n this.index = 0;\n this.parent = null;\n this.length = 0;\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 Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n };\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n return TransformMode2;\n })(TransformMode || {});\n\n // spine-core/src/Bone.ts\n var Bone = class {\n constructor(data, skeleton, parent) {\n this.parent = null;\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.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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 isActive() {\n return this.active;\n }\n update() {\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\n }\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n updateWorldTransformWith(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 let parent = this.parent;\n if (!parent) {\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n let sx = skeleton.scaleX;\n let sy = skeleton.scaleY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n let 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 0 /* Normal */: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = 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 1 /* OnlyTranslation */: {\n let rotationY = rotation + 90 + shearY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case 2 /* NoRotationOrReflection */: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 1e-4) {\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) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = 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 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 1e-5)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = 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 setToSetupPose() {\n let 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 getWorldRotationX() {\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\n }\n getWorldRotationY() {\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\n }\n getWorldScaleX() {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n }\n getWorldScaleY() {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n }\n updateAppliedTransform() {\n let parent = this.parent;\n if (!parent) {\n this.ax = this.worldX - this.skeleton.x;\n this.ay = this.worldY - this.skeleton.y;\n this.arotation = Math.atan2(this.c, this.a) * 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) * MathUtils.radDeg;\n return;\n }\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n let pid = 1 / (pa * pd - pb * pc);\n let 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 let ia = pid * pd;\n let id = pid * pa;\n let ib = pid * pb;\n let ic = pid * pc;\n let ra = ia * this.a - ib * this.c;\n let rb = ia * this.b - ib * this.d;\n let rc = id * this.c - ic * this.a;\n let rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 1e-4) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\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) * MathUtils.radDeg;\n }\n }\n worldToLocal(world) {\n let invDet = 1 / (this.a * this.d - this.b * this.c);\n let x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = x * this.d * invDet - y * this.b * invDet;\n world.y = y * this.a * invDet - x * this.c * invDet;\n return world;\n }\n localToWorld(local) {\n let 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 worldToLocalRotation(worldRotation) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\n }\n localToWorldRotation(localRotation) {\n localRotation -= this.rotation - this.shearX;\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\n }\n rotateWorld(degrees) {\n let a = this.a, b = this.b, c = this.c, d = this.d;\n let cos = MathUtils.cosDeg(degrees), sin = 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 }\n };\n\n // spine-core/src/ConstraintData.ts\n var ConstraintData = class {\n constructor(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n };\n\n // spine-core/src/AssetManagerBase.ts\n var AssetManagerBase = class {\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\n this.pathPrefix = \"\";\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n this.downloader = downloader;\n }\n start(path) {\n this.toLoad++;\n return this.pathPrefix + path;\n }\n success(callback, path, asset) {\n this.toLoad--;\n this.loaded++;\n this.assets[path] = asset;\n if (callback)\n callback(path, asset);\n }\n error(callback, path, message) {\n this.toLoad--;\n this.loaded++;\n this.errors[path] = message;\n if (callback)\n callback(path, message);\n }\n loadAll() {\n let promise = new Promise((resolve, reject) => {\n let check = () => {\n if (this.isLoadingComplete()) {\n if (this.hasErrors())\n reject(this.errors);\n else\n resolve(this);\n return;\n }\n requestAnimationFrame(check);\n };\n requestAnimationFrame(check);\n });\n return promise;\n }\n setRawDataURI(path, data) {\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\n }\n loadBinary(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadBinary(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\n });\n }\n loadText(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadText(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\n });\n }\n loadJson(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadJson(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\n });\n }\n loadTexture(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\n let isWebWorker = !isBrowser;\n if (isWebWorker) {\n fetch(path, { mode: \"cors\" }).then((response) => {\n if (response.ok)\n return response.blob();\n this.error(error, path, `Couldn't load image: ${path}`);\n return null;\n }).then((blob) => {\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\n }).then((bitmap) => {\n if (bitmap)\n this.success(success, path, this.textureLoader(bitmap));\n });\n } else {\n let image = new Image();\n image.crossOrigin = \"anonymous\";\n image.onload = () => {\n this.success(success, path, this.textureLoader(image));\n };\n image.onerror = () => {\n this.error(error, path, `Couldn't load image: ${path}`);\n };\n if (this.downloader.rawDataUris[path])\n path = this.downloader.rawDataUris[path];\n image.src = path;\n }\n }\n loadTextureAtlas(path, success = () => {\n }, error = () => {\n }, fileAlias) {\n let index = path.lastIndexOf(\"/\");\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\n path = this.start(path);\n this.downloader.downloadText(path, (atlasText) => {\n try {\n let atlas = new TextureAtlas(atlasText);\n let toLoad = atlas.pages.length, abort = false;\n for (let page of atlas.pages) {\n this.loadTexture(\n !fileAlias ? parent + page.name : fileAlias[page.name],\n (imagePath, texture) => {\n if (!abort) {\n page.setTexture(texture);\n if (--toLoad == 0)\n this.success(success, path, atlas);\n }\n },\n (imagePath, message) => {\n if (!abort)\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\n abort = true;\n }\n );\n }\n } catch (e) {\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\n }\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\n });\n }\n get(path) {\n return this.assets[this.pathPrefix + path];\n }\n require(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset)\n return asset;\n let error = this.errors[path];\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\n }\n remove(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n delete this.assets[path];\n return asset;\n }\n removeAll() {\n for (let key in this.assets) {\n let asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n }\n isLoadingComplete() {\n return this.toLoad == 0;\n }\n getToLoad() {\n return this.toLoad;\n }\n getLoaded() {\n return this.loaded;\n }\n dispose() {\n this.removeAll();\n }\n hasErrors() {\n return Object.keys(this.errors).length > 0;\n }\n getErrors() {\n return this.errors;\n }\n };\n var Downloader = class {\n constructor() {\n this.callbacks = {};\n this.rawDataUris = {};\n }\n dataUriToString(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx != -1) {\n base64Idx += \"base64,\".length;\n return atob(dataUri.substr(base64Idx));\n } else {\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\n }\n }\n base64ToUint8Array(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n }\n dataUriToUint8Array(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx == -1)\n throw new Error(\"Not a binary data URI.\");\n base64Idx += \"base64,\".length;\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\n }\n downloadText(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToString(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.open(\"GET\", url, true);\n let done = () => {\n this.finish(url, request.status, request.responseText);\n };\n request.onload = done;\n request.onerror = done;\n request.send();\n }\n downloadJson(url, success, error) {\n this.downloadText(url, (data) => {\n success(JSON.parse(data));\n }, error);\n }\n downloadBinary(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n let onerror = () => {\n this.finish(url, request.status, request.response);\n };\n request.onload = () => {\n if (request.status == 200 || request.status == 0)\n this.finish(url, 200, new Uint8Array(request.response));\n else\n onerror();\n };\n request.onerror = onerror;\n request.send();\n }\n start(url, success, error) {\n let callbacks = this.callbacks[url];\n try {\n if (callbacks)\n return true;\n this.callbacks[url] = callbacks = [];\n } finally {\n callbacks.push(success, error);\n }\n }\n finish(url, status, data) {\n let callbacks = this.callbacks[url];\n delete this.callbacks[url];\n let args = status == 200 || status == 0 ? [data] : [status, data];\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\n callbacks[i].apply(null, args);\n }\n };\n\n // spine-core/src/Event.ts\n var Event = class {\n constructor(time, data) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.time = 0;\n this.volume = 0;\n this.balance = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n };\n\n // spine-core/src/EventData.ts\n var EventData = class {\n constructor(name) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.audioPath = null;\n this.volume = 0;\n this.balance = 0;\n this.name = name;\n }\n };\n\n // spine-core/src/IkConstraint.ts\n var IkConstraint = class {\n constructor(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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find bone ${data.target.name}`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mix == 0)\n return;\n let target = this.target;\n let 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.data.uniform, this.softness, this.mix);\n break;\n }\n }\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\n let p = bone.parent;\n if (!p)\n throw new Error(\"IK bone must have parent.\");\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case 1 /* OnlyTranslation */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case 2 /* NoRotationOrReflection */:\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n let sa = pa / bone.skeleton.scaleX;\n let 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) * MathUtils.radDeg;\n default:\n let x = targetX - p.worldX, y = targetY - p.worldY;\n let 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) * 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 let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(\n bone.ax,\n bone.ay,\n bone.arotation + rotationIK * alpha,\n sx,\n sy,\n bone.ashearX,\n bone.ashearY\n );\n }\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\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 } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n let u = Math.abs(psx - psy) <= 1e-4;\n if (!u || stretch) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n let pp = parent.parent;\n if (!pp)\n throw new Error(\"IK parent must itself have a parent.\");\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 1e-4) {\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 let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) * 0.5;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let 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:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1) {\n cos = -1;\n a2 = Math.PI * bendDir;\n } else if (cos > 1) {\n cos = 1;\n a2 = 0;\n if (stretch) {\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n sx *= a;\n if (uniform)\n sy *= a;\n }\n } else\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 } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) * 0.5;\n let r0 = q / c2, r1 = c / q;\n let 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 let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let 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) * 0.5) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * 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, sy, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * 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 };\n\n // spine-core/src/IkConstraintData.ts\n var IkConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/PathConstraintData.ts\n var PathConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.positionMode = PositionMode.Fixed;\n this.spacingMode = SpacingMode.Fixed;\n this.rotateMode = RotateMode.Chain;\n this.offsetRotation = 0;\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n }\n set target(slotData) {\n this._target = slotData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"SlotData not set.\");\n else\n return this._target;\n }\n };\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\n return PositionMode2;\n })(PositionMode || {});\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\n return SpacingMode2;\n })(SpacingMode || {});\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\n return RotateMode2;\n })(RotateMode || {});\n\n // spine-core/src/PathConstraint.ts\n var _PathConstraint = class {\n constructor(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findSlot(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}`);\n this.target = target;\n this.position = data.position;\n this.spacing = data.spacing;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n }\n isActive() {\n return this.active;\n }\n update() {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment))\n return;\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\n return;\n let data = this.data;\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\n let bones = this.bones;\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\n let spacing = this.spacing;\n switch (data.spacingMode) {\n case 2 /* Percent */:\n if (scale) {\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon)\n lengths[i] = 0;\n else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n lengths[i] = Math.sqrt(x * x + y * y);\n }\n }\n }\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\n break;\n case 3 /* Proportional */:\n let sum = 0;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = length;\n sum += length;\n }\n }\n if (sum > 0) {\n sum = spacesCount / sum * spacing;\n for (let i = 1; i < spacesCount; i++)\n spaces[i] *= sum;\n }\n break;\n default:\n let lengthSpacing = data.spacingMode == 0 /* Length */;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n }\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = data.rotateMode == 1 /* Chain */;\n else {\n tip = false;\n let p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * mixX;\n bone.worldY += (boneY - bone.worldY) * mixY;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (mixRotate > 0) {\n let 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 let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\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.updateAppliedTransform();\n }\n }\n computeWorldPositions(path, spacesCount, tangents) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\n let closed2 = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed2 ? 1 : 2;\n let pathLength2 = lengths[curveCount];\n if (this.data.positionMode == 1 /* Percent */)\n position *= pathLength2;\n let multiplier2;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier2 = pathLength2;\n break;\n case 3 /* Proportional */:\n multiplier2 = pathLength2 / spacesCount;\n break;\n default:\n multiplier2 = 1;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier2;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength2;\n if (p < 0)\n p += pathLength2;\n curve = 0;\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 } else if (p > pathLength2) {\n if (prevCurve != _PathConstraint.AFTER) {\n prevCurve = _PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = lengths[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed2 && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(\n p,\n world[0],\n world[1],\n world[2],\n world[3],\n world[4],\n world[5],\n world[6],\n world[7],\n out,\n o,\n tangents || i > 0 && space == 0\n );\n }\n return out;\n }\n if (closed2) {\n verticesLength += 2;\n world = 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 } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let 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 (this.data.positionMode == 1 /* Percent */)\n position *= pathLength;\n let multiplier;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier = pathLength;\n break;\n case 3 /* Proportional */:\n multiplier = pathLength / spacesCount;\n break;\n default:\n multiplier = 1;\n }\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = curves[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n let 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) * 6e-3;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\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 let length = segments[segment];\n if (p > length)\n continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - 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 addBeforePosition(p, temp, i, out, o) {\n let 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 addAfterPosition(p, temp, i, out, o) {\n let 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 addCurvePosition(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 let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let 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 < 1e-3)\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 };\n var PathConstraint = _PathConstraint;\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 1e-5;\n\n // spine-core/src/Slot.ts\n var Slot = class {\n constructor(data, bone) {\n this.darkColor = null;\n this.attachment = null;\n this.attachmentState = 0;\n this.sequenceIndex = -1;\n this.deform = new Array();\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!bone)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = !data.darkColor ? null : new Color();\n this.setToSetupPose();\n }\n getSkeleton() {\n return this.bone.skeleton;\n }\n getAttachment() {\n return this.attachment;\n }\n setAttachment(attachment) {\n if (this.attachment == attachment)\n return;\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\n this.deform.length = 0;\n }\n this.attachment = attachment;\n this.sequenceIndex = -1;\n }\n setToSetupPose() {\n this.color.setFromColor(this.data.color);\n if (this.darkColor)\n this.darkColor.setFromColor(this.data.darkColor);\n if (!this.data.attachmentName)\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 };\n\n // spine-core/src/TransformConstraint.ts\n var TransformConstraint = class {\n constructor(data, skeleton) {\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 0;\n this.temp = new Vector2();\n this.active = false;\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n this.mixScaleX = data.mixScaleX;\n this.mixScaleY = data.mixScaleY;\n this.mixShearY = data.mixShearY;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\n return;\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n applyAbsoluteWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * mixX;\n bone.worldY += (temp.y - bone.worldY) * mixY;\n }\n if (mixScaleX != 0) {\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n if (s != 0)\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n if (s != 0)\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let b = bone.b, d = bone.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyRelativeWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * mixX;\n bone.worldY += temp.y * mixY;\n }\n if (mixScaleX != 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n let b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyAbsoluteLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation;\n if (mixRotate != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n rotation += r * mixRotate;\n }\n let x = bone.ax, y = bone.ay;\n x += (target.ax - x + this.data.offsetX) * mixX;\n y += (target.ay - y + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (mixScaleX != 0 && scaleX != 0)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\n if (mixScaleY != 0 && scaleY != 0)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\n let shearY = bone.ashearY;\n if (mixShearY != 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n shearY += r * mixShearY;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n applyRelativeLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n };\n\n // spine-core/src/Skeleton.ts\n var _Skeleton = class {\n constructor(data) {\n this._updateCache = new Array();\n this.skin = null;\n this.scaleX = 1;\n this._scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone;\n if (!boneData.parent)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n get scaleY() {\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\n }\n set scaleY(scaleY) {\n this._scaleY = scaleY;\n }\n updateCache() {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone);\n }\n }\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n sortIkConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let target = constraint.target;\n this.sortBone(target);\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length == 1) {\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n } else {\n let child = constrained[constrained.length - 1];\n this.sortBone(child);\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n child.sorted = true;\n }\n }\n sortPathConstraint(constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortTransformConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n this.sortBone(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n sortPathConstraintAttachmentWith(attachment, slotBone) {\n if (!(attachment instanceof PathAttachment))\n return;\n let pathBones = attachment.bones;\n if (!pathBones)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n for (let i = 0, n = pathBones.length; i < n; ) {\n let nn = pathBones[i++];\n nn += i;\n while (i < nn)\n this.sortBone(bones[pathBones[i++]]);\n }\n }\n }\n sortBone(bone) {\n if (!bone)\n return;\n if (bone.sorted)\n return;\n let parent = bone.parent;\n if (parent)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n sortReset(bones) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let 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 updateWorldTransform() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[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 }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n updateWorldTransformWith(parent) {\n let rootBone = this.getRootBone();\n if (!rootBone)\n throw new Error(\"Root bone must not be null.\");\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++) {\n let updatable = updateCache[i];\n if (updatable != rootBone)\n updatable.update();\n }\n }\n setToSetupPose() {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n setBonesToSetupPose() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let 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 let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n }\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n }\n }\n setSlotsToSetupPose() {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n getRootBone() {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n }\n setSkinByName(skinName) {\n let skin = this.data.findSkin(skinName);\n if (!skin)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n setSkin(newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin) {\n if (this.skin)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name) {\n let attachment = newSkin.getAttachment(i, name);\n if (attachment)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n getAttachmentByName(slotName, attachmentName) {\n let slot = this.data.findSlot(slotName);\n if (!slot)\n throw new Error(`Can't find slot with name ${slotName}`);\n return this.getAttachment(slot.index, attachmentName);\n }\n getAttachment(slotIndex, attachmentName) {\n if (!attachmentName)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin) {\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment)\n return attachment;\n }\n if (this.data.defaultSkin)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n setAttachment(slotName, attachmentName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment = null;\n if (attachmentName) {\n attachment = this.getAttachment(i, attachmentName);\n if (!attachment)\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 findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n getBoundsRect() {\n let offset = new Vector2();\n let size = new Vector2();\n this.getBounds(offset, size);\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\n }\n getBounds(offset, size, temp = new Array(2)) {\n if (!offset)\n throw new Error(\"offset cannot be null.\");\n if (!size)\n throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n let verticesLength = 0;\n let vertices = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let 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 };\n var Skeleton = _Skeleton;\n Skeleton.yDown = false;\n\n // spine-core/src/SkeletonData.ts\n var SkeletonData = class {\n constructor() {\n this.name = null;\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.defaultSkin = null;\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.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n this.version = null;\n this.hash = null;\n this.fps = 0;\n this.imagesPath = null;\n this.audioPath = null;\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n }\n findSkin(skinName) {\n if (!skinName)\n throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n }\n findEvent(eventDataName) {\n if (!eventDataName)\n throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName)\n return event;\n }\n return null;\n }\n findAnimation(animationName) {\n if (!animationName)\n throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n }\n findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n };\n\n // spine-core/src/Skin.ts\n var SkinEntry = class {\n constructor(slotIndex = 0, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n };\n var Skin = class {\n constructor(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n setAttachment(slotIndex, name, attachment) {\n if (!attachment)\n throw new Error(\"attachment cannot be null.\");\n let 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 addSkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n copySkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (!attachment.attachment)\n continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n getAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n removeAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary)\n delete dictionary[name];\n }\n getAttachments() {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n getAttachmentsForSlot(slotIndex, attachments) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n clear() {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n attachAll(skeleton, oldSkin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n };\n\n // spine-core/src/SlotData.ts\n var SlotData = class {\n constructor(index, name, boneData) {\n this.index = 0;\n this.color = new Color(1, 1, 1, 1);\n this.darkColor = null;\n this.attachmentName = null;\n this.blendMode = BlendMode.Normal;\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n if (!boneData)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n };\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\n return BlendMode3;\n })(BlendMode || {});\n\n // spine-core/src/TransformConstraintData.ts\n var TransformConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/SkeletonBinary.ts\n var SkeletonBinary = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(binary) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n skeletonData.name = \"\";\n let input = new BinaryInput(binary);\n let lowHash = input.readInt32();\n let highHash = input.readInt32();\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n let nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n let n = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let str = input.readString();\n if (!str)\n throw new Error(\"String in string table must not be null.\");\n input.strings.push(str);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Bone name must not be null.\");\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n let data = new BoneData(i, name, parent);\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 = input.readInt(true);\n data.skinRequired = input.readBoolean();\n if (nonessential)\n Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let slotName = input.readString();\n if (!slotName)\n throw new Error(\"Slot name must not be null.\");\n let boneData = skeletonData.bones[input.readInt(true)];\n let data = new SlotData(i, slotName, boneData);\n Color.rgba8888ToColor(data.color, input.readInt32());\n let darkColor = input.readInt32();\n if (darkColor != -1)\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = input.readInt(true);\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"IK constraint data name must not be null.\");\n let data = new IkConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Transform constraint data name must not be null.\");\n let data = new TransformConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n data.mixScaleX = input.readFloat();\n data.mixScaleY = input.readFloat();\n data.mixShearY = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Path constraint data name must not be null.\");\n let data = new PathConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 = input.readInt(true);\n data.spacingMode = input.readInt(true);\n data.rotateMode = input.readInt(true);\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n let i = skeletonData.skins.length;\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++) {\n let skin = this.readSkin(input, skeletonData, false, nonessential);\n if (!skin)\n throw new Error(\"readSkin() should not have returned null.\");\n skeletonData.skins[i] = skin;\n }\n }\n n = this.linkedMeshes.length;\n for (let i = 0; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(\"Not skin found for linked mesh.\");\n if (!linkedMesh.parent)\n throw new Error(\"Linked mesh parent must not be null\");\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let eventName = input.readStringRef();\n if (!eventName)\n throw new Error();\n let data = new EventData(eventName);\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) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let animationName = input.readString();\n if (!animationName)\n throw new Error(\"Animatio name must not be null.\");\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\n }\n return skeletonData;\n }\n readSkin(input, skeletonData, defaultSkin, nonessential) {\n let skin = null;\n let slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new Skin(\"default\");\n } else {\n let skinName = input.readStringRef();\n if (!skinName)\n throw new Error(\"Skin name must not be null.\");\n skin = new Skin(skinName);\n skin.bones.length = input.readInt(true);\n for (let i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (let 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 (let i = 0; i < slotCount; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let name = input.readStringRef();\n if (!name)\n throw new Error(\"Attachment name must not be null\");\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n if (attachment)\n skin.setAttachment(slotIndex, name, attachment);\n }\n }\n return skin;\n }\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n let scale = this.scale;\n let name = input.readStringRef();\n if (!name)\n name = attachmentName;\n switch (input.readByte()) {\n case AttachmentType.Region: {\n let path = input.readStringRef();\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let scaleX = input.readFloat();\n let scaleY = input.readFloat();\n let width = input.readFloat();\n let height = input.readFloat();\n let color = input.readInt32();\n let sequence = this.readSequence(input);\n if (!path)\n path = name;\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\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 Color.rgba8888ToColor(region.color, color);\n region.sequence = sequence;\n if (sequence == null)\n region.updateRegion();\n return region;\n }\n case AttachmentType.BoundingBox: {\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case AttachmentType.Mesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let vertexCount = input.readInt(true);\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\n let triangles = this.readShortArray(input);\n let vertices = this.readVertices(input, vertexCount);\n let hullLength = input.readInt(true);\n let sequence = this.readSequence(input);\n let edges = [];\n let width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n 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 if (sequence == null)\n mesh.updateRegion();\n mesh.hullLength = hullLength << 1;\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case AttachmentType.LinkedMesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let skinName = input.readStringRef();\n let parent = input.readStringRef();\n let inheritTimelines = input.readBoolean();\n let sequence = this.readSequence(input);\n let width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n Color.rgba8888ToColor(mesh.color, color);\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\n return mesh;\n }\n case AttachmentType.Path: {\n let closed2 = input.readBoolean();\n let constantSpeed = input.readBoolean();\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n let color = nonessential ? input.readInt32() : 0;\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = closed2;\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 Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case AttachmentType.Point: {\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let color = nonessential ? input.readInt32() : 0;\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case AttachmentType.Clipping: {\n let endSlotIndex = input.readInt(true);\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\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 Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n }\n readSequence(input) {\n if (!input.readBoolean())\n return null;\n let sequence = new Sequence(input.readInt(true));\n sequence.start = input.readInt(true);\n sequence.digits = input.readInt(true);\n sequence.setupIndex = input.readInt(true);\n return sequence;\n }\n readVertices(input, vertexCount) {\n let scale = this.scale;\n let verticesLength = vertexCount << 1;\n let vertices = new Vertices();\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n let weights = new Array();\n let bonesArray = new Array();\n for (let i = 0; i < vertexCount; i++) {\n let boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n }\n readFloatArray(input, n, scale) {\n let array = new Array(n);\n if (scale == 1) {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat();\n } else {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n }\n readShortArray(input) {\n let n = input.readInt(true);\n let array = new Array(n);\n for (let i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n }\n readAnimation(input, name, skeletonData) {\n input.readInt(true);\n let timelines = new Array();\n let scale = this.scale;\n let tempColor1 = new Color();\n let tempColor2 = new Color();\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case SLOT_ATTACHMENT: {\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\n for (let frame = 0; frame < frameCount; frame++)\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n a = a2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let na = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n a = na;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_ALPHA: {\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n }\n time = time2;\n a = a2;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let boneIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\n switch (type) {\n case BONE_ROTATE:\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_TRANSLATE:\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEX:\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEY:\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_SCALE:\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEX:\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEY:\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEAR:\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARX:\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARY:\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixShearY = mixShearY2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true);\n let data = skeletonData.pathConstraints[index];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n switch (input.readByte()) {\n case PATH_POSITION:\n timelines.push(readTimeline1(\n input,\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\n data.positionMode == 0 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_SPACING:\n timelines.push(readTimeline1(\n input,\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_MIX:\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n }\n timelines.push(timeline);\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let skin = skeletonData.skins[input.readInt(true)];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let slotIndex = input.readInt(true);\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n let attachmentName = input.readStringRef();\n if (!attachmentName)\n throw new Error(\"attachmentName must not be null.\");\n let attachment = skin.getAttachment(slotIndex, attachmentName);\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case ATTACHMENT_DEFORM: {\n let vertexAttachment = attachment;\n let weighted = vertexAttachment.bones;\n let vertices = vertexAttachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let bezierCount = input.readInt(true);\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\n let time = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let end = input.readInt(true);\n if (end == 0)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat();\n } else {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (let v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frame, time, deform);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n }\n time = time2;\n }\n timelines.push(timeline);\n break;\n }\n case ATTACHMENT_SEQUENCE: {\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\n for (let frame = 0; frame < frameCount; frame++) {\n let time = input.readFloat();\n let modeAndIndex = input.readInt32();\n timeline.setFrame(\n frame,\n time,\n SequenceModeValues[modeAndIndex & 15],\n modeAndIndex >> 4,\n input.readFloat()\n );\n }\n timelines.push(timeline);\n break;\n }\n }\n }\n }\n }\n let drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n let timeline = new DrawOrderTimeline(drawOrderCount);\n let slotCount = skeletonData.slots.length;\n for (let i = 0; i < drawOrderCount; i++) {\n let time = input.readFloat();\n let offsetCount = input.readInt(true);\n let drawOrder = Utils.newArray(slotCount, 0);\n for (let ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsetCount; ii++) {\n let 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 (let 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 }\n let eventCount = input.readInt(true);\n if (eventCount > 0) {\n let timeline = new EventTimeline(eventCount);\n for (let i = 0; i < eventCount; i++) {\n let time = input.readFloat();\n let eventData = skeletonData.events[input.readInt(true)];\n let event = new Event(time, eventData);\n event.intValue = input.readInt(false);\n event.floatValue = input.readFloat();\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event.data.audioPath) {\n event.volume = input.readFloat();\n event.balance = input.readFloat();\n }\n timeline.setFrame(i, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n return new Animation(name, timelines, duration);\n }\n };\n var BinaryInput = class {\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n readByte() {\n return this.buffer.getInt8(this.index++);\n }\n readUnsignedByte() {\n return this.buffer.getUint8(this.index++);\n }\n readShort() {\n let value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n }\n readInt32() {\n let value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n }\n readInt(optimizePositive) {\n let b = this.readByte();\n let result = b & 127;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 7;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 14;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 21;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\n }\n readStringRef() {\n let index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n }\n readString() {\n let byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n let chars = \"\";\n let charCount = 0;\n for (let i = 0; i < byteCount; ) {\n let b = this.readUnsignedByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n }\n readFloat() {\n let value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n }\n readBoolean() {\n return this.readByte() != 0;\n }\n };\n var LinkedMesh = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n var Vertices = class {\n constructor(bones = null, vertices = null) {\n this.bones = bones;\n this.vertices = vertices;\n }\n };\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\n return AttachmentType2;\n })(AttachmentType || {});\n function readTimeline1(input, timeline, scale) {\n let time = input.readFloat(), value = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n }\n time = time2;\n value = value2;\n }\n return timeline;\n }\n function readTimeline2(input, timeline, scale) {\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n }\n return timeline;\n }\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\n }\n var BONE_ROTATE = 0;\n var BONE_TRANSLATE = 1;\n var BONE_TRANSLATEX = 2;\n var BONE_TRANSLATEY = 3;\n var BONE_SCALE = 4;\n var BONE_SCALEX = 5;\n var BONE_SCALEY = 6;\n var BONE_SHEAR = 7;\n var BONE_SHEARX = 8;\n var BONE_SHEARY = 9;\n var SLOT_ATTACHMENT = 0;\n var SLOT_RGBA = 1;\n var SLOT_RGB = 2;\n var SLOT_RGBA2 = 3;\n var SLOT_RGB2 = 4;\n var SLOT_ALPHA = 5;\n var ATTACHMENT_DEFORM = 0;\n var ATTACHMENT_SEQUENCE = 1;\n var PATH_POSITION = 0;\n var PATH_SPACING = 1;\n var PATH_MIX = 2;\n var CURVE_STEPPED = 1;\n var CURVE_BEZIER = 2;\n\n // spine-core/src/SkeletonBounds.ts\n var SkeletonBounds = class {\n constructor() {\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 Pool(() => {\n return Utils.newFloatArray(16);\n });\n }\n update(skeleton, updateAabb) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = 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 } 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 aabbCompute() {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let 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 aabbContainsPoint(x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n aabbIntersectsSegment(x1, y1, x2, y2) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let 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 let m = (y2 - y1) / (x2 - x1);\n let 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 let 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 aabbIntersectsSkeleton(bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n containsPoint(x, y) {\n let polygons = this.polygons;\n for (let 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 containsPointPolygon(polygon, x, y) {\n let vertices = polygon;\n let nn = polygon.length;\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\n let 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 intersectsSegment(x1, y1, x2, y2) {\n let polygons = this.polygons;\n for (let 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 intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\n let vertices = polygon;\n let nn = polygon.length;\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let 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 let 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 getPolygon(boundingBox) {\n if (!boundingBox)\n throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n getWidth() {\n return this.maxX - this.minX;\n }\n getHeight() {\n return this.maxY - this.minY;\n }\n };\n\n // spine-core/src/Triangulator.ts\n var Triangulator = class {\n constructor() {\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 Pool(() => {\n return new Array();\n });\n this.polygonIndicesPool = new Pool(() => {\n return new Array();\n });\n }\n triangulate(verticesArray) {\n let vertices = verticesArray;\n let vertexCount = verticesArray.length >> 1;\n let indices = this.indicesArray;\n indices.length = 0;\n for (let i = 0; i < vertexCount; i++)\n indices[i] = i;\n let isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (let i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n let triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n let previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer:\n if (!isConcave[i]) {\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n let v = indices[ii] << 1;\n let 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 let previousIndex = (vertexCount + i - 1) % vertexCount;\n let 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 decompose(verticesArray, triangles) {\n let vertices = verticesArray;\n let convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n let convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n let polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n let polygon = this.polygonPool.obtain();\n polygon.length = 0;\n let fanBaseIndex = -1, lastWinding = 0;\n for (let i = 0, n = triangles.length; i < n; i += 3) {\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\n let merged = false;\n if (fanBaseIndex == t1) {\n let o = polygon.length - 4;\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n let 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 } 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 (let i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n let firstIndex = polygonIndices[0];\n let lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n let o = polygon.length - 4;\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\n let firstX = polygon[0], firstY = polygon[1];\n let secondX = polygon[2], secondY = polygon[3];\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (let ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n let otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n let otherFirstIndex = otherIndices[0];\n let otherSecondIndex = otherIndices[1];\n let otherLastIndex = otherIndices[2];\n let otherPoly = convexPolygons[ii];\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n let 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 (let 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 static isConcave(index, vertexCount, vertices, indices) {\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n let current = indices[index] << 1;\n let next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(\n vertices[previous],\n vertices[previous + 1],\n vertices[current],\n vertices[current + 1],\n vertices[next],\n vertices[next + 1]\n );\n }\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n }\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\n let px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n }\n };\n\n // spine-core/src/SkeletonClipping.ts\n var SkeletonClipping = class {\n constructor() {\n this.triangulator = new 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 this.clipAttachment = null;\n this.clippingPolygons = null;\n }\n clipStart(slot, clip) {\n if (this.clipAttachment)\n return 0;\n this.clipAttachment = clip;\n let n = clip.worldVerticesLength;\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n let clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\n let polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n }\n clipEndWithSlot(slot) {\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n }\n clipEnd() {\n if (!this.clipAttachment)\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 isClipping() {\n return this.clipAttachment != null;\n }\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n let clippedTriangles = this.clippedTriangles;\n let polygons = this.clippingPolygons;\n let polygonsCount = polygons.length;\n let vertexSize = twoColor ? 12 : 8;\n let index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer:\n for (let i = 0; i < trianglesLength; i += 3) {\n let vertexOffset = triangles[i] << 1;\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (let p = 0; p < polygonsCount; p++) {\n let s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n let clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\n let clipOutputCount = clipOutputLength >> 1;\n let clipOutputItems = this.clipOutput;\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\n let 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 let c0 = x - x3, c1 = y - y3;\n let a = (d0 * c0 + d1 * c1) * d;\n let b = (d4 * c0 + d2 * c1) * d;\n let 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 let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (let 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 } else {\n let clippedVerticesItems = 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 } 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 let clippedTrianglesItems = 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 clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\n let originalOutput = output;\n let clipped = false;\n let input;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\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 let clippingVertices = clippingArea;\n let clippingVerticesLast = clippingArea.length - 4;\n for (let i = 0; ; i += 2) {\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n let inputVertices = input;\n let inputVerticesLength = input.length - 2, outputStart = output.length;\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n let 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 let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n } else {\n output.push(edgeX);\n output.push(edgeY);\n }\n } else if (side2) {\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\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 let temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (let i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n } else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n }\n static makeClockwise(polygon) {\n let vertices = polygon;\n let verticeslength = polygon.length;\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (let 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 (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n let x = vertices[i], y = vertices[i + 1];\n let 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 };\n\n // spine-core/src/SkeletonJson.ts\n var SkeletonJson = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(json) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\n let skeletonMap = root.skeleton;\n if (skeletonMap) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.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 (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n let parent = null;\n let parentName = getValue(boneMap, \"parent\", null);\n if (parentName)\n parent = skeletonData.findBone(parentName);\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = getValue(boneMap, \"length\", 0) * scale;\n data.x = getValue(boneMap, \"x\", 0) * scale;\n data.y = getValue(boneMap, \"y\", 0) * scale;\n data.rotation = getValue(boneMap, \"rotation\", 0);\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\n data.shearX = getValue(boneMap, \"shearX\", 0);\n data.shearY = getValue(boneMap, \"shearY\", 0);\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\n data.skinRequired = getValue(boneMap, \"skin\", false);\n let color = getValue(boneMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let boneData = skeletonData.findBone(slotMap.bone);\n if (!boneData)\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\n let color = getValue(slotMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n let dark = getValue(slotMap, \"dark\", null);\n if (dark)\n data.darkColor = Color.fromString(dark);\n data.attachmentName = getValue(slotMap, \"attachment\", null);\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\n if (!bone)\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let target = skeletonData.findBone(constraintMap.target);\n ;\n if (!target)\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\n data.target = target;\n data.mix = getValue(constraintMap, \"mix\", 1);\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = getValue(constraintMap, \"compress\", false);\n data.stretch = getValue(constraintMap, \"stretch\", false);\n data.uniform = getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findBone(targetName);\n if (!target)\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\n data.target = target;\n data.local = getValue(constraintMap, \"local\", false);\n data.relative = getValue(constraintMap, \"relative\", false);\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findSlot(targetName);\n if (!target)\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\n data.target = target;\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.position = getValue(constraintMap, \"position\", 0);\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i];\n let skin = new Skin(skinMap.name);\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let boneName = skinMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraintName = skinMap.ik[ii];\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraintName = skinMap.transform[ii];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraintName = skinMap.path[ii];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment)\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 (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = getValue(eventMap, \"int\", 0);\n data.floatValue = getValue(eventMap, \"float\", 0);\n data.stringValue = getValue(eventMap, \"string\", \"\");\n data.audioPath = getValue(eventMap, \"audio\", null);\n if (data.audioPath) {\n data.volume = getValue(eventMap, \"volume\", 1);\n data.balance = getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n }\n readAttachment(map, skin, slotIndex, name, skeletonData) {\n let scale = this.scale;\n name = getValue(map, \"name\", name);\n switch (getValue(map, \"type\", \"region\")) {\n case \"region\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\n return null;\n region.path = path;\n region.x = getValue(map, \"x\", 0) * scale;\n region.y = getValue(map, \"y\", 0) * scale;\n region.scaleX = getValue(map, \"scaleX\", 1);\n region.scaleY = getValue(map, \"scaleY\", 1);\n region.rotation = getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n region.sequence = sequence;\n let color = getValue(map, \"color\", null);\n if (color)\n region.color.setFromString(color);\n if (region.region != null)\n region.updateRegion();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n let color = getValue(map, \"color\", null);\n if (color)\n mesh.color.setFromString(color);\n mesh.width = getValue(map, \"width\", 0) * scale;\n mesh.height = getValue(map, \"height\", 0) * scale;\n mesh.sequence = sequence;\n let parent = getValue(map, \"parent\", null);\n if (parent) {\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\n return mesh;\n }\n let uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n if (mesh.region != null)\n mesh.updateRegion();\n mesh.edges = getValue(map, \"edges\", null);\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = getValue(map, \"closed\", false);\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n let color = getValue(map, \"color\", null);\n if (color)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = getValue(map, \"x\", 0) * scale;\n point.y = getValue(map, \"y\", 0) * scale;\n point.rotation = getValue(map, \"rotation\", 0);\n let color = getValue(map, \"color\", null);\n if (color)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\n return null;\n let end = getValue(map, \"end\", null);\n if (end)\n clip.endSlot = skeletonData.findSlot(end);\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n readSequence(map) {\n if (map == null)\n return null;\n let sequence = new Sequence(getValue(map, \"count\", 0));\n sequence.start = getValue(map, \"start\", 1);\n sequence.digits = getValue(map, \"digits\", 0);\n sequence.setupIndex = getValue(map, \"setup\", 0);\n return sequence;\n }\n readVertices(map, attachment, verticesLength) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n; ) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n }\n readAnimation(map, name, skeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotName);\n let slotIndex = slot.index;\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (!timelineMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(frames, slotIndex);\n for (let frame = 0; frame < frames; frame++) {\n let keyMap = timelineMap[frame];\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgba\") {\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb\") {\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"alpha\") {\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\n } else if (timelineName == \"rgba2\") {\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb2\") {\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(\"Bone not found: \" + boneName);\n let boneIndex = bone.index;\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n let frames = timelineMap.length;\n if (frames == 0)\n continue;\n if (timelineName === \"rotate\") {\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\n } else if (timelineName === \"translate\") {\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\n } else if (timelineName === \"translatex\") {\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"translatey\") {\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"scale\") {\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\n } else if (timelineName === \"scalex\") {\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"scaley\") {\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"shear\") {\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\n } else if (timelineName === \"shearx\") {\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n } else if (timelineName === \"sheary\") {\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n }\n }\n }\n }\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let keyMap = constraintMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(\"IK Constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mix = getValue(keyMap, \"mix\", 1);\n let softness = getValue(keyMap, \"softness\", 0) * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\n let nextMap = constraintMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mix2 = getValue(nextMap, \"mix\", 1);\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.transform) {\n for (let constraintName in map.transform) {\n let timelineMap = map.transform[constraintName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Transform constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixScaleX = mixScaleX2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Path constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName === \"position\") {\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"spacing\") {\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.attachments) {\n for (let attachmentsName in map.attachments) {\n let attachmentsMap = map.attachments[attachmentsName];\n let skin = skeletonData.findSkin(attachmentsName);\n if (!skin)\n throw new Error(\"Skin not found: \" + attachmentsName);\n for (let slotMapName in attachmentsMap) {\n let slotMap = attachmentsMap[slotMapName];\n let slot = skeletonData.findSlot(slotMapName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotMapName);\n let slotIndex = slot.index;\n for (let attachmentMapName in slotMap) {\n let attachmentMap = slotMap[attachmentMapName];\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\n for (let timelineMapName in attachmentMap) {\n let timelineMap = attachmentMap[timelineMapName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n if (timelineMapName == \"deform\") {\n let weighted = attachment.bones;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\n let time = getValue(keyMap, \"time\", 0);\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let verticesValue = getValue(keyMap, \"vertices\", null);\n if (!verticesValue)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = getValue(keyMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frame, time, deform);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let curve = keyMap.curve;\n if (curve)\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n time = time2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineMapName == \"sequence\") {\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\n let lastDelay = 0;\n for (let frame = 0; frame < timelineMap.length; frame++) {\n let delay = getValue(keyMap, \"delay\", lastDelay);\n let time = getValue(keyMap, \"time\", 0);\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\n let index = getValue(keyMap, \"index\", 0);\n timeline.setFrame(frame, time, mode, index, delay);\n lastDelay = delay;\n keyMap = timelineMap[frame + 1];\n }\n timelines.push(timeline);\n }\n }\n }\n }\n }\n }\n if (map.drawOrder) {\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\n let slotCount = skeletonData.slots.length;\n let frame = 0;\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\n let drawOrderMap = map.drawOrder[i];\n let drawOrder = null;\n let offsets = getValue(drawOrderMap, \"offsets\", null);\n if (offsets) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsets.length; ii++) {\n let offsetMap = offsets[ii];\n let slot = skeletonData.findSlot(offsetMap.slot);\n if (!slot)\n throw new Error(\"Slot not found: \" + slot);\n let slotIndex = slot.index;\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 (let ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n }\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frame = 0;\n for (let i = 0; i < map.events.length; i++, frame++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (!eventData)\n throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath) {\n event.volume = getValue(eventMap, \"volume\", 1);\n event.balance = getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frame, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n };\n var LinkedMesh2 = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n function readTimeline12(keys, timeline, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\n if (keyMap.curve)\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n time = time2;\n value = value2;\n keyMap = nextMap;\n }\n }\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n keyMap = nextMap;\n }\n }\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n if (curve == \"stepped\") {\n timeline.setStepped(frame);\n return bezier;\n }\n let i = value << 2;\n let cx1 = curve[i];\n let cy1 = curve[i + 1] * scale;\n let cx2 = curve[i + 2];\n let cy2 = curve[i + 3] * scale;\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n return bezier + 1;\n }\n function getValue(map, property, defaultValue) {\n return map[property] !== void 0 ? map[property] : defaultValue;\n }\n\n // spine-core/src/polyfills.ts\n (() => {\n if (typeof Math.fround === \"undefined\") {\n Math.fround = function(array) {\n return function(x) {\n return array[0] = x, array[0];\n };\n }(new Float32Array(1));\n }\n })();\n\n // spine-canvas/src/CanvasTexture.ts\n var CanvasTexture = class extends Texture {\n constructor(image) {\n super(image);\n }\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-canvas/src/AssetManager.ts\n var AssetManager = class extends AssetManagerBase {\n constructor(pathPrefix = \"\", downloader = new Downloader()) {\n super((image) => {\n return new CanvasTexture(image);\n }, pathPrefix, downloader);\n }\n };\n\n // spine-canvas/src/SkeletonRenderer.ts\n var worldVertices = Utils.newFloatArray(8);\n var _SkeletonRenderer = class {\n constructor(context) {\n this.triangleRendering = false;\n this.debugRendering = false;\n this.vertices = Utils.newFloatArray(8 * 1024);\n this.tempColor = new Color();\n this.ctx = context;\n }\n draw(skeleton) {\n if (this.triangleRendering)\n this.drawTriangles(skeleton);\n else\n this.drawImages(skeleton);\n }\n drawImages(skeleton) {\n let ctx = this.ctx;\n let color = this.tempColor;\n let skeletonColor = skeleton.color;\n let drawOrder = skeleton.drawOrder;\n if (this.debugRendering)\n ctx.strokeStyle = \"green\";\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let bone = slot.bone;\n if (!bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof RegionAttachment))\n continue;\n attachment.computeWorldVertices(slot, worldVertices, 0, 2);\n let region = attachment.region;\n let image = region.page.texture.getImage();\n let slotColor = slot.color;\n let regionColor = attachment.color;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r,\n skeletonColor.g * slotColor.g * regionColor.g,\n skeletonColor.b * slotColor.b * regionColor.b,\n skeletonColor.a * slotColor.a * regionColor.a\n );\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 let atlasScale = attachment.width / region.originalWidth;\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\n let w = region.width, h = region.height;\n ctx.translate(w / 2, h / 2);\n if (attachment.region.degrees == 90) {\n let 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 ctx.globalAlpha = color.a;\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 }\n drawTriangles(skeleton) {\n let ctx = this.ctx;\n let color = this.tempColor;\n let skeletonColor = skeleton.color;\n let drawOrder = skeleton.drawOrder;\n let blendMode = null;\n let vertices = this.vertices;\n let triangles = null;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let attachment = slot.getAttachment();\n let texture;\n let region;\n if (attachment instanceof RegionAttachment) {\n let regionAttachment = attachment;\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\n region = regionAttachment.region;\n texture = region.page.texture.getImage();\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n vertices = this.computeMeshVertices(slot, mesh, false);\n triangles = mesh.triangles;\n let region2 = mesh.region.renderObject;\n texture = region2.page.texture.getImage();\n } else\n continue;\n if (texture) {\n if (slot.data.blendMode != blendMode)\n blendMode = slot.data.blendMode;\n let slotColor = slot.color;\n let attachmentColor = attachment.color;\n color.set(\n skeletonColor.r * slotColor.r * attachmentColor.r,\n skeletonColor.g * slotColor.g * attachmentColor.g,\n skeletonColor.b * slotColor.b * attachmentColor.b,\n skeletonColor.a * slotColor.a * attachmentColor.a\n );\n ctx.globalAlpha = color.a;\n for (var j = 0; j < triangles.length; j += 3) {\n let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\n let x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\n let x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\n let 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 drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\n let 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 computeRegionVertices(slot, region, pma) {\n let skeletonColor = slot.bone.skeleton.color;\n let slotColor = slot.color;\n let regionColor = region.color;\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\n let multiplier = pma ? alpha : 1;\n let color = this.tempColor;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\n alpha\n );\n region.computeWorldVertices(slot, this.vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\n let vertices = this.vertices;\n let uvs = region.uvs;\n vertices[RegionAttachment.C1R] = color.r;\n vertices[RegionAttachment.C1G] = color.g;\n vertices[RegionAttachment.C1B] = color.b;\n vertices[RegionAttachment.C1A] = color.a;\n vertices[RegionAttachment.U1] = uvs[0];\n vertices[RegionAttachment.V1] = uvs[1];\n vertices[RegionAttachment.C2R] = color.r;\n vertices[RegionAttachment.C2G] = color.g;\n vertices[RegionAttachment.C2B] = color.b;\n vertices[RegionAttachment.C2A] = color.a;\n vertices[RegionAttachment.U2] = uvs[2];\n vertices[RegionAttachment.V2] = uvs[3];\n vertices[RegionAttachment.C3R] = color.r;\n vertices[RegionAttachment.C3G] = color.g;\n vertices[RegionAttachment.C3B] = color.b;\n vertices[RegionAttachment.C3A] = color.a;\n vertices[RegionAttachment.U3] = uvs[4];\n vertices[RegionAttachment.V3] = uvs[5];\n vertices[RegionAttachment.C4R] = color.r;\n vertices[RegionAttachment.C4G] = color.g;\n vertices[RegionAttachment.C4B] = color.b;\n vertices[RegionAttachment.C4A] = color.a;\n vertices[RegionAttachment.U4] = uvs[6];\n vertices[RegionAttachment.V4] = uvs[7];\n return vertices;\n }\n computeMeshVertices(slot, mesh, pma) {\n let skeletonColor = slot.bone.skeleton.color;\n let slotColor = slot.color;\n let regionColor = mesh.color;\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\n let multiplier = pma ? alpha : 1;\n let color = this.tempColor;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\n alpha\n );\n let vertexCount = mesh.worldVerticesLength / 2;\n let vertices = this.vertices;\n if (vertices.length < mesh.worldVerticesLength)\n this.vertices = vertices = Utils.newFloatArray(mesh.worldVerticesLength);\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\n let uvs = mesh.uvs;\n for (let i = 0, u = 0, v = 2; i < vertexCount; 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 };\n var SkeletonRenderer = _SkeletonRenderer;\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\n return __toCommonJS(src_exports);\n})();\n//# sourceMappingURL=spine-canvas.js.map\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine4.1/dist/SpinePlugin.js b/plugins/spine4.1/dist/SpinePlugin.js index aac579983..38401887c 100644 --- a/plugins/spine4.1/dist/SpinePlugin.js +++ b/plugins/spine4.1/dist/SpinePlugin.js @@ -15141,35 +15141,33 @@ var SpinePlugin = new Class({ return null; } - var gl = this.gl; - var i; - var atlasPage; - var realTextureKey; - - if (this.isWebGL) + if (!this.spineTextures.has(atlasKey)) { - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - } + var gl = this.gl; + var i; + var atlasPage; + var realTextureKey; - for (i = 0; i < atlas.pages.length; i ++) - { - atlasPage = atlas.pages[i]; - realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; if (this.isWebGL) { - atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); } - else + + for (i = 0; i < atlas.pages.length; i ++) { - atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + atlasPage = atlas.pages[i]; + realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; + if (this.isWebGL) + { + atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + } + else + { + atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + } } - } - - var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey; - - if (!this.spineTextures.has(spineTextureKey)) - { - this.spineTextures.add(spineTextureKey, atlas); + + this.spineTextures.add(atlasKey, atlas); } var preMultipliedAlpha = atlasData.preMultipliedAlpha; diff --git a/plugins/spine4.1/dist/SpinePlugin.min.js b/plugins/spine4.1/dist/SpinePlugin.min.js index 23eab615b..cb9b91cbc 100644 --- a/plugins/spine4.1/dist/SpinePlugin.min.js +++ b/plugins/spine4.1/dist/SpinePlugin.min.js @@ -226,7 +226,7 @@ var s=i(0),n=i(1),r=i(19),a=new s({initialize:function(t,e,i,s,n,r,a){this.textu * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var s=i(70),n=i(0),r=i(10),a=i(184),o=i(185),h={canvas:i(209),webgl:i(210)},l=i(211),c=i(227),u=i(260),d=i(2),f=new n({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);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),this.renderer||(this.renderer={width:n.scale.width,height:n.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,s,n,r){var a=this.scene.sys[i],o=new c(this.scene,a,t,e,s,n,r);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var n=r(t,"key",null),a=r(t,"animationName",null),o=r(t,"loop",!1),h=this.scene.sys[i],l=new c(this.scene,h,0,0,n,a,o);void 0!==e&&(t.add=e),s(this.scene,l,t);var u=r(t,"skinName",!1);u&&l.setSkinByName(u);var d=r(t,"slotName",!1),f=r(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,s){var n=this.scene.sys[i],r=new u(this.scene,n,t,e,s);return this.displayList.add(r),r}),(function(t,e){void 0===t&&(t={});var n=r(t,"x",0),a=r(t,"y",0),o=r(t,"children",null),h=this.scene.sys[i],l=new u(this.scene,h,n,a,o);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.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 i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var n=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var n=this.textures,r=this.sceneRenderer.context.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(r,n.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,s,n,r,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h * @copyright 2013-2023 Photon Storm Ltd. diff --git a/plugins/spine4.1/dist/SpinePluginDebug.js b/plugins/spine4.1/dist/SpinePluginDebug.js index 3f68cbecb..dc634e0dd 100644 --- a/plugins/spine4.1/dist/SpinePluginDebug.js +++ b/plugins/spine4.1/dist/SpinePluginDebug.js @@ -37443,35 +37443,33 @@ var SpinePlugin = new Class({ return null; } - var gl = this.gl; - var i; - var atlasPage; - var realTextureKey; - - if (this.isWebGL) + if (!this.spineTextures.has(atlasKey)) { - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - } + var gl = this.gl; + var i; + var atlasPage; + var realTextureKey; - for (i = 0; i < atlas.pages.length; i ++) - { - atlasPage = atlas.pages[i]; - realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; if (this.isWebGL) { - atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); } - else + + for (i = 0; i < atlas.pages.length; i ++) { - atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + atlasPage = atlas.pages[i]; + realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; + if (this.isWebGL) + { + atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + } + else + { + atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + } } - } - - var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey; - - if (!this.spineTextures.has(spineTextureKey)) - { - this.spineTextures.add(spineTextureKey, atlas); + + this.spineTextures.add(atlasKey, atlas); } var preMultipliedAlpha = atlasData.preMultipliedAlpha; diff --git a/plugins/spine4.1/dist/SpinePluginDebug.js.map b/plugins/spine4.1/dist/SpinePluginDebug.js.map index db9c79001..49a40d2dd 100644 --- a/plugins/spine4.1/dist/SpinePluginDebug.js.map +++ b/plugins/spine4.1/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GetCalcMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/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/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-canvas.js","webpack:///./runtimes/spine-webgl.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,4FAA8B;;AAE5D;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChEA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;;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;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,kBAAkB,mBAAO,CAAC,+CAAa;AACvC,iBAAiB,mBAAO,CAAC,6CAAY;AACrC;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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;AACA;AACA;AACA;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;ACjuCA;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;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;;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvHA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1IA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA,sDAAsD,iBAAiB,cAAc;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC7E;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;AACjD;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA,GAAG,oBAAoB;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,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,OAAO;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,6BAA6B,iBAAiB;AAC9C;AACA,aAAa;AACb;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA,WAAW;AACX,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;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,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,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;AACpB;AACA;AACA;AACA;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;AACA;AACA;AACA;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;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;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;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wDAAwD,KAAK,WAAW,OAAO,IAAI,aAAa;AAChG,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA,SAAS;AACT,iDAAiD,yDAAyD;AAC1G,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,yEAAyE,KAAK,eAAe,UAAU;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,KAAK,IAAI,UAAU;AACrF;AACA,OAAO;AACP,+DAA+D,KAAK,WAAW,OAAO,IAAI,aAAa;AACvG,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,8CAA8C,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;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,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc,EAAE;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,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,EAAE;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;;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;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;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,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,qBAAqB,eAAe;AACpC;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;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,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;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;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;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;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;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;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,qBAAqB,2BAA2B;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;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,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,kDAAkD,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO;AACP,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;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;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,EAAE;AACzF;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,kDAAkD,SAAS;AAC3D;AACA,sDAAsD,WAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,qBAAqB;AACrB,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;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,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,6CAA6C,SAAS;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,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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,OAAO;AAClD;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;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;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;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,QAAQ;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;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,8BAA8B,sBAAsB;AACpD;AACA;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,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;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,8CAA8C,OAAO;AACrD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,OAAO;AACjF;AACA;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;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,kDAAkD,aAAa,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA,oDAAoD,wBAAwB,qBAAqB,mBAAmB;AACpH;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB,qBAAqB,mBAAmB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,4BAA4B,mBAAmB;AAC5G;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,4BAA4B,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,uBAAuB,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,uBAAuB,mBAAmB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,sDAAsD,SAAS,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA,+DAA+D,eAAe,YAAY,aAAa;AACvG;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,sEAAsE,eAAe,YAAY,aAAa;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,iEAAiE,eAAe,YAAY,aAAa;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,YAAY,aAAa;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,OAAO;AAChF;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,2CAA2C,OAAO;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,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,sBAAsB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;;AAEA,CAAC;;;;;;;;;;;;ACv0SD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA,sDAAsD,iBAAiB,cAAc;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC7E;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;AACjD;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA,GAAG,oBAAoB;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,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,OAAO;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,6BAA6B,iBAAiB;AAC9C;AACA,aAAa;AACb;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA,WAAW;AACX,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;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,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,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;AACpB;AACA;AACA;AACA;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;AACA;AACA;AACA;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;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;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;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wDAAwD,KAAK,WAAW,OAAO,IAAI,aAAa;AAChG,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA,SAAS;AACT,iDAAiD,yDAAyD;AAC1G,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,yEAAyE,KAAK,eAAe,UAAU;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,KAAK,IAAI,UAAU;AACrF;AACA,OAAO;AACP,+DAA+D,KAAK,WAAW,OAAO,IAAI,aAAa;AACvG,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,8CAA8C,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;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,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc,EAAE;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,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,EAAE;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;;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;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;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,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,qBAAqB,eAAe;AACpC;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;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,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;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;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;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;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;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;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,qBAAqB,2BAA2B;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;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,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,kDAAkD,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO;AACP,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;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;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,EAAE;AACzF;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,kDAAkD,SAAS;AAC3D;AACA,sDAAsD,WAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,qBAAqB;AACrB,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;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,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,6CAA6C,SAAS;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,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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,OAAO;AAClD;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;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;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;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,QAAQ;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;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,8BAA8B,sBAAsB;AACpD;AACA;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,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;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,8CAA8C,OAAO;AACrD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,OAAO;AACjF;AACA;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;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,kDAAkD,aAAa,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA,oDAAoD,wBAAwB,qBAAqB,mBAAmB;AACpH;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB,qBAAqB,mBAAmB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,4BAA4B,mBAAmB;AAC5G;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,4BAA4B,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,uBAAuB,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,uBAAuB,mBAAmB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,sDAAsD,SAAS,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA,+DAA+D,eAAe,YAAY,aAAa;AACvG;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,sEAAsE,eAAe,YAAY,aAAa;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,iEAAiE,eAAe,YAAY,aAAa;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,YAAY,aAAa;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,OAAO;AAChF;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sDAAsD,OAAO;AAC7D;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;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;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;AACA;;AAEA;AACA,iBAAiB;AACjB,qBAAqB;AACrB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB,gBAAgB;AAChB,qBAAqB;AACrB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;;AAEA;AACA,iBAAiB;AACjB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,2BAA2B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oBAAoB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,uBAAuB,cAAc;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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,SAAS;AACT;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;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,+DAA+D,QAAQ;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,+DAA+D,QAAQ;AACvE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,wCAAwC;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TransformMatrix = require('./components/TransformMatrix');\n\nvar tempMatrix1 = new TransformMatrix();\nvar tempMatrix2 = new TransformMatrix();\nvar tempMatrix3 = new TransformMatrix();\n\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\n\n/**\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\n * the parent matrix if provided.\n *\n * Note that the object this results contains _references_ to the Transform Matrices,\n * not new instances of them. Therefore, you should use their values immediately, or\n * copy them to your own matrix, as they will be replaced as soon as another Game\n * Object is rendered.\n *\n * @function Phaser.GameObjects.GetCalcMatrix\n * @memberof Phaser.GameObjects\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\n *\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\n */\nvar GetCalcMatrix = function (src, camera, parentMatrix)\n{\n var camMatrix = tempMatrix1;\n var spriteMatrix = tempMatrix2;\n var calcMatrix = tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, 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 else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n }\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n return result;\n};\n\nmodule.exports = GetCalcMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\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, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\n\n var children = container.list;\n var childCount = children.length;\n\n if (childCount === 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 renderer.pipelines.preBatch(container);\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 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) ? (children[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, camera, transformMatrix, container);\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 renderer.pipelines.postBatch(container);\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = [ content[0] ];\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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 SpineCanvas = require('SpineCanvas');\nvar SpineWebgl = require('SpineWebgl');\nvar Spine = {\n canvas: SpineCanvas,\n webgl: SpineWebgl\n};\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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 this.runtime.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 this.runtime.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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n \n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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 this.runtime.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new this.runtime.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new this.runtime.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 this.runtime.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 var gl = this.gl;\n var i;\n var atlasPage;\n var realTextureKey;\n\n if (this.isWebGL)\n {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n }\n\n for (i = 0; i < atlas.pages.length; i ++)\n {\n atlasPage = atlas.pages[i];\n realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;\n if (this.isWebGL)\n {\n atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));\n }\n else\n {\n atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));\n }\n }\n\n var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;\n\n if (!this.spineTextures.has(spineTextureKey))\n {\n this.spineTextures.add(spineTextureKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new this.runtime.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new this.runtime.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 this.runtime.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 this.runtime.AnimationStateData(skeleton.data);\n\n var state = new this.runtime.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 this.runtime.Vector2();\n var size = new this.runtime.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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 {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, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\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, 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 2022 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 2022 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 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 {SpineContainer} container - The Game Object being rendered in this call.\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, 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.pipelines.rebind();\n }\n\n return;\n }\n\n camera.addToRenderList(container);\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 if (renderer.newType)\n {\n // flush + clear if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var rendererNextType = renderer.nextTypeMatch;\n\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\n renderer.nextTypeMatch = true;\n renderer.newType = false;\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (child.willRender(camera, container))\n {\n var mask = child.mask;\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.preRenderWebGL(renderer, child, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.postRenderWebGL(renderer, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n }\n }\n\n renderer.nextTypeMatch = rendererNextType;\n\n if (!rendererNextType)\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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 {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, 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 camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n camera.addToRenderList(src);\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 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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Directly 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#renderDirect\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 {SpineGameObject} src - The Game Object being rendered in this call.\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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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 // 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.pipelines.rebind();\n};\n\nmodule.exports = SpineGameObjectWebGLDirect;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (renderer.newType)\n {\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\n\"use strict\";\nvar spine = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // spine-canvas/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n AlphaTimeline: () => AlphaTimeline,\n Animation: () => Animation,\n AnimationState: () => AnimationState,\n AnimationStateAdapter: () => AnimationStateAdapter,\n AnimationStateData: () => AnimationStateData,\n AssetManager: () => AssetManager,\n AssetManagerBase: () => AssetManagerBase,\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\n Attachment: () => Attachment,\n AttachmentTimeline: () => AttachmentTimeline,\n BinaryInput: () => BinaryInput,\n BlendMode: () => BlendMode,\n Bone: () => Bone,\n BoneData: () => BoneData,\n BoundingBoxAttachment: () => BoundingBoxAttachment,\n CURRENT: () => CURRENT,\n CanvasTexture: () => CanvasTexture,\n ClippingAttachment: () => ClippingAttachment,\n Color: () => Color,\n ConstraintData: () => ConstraintData,\n CurveTimeline: () => CurveTimeline,\n CurveTimeline1: () => CurveTimeline1,\n CurveTimeline2: () => CurveTimeline2,\n DebugUtils: () => DebugUtils,\n DeformTimeline: () => DeformTimeline,\n Downloader: () => Downloader,\n DrawOrderTimeline: () => DrawOrderTimeline,\n Event: () => Event,\n EventData: () => EventData,\n EventQueue: () => EventQueue,\n EventTimeline: () => EventTimeline,\n EventType: () => EventType,\n FIRST: () => FIRST,\n FakeTexture: () => FakeTexture,\n HOLD_FIRST: () => HOLD_FIRST,\n HOLD_MIX: () => HOLD_MIX,\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\n IkConstraint: () => IkConstraint,\n IkConstraintData: () => IkConstraintData,\n IkConstraintTimeline: () => IkConstraintTimeline,\n IntSet: () => IntSet,\n Interpolation: () => Interpolation,\n MathUtils: () => MathUtils,\n MeshAttachment: () => MeshAttachment,\n MixBlend: () => MixBlend,\n MixDirection: () => MixDirection,\n PathAttachment: () => PathAttachment,\n PathConstraint: () => PathConstraint,\n PathConstraintData: () => PathConstraintData,\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\n PointAttachment: () => PointAttachment,\n Pool: () => Pool,\n PositionMode: () => PositionMode,\n Pow: () => Pow,\n PowOut: () => PowOut,\n RGB2Timeline: () => RGB2Timeline,\n RGBA2Timeline: () => RGBA2Timeline,\n RGBATimeline: () => RGBATimeline,\n RGBTimeline: () => RGBTimeline,\n RegionAttachment: () => RegionAttachment,\n RotateMode: () => RotateMode,\n RotateTimeline: () => RotateTimeline,\n SETUP: () => SETUP,\n SUBSEQUENT: () => SUBSEQUENT,\n ScaleTimeline: () => ScaleTimeline,\n ScaleXTimeline: () => ScaleXTimeline,\n ScaleYTimeline: () => ScaleYTimeline,\n SequenceTimeline: () => SequenceTimeline,\n ShearTimeline: () => ShearTimeline,\n ShearXTimeline: () => ShearXTimeline,\n ShearYTimeline: () => ShearYTimeline,\n Skeleton: () => Skeleton,\n SkeletonBinary: () => SkeletonBinary,\n SkeletonBounds: () => SkeletonBounds,\n SkeletonClipping: () => SkeletonClipping,\n SkeletonData: () => SkeletonData,\n SkeletonJson: () => SkeletonJson,\n SkeletonRenderer: () => SkeletonRenderer,\n Skin: () => Skin,\n SkinEntry: () => SkinEntry,\n Slot: () => Slot,\n SlotData: () => SlotData,\n SpacingMode: () => SpacingMode,\n StringSet: () => StringSet,\n Texture: () => Texture,\n TextureAtlas: () => TextureAtlas,\n TextureAtlasPage: () => TextureAtlasPage,\n TextureAtlasRegion: () => TextureAtlasRegion,\n TextureFilter: () => TextureFilter,\n TextureRegion: () => TextureRegion,\n TextureWrap: () => TextureWrap,\n TimeKeeper: () => TimeKeeper,\n Timeline: () => Timeline,\n TrackEntry: () => TrackEntry,\n TransformConstraint: () => TransformConstraint,\n TransformConstraintData: () => TransformConstraintData,\n TransformConstraintTimeline: () => TransformConstraintTimeline,\n TransformMode: () => TransformMode,\n TranslateTimeline: () => TranslateTimeline,\n TranslateXTimeline: () => TranslateXTimeline,\n TranslateYTimeline: () => TranslateYTimeline,\n Triangulator: () => Triangulator,\n Utils: () => Utils,\n Vector2: () => Vector2,\n VertexAttachment: () => VertexAttachment,\n WindowedMean: () => WindowedMean\n });\n\n // spine-core/src/Utils.ts\n var IntSet = class {\n constructor() {\n this.array = new Array();\n }\n add(value) {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n contains(value) {\n return this.array[value | 0] != void 0;\n }\n remove(value) {\n this.array[value | 0] = void 0;\n }\n clear() {\n this.array.length = 0;\n }\n };\n var StringSet = class {\n constructor() {\n this.entries = {};\n this.size = 0;\n }\n add(value) {\n let contains = this.entries[value];\n this.entries[value] = true;\n if (!contains) {\n this.size++;\n return true;\n }\n return false;\n }\n addAll(values) {\n let oldSize = this.size;\n for (var i = 0, n = values.length; i < n; i++)\n this.add(values[i]);\n return oldSize != this.size;\n }\n contains(value) {\n return this.entries[value];\n }\n clear() {\n this.entries = {};\n this.size = 0;\n }\n };\n var _Color = class {\n constructor(r = 0, g = 0, b = 0, a = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n set(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this.clamp();\n }\n setFromColor(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 setFromString(hex) {\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n return this;\n }\n add(r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n return this.clamp();\n }\n clamp() {\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 static rgba8888ToColor(color, value) {\n color.r = ((value & 4278190080) >>> 24) / 255;\n color.g = ((value & 16711680) >>> 16) / 255;\n color.b = ((value & 65280) >>> 8) / 255;\n color.a = (value & 255) / 255;\n }\n static rgb888ToColor(color, value) {\n color.r = ((value & 16711680) >>> 16) / 255;\n color.g = ((value & 65280) >>> 8) / 255;\n color.b = (value & 255) / 255;\n }\n static fromString(hex) {\n return new _Color().setFromString(hex);\n }\n };\n var Color = _Color;\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 var _MathUtils = class {\n static clamp(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n }\n static cosDeg(degrees) {\n return Math.cos(degrees * _MathUtils.degRad);\n }\n static sinDeg(degrees) {\n return Math.sin(degrees * _MathUtils.degRad);\n }\n static signum(value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n static toInt(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n static cbrt(x) {\n let y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n }\n static randomTriangular(min, max) {\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n static randomTriangularWith(min, max, mode) {\n let u = Math.random();\n let 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 static isPowerOfTwo(value) {\n return value && (value & value - 1) === 0;\n }\n };\n var MathUtils = _MathUtils;\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 var Interpolation = class {\n apply(start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n }\n };\n var Pow = class extends Interpolation {\n constructor(power) {\n super();\n this.power = 2;\n this.power = power;\n }\n applyInternal(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 };\n var PowOut = class extends Pow {\n constructor(power) {\n super(power);\n }\n applyInternal(a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n };\n var _Utils = class {\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n static arrayFill(array, fromIndex, toIndex, value) {\n for (let i = fromIndex; i < toIndex; i++)\n array[i] = value;\n }\n static setArraySize(array, size, value = 0) {\n let oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n }\n static ensureArrayCapacity(array, size, value = 0) {\n if (array.length >= size)\n return array;\n return _Utils.setArraySize(array, size, value);\n }\n static newArray(size, defaultValue) {\n let array = new Array(size);\n for (let i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n }\n static newFloatArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Float32Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static newShortArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Int16Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static toFloatArray(array) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n static toSinglePrecision(value) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n static webkit602BugfixHelper(alpha, blend) {\n }\n static contains(array, element, identity = true) {\n for (var i = 0; i < array.length; i++)\n if (array[i] == element)\n return true;\n return false;\n }\n static enumValue(type, name) {\n return type[name[0].toUpperCase() + name.slice(1)];\n }\n };\n var Utils = _Utils;\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\n var DebugUtils = class {\n static logBones(skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let 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 };\n var Pool = class {\n constructor(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n obtain() {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n free(item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n }\n freeAll(items) {\n for (let i = 0; i < items.length; i++)\n this.free(items[i]);\n }\n clear() {\n this.items.length = 0;\n }\n };\n var Vector2 = class {\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n length() {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n normalize() {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n };\n var TimeKeeper = class {\n constructor() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1e3;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n update() {\n let now = Date.now() / 1e3;\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 };\n var WindowedMean = class {\n constructor(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 hasEnoughData() {\n return this.addedValues >= this.values.length;\n }\n addValue(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 getMean() {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++)\n mean += this.values[i];\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n return 0;\n }\n };\n\n // spine-core/src/attachments/Attachment.ts\n var Attachment = class {\n constructor(name) {\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n };\n var _VertexAttachment = class extends Attachment {\n constructor(name) {\n super(name);\n this.id = _VertexAttachment.nextID++;\n this.bones = null;\n this.vertices = [];\n this.worldVerticesLength = 0;\n this.timelineAttachment = this;\n }\n computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (!bones) {\n if (deformArray.length > 0)\n vertices = deformArray;\n let bone = slot.bone;\n let x = bone.worldX;\n let y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\n let vx = vertices[v2], vy = vertices[v2 + 1];\n worldVertices2[w] = vx * a + vy * b + x;\n worldVertices2[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let 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 worldVertices2[w] = wx;\n worldVertices2[w + 1] = wy;\n }\n } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let 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 worldVertices2[w] = wx;\n worldVertices2[w + 1] = wy;\n }\n }\n }\n copyTo(attachment) {\n if (this.bones) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n if (this.vertices) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.timelineAttachment = this.timelineAttachment;\n }\n };\n var VertexAttachment = _VertexAttachment;\n VertexAttachment.nextID = 0;\n\n // spine-core/src/attachments/Sequence.ts\n var _Sequence = class {\n constructor(count) {\n this.id = _Sequence.nextID();\n this.start = 0;\n this.digits = 0;\n this.setupIndex = 0;\n this.regions = new Array(count);\n }\n copy() {\n let copy = new _Sequence(this.regions.length);\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\n copy.start = this.start;\n copy.digits = this.digits;\n copy.setupIndex = this.setupIndex;\n return copy;\n }\n apply(slot, attachment) {\n let index = slot.sequenceIndex;\n if (index == -1)\n index = this.setupIndex;\n if (index >= this.regions.length)\n index = this.regions.length - 1;\n let region = this.regions[index];\n if (attachment.region != region) {\n attachment.region = region;\n attachment.updateRegion();\n }\n }\n getPath(basePath, index) {\n let result = basePath;\n let frame = (this.start + index).toString();\n for (let i = this.digits - frame.length; i > 0; i--)\n result += \"0\";\n result += frame;\n return result;\n }\n static nextID() {\n return _Sequence._nextID++;\n }\n };\n var Sequence = _Sequence;\n Sequence._nextID = 0;\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\n return SequenceMode2;\n })(SequenceMode || {});\n var SequenceModeValues = [\n 0 /* hold */,\n 1 /* once */,\n 2 /* loop */,\n 3 /* pingpong */,\n 4 /* onceReverse */,\n 5 /* loopReverse */,\n 6 /* pingpongReverse */\n ];\n\n // spine-core/src/Animation.ts\n var Animation = class {\n constructor(name, timelines, duration) {\n this.timelines = [];\n this.timelineIds = new StringSet();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n this.setTimelines(timelines);\n this.duration = duration;\n }\n setTimelines(timelines) {\n if (!timelines)\n throw new Error(\"timelines cannot be null.\");\n this.timelines = timelines;\n this.timelineIds.clear();\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds.addAll(timelines[i].getPropertyIds());\n }\n hasTimeline(ids) {\n for (let i = 0; i < ids.length; i++)\n if (this.timelineIds.contains(ids[i]))\n return true;\n return false;\n }\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (!skeleton)\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 let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n };\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\n return MixBlend2;\n })(MixBlend || {});\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\n return MixDirection2;\n })(MixDirection || {});\n var Property = {\n rotate: 0,\n x: 1,\n y: 2,\n scaleX: 3,\n scaleY: 4,\n shearX: 5,\n shearY: 6,\n rgb: 7,\n alpha: 8,\n rgb2: 9,\n attachment: 10,\n deform: 11,\n event: 12,\n drawOrder: 13,\n ikConstraint: 14,\n transformConstraint: 15,\n pathConstraintPosition: 16,\n pathConstraintSpacing: 17,\n pathConstraintMix: 18,\n sequence: 19\n };\n var Timeline = class {\n constructor(frameCount, propertyIds) {\n this.propertyIds = propertyIds;\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\n }\n getPropertyIds() {\n return this.propertyIds;\n }\n getFrameEntries() {\n return 1;\n }\n getFrameCount() {\n return this.frames.length / this.getFrameEntries();\n }\n getDuration() {\n return this.frames[this.frames.length - this.getFrameEntries()];\n }\n static search1(frames, time) {\n let n = frames.length;\n for (let i = 1; i < n; i++)\n if (frames[i] > time)\n return i - 1;\n return n - 1;\n }\n static search(frames, time, step) {\n let n = frames.length;\n for (let i = step; i < n; i += step)\n if (frames[i] > time)\n return i - step;\n return n - step;\n }\n };\n var CurveTimeline = class extends Timeline {\n constructor(frameCount, bezierCount, propertyIds) {\n super(frameCount, propertyIds);\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\n this.curves[frameCount - 1] = 1;\n }\n setLinear(frame) {\n this.curves[frame] = 0;\n }\n setStepped(frame) {\n this.curves[frame] = 1;\n }\n shrink(bezierCount) {\n let size = this.getFrameCount() + bezierCount * 18;\n if (this.curves.length > size) {\n let newCurves = Utils.newFloatArray(size);\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\n this.curves = newCurves;\n }\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = value1 + dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getBezierValue(time, frameIndex, valueOffset, i) {\n let curves = this.curves;\n if (curves[i] > time) {\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n frameIndex += this.getFrameEntries();\n let x = curves[n - 2], y = curves[n - 1];\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\n }\n };\n var CurveTimeline1 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId) {\n super(frameCount, bezierCount, [propertyId]);\n }\n getFrameEntries() {\n return 2;\n }\n setFrame(frame, time, value) {\n frame <<= 1;\n this.frames[frame] = time;\n this.frames[frame + 1] = value;\n }\n getCurveValue(time) {\n let frames = this.frames;\n let i = frames.length - 2;\n for (let ii = 2; ii <= i; ii += 2) {\n if (frames[ii] > time) {\n i = ii - 2;\n break;\n }\n }\n let curveType = this.curves[i >> 1];\n switch (curveType) {\n case 0:\n let before = frames[i], value = frames[i + 1];\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\n case 1:\n return frames[i + 1];\n }\n return this.getBezierValue(time, i, 1, curveType - 2);\n }\n };\n var CurveTimeline2 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\n }\n getFrameEntries() {\n return 3;\n }\n setFrame(frame, time, value1, value2) {\n frame *= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = value1;\n this.frames[frame + 2] = value2;\n }\n };\n var RotateTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n return;\n case 1 /* first */:\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\n }\n return;\n }\n let r = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n r += bone.data.rotation - bone.rotation;\n case 3 /* add */:\n bone.rotation += r * alpha;\n }\n }\n };\n var TranslateTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.x + \"|\" + boneIndex,\n Property.y + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n };\n var TranslateXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n break;\n case 3 /* add */:\n bone.x += x * alpha;\n }\n }\n };\n var TranslateYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case 3 /* add */:\n bone.y += y * alpha;\n }\n }\n };\n var ScaleTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.scaleX + \"|\" + boneIndex,\n Property.scaleY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let x, y;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n x *= bone.data.scaleX;\n y *= bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ScaleXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time) * bone.data.scaleX;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleX += x - bone.data.scaleX;\n else\n bone.scaleX = x;\n } else {\n let bx = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n }\n }\n }\n };\n var ScaleYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time) * bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleY += y - bone.data.scaleY;\n else\n bone.scaleY = y;\n } else {\n let by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n by = bone.data.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = bone.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ShearTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.shearX + \"|\" + boneIndex,\n Property.shearY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n };\n var ShearXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n break;\n case 3 /* add */:\n bone.shearX += x * alpha;\n }\n }\n };\n var ShearYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case 3 /* add */:\n bone.shearY += y * alpha;\n }\n }\n };\n var RGBATimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 5;\n }\n setFrame(frame, time, r, g, b, a) {\n frame *= 5;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.setFromColor(setup);\n return;\n case 1 /* first */:\n color.add(\n (setup.r - color.r) * alpha,\n (setup.g - color.g) * alpha,\n (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha\n );\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0;\n let i = Timeline.search(frames, time, 5);\n let curveType = this.curves[i / 5];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n let t = (time - before) / (frames[i + 5] - before);\n r += (frames[i + 5 + 1] - r) * t;\n g += (frames[i + 5 + 2] - g) * t;\n b += (frames[i + 5 + 3] - b) * t;\n a += (frames[i + 5 + 4] - a) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n }\n if (alpha == 1)\n color.set(r, g, b, a);\n else {\n if (blend == 0 /* 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 };\n var RGBTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, r, g, b) {\n frame <<= 2;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n return;\n case 1 /* first */:\n color.r += (setup.r - color.r) * alpha;\n color.g += (setup.g - color.g) * alpha;\n color.b += (setup.b - color.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n r += (frames[i + 4 + 1] - r) * t;\n g += (frames[i + 4 + 2] - g) * t;\n b += (frames[i + 4 + 3] - b) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (alpha == 1) {\n color.r = r;\n color.g = g;\n color.b = b;\n } else {\n if (blend == 0 /* setup */) {\n let setup = slot.data.color;\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n }\n color.r += (r - color.r) * alpha;\n color.g += (g - color.g) * alpha;\n color.b += (b - color.b) * alpha;\n }\n }\n };\n var AlphaTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let color = slot.color;\n if (time < this.frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.a = setup.a;\n return;\n case 1 /* first */:\n color.a += (setup.a - color.a) * alpha;\n }\n return;\n }\n let a = this.getCurveValue(time);\n if (alpha == 1)\n color.a = a;\n else {\n if (blend == 0 /* setup */)\n color.a = slot.data.color.a;\n color.a += (a - color.a) * alpha;\n }\n }\n };\n var RGBA2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 8;\n }\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\n frame <<= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n this.frames[frame + 5] = r2;\n this.frames[frame + 6] = g2;\n this.frames[frame + 7] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.setFromColor(setupLight);\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.add(\n (setupLight.r - light.r) * alpha,\n (setupLight.g - light.g) * alpha,\n (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha\n );\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 8);\n let curveType = this.curves[i >> 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n let t = (time - before) / (frames[i + 8] - before);\n r += (frames[i + 8 + 1] - r) * t;\n g += (frames[i + 8 + 2] - g) * t;\n b += (frames[i + 8 + 3] - b) * t;\n a += (frames[i + 8 + 4] - a) * t;\n r2 += (frames[i + 8 + 5] - r2) * t;\n g2 += (frames[i + 8 + 6] - g2) * t;\n b2 += (frames[i + 8 + 7] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\n }\n if (alpha == 1) {\n light.set(r, g, b, a);\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n light.setFromColor(slot.data.color);\n let setupDark = slot.data.darkColor;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var RGB2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, r, g, b, r2, g2, b2) {\n frame *= 7;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = r2;\n this.frames[frame + 5] = g2;\n this.frames[frame + 6] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.r += (setupLight.r - light.r) * alpha;\n light.g += (setupLight.g - light.g) * alpha;\n light.b += (setupLight.b - light.b) * alpha;\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n r += (frames[i + 7 + 1] - r) * t;\n g += (frames[i + 7 + 2] - g) * t;\n b += (frames[i + 7 + 3] - b) * t;\n r2 += (frames[i + 7 + 4] - r2) * t;\n g2 += (frames[i + 7 + 5] - g2) * t;\n b2 += (frames[i + 7 + 6] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (alpha == 1) {\n light.r = r;\n light.g = g;\n light.b = b;\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.r += (r - light.r) * alpha;\n light.g += (g - light.g) * alpha;\n light.b += (b - light.b) * alpha;\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var AttachmentTimeline = class extends Timeline {\n constructor(frameCount, slotIndex) {\n super(frameCount, [\n Property.attachment + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachmentNames = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, attachmentName) {\n this.frames[frame] = time;\n this.attachmentNames[frame] = attachmentName;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\n }\n setAttachment(skeleton, slot, attachmentName) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n };\n var DeformTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex, attachment) {\n super(frameCount, bezierCount, [\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n this.vertices = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, vertices) {\n this.frames[frame] = time;\n this.vertices[frame] = vertices;\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getCurvePercent(time, frame) {\n let curves = this.curves;\n let i = curves[frame];\n switch (i) {\n case 0:\n let x2 = this.frames[frame];\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\n case 1:\n return 0;\n }\n i -= 2;\n if (curves[i] > time) {\n let x2 = this.frames[frame];\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n let x = curves[n - 2], y = curves[n - 1];\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.getAttachment();\n if (!slotAttachment)\n return;\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\n return;\n let deform = slot.deform;\n if (deform.length == 0)\n blend = 0 /* setup */;\n let vertices = this.vertices;\n let vertexCount = vertices[0].length;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n deform.length = 0;\n return;\n case 1 /* first */:\n if (alpha == 1) {\n deform.length = 0;\n return;\n }\n deform.length = vertexCount;\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n deform.length = vertexCount;\n if (time >= frames[frames.length - 1]) {\n let lastVertices = vertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] - setupVertices[i2];\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2];\n }\n } else\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let setup = setupVertices[i2];\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] = lastVertices[i2] * alpha;\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] * alpha;\n }\n }\n }\n return;\n }\n let frame = Timeline.search1(frames, time);\n let percent = this.getCurvePercent(time, frame);\n let prevVertices = vertices[frame];\n let nextVertices = vertices[frame + 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2], setup = setupVertices[i2];\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\n }\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n };\n var _EventTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _EventTimeline.propertyIds);\n this.events = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, event) {\n this.frames[frame] = event.time;\n this.events[frame] = event;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (!firedEvents)\n return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n let i = 0;\n if (lastTime < frames[0])\n i = 0;\n else {\n i = Timeline.search1(frames, lastTime) + 1;\n let frameTime = frames[i];\n while (i > 0) {\n if (frames[i - 1] != frameTime)\n break;\n i--;\n }\n }\n for (; i < frameCount && time >= frames[i]; i++)\n firedEvents.push(this.events[i]);\n }\n };\n var EventTimeline = _EventTimeline;\n EventTimeline.propertyIds = [\"\" + Property.event];\n var _DrawOrderTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _DrawOrderTimeline.propertyIds);\n this.drawOrders = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, drawOrder) {\n this.frames[frame] = time;\n this.drawOrders[frame] = drawOrder;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n let idx = Timeline.search1(this.frames, time);\n let drawOrderToSetupIndex = this.drawOrders[idx];\n if (!drawOrderToSetupIndex)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n else {\n let drawOrder = skeleton.drawOrder;\n let slots = skeleton.slots;\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n };\n var DrawOrderTimeline = _DrawOrderTimeline;\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\n var IkConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, ikConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.ikConstraint + \"|\" + ikConstraintIndex\n ]);\n this.ikConstraintIndex = 0;\n this.ikConstraintIndex = ikConstraintIndex;\n }\n getFrameEntries() {\n return 6;\n }\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\n frame *= 6;\n this.frames[frame] = time;\n this.frames[frame + 1] = mix;\n this.frames[frame + 2] = softness;\n this.frames[frame + 3] = bendDirection;\n this.frames[frame + 4] = compress ? 1 : 0;\n this.frames[frame + 5] = stretch ? 1 : 0;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* 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 1 /* 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 let mix = 0, softness = 0;\n let i = Timeline.search(frames, time, 6);\n let curveType = this.curves[i / 6];\n switch (curveType) {\n case 0:\n let before = frames[i];\n mix = frames[i + 1];\n softness = frames[i + 2];\n let t = (time - before) / (frames[i + 6] - before);\n mix += (frames[i + 6 + 1] - mix) * t;\n softness += (frames[i + 6 + 2] - softness) * t;\n break;\n case 1:\n mix = frames[i + 1];\n softness = frames[i + 2];\n break;\n default:\n mix = this.getBezierValue(time, i, 1, curveType - 2);\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n if (blend == 0 /* setup */) {\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\n if (direction == 1 /* mixOut */) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n } else {\n constraint.mix += (mix - constraint.mix) * alpha;\n constraint.softness += (softness - constraint.softness) * alpha;\n if (direction == 0 /* mixIn */) {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n }\n }\n };\n var TransformConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, transformConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.transformConstraint + \"|\" + transformConstraintIndex\n ]);\n this.transformConstraintIndex = 0;\n this.transformConstraintIndex = transformConstraintIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\n let frames = this.frames;\n frame *= 7;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n frames[frame + 4] = mixScaleX;\n frames[frame + 5] = mixScaleY;\n frames[frame + 6] = mixShearY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\n }\n return;\n }\n let rotate, x, y, scaleX, scaleY, shearY;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n rotate += (frames[i + 7 + 1] - rotate) * t;\n x += (frames[i + 7 + 2] - x) * t;\n y += (frames[i + 7 + 3] - y) * t;\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\n shearY += (frames[i + 7 + 6] - shearY) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\n }\n }\n };\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.position = constraint.data.position;\n return;\n case 1 /* first */:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n let position = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n };\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.spacing = constraint.data.spacing;\n return;\n case 1 /* first */:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n let spacing = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n };\n var PathConstraintMixTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\n ]);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, mixRotate, mixX, mixY) {\n let frames = this.frames;\n frame <<= 2;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = constraint.data.mixRotate;\n constraint.mixX = constraint.data.mixX;\n constraint.mixY = constraint.data.mixY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\n }\n return;\n }\n let rotate, x, y;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n rotate += (frames[i + 4 + 1] - rotate) * t;\n x += (frames[i + 4 + 2] - x) * t;\n y += (frames[i + 4 + 3] - y) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n }\n }\n };\n var _SequenceTimeline = class extends Timeline {\n constructor(frameCount, slotIndex, attachment) {\n super(frameCount, [\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\n ]);\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n }\n getFrameEntries() {\n return _SequenceTimeline.ENTRIES;\n }\n getSlotIndex() {\n return this.slotIndex;\n }\n getAttachment() {\n return this.attachment;\n }\n setFrame(frame, time, mode, index, delay) {\n let frames = this.frames;\n frame *= _SequenceTimeline.ENTRIES;\n frames[frame] = time;\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\n frames[frame + _SequenceTimeline.DELAY] = delay;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.attachment;\n let attachment = this.attachment;\n if (slotAttachment != attachment) {\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\n return;\n }\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n slot.sequenceIndex = -1;\n return;\n }\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\n let before = frames[i];\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\n let delay = frames[i + _SequenceTimeline.DELAY];\n if (!this.attachment.sequence)\n return;\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\n let mode = SequenceModeValues[modeAndIndex & 15];\n if (mode != 0 /* hold */) {\n index += (time - before) / delay + 1e-5 | 0;\n switch (mode) {\n case 1 /* once */:\n index = Math.min(count - 1, index);\n break;\n case 2 /* loop */:\n index %= count;\n break;\n case 3 /* pingpong */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : index % n;\n if (index >= count)\n index = n - index;\n break;\n }\n case 4 /* onceReverse */:\n index = Math.max(count - 1 - index, 0);\n break;\n case 5 /* loopReverse */:\n index = count - 1 - index % count;\n break;\n case 6 /* pingpongReverse */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : (index + count - 1) % n;\n if (index >= count)\n index = n - index;\n }\n }\n }\n slot.sequenceIndex = index;\n }\n };\n var SequenceTimeline = _SequenceTimeline;\n SequenceTimeline.ENTRIES = 3;\n SequenceTimeline.MODE = 1;\n SequenceTimeline.DELAY = 2;\n\n // spine-core/src/AnimationState.ts\n var _AnimationState = class {\n constructor(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 StringSet();\n this.animationsChanged = false;\n this.trackEntryPool = new Pool(() => new TrackEntry());\n this.data = data;\n }\n static emptyAnimation() {\n return _AnimationState._emptyAnimation;\n }\n update(delta) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (!current)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n let 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 let next = current.next;\n if (next) {\n let 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) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\n tracks[i] = null;\n this.queue.end(current);\n this.clearNext(current);\n continue;\n }\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from)\n from.mixingTo = null;\n while (from) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n }\n updateMixingFrom(to, delta) {\n let from = to.mixingFrom;\n if (!from)\n return true;\n let 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)\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 apply(skeleton) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\n let current = tracks[i2];\n if (!current || current.delay > 0)\n continue;\n applied = true;\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\n let mix = current.alpha;\n if (current.mixingFrom)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && !current.next)\n mix = 0;\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\n let applyEvents = events;\n if (current.reverse) {\n applyTime = current.animation.duration - applyTime;\n applyEvents = null;\n }\n let timelines = current.animation.timelines;\n let timelineCount = timelines.length;\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\n for (let ii = 0; ii < timelineCount; ii++) {\n Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\n }\n } else {\n let timelineMode = current.timelineMode;\n let shortestRotation = current.shortestRotation;\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n current.timelinesRotation.length = timelineCount << 1;\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline2 = timelines[ii];\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\n } else if (timeline2 instanceof AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\n } else {\n Utils.webkit602BugfixHelper(mix, blend);\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* 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 + 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.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n }\n applyMixingFrom(to, skeleton, blend) {\n let from = to.mixingFrom;\n if (from.mixingFrom)\n this.applyMixingFrom(from, skeleton, blend);\n let mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == 1 /* first */)\n blend = 0 /* setup */;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != 1 /* first */)\n blend = from.mixBlend;\n }\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let timelines = from.animation.timelines;\n let timelineCount = timelines.length;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\n let events = null;\n if (from.reverse)\n applyTime = from.animation.duration - applyTime;\n else if (mix < from.eventThreshold)\n events = this.events;\n if (blend == 3 /* add */) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n let shortestRotation = from.shortestRotation;\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n from.timelinesRotation.length = timelineCount << 1;\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = 1 /* mixOut */;\n let timelineBlend;\n let alpha = 0;\n switch (timelineMode[i]) {\n case SUBSEQUENT:\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaMix;\n break;\n case HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case HOLD_FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = 0 /* setup */;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (!shortestRotation && timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\n else {\n Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\n direction = 0 /* mixIn */;\n timeline.apply(skeleton, animationLast, applyTime, 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 applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n if (time < timeline.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n } else\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + SETUP;\n }\n setAttachment(skeleton, slot, attachmentName, attachments) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n if (attachments)\n slot.attachmentState = this.unkeyedState + CURRENT;\n }\n applyRotateTimeline(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, 0 /* mixIn */);\n return;\n }\n let bone = skeleton.bones[timeline.boneIndex];\n if (!bone.active)\n return;\n let frames = timeline.frames;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case 1 /* first */:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\n r2 = bone.data.rotation + timeline.getCurveValue(time);\n }\n let total = 0, diff = r2 - r1;\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n let current = diff > 0, dir = lastTotal >= 0;\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n bone.rotation = r1 + total * alpha;\n }\n queueEvents(entry, animationTime) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped)\n break;\n if (event.time > animationEnd)\n continue;\n this.queue.event(entry, event);\n }\n let 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 let event = events[i];\n if (event.time < animationStart)\n continue;\n this.queue.event(entry, event);\n }\n }\n clearTracks() {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let 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 clearTrack(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n let current = this.tracks[trackIndex];\n if (!current)\n return;\n this.queue.end(current);\n this.clearNext(current);\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (!from)\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 setCurrent(index, current, interrupt) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n current.previous = null;\n if (from) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom && 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 setAnimation(trackIndex, animationName, loop = false) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n setAnimationWith(trackIndex, animation, loop = false) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.clearNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.clearNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let last = this.expandToIndex(trackIndex);\n if (last) {\n while (last.next)\n last = last.next;\n }\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n if (!last) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n entry.previous = last;\n if (delay <= 0)\n delay += last.getTrackComplete() - entry.mixDuration;\n }\n entry.delay = delay;\n return entry;\n }\n setEmptyAnimation(trackIndex, mixDuration = 0) {\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\n if (delay <= 0)\n entry.delay += entry.mixDuration - mixDuration;\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n setEmptyAnimations(mixDuration = 0) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n expandToIndex(index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n trackEntry(trackIndex, animation, loop, last) {\n let entry = this.trackEntryPool.obtain();\n entry.reset();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.reverse = false;\n entry.shortestRotation = 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.mixTime = 0;\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\n entry.interruptAlpha = 1;\n entry.totalAlpha = 0;\n entry.mixBlend = 2 /* replace */;\n return entry;\n }\n clearNext(entry) {\n let next = entry.next;\n while (next) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n _animationsChanged() {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let entry = tracks[i];\n if (!entry)\n continue;\n while (entry.mixingFrom)\n entry = entry.mixingFrom;\n do {\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry);\n }\n }\n computeHold(entry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n timelineMode.length = timelinesCount;\n let timelineHoldMix = entry.timelineHoldMix;\n timelineHoldMix.length = 0;\n let propertyIDs = this.propertyIDs;\n if (to && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++)\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\n return;\n }\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let ids = timeline.getPropertyIds();\n if (!propertyIDs.addAll(ids))\n timelineMode[i] = SUBSEQUENT;\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\n timelineMode[i] = FIRST;\n } else {\n for (let next = to.mixingTo; next; next = next.mixingTo) {\n if (next.animation.hasTimeline(ids))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = HOLD_MIX;\n timelineHoldMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = HOLD_FIRST;\n }\n }\n }\n getCurrent(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n }\n addListener(listener) {\n if (!listener)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n }\n clearListeners() {\n this.listeners.length = 0;\n }\n clearListenerNotifications() {\n this.queue.clear();\n }\n };\n var AnimationState = _AnimationState;\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\n var TrackEntry = class {\n constructor() {\n this.animation = null;\n this.previous = null;\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.listener = null;\n this.trackIndex = 0;\n this.loop = false;\n this.holdPrevious = false;\n this.reverse = false;\n this.shortestRotation = false;\n this.eventThreshold = 0;\n this.attachmentThreshold = 0;\n this.drawOrderThreshold = 0;\n this.animationStart = 0;\n this.animationEnd = 0;\n this.animationLast = 0;\n this.nextAnimationLast = 0;\n this.delay = 0;\n this.trackTime = 0;\n this.trackLast = 0;\n this.nextTrackLast = 0;\n this.trackEnd = 0;\n this.timeScale = 0;\n this.alpha = 0;\n this.mixTime = 0;\n this.mixDuration = 0;\n this.interruptAlpha = 0;\n this.totalAlpha = 0;\n this.mixBlend = 2 /* replace */;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n reset() {\n this.next = null;\n this.previous = 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 getAnimationTime() {\n if (this.loop) {\n let 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 setAnimationLast(animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n isComplete() {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n resetRotationDirections() {\n this.timelinesRotation.length = 0;\n }\n getTrackComplete() {\n let duration = this.animationEnd - this.animationStart;\n if (duration != 0) {\n if (this.loop)\n return duration * (1 + (this.trackTime / duration | 0));\n if (this.trackTime < duration)\n return duration;\n }\n return this.trackTime;\n }\n };\n var EventQueue = class {\n constructor(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n start(entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n interrupt(entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n end(entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n dispose(entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n complete(entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n event(entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n drain() {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n let objects = this.objects;\n let listeners = this.animState.listeners;\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i];\n let entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener && entry.listener.start)\n entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.start)\n listener.start(entry);\n }\n break;\n case EventType.interrupt:\n if (entry.listener && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.interrupt)\n listener.interrupt(entry);\n }\n break;\n case EventType.end:\n if (entry.listener && entry.listener.end)\n entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.end)\n listener.end(entry);\n }\n case EventType.dispose:\n if (entry.listener && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.dispose)\n listener.dispose(entry);\n }\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener && entry.listener.complete)\n entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.complete)\n listener.complete(entry);\n }\n break;\n case EventType.event:\n let event = objects[i++ + 2];\n if (entry.listener && entry.listener.event)\n entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.event)\n listener.event(entry, event);\n }\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n }\n clear() {\n this.objects.length = 0;\n }\n };\n var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"start\"] = 0] = \"start\";\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\n EventType2[EventType2[\"end\"] = 2] = \"end\";\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\n EventType2[EventType2[\"event\"] = 5] = \"event\";\n return EventType2;\n })(EventType || {});\n var AnimationStateAdapter = class {\n start(entry) {\n }\n interrupt(entry) {\n }\n end(entry) {\n }\n dispose(entry) {\n }\n complete(entry) {\n }\n event(entry, event) {\n }\n };\n var SUBSEQUENT = 0;\n var FIRST = 1;\n var HOLD_SUBSEQUENT = 2;\n var HOLD_FIRST = 3;\n var HOLD_MIX = 4;\n var SETUP = 1;\n var CURRENT = 2;\n\n // spine-core/src/AnimationStateData.ts\n var AnimationStateData = class {\n constructor(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (!skeletonData)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n setMix(fromName, toName, duration) {\n let from = this.skeletonData.findAnimation(fromName);\n if (!from)\n throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (!to)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n setMixWith(from, to, duration) {\n if (!from)\n throw new Error(\"from cannot be null.\");\n if (!to)\n throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n getMix(from, to) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === void 0 ? this.defaultMix : value;\n }\n };\n\n // spine-core/src/attachments/BoundingBoxAttachment.ts\n var BoundingBoxAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/attachments/ClippingAttachment.ts\n var ClippingAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.endSlot = null;\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\n }\n copy() {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/Texture.ts\n var Texture = class {\n constructor(image) {\n this._image = image;\n }\n getImage() {\n return this._image;\n }\n };\n var TextureFilter = /* @__PURE__ */ ((TextureFilter3) => {\n TextureFilter3[TextureFilter3[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter3[TextureFilter3[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter3[TextureFilter3[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter3[TextureFilter3[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter3[TextureFilter3[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter3[TextureFilter3[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter3[TextureFilter3[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n return TextureFilter3;\n })(TextureFilter || {});\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\n return TextureWrap3;\n })(TextureWrap || {});\n var TextureRegion = class {\n constructor() {\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.degrees = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n };\n var FakeTexture = class extends Texture {\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-core/src/TextureAtlas.ts\n var TextureAtlas = class {\n constructor(atlasText) {\n this.pages = new Array();\n this.regions = new Array();\n let reader = new TextureAtlasReader(atlasText);\n let entry = new Array(4);\n let pageFields = {};\n pageFields[\"size\"] = (page2) => {\n page2.width = parseInt(entry[1]);\n page2.height = parseInt(entry[2]);\n };\n pageFields[\"format\"] = () => {\n };\n pageFields[\"filter\"] = (page2) => {\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\n };\n pageFields[\"repeat\"] = (page2) => {\n if (entry[1].indexOf(\"x\") != -1)\n page2.uWrap = 10497 /* Repeat */;\n if (entry[1].indexOf(\"y\") != -1)\n page2.vWrap = 10497 /* Repeat */;\n };\n pageFields[\"pma\"] = (page2) => {\n page2.pma = entry[1] == \"true\";\n };\n var regionFields = {};\n regionFields[\"xy\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n };\n regionFields[\"size\"] = (region) => {\n region.width = parseInt(entry[1]);\n region.height = parseInt(entry[2]);\n };\n regionFields[\"bounds\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n region.width = parseInt(entry[3]);\n region.height = parseInt(entry[4]);\n };\n regionFields[\"offset\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n };\n regionFields[\"orig\"] = (region) => {\n region.originalWidth = parseInt(entry[1]);\n region.originalHeight = parseInt(entry[2]);\n };\n regionFields[\"offsets\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n region.originalWidth = parseInt(entry[3]);\n region.originalHeight = parseInt(entry[4]);\n };\n regionFields[\"rotate\"] = (region) => {\n let value = entry[1];\n if (value == \"true\")\n region.degrees = 90;\n else if (value != \"false\")\n region.degrees = parseInt(value);\n };\n regionFields[\"index\"] = (region) => {\n region.index = parseInt(entry[1]);\n };\n let line = reader.readLine();\n while (line && line.trim().length == 0)\n line = reader.readLine();\n while (true) {\n if (!line || line.trim().length == 0)\n break;\n if (reader.readEntry(entry, line) == 0)\n break;\n line = reader.readLine();\n }\n let page = null;\n let names = null;\n let values = null;\n while (true) {\n if (line === null)\n break;\n if (line.trim().length == 0) {\n page = null;\n line = reader.readLine();\n } else if (!page) {\n page = new TextureAtlasPage(line.trim());\n while (true) {\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\n break;\n let field = pageFields[entry[0]];\n if (field)\n field(page);\n }\n this.pages.push(page);\n } else {\n let region = new TextureAtlasRegion(page, line);\n while (true) {\n let count = reader.readEntry(entry, line = reader.readLine());\n if (count == 0)\n break;\n let field = regionFields[entry[0]];\n if (field)\n field(region);\n else {\n if (!names)\n names = [];\n if (!values)\n values = [];\n names.push(entry[0]);\n let entryValues = [];\n for (let i = 0; i < count; i++)\n entryValues.push(parseInt(entry[i + 1]));\n values.push(entryValues);\n }\n }\n if (region.originalWidth == 0 && region.originalHeight == 0) {\n region.originalWidth = region.width;\n region.originalHeight = region.height;\n }\n if (names && names.length > 0 && values && values.length > 0) {\n region.names = names;\n region.values = values;\n names = null;\n values = null;\n }\n region.u = region.x / page.width;\n region.v = region.y / page.height;\n if (region.degrees == 90) {\n region.u2 = (region.x + region.height) / page.width;\n region.v2 = (region.y + region.width) / page.height;\n } else {\n region.u2 = (region.x + region.width) / page.width;\n region.v2 = (region.y + region.height) / page.height;\n }\n this.regions.push(region);\n }\n }\n }\n findRegion(name) {\n for (let 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 setTextures(assetManager, pathPrefix = \"\") {\n for (let page of this.pages)\n page.setTexture(assetManager.get(pathPrefix + page.name));\n }\n dispose() {\n var _a;\n for (let i = 0; i < this.pages.length; i++) {\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\n }\n }\n };\n var TextureAtlasReader = class {\n constructor(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n readLine() {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n readEntry(entry, line) {\n if (!line)\n return 0;\n line = line.trim();\n if (line.length == 0)\n return 0;\n let colon = line.indexOf(\":\");\n if (colon == -1)\n return 0;\n entry[0] = line.substr(0, colon).trim();\n for (let i = 1, lastMatch = colon + 1; ; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) {\n entry[i] = line.substr(lastMatch).trim();\n return i;\n }\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n if (i == 4)\n return 4;\n }\n }\n };\n var TextureAtlasPage = class {\n constructor(name) {\n this.minFilter = 9728 /* Nearest */;\n this.magFilter = 9728 /* Nearest */;\n this.uWrap = 33071 /* ClampToEdge */;\n this.vWrap = 33071 /* ClampToEdge */;\n this.texture = null;\n this.width = 0;\n this.height = 0;\n this.pma = false;\n this.name = name;\n }\n setTexture(texture) {\n this.texture = texture;\n texture.setFilters(this.minFilter, this.magFilter);\n texture.setWraps(this.uWrap, this.vWrap);\n }\n };\n var TextureAtlasRegion = class extends TextureRegion {\n constructor(page, name) {\n super();\n this.x = 0;\n this.y = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n this.index = 0;\n this.degrees = 0;\n this.names = null;\n this.values = null;\n this.page = page;\n this.name = name;\n }\n };\n\n // spine-core/src/attachments/MeshAttachment.ts\n var MeshAttachment = class extends VertexAttachment {\n constructor(name, path) {\n super(name);\n this.region = null;\n this.regionUVs = [];\n this.uvs = [];\n this.triangles = [];\n this.color = new Color(1, 1, 1, 1);\n this.width = 0;\n this.height = 0;\n this.hullLength = 0;\n this.edges = [];\n this.parentMesh = null;\n this.sequence = null;\n this.tempColor = new Color(0, 0, 0, 0);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let regionUVs = this.regionUVs;\n if (!this.uvs || this.uvs.length != regionUVs.length)\n this.uvs = Utils.newFloatArray(regionUVs.length);\n let uvs = this.uvs;\n let n = this.uvs.length;\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof TextureAtlasRegion) {\n let region = this.region, image = region.page.texture.getImage();\n let textureWidth = image.width, textureHeight = image.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 (let 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 (let 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 (let 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 } else if (!this.region) {\n u = v = 0;\n width = height = 1;\n } else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (let 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 getParentMesh() {\n return this.parentMesh;\n }\n setParentMesh(parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh) {\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 copy() {\n if (this.parentMesh)\n return this.newLinkedMesh();\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n if (this.edges) {\n copy.edges = new Array(this.edges.length);\n 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 computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n super.computeWorldVertices(slot, start, count, worldVertices2, offset, stride);\n }\n newLinkedMesh() {\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n copy.timelineAttachment = this.timelineAttachment;\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\n if (copy.region != null)\n copy.updateRegion();\n return copy;\n }\n };\n\n // spine-core/src/attachments/PathAttachment.ts\n var PathAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.lengths = [];\n this.closed = false;\n this.constantSpeed = false;\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n 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 };\n\n // spine-core/src/attachments/PointAttachment.ts\n var PointAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.color = new Color(0.38, 0.94, 0, 1);\n }\n computeWorldPosition(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 computeWorldRotation(bone) {\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * bone.a + sin * bone.b;\n let y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n copy() {\n let copy = new PointAttachment(this.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 };\n\n // spine-core/src/attachments/RegionAttachment.ts\n var _RegionAttachment = class extends Attachment {\n constructor(name, path) {\n super(name);\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 Color(1, 1, 1, 1);\n this.rendererObject = null;\n this.region = null;\n this.sequence = null;\n this.offset = Utils.newFloatArray(8);\n this.uvs = Utils.newFloatArray(8);\n this.tempColor = new Color(1, 1, 1, 1);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let region = this.region;\n let uvs = this.uvs;\n if (region == null) {\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n uvs[4] = 1;\n uvs[5] = 1;\n uvs[6] = 1;\n uvs[7] = 0;\n return;\n }\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let x = this.x, y = this.y;\n let localXCos = localX * cos + x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[0] = localXCos - localYSin;\n offset[1] = localYCos + localXSin;\n offset[2] = localXCos - localY2Sin;\n offset[3] = localY2Cos + localXSin;\n offset[4] = localX2Cos - localY2Sin;\n offset[5] = localY2Cos + localX2Sin;\n offset[6] = localX2Cos - localYSin;\n offset[7] = localYCos + localX2Sin;\n if (region.degrees == 90) {\n uvs[0] = region.u2;\n uvs[1] = region.v2;\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 } 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 computeWorldVertices(slot, worldVertices2, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n let bone = slot.bone;\n let vertexOffset = this.offset;\n let x = bone.worldX, y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[0];\n offsetY = vertexOffset[1];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[2];\n offsetY = vertexOffset[3];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[4];\n offsetY = vertexOffset[5];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[6];\n offsetY = vertexOffset[7];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n }\n copy() {\n let copy = new _RegionAttachment(this.name, this.path);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\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 Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n return copy;\n }\n };\n var RegionAttachment = _RegionAttachment;\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\n // spine-core/src/AtlasAttachmentLoader.ts\n var AtlasAttachmentLoader = class {\n constructor(atlas) {\n this.atlas = atlas;\n }\n loadSequence(name, basePath, sequence) {\n let regions = sequence.regions;\n for (let i = 0, n = regions.length; i < n; i++) {\n let path = sequence.getPath(basePath, i);\n let region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\n regions[i] = region;\n regions[i].renderObject = regions[i];\n }\n }\n newRegionAttachment(skin, name, path, sequence) {\n let attachment = new RegionAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newMeshAttachment(skin, name, path, sequence) {\n let attachment = new MeshAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newBoundingBoxAttachment(skin, name) {\n return new BoundingBoxAttachment(name);\n }\n newPathAttachment(skin, name) {\n return new PathAttachment(name);\n }\n newPointAttachment(skin, name) {\n return new PointAttachment(name);\n }\n newClippingAttachment(skin, name) {\n return new ClippingAttachment(name);\n }\n };\n\n // spine-core/src/BoneData.ts\n var BoneData = class {\n constructor(index, name, parent) {\n this.index = 0;\n this.parent = null;\n this.length = 0;\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 Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n };\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n return TransformMode2;\n })(TransformMode || {});\n\n // spine-core/src/Bone.ts\n var Bone = class {\n constructor(data, skeleton, parent) {\n this.parent = null;\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.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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 isActive() {\n return this.active;\n }\n update() {\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\n }\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n updateWorldTransformWith(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 let parent = this.parent;\n if (!parent) {\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n let sx = skeleton.scaleX;\n let sy = skeleton.scaleY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n let 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 0 /* Normal */: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = 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 1 /* OnlyTranslation */: {\n let rotationY = rotation + 90 + shearY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case 2 /* NoRotationOrReflection */: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 1e-4) {\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) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = 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 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 1e-5)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = 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 setToSetupPose() {\n let 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 getWorldRotationX() {\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\n }\n getWorldRotationY() {\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\n }\n getWorldScaleX() {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n }\n getWorldScaleY() {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n }\n updateAppliedTransform() {\n let parent = this.parent;\n if (!parent) {\n this.ax = this.worldX - this.skeleton.x;\n this.ay = this.worldY - this.skeleton.y;\n this.arotation = Math.atan2(this.c, this.a) * 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) * MathUtils.radDeg;\n return;\n }\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n let pid = 1 / (pa * pd - pb * pc);\n let 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 let ia = pid * pd;\n let id = pid * pa;\n let ib = pid * pb;\n let ic = pid * pc;\n let ra = ia * this.a - ib * this.c;\n let rb = ia * this.b - ib * this.d;\n let rc = id * this.c - ic * this.a;\n let rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 1e-4) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\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) * MathUtils.radDeg;\n }\n }\n worldToLocal(world) {\n let invDet = 1 / (this.a * this.d - this.b * this.c);\n let x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = x * this.d * invDet - y * this.b * invDet;\n world.y = y * this.a * invDet - x * this.c * invDet;\n return world;\n }\n localToWorld(local) {\n let 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 worldToLocalRotation(worldRotation) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\n }\n localToWorldRotation(localRotation) {\n localRotation -= this.rotation - this.shearX;\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\n }\n rotateWorld(degrees) {\n let a = this.a, b = this.b, c = this.c, d = this.d;\n let cos = MathUtils.cosDeg(degrees), sin = 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 }\n };\n\n // spine-core/src/ConstraintData.ts\n var ConstraintData = class {\n constructor(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n };\n\n // spine-core/src/AssetManagerBase.ts\n var AssetManagerBase = class {\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\n this.pathPrefix = \"\";\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n this.downloader = downloader;\n }\n start(path) {\n this.toLoad++;\n return this.pathPrefix + path;\n }\n success(callback, path, asset) {\n this.toLoad--;\n this.loaded++;\n this.assets[path] = asset;\n if (callback)\n callback(path, asset);\n }\n error(callback, path, message) {\n this.toLoad--;\n this.loaded++;\n this.errors[path] = message;\n if (callback)\n callback(path, message);\n }\n loadAll() {\n let promise = new Promise((resolve, reject) => {\n let check = () => {\n if (this.isLoadingComplete()) {\n if (this.hasErrors())\n reject(this.errors);\n else\n resolve(this);\n return;\n }\n requestAnimationFrame(check);\n };\n requestAnimationFrame(check);\n });\n return promise;\n }\n setRawDataURI(path, data) {\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\n }\n loadBinary(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadBinary(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\n });\n }\n loadText(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadText(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\n });\n }\n loadJson(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadJson(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\n });\n }\n loadTexture(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\n let isWebWorker = !isBrowser;\n if (isWebWorker) {\n fetch(path, { mode: \"cors\" }).then((response) => {\n if (response.ok)\n return response.blob();\n this.error(error, path, `Couldn't load image: ${path}`);\n return null;\n }).then((blob) => {\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\n }).then((bitmap) => {\n if (bitmap)\n this.success(success, path, this.textureLoader(bitmap));\n });\n } else {\n let image = new Image();\n image.crossOrigin = \"anonymous\";\n image.onload = () => {\n this.success(success, path, this.textureLoader(image));\n };\n image.onerror = () => {\n this.error(error, path, `Couldn't load image: ${path}`);\n };\n if (this.downloader.rawDataUris[path])\n path = this.downloader.rawDataUris[path];\n image.src = path;\n }\n }\n loadTextureAtlas(path, success = () => {\n }, error = () => {\n }, fileAlias) {\n let index = path.lastIndexOf(\"/\");\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\n path = this.start(path);\n this.downloader.downloadText(path, (atlasText) => {\n try {\n let atlas = new TextureAtlas(atlasText);\n let toLoad = atlas.pages.length, abort = false;\n for (let page of atlas.pages) {\n this.loadTexture(\n !fileAlias ? parent + page.name : fileAlias[page.name],\n (imagePath, texture) => {\n if (!abort) {\n page.setTexture(texture);\n if (--toLoad == 0)\n this.success(success, path, atlas);\n }\n },\n (imagePath, message) => {\n if (!abort)\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\n abort = true;\n }\n );\n }\n } catch (e) {\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\n }\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\n });\n }\n get(path) {\n return this.assets[this.pathPrefix + path];\n }\n require(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset)\n return asset;\n let error = this.errors[path];\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\n }\n remove(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n delete this.assets[path];\n return asset;\n }\n removeAll() {\n for (let key in this.assets) {\n let asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n }\n isLoadingComplete() {\n return this.toLoad == 0;\n }\n getToLoad() {\n return this.toLoad;\n }\n getLoaded() {\n return this.loaded;\n }\n dispose() {\n this.removeAll();\n }\n hasErrors() {\n return Object.keys(this.errors).length > 0;\n }\n getErrors() {\n return this.errors;\n }\n };\n var Downloader = class {\n constructor() {\n this.callbacks = {};\n this.rawDataUris = {};\n }\n dataUriToString(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx != -1) {\n base64Idx += \"base64,\".length;\n return atob(dataUri.substr(base64Idx));\n } else {\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\n }\n }\n base64ToUint8Array(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n }\n dataUriToUint8Array(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx == -1)\n throw new Error(\"Not a binary data URI.\");\n base64Idx += \"base64,\".length;\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\n }\n downloadText(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToString(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.open(\"GET\", url, true);\n let done = () => {\n this.finish(url, request.status, request.responseText);\n };\n request.onload = done;\n request.onerror = done;\n request.send();\n }\n downloadJson(url, success, error) {\n this.downloadText(url, (data) => {\n success(JSON.parse(data));\n }, error);\n }\n downloadBinary(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n let onerror = () => {\n this.finish(url, request.status, request.response);\n };\n request.onload = () => {\n if (request.status == 200 || request.status == 0)\n this.finish(url, 200, new Uint8Array(request.response));\n else\n onerror();\n };\n request.onerror = onerror;\n request.send();\n }\n start(url, success, error) {\n let callbacks = this.callbacks[url];\n try {\n if (callbacks)\n return true;\n this.callbacks[url] = callbacks = [];\n } finally {\n callbacks.push(success, error);\n }\n }\n finish(url, status, data) {\n let callbacks = this.callbacks[url];\n delete this.callbacks[url];\n let args = status == 200 || status == 0 ? [data] : [status, data];\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\n callbacks[i].apply(null, args);\n }\n };\n\n // spine-core/src/Event.ts\n var Event = class {\n constructor(time, data) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.time = 0;\n this.volume = 0;\n this.balance = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n };\n\n // spine-core/src/EventData.ts\n var EventData = class {\n constructor(name) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.audioPath = null;\n this.volume = 0;\n this.balance = 0;\n this.name = name;\n }\n };\n\n // spine-core/src/IkConstraint.ts\n var IkConstraint = class {\n constructor(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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find bone ${data.target.name}`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mix == 0)\n return;\n let target = this.target;\n let 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.data.uniform, this.softness, this.mix);\n break;\n }\n }\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\n let p = bone.parent;\n if (!p)\n throw new Error(\"IK bone must have parent.\");\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case 1 /* OnlyTranslation */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case 2 /* NoRotationOrReflection */:\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n let sa = pa / bone.skeleton.scaleX;\n let 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) * MathUtils.radDeg;\n default:\n let x = targetX - p.worldX, y = targetY - p.worldY;\n let 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) * 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 let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(\n bone.ax,\n bone.ay,\n bone.arotation + rotationIK * alpha,\n sx,\n sy,\n bone.ashearX,\n bone.ashearY\n );\n }\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\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 } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n let u = Math.abs(psx - psy) <= 1e-4;\n if (!u || stretch) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n let pp = parent.parent;\n if (!pp)\n throw new Error(\"IK parent must itself have a parent.\");\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 1e-4) {\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 let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) * 0.5;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let 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:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1) {\n cos = -1;\n a2 = Math.PI * bendDir;\n } else if (cos > 1) {\n cos = 1;\n a2 = 0;\n if (stretch) {\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n sx *= a;\n if (uniform)\n sy *= a;\n }\n } else\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 } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) * 0.5;\n let r0 = q / c2, r1 = c / q;\n let 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 let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let 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) * 0.5) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * 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, sy, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * 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 };\n\n // spine-core/src/IkConstraintData.ts\n var IkConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/PathConstraintData.ts\n var PathConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.positionMode = PositionMode.Fixed;\n this.spacingMode = SpacingMode.Fixed;\n this.rotateMode = RotateMode.Chain;\n this.offsetRotation = 0;\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n }\n set target(slotData) {\n this._target = slotData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"SlotData not set.\");\n else\n return this._target;\n }\n };\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\n return PositionMode2;\n })(PositionMode || {});\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\n return SpacingMode2;\n })(SpacingMode || {});\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\n return RotateMode2;\n })(RotateMode || {});\n\n // spine-core/src/PathConstraint.ts\n var _PathConstraint = class {\n constructor(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findSlot(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}`);\n this.target = target;\n this.position = data.position;\n this.spacing = data.spacing;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n }\n isActive() {\n return this.active;\n }\n update() {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment))\n return;\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\n return;\n let data = this.data;\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\n let bones = this.bones;\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\n let spacing = this.spacing;\n switch (data.spacingMode) {\n case 2 /* Percent */:\n if (scale) {\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon)\n lengths[i] = 0;\n else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n lengths[i] = Math.sqrt(x * x + y * y);\n }\n }\n }\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\n break;\n case 3 /* Proportional */:\n let sum = 0;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = length;\n sum += length;\n }\n }\n if (sum > 0) {\n sum = spacesCount / sum * spacing;\n for (let i = 1; i < spacesCount; i++)\n spaces[i] *= sum;\n }\n break;\n default:\n let lengthSpacing = data.spacingMode == 0 /* Length */;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n }\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = data.rotateMode == 1 /* Chain */;\n else {\n tip = false;\n let p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * mixX;\n bone.worldY += (boneY - bone.worldY) * mixY;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (mixRotate > 0) {\n let 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 let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\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.updateAppliedTransform();\n }\n }\n computeWorldPositions(path, spacesCount, tangents) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\n let closed2 = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed2 ? 1 : 2;\n let pathLength2 = lengths[curveCount];\n if (this.data.positionMode == 1 /* Percent */)\n position *= pathLength2;\n let multiplier2;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier2 = pathLength2;\n break;\n case 3 /* Proportional */:\n multiplier2 = pathLength2 / spacesCount;\n break;\n default:\n multiplier2 = 1;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier2;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength2;\n if (p < 0)\n p += pathLength2;\n curve = 0;\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 } else if (p > pathLength2) {\n if (prevCurve != _PathConstraint.AFTER) {\n prevCurve = _PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = lengths[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed2 && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(\n p,\n world[0],\n world[1],\n world[2],\n world[3],\n world[4],\n world[5],\n world[6],\n world[7],\n out,\n o,\n tangents || i > 0 && space == 0\n );\n }\n return out;\n }\n if (closed2) {\n verticesLength += 2;\n world = 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 } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let 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 (this.data.positionMode == 1 /* Percent */)\n position *= pathLength;\n let multiplier;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier = pathLength;\n break;\n case 3 /* Proportional */:\n multiplier = pathLength / spacesCount;\n break;\n default:\n multiplier = 1;\n }\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = curves[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n let 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) * 6e-3;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\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 let length = segments[segment];\n if (p > length)\n continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - 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 addBeforePosition(p, temp, i, out, o) {\n let 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 addAfterPosition(p, temp, i, out, o) {\n let 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 addCurvePosition(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 let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let 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 < 1e-3)\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 };\n var PathConstraint = _PathConstraint;\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 1e-5;\n\n // spine-core/src/Slot.ts\n var Slot = class {\n constructor(data, bone) {\n this.darkColor = null;\n this.attachment = null;\n this.attachmentState = 0;\n this.sequenceIndex = -1;\n this.deform = new Array();\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!bone)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = !data.darkColor ? null : new Color();\n this.setToSetupPose();\n }\n getSkeleton() {\n return this.bone.skeleton;\n }\n getAttachment() {\n return this.attachment;\n }\n setAttachment(attachment) {\n if (this.attachment == attachment)\n return;\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\n this.deform.length = 0;\n }\n this.attachment = attachment;\n this.sequenceIndex = -1;\n }\n setToSetupPose() {\n this.color.setFromColor(this.data.color);\n if (this.darkColor)\n this.darkColor.setFromColor(this.data.darkColor);\n if (!this.data.attachmentName)\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 };\n\n // spine-core/src/TransformConstraint.ts\n var TransformConstraint = class {\n constructor(data, skeleton) {\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 0;\n this.temp = new Vector2();\n this.active = false;\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n this.mixScaleX = data.mixScaleX;\n this.mixScaleY = data.mixScaleY;\n this.mixShearY = data.mixShearY;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\n return;\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n applyAbsoluteWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * mixX;\n bone.worldY += (temp.y - bone.worldY) * mixY;\n }\n if (mixScaleX != 0) {\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n if (s != 0)\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n if (s != 0)\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let b = bone.b, d = bone.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyRelativeWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * mixX;\n bone.worldY += temp.y * mixY;\n }\n if (mixScaleX != 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n let b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyAbsoluteLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation;\n if (mixRotate != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n rotation += r * mixRotate;\n }\n let x = bone.ax, y = bone.ay;\n x += (target.ax - x + this.data.offsetX) * mixX;\n y += (target.ay - y + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (mixScaleX != 0 && scaleX != 0)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\n if (mixScaleY != 0 && scaleY != 0)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\n let shearY = bone.ashearY;\n if (mixShearY != 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n shearY += r * mixShearY;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n applyRelativeLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n };\n\n // spine-core/src/Skeleton.ts\n var _Skeleton = class {\n constructor(data) {\n this._updateCache = new Array();\n this.skin = null;\n this.scaleX = 1;\n this._scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone;\n if (!boneData.parent)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n get scaleY() {\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\n }\n set scaleY(scaleY) {\n this._scaleY = scaleY;\n }\n updateCache() {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone);\n }\n }\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n sortIkConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let target = constraint.target;\n this.sortBone(target);\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length == 1) {\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n } else {\n let child = constrained[constrained.length - 1];\n this.sortBone(child);\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n child.sorted = true;\n }\n }\n sortPathConstraint(constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortTransformConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n this.sortBone(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n sortPathConstraintAttachmentWith(attachment, slotBone) {\n if (!(attachment instanceof PathAttachment))\n return;\n let pathBones = attachment.bones;\n if (!pathBones)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n for (let i = 0, n = pathBones.length; i < n; ) {\n let nn = pathBones[i++];\n nn += i;\n while (i < nn)\n this.sortBone(bones[pathBones[i++]]);\n }\n }\n }\n sortBone(bone) {\n if (!bone)\n return;\n if (bone.sorted)\n return;\n let parent = bone.parent;\n if (parent)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n sortReset(bones) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let 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 updateWorldTransform() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[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 }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n updateWorldTransformWith(parent) {\n let rootBone = this.getRootBone();\n if (!rootBone)\n throw new Error(\"Root bone must not be null.\");\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++) {\n let updatable = updateCache[i];\n if (updatable != rootBone)\n updatable.update();\n }\n }\n setToSetupPose() {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n setBonesToSetupPose() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let 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 let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n }\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n }\n }\n setSlotsToSetupPose() {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n getRootBone() {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n }\n setSkinByName(skinName) {\n let skin = this.data.findSkin(skinName);\n if (!skin)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n setSkin(newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin) {\n if (this.skin)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name) {\n let attachment = newSkin.getAttachment(i, name);\n if (attachment)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n getAttachmentByName(slotName, attachmentName) {\n let slot = this.data.findSlot(slotName);\n if (!slot)\n throw new Error(`Can't find slot with name ${slotName}`);\n return this.getAttachment(slot.index, attachmentName);\n }\n getAttachment(slotIndex, attachmentName) {\n if (!attachmentName)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin) {\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment)\n return attachment;\n }\n if (this.data.defaultSkin)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n setAttachment(slotName, attachmentName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment = null;\n if (attachmentName) {\n attachment = this.getAttachment(i, attachmentName);\n if (!attachment)\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 findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n getBoundsRect() {\n let offset = new Vector2();\n let size = new Vector2();\n this.getBounds(offset, size);\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\n }\n getBounds(offset, size, temp = new Array(2)) {\n if (!offset)\n throw new Error(\"offset cannot be null.\");\n if (!size)\n throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n let verticesLength = 0;\n let vertices = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let 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 };\n var Skeleton = _Skeleton;\n Skeleton.yDown = false;\n\n // spine-core/src/SkeletonData.ts\n var SkeletonData = class {\n constructor() {\n this.name = null;\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.defaultSkin = null;\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.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n this.version = null;\n this.hash = null;\n this.fps = 0;\n this.imagesPath = null;\n this.audioPath = null;\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n }\n findSkin(skinName) {\n if (!skinName)\n throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n }\n findEvent(eventDataName) {\n if (!eventDataName)\n throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName)\n return event;\n }\n return null;\n }\n findAnimation(animationName) {\n if (!animationName)\n throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n }\n findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n };\n\n // spine-core/src/Skin.ts\n var SkinEntry = class {\n constructor(slotIndex = 0, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n };\n var Skin = class {\n constructor(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n setAttachment(slotIndex, name, attachment) {\n if (!attachment)\n throw new Error(\"attachment cannot be null.\");\n let 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 addSkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n copySkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (!attachment.attachment)\n continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n getAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n removeAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary)\n delete dictionary[name];\n }\n getAttachments() {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n getAttachmentsForSlot(slotIndex, attachments) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n clear() {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n attachAll(skeleton, oldSkin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n };\n\n // spine-core/src/SlotData.ts\n var SlotData = class {\n constructor(index, name, boneData) {\n this.index = 0;\n this.color = new Color(1, 1, 1, 1);\n this.darkColor = null;\n this.attachmentName = null;\n this.blendMode = BlendMode.Normal;\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n if (!boneData)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n };\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\n return BlendMode3;\n })(BlendMode || {});\n\n // spine-core/src/TransformConstraintData.ts\n var TransformConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/SkeletonBinary.ts\n var SkeletonBinary = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(binary) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n skeletonData.name = \"\";\n let input = new BinaryInput(binary);\n let lowHash = input.readInt32();\n let highHash = input.readInt32();\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n let nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n let n = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let str = input.readString();\n if (!str)\n throw new Error(\"String in string table must not be null.\");\n input.strings.push(str);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Bone name must not be null.\");\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n let data = new BoneData(i, name, parent);\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 = input.readInt(true);\n data.skinRequired = input.readBoolean();\n if (nonessential)\n Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let slotName = input.readString();\n if (!slotName)\n throw new Error(\"Slot name must not be null.\");\n let boneData = skeletonData.bones[input.readInt(true)];\n let data = new SlotData(i, slotName, boneData);\n Color.rgba8888ToColor(data.color, input.readInt32());\n let darkColor = input.readInt32();\n if (darkColor != -1)\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = input.readInt(true);\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"IK constraint data name must not be null.\");\n let data = new IkConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Transform constraint data name must not be null.\");\n let data = new TransformConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n data.mixScaleX = input.readFloat();\n data.mixScaleY = input.readFloat();\n data.mixShearY = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Path constraint data name must not be null.\");\n let data = new PathConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 = input.readInt(true);\n data.spacingMode = input.readInt(true);\n data.rotateMode = input.readInt(true);\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n let i = skeletonData.skins.length;\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++) {\n let skin = this.readSkin(input, skeletonData, false, nonessential);\n if (!skin)\n throw new Error(\"readSkin() should not have returned null.\");\n skeletonData.skins[i] = skin;\n }\n }\n n = this.linkedMeshes.length;\n for (let i = 0; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(\"Not skin found for linked mesh.\");\n if (!linkedMesh.parent)\n throw new Error(\"Linked mesh parent must not be null\");\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let eventName = input.readStringRef();\n if (!eventName)\n throw new Error();\n let data = new EventData(eventName);\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) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let animationName = input.readString();\n if (!animationName)\n throw new Error(\"Animatio name must not be null.\");\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\n }\n return skeletonData;\n }\n readSkin(input, skeletonData, defaultSkin, nonessential) {\n let skin = null;\n let slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new Skin(\"default\");\n } else {\n let skinName = input.readStringRef();\n if (!skinName)\n throw new Error(\"Skin name must not be null.\");\n skin = new Skin(skinName);\n skin.bones.length = input.readInt(true);\n for (let i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (let 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 (let i = 0; i < slotCount; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let name = input.readStringRef();\n if (!name)\n throw new Error(\"Attachment name must not be null\");\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n if (attachment)\n skin.setAttachment(slotIndex, name, attachment);\n }\n }\n return skin;\n }\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n let scale = this.scale;\n let name = input.readStringRef();\n if (!name)\n name = attachmentName;\n switch (input.readByte()) {\n case AttachmentType.Region: {\n let path = input.readStringRef();\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let scaleX = input.readFloat();\n let scaleY = input.readFloat();\n let width = input.readFloat();\n let height = input.readFloat();\n let color = input.readInt32();\n let sequence = this.readSequence(input);\n if (!path)\n path = name;\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\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 Color.rgba8888ToColor(region.color, color);\n region.sequence = sequence;\n if (sequence == null)\n region.updateRegion();\n return region;\n }\n case AttachmentType.BoundingBox: {\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case AttachmentType.Mesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let vertexCount = input.readInt(true);\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\n let triangles = this.readShortArray(input);\n let vertices = this.readVertices(input, vertexCount);\n let hullLength = input.readInt(true);\n let sequence = this.readSequence(input);\n let edges = [];\n let width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n 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 if (sequence == null)\n mesh.updateRegion();\n mesh.hullLength = hullLength << 1;\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case AttachmentType.LinkedMesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let skinName = input.readStringRef();\n let parent = input.readStringRef();\n let inheritTimelines = input.readBoolean();\n let sequence = this.readSequence(input);\n let width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n Color.rgba8888ToColor(mesh.color, color);\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\n return mesh;\n }\n case AttachmentType.Path: {\n let closed2 = input.readBoolean();\n let constantSpeed = input.readBoolean();\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n let color = nonessential ? input.readInt32() : 0;\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = closed2;\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 Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case AttachmentType.Point: {\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let color = nonessential ? input.readInt32() : 0;\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case AttachmentType.Clipping: {\n let endSlotIndex = input.readInt(true);\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\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 Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n }\n readSequence(input) {\n if (!input.readBoolean())\n return null;\n let sequence = new Sequence(input.readInt(true));\n sequence.start = input.readInt(true);\n sequence.digits = input.readInt(true);\n sequence.setupIndex = input.readInt(true);\n return sequence;\n }\n readVertices(input, vertexCount) {\n let scale = this.scale;\n let verticesLength = vertexCount << 1;\n let vertices = new Vertices();\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n let weights = new Array();\n let bonesArray = new Array();\n for (let i = 0; i < vertexCount; i++) {\n let boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n }\n readFloatArray(input, n, scale) {\n let array = new Array(n);\n if (scale == 1) {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat();\n } else {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n }\n readShortArray(input) {\n let n = input.readInt(true);\n let array = new Array(n);\n for (let i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n }\n readAnimation(input, name, skeletonData) {\n input.readInt(true);\n let timelines = new Array();\n let scale = this.scale;\n let tempColor1 = new Color();\n let tempColor2 = new Color();\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case SLOT_ATTACHMENT: {\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\n for (let frame = 0; frame < frameCount; frame++)\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n a = a2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let na = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n a = na;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_ALPHA: {\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n }\n time = time2;\n a = a2;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let boneIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\n switch (type) {\n case BONE_ROTATE:\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_TRANSLATE:\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEX:\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEY:\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_SCALE:\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEX:\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEY:\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEAR:\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARX:\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARY:\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixShearY = mixShearY2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true);\n let data = skeletonData.pathConstraints[index];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n switch (input.readByte()) {\n case PATH_POSITION:\n timelines.push(readTimeline1(\n input,\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\n data.positionMode == 0 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_SPACING:\n timelines.push(readTimeline1(\n input,\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_MIX:\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n }\n timelines.push(timeline);\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let skin = skeletonData.skins[input.readInt(true)];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let slotIndex = input.readInt(true);\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n let attachmentName = input.readStringRef();\n if (!attachmentName)\n throw new Error(\"attachmentName must not be null.\");\n let attachment = skin.getAttachment(slotIndex, attachmentName);\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case ATTACHMENT_DEFORM: {\n let vertexAttachment = attachment;\n let weighted = vertexAttachment.bones;\n let vertices = vertexAttachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let bezierCount = input.readInt(true);\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\n let time = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let end = input.readInt(true);\n if (end == 0)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat();\n } else {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (let v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frame, time, deform);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n }\n time = time2;\n }\n timelines.push(timeline);\n break;\n }\n case ATTACHMENT_SEQUENCE: {\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\n for (let frame = 0; frame < frameCount; frame++) {\n let time = input.readFloat();\n let modeAndIndex = input.readInt32();\n timeline.setFrame(\n frame,\n time,\n SequenceModeValues[modeAndIndex & 15],\n modeAndIndex >> 4,\n input.readFloat()\n );\n }\n timelines.push(timeline);\n break;\n }\n }\n }\n }\n }\n let drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n let timeline = new DrawOrderTimeline(drawOrderCount);\n let slotCount = skeletonData.slots.length;\n for (let i = 0; i < drawOrderCount; i++) {\n let time = input.readFloat();\n let offsetCount = input.readInt(true);\n let drawOrder = Utils.newArray(slotCount, 0);\n for (let ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsetCount; ii++) {\n let 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 (let 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 }\n let eventCount = input.readInt(true);\n if (eventCount > 0) {\n let timeline = new EventTimeline(eventCount);\n for (let i = 0; i < eventCount; i++) {\n let time = input.readFloat();\n let eventData = skeletonData.events[input.readInt(true)];\n let event = new Event(time, eventData);\n event.intValue = input.readInt(false);\n event.floatValue = input.readFloat();\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event.data.audioPath) {\n event.volume = input.readFloat();\n event.balance = input.readFloat();\n }\n timeline.setFrame(i, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n return new Animation(name, timelines, duration);\n }\n };\n var BinaryInput = class {\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n readByte() {\n return this.buffer.getInt8(this.index++);\n }\n readUnsignedByte() {\n return this.buffer.getUint8(this.index++);\n }\n readShort() {\n let value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n }\n readInt32() {\n let value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n }\n readInt(optimizePositive) {\n let b = this.readByte();\n let result = b & 127;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 7;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 14;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 21;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\n }\n readStringRef() {\n let index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n }\n readString() {\n let byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n let chars = \"\";\n let charCount = 0;\n for (let i = 0; i < byteCount; ) {\n let b = this.readUnsignedByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n }\n readFloat() {\n let value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n }\n readBoolean() {\n return this.readByte() != 0;\n }\n };\n var LinkedMesh = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n var Vertices = class {\n constructor(bones = null, vertices = null) {\n this.bones = bones;\n this.vertices = vertices;\n }\n };\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\n return AttachmentType2;\n })(AttachmentType || {});\n function readTimeline1(input, timeline, scale) {\n let time = input.readFloat(), value = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n }\n time = time2;\n value = value2;\n }\n return timeline;\n }\n function readTimeline2(input, timeline, scale) {\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n }\n return timeline;\n }\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\n }\n var BONE_ROTATE = 0;\n var BONE_TRANSLATE = 1;\n var BONE_TRANSLATEX = 2;\n var BONE_TRANSLATEY = 3;\n var BONE_SCALE = 4;\n var BONE_SCALEX = 5;\n var BONE_SCALEY = 6;\n var BONE_SHEAR = 7;\n var BONE_SHEARX = 8;\n var BONE_SHEARY = 9;\n var SLOT_ATTACHMENT = 0;\n var SLOT_RGBA = 1;\n var SLOT_RGB = 2;\n var SLOT_RGBA2 = 3;\n var SLOT_RGB2 = 4;\n var SLOT_ALPHA = 5;\n var ATTACHMENT_DEFORM = 0;\n var ATTACHMENT_SEQUENCE = 1;\n var PATH_POSITION = 0;\n var PATH_SPACING = 1;\n var PATH_MIX = 2;\n var CURVE_STEPPED = 1;\n var CURVE_BEZIER = 2;\n\n // spine-core/src/SkeletonBounds.ts\n var SkeletonBounds = class {\n constructor() {\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 Pool(() => {\n return Utils.newFloatArray(16);\n });\n }\n update(skeleton, updateAabb) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = 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 } 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 aabbCompute() {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let 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 aabbContainsPoint(x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n aabbIntersectsSegment(x1, y1, x2, y2) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let 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 let m = (y2 - y1) / (x2 - x1);\n let 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 let 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 aabbIntersectsSkeleton(bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n containsPoint(x, y) {\n let polygons = this.polygons;\n for (let 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 containsPointPolygon(polygon, x, y) {\n let vertices = polygon;\n let nn = polygon.length;\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\n let 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 intersectsSegment(x1, y1, x2, y2) {\n let polygons = this.polygons;\n for (let 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 intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\n let vertices = polygon;\n let nn = polygon.length;\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let 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 let 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 getPolygon(boundingBox) {\n if (!boundingBox)\n throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n getWidth() {\n return this.maxX - this.minX;\n }\n getHeight() {\n return this.maxY - this.minY;\n }\n };\n\n // spine-core/src/Triangulator.ts\n var Triangulator = class {\n constructor() {\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 Pool(() => {\n return new Array();\n });\n this.polygonIndicesPool = new Pool(() => {\n return new Array();\n });\n }\n triangulate(verticesArray) {\n let vertices = verticesArray;\n let vertexCount = verticesArray.length >> 1;\n let indices = this.indicesArray;\n indices.length = 0;\n for (let i = 0; i < vertexCount; i++)\n indices[i] = i;\n let isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (let i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n let triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n let previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer:\n if (!isConcave[i]) {\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n let v = indices[ii] << 1;\n let 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 let previousIndex = (vertexCount + i - 1) % vertexCount;\n let 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 decompose(verticesArray, triangles) {\n let vertices = verticesArray;\n let convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n let convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n let polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n let polygon = this.polygonPool.obtain();\n polygon.length = 0;\n let fanBaseIndex = -1, lastWinding = 0;\n for (let i = 0, n = triangles.length; i < n; i += 3) {\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\n let merged = false;\n if (fanBaseIndex == t1) {\n let o = polygon.length - 4;\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n let 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 } 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 (let i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n let firstIndex = polygonIndices[0];\n let lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n let o = polygon.length - 4;\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\n let firstX = polygon[0], firstY = polygon[1];\n let secondX = polygon[2], secondY = polygon[3];\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (let ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n let otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n let otherFirstIndex = otherIndices[0];\n let otherSecondIndex = otherIndices[1];\n let otherLastIndex = otherIndices[2];\n let otherPoly = convexPolygons[ii];\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n let 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 (let 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 static isConcave(index, vertexCount, vertices, indices) {\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n let current = indices[index] << 1;\n let next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(\n vertices[previous],\n vertices[previous + 1],\n vertices[current],\n vertices[current + 1],\n vertices[next],\n vertices[next + 1]\n );\n }\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n }\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\n let px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n }\n };\n\n // spine-core/src/SkeletonClipping.ts\n var SkeletonClipping = class {\n constructor() {\n this.triangulator = new 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 this.clipAttachment = null;\n this.clippingPolygons = null;\n }\n clipStart(slot, clip) {\n if (this.clipAttachment)\n return 0;\n this.clipAttachment = clip;\n let n = clip.worldVerticesLength;\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n let clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\n let polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n }\n clipEndWithSlot(slot) {\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n }\n clipEnd() {\n if (!this.clipAttachment)\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 isClipping() {\n return this.clipAttachment != null;\n }\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n let clippedTriangles = this.clippedTriangles;\n let polygons = this.clippingPolygons;\n let polygonsCount = polygons.length;\n let vertexSize = twoColor ? 12 : 8;\n let index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer:\n for (let i = 0; i < trianglesLength; i += 3) {\n let vertexOffset = triangles[i] << 1;\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (let p = 0; p < polygonsCount; p++) {\n let s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n let clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\n let clipOutputCount = clipOutputLength >> 1;\n let clipOutputItems = this.clipOutput;\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\n let 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 let c0 = x - x3, c1 = y - y3;\n let a = (d0 * c0 + d1 * c1) * d;\n let b = (d4 * c0 + d2 * c1) * d;\n let 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 let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (let 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 } else {\n let clippedVerticesItems = 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 } 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 let clippedTrianglesItems = 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 clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\n let originalOutput = output;\n let clipped = false;\n let input;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\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 let clippingVertices = clippingArea;\n let clippingVerticesLast = clippingArea.length - 4;\n for (let i = 0; ; i += 2) {\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n let inputVertices = input;\n let inputVerticesLength = input.length - 2, outputStart = output.length;\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n let 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 let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n } else {\n output.push(edgeX);\n output.push(edgeY);\n }\n } else if (side2) {\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\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 let temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (let i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n } else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n }\n static makeClockwise(polygon) {\n let vertices = polygon;\n let verticeslength = polygon.length;\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (let 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 (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n let x = vertices[i], y = vertices[i + 1];\n let 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 };\n\n // spine-core/src/SkeletonJson.ts\n var SkeletonJson = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(json) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\n let skeletonMap = root.skeleton;\n if (skeletonMap) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.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 (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n let parent = null;\n let parentName = getValue(boneMap, \"parent\", null);\n if (parentName)\n parent = skeletonData.findBone(parentName);\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = getValue(boneMap, \"length\", 0) * scale;\n data.x = getValue(boneMap, \"x\", 0) * scale;\n data.y = getValue(boneMap, \"y\", 0) * scale;\n data.rotation = getValue(boneMap, \"rotation\", 0);\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\n data.shearX = getValue(boneMap, \"shearX\", 0);\n data.shearY = getValue(boneMap, \"shearY\", 0);\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\n data.skinRequired = getValue(boneMap, \"skin\", false);\n let color = getValue(boneMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let boneData = skeletonData.findBone(slotMap.bone);\n if (!boneData)\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\n let color = getValue(slotMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n let dark = getValue(slotMap, \"dark\", null);\n if (dark)\n data.darkColor = Color.fromString(dark);\n data.attachmentName = getValue(slotMap, \"attachment\", null);\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\n if (!bone)\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let target = skeletonData.findBone(constraintMap.target);\n ;\n if (!target)\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\n data.target = target;\n data.mix = getValue(constraintMap, \"mix\", 1);\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = getValue(constraintMap, \"compress\", false);\n data.stretch = getValue(constraintMap, \"stretch\", false);\n data.uniform = getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findBone(targetName);\n if (!target)\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\n data.target = target;\n data.local = getValue(constraintMap, \"local\", false);\n data.relative = getValue(constraintMap, \"relative\", false);\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findSlot(targetName);\n if (!target)\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\n data.target = target;\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.position = getValue(constraintMap, \"position\", 0);\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i];\n let skin = new Skin(skinMap.name);\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let boneName = skinMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraintName = skinMap.ik[ii];\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraintName = skinMap.transform[ii];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraintName = skinMap.path[ii];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment)\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 (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = getValue(eventMap, \"int\", 0);\n data.floatValue = getValue(eventMap, \"float\", 0);\n data.stringValue = getValue(eventMap, \"string\", \"\");\n data.audioPath = getValue(eventMap, \"audio\", null);\n if (data.audioPath) {\n data.volume = getValue(eventMap, \"volume\", 1);\n data.balance = getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n }\n readAttachment(map, skin, slotIndex, name, skeletonData) {\n let scale = this.scale;\n name = getValue(map, \"name\", name);\n switch (getValue(map, \"type\", \"region\")) {\n case \"region\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\n return null;\n region.path = path;\n region.x = getValue(map, \"x\", 0) * scale;\n region.y = getValue(map, \"y\", 0) * scale;\n region.scaleX = getValue(map, \"scaleX\", 1);\n region.scaleY = getValue(map, \"scaleY\", 1);\n region.rotation = getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n region.sequence = sequence;\n let color = getValue(map, \"color\", null);\n if (color)\n region.color.setFromString(color);\n if (region.region != null)\n region.updateRegion();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n let color = getValue(map, \"color\", null);\n if (color)\n mesh.color.setFromString(color);\n mesh.width = getValue(map, \"width\", 0) * scale;\n mesh.height = getValue(map, \"height\", 0) * scale;\n mesh.sequence = sequence;\n let parent = getValue(map, \"parent\", null);\n if (parent) {\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\n return mesh;\n }\n let uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n if (mesh.region != null)\n mesh.updateRegion();\n mesh.edges = getValue(map, \"edges\", null);\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = getValue(map, \"closed\", false);\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n let color = getValue(map, \"color\", null);\n if (color)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = getValue(map, \"x\", 0) * scale;\n point.y = getValue(map, \"y\", 0) * scale;\n point.rotation = getValue(map, \"rotation\", 0);\n let color = getValue(map, \"color\", null);\n if (color)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\n return null;\n let end = getValue(map, \"end\", null);\n if (end)\n clip.endSlot = skeletonData.findSlot(end);\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n readSequence(map) {\n if (map == null)\n return null;\n let sequence = new Sequence(getValue(map, \"count\", 0));\n sequence.start = getValue(map, \"start\", 1);\n sequence.digits = getValue(map, \"digits\", 0);\n sequence.setupIndex = getValue(map, \"setup\", 0);\n return sequence;\n }\n readVertices(map, attachment, verticesLength) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n; ) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n }\n readAnimation(map, name, skeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotName);\n let slotIndex = slot.index;\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (!timelineMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(frames, slotIndex);\n for (let frame = 0; frame < frames; frame++) {\n let keyMap = timelineMap[frame];\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgba\") {\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb\") {\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"alpha\") {\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\n } else if (timelineName == \"rgba2\") {\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb2\") {\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(\"Bone not found: \" + boneName);\n let boneIndex = bone.index;\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n let frames = timelineMap.length;\n if (frames == 0)\n continue;\n if (timelineName === \"rotate\") {\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\n } else if (timelineName === \"translate\") {\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\n } else if (timelineName === \"translatex\") {\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"translatey\") {\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"scale\") {\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\n } else if (timelineName === \"scalex\") {\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"scaley\") {\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"shear\") {\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\n } else if (timelineName === \"shearx\") {\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n } else if (timelineName === \"sheary\") {\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n }\n }\n }\n }\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let keyMap = constraintMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(\"IK Constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mix = getValue(keyMap, \"mix\", 1);\n let softness = getValue(keyMap, \"softness\", 0) * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\n let nextMap = constraintMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mix2 = getValue(nextMap, \"mix\", 1);\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.transform) {\n for (let constraintName in map.transform) {\n let timelineMap = map.transform[constraintName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Transform constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixScaleX = mixScaleX2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Path constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName === \"position\") {\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"spacing\") {\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.attachments) {\n for (let attachmentsName in map.attachments) {\n let attachmentsMap = map.attachments[attachmentsName];\n let skin = skeletonData.findSkin(attachmentsName);\n if (!skin)\n throw new Error(\"Skin not found: \" + attachmentsName);\n for (let slotMapName in attachmentsMap) {\n let slotMap = attachmentsMap[slotMapName];\n let slot = skeletonData.findSlot(slotMapName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotMapName);\n let slotIndex = slot.index;\n for (let attachmentMapName in slotMap) {\n let attachmentMap = slotMap[attachmentMapName];\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\n for (let timelineMapName in attachmentMap) {\n let timelineMap = attachmentMap[timelineMapName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n if (timelineMapName == \"deform\") {\n let weighted = attachment.bones;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\n let time = getValue(keyMap, \"time\", 0);\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let verticesValue = getValue(keyMap, \"vertices\", null);\n if (!verticesValue)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = getValue(keyMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frame, time, deform);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let curve = keyMap.curve;\n if (curve)\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n time = time2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineMapName == \"sequence\") {\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\n let lastDelay = 0;\n for (let frame = 0; frame < timelineMap.length; frame++) {\n let delay = getValue(keyMap, \"delay\", lastDelay);\n let time = getValue(keyMap, \"time\", 0);\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\n let index = getValue(keyMap, \"index\", 0);\n timeline.setFrame(frame, time, mode, index, delay);\n lastDelay = delay;\n keyMap = timelineMap[frame + 1];\n }\n timelines.push(timeline);\n }\n }\n }\n }\n }\n }\n if (map.drawOrder) {\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\n let slotCount = skeletonData.slots.length;\n let frame = 0;\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\n let drawOrderMap = map.drawOrder[i];\n let drawOrder = null;\n let offsets = getValue(drawOrderMap, \"offsets\", null);\n if (offsets) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsets.length; ii++) {\n let offsetMap = offsets[ii];\n let slot = skeletonData.findSlot(offsetMap.slot);\n if (!slot)\n throw new Error(\"Slot not found: \" + slot);\n let slotIndex = slot.index;\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 (let ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n }\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frame = 0;\n for (let i = 0; i < map.events.length; i++, frame++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (!eventData)\n throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath) {\n event.volume = getValue(eventMap, \"volume\", 1);\n event.balance = getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frame, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n };\n var LinkedMesh2 = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n function readTimeline12(keys, timeline, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\n if (keyMap.curve)\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n time = time2;\n value = value2;\n keyMap = nextMap;\n }\n }\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n keyMap = nextMap;\n }\n }\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n if (curve == \"stepped\") {\n timeline.setStepped(frame);\n return bezier;\n }\n let i = value << 2;\n let cx1 = curve[i];\n let cy1 = curve[i + 1] * scale;\n let cx2 = curve[i + 2];\n let cy2 = curve[i + 3] * scale;\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n return bezier + 1;\n }\n function getValue(map, property, defaultValue) {\n return map[property] !== void 0 ? map[property] : defaultValue;\n }\n\n // spine-core/src/polyfills.ts\n (() => {\n if (typeof Math.fround === \"undefined\") {\n Math.fround = function(array) {\n return function(x) {\n return array[0] = x, array[0];\n };\n }(new Float32Array(1));\n }\n })();\n\n // spine-canvas/src/CanvasTexture.ts\n var CanvasTexture = class extends Texture {\n constructor(image) {\n super(image);\n }\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-canvas/src/AssetManager.ts\n var AssetManager = class extends AssetManagerBase {\n constructor(pathPrefix = \"\", downloader = new Downloader()) {\n super((image) => {\n return new CanvasTexture(image);\n }, pathPrefix, downloader);\n }\n };\n\n // spine-canvas/src/SkeletonRenderer.ts\n var worldVertices = Utils.newFloatArray(8);\n var _SkeletonRenderer = class {\n constructor(context) {\n this.triangleRendering = false;\n this.debugRendering = false;\n this.vertices = Utils.newFloatArray(8 * 1024);\n this.tempColor = new Color();\n this.ctx = context;\n }\n draw(skeleton) {\n if (this.triangleRendering)\n this.drawTriangles(skeleton);\n else\n this.drawImages(skeleton);\n }\n drawImages(skeleton) {\n let ctx = this.ctx;\n let color = this.tempColor;\n let skeletonColor = skeleton.color;\n let drawOrder = skeleton.drawOrder;\n if (this.debugRendering)\n ctx.strokeStyle = \"green\";\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let bone = slot.bone;\n if (!bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof RegionAttachment))\n continue;\n attachment.computeWorldVertices(slot, worldVertices, 0, 2);\n let region = attachment.region;\n let image = region.page.texture.getImage();\n let slotColor = slot.color;\n let regionColor = attachment.color;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r,\n skeletonColor.g * slotColor.g * regionColor.g,\n skeletonColor.b * slotColor.b * regionColor.b,\n skeletonColor.a * slotColor.a * regionColor.a\n );\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 let atlasScale = attachment.width / region.originalWidth;\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\n let w = region.width, h = region.height;\n ctx.translate(w / 2, h / 2);\n if (attachment.region.degrees == 90) {\n let 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 ctx.globalAlpha = color.a;\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 }\n drawTriangles(skeleton) {\n let ctx = this.ctx;\n let color = this.tempColor;\n let skeletonColor = skeleton.color;\n let drawOrder = skeleton.drawOrder;\n let blendMode = null;\n let vertices = this.vertices;\n let triangles = null;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let attachment = slot.getAttachment();\n let texture;\n let region;\n if (attachment instanceof RegionAttachment) {\n let regionAttachment = attachment;\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\n region = regionAttachment.region;\n texture = region.page.texture.getImage();\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n vertices = this.computeMeshVertices(slot, mesh, false);\n triangles = mesh.triangles;\n let region2 = mesh.region.renderObject;\n texture = region2.page.texture.getImage();\n } else\n continue;\n if (texture) {\n if (slot.data.blendMode != blendMode)\n blendMode = slot.data.blendMode;\n let slotColor = slot.color;\n let attachmentColor = attachment.color;\n color.set(\n skeletonColor.r * slotColor.r * attachmentColor.r,\n skeletonColor.g * slotColor.g * attachmentColor.g,\n skeletonColor.b * slotColor.b * attachmentColor.b,\n skeletonColor.a * slotColor.a * attachmentColor.a\n );\n ctx.globalAlpha = color.a;\n for (var j = 0; j < triangles.length; j += 3) {\n let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\n let x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\n let x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\n let 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 drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\n let 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 computeRegionVertices(slot, region, pma) {\n let skeletonColor = slot.bone.skeleton.color;\n let slotColor = slot.color;\n let regionColor = region.color;\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\n let multiplier = pma ? alpha : 1;\n let color = this.tempColor;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\n alpha\n );\n region.computeWorldVertices(slot, this.vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\n let vertices = this.vertices;\n let uvs = region.uvs;\n vertices[RegionAttachment.C1R] = color.r;\n vertices[RegionAttachment.C1G] = color.g;\n vertices[RegionAttachment.C1B] = color.b;\n vertices[RegionAttachment.C1A] = color.a;\n vertices[RegionAttachment.U1] = uvs[0];\n vertices[RegionAttachment.V1] = uvs[1];\n vertices[RegionAttachment.C2R] = color.r;\n vertices[RegionAttachment.C2G] = color.g;\n vertices[RegionAttachment.C2B] = color.b;\n vertices[RegionAttachment.C2A] = color.a;\n vertices[RegionAttachment.U2] = uvs[2];\n vertices[RegionAttachment.V2] = uvs[3];\n vertices[RegionAttachment.C3R] = color.r;\n vertices[RegionAttachment.C3G] = color.g;\n vertices[RegionAttachment.C3B] = color.b;\n vertices[RegionAttachment.C3A] = color.a;\n vertices[RegionAttachment.U3] = uvs[4];\n vertices[RegionAttachment.V3] = uvs[5];\n vertices[RegionAttachment.C4R] = color.r;\n vertices[RegionAttachment.C4G] = color.g;\n vertices[RegionAttachment.C4B] = color.b;\n vertices[RegionAttachment.C4A] = color.a;\n vertices[RegionAttachment.U4] = uvs[6];\n vertices[RegionAttachment.V4] = uvs[7];\n return vertices;\n }\n computeMeshVertices(slot, mesh, pma) {\n let skeletonColor = slot.bone.skeleton.color;\n let slotColor = slot.color;\n let regionColor = mesh.color;\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\n let multiplier = pma ? alpha : 1;\n let color = this.tempColor;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\n alpha\n );\n let vertexCount = mesh.worldVerticesLength / 2;\n let vertices = this.vertices;\n if (vertices.length < mesh.worldVerticesLength)\n this.vertices = vertices = Utils.newFloatArray(mesh.worldVerticesLength);\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\n let uvs = mesh.uvs;\n for (let i = 0, u = 0, v = 2; i < vertexCount; 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 };\n var SkeletonRenderer = _SkeletonRenderer;\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\n return __toCommonJS(src_exports);\n})();\n//# sourceMappingURL=spine-canvas.js.map\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\n\"use strict\";\nvar spine = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // spine-webgl/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n AlphaTimeline: () => AlphaTimeline,\n Animation: () => Animation,\n AnimationState: () => AnimationState,\n AnimationStateAdapter: () => AnimationStateAdapter,\n AnimationStateData: () => AnimationStateData,\n AssetManager: () => AssetManager,\n AssetManagerBase: () => AssetManagerBase,\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\n Attachment: () => Attachment,\n AttachmentTimeline: () => AttachmentTimeline,\n BinaryInput: () => BinaryInput,\n BlendMode: () => BlendMode,\n Bone: () => Bone,\n BoneData: () => BoneData,\n BoundingBoxAttachment: () => BoundingBoxAttachment,\n CURRENT: () => CURRENT,\n CameraController: () => CameraController,\n ClippingAttachment: () => ClippingAttachment,\n Color: () => Color,\n Color2Attribute: () => Color2Attribute,\n ColorAttribute: () => ColorAttribute,\n ConstraintData: () => ConstraintData,\n CurveTimeline: () => CurveTimeline,\n CurveTimeline1: () => CurveTimeline1,\n CurveTimeline2: () => CurveTimeline2,\n DebugUtils: () => DebugUtils,\n DeformTimeline: () => DeformTimeline,\n Downloader: () => Downloader,\n DrawOrderTimeline: () => DrawOrderTimeline,\n Event: () => Event,\n EventData: () => EventData,\n EventQueue: () => EventQueue,\n EventTimeline: () => EventTimeline,\n EventType: () => EventType,\n FIRST: () => FIRST,\n FakeTexture: () => FakeTexture,\n GLTexture: () => GLTexture,\n HOLD_FIRST: () => HOLD_FIRST,\n HOLD_MIX: () => HOLD_MIX,\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\n IkConstraint: () => IkConstraint,\n IkConstraintData: () => IkConstraintData,\n IkConstraintTimeline: () => IkConstraintTimeline,\n Input: () => Input,\n IntSet: () => IntSet,\n Interpolation: () => Interpolation,\n LoadingScreen: () => LoadingScreen,\n M00: () => M00,\n M01: () => M01,\n M02: () => M02,\n M03: () => M03,\n M10: () => M10,\n M11: () => M11,\n M12: () => M12,\n M13: () => M13,\n M20: () => M20,\n M21: () => M21,\n M22: () => M22,\n M23: () => M23,\n M30: () => M30,\n M31: () => M31,\n M32: () => M32,\n M33: () => M33,\n ManagedWebGLRenderingContext: () => ManagedWebGLRenderingContext,\n MathUtils: () => MathUtils,\n Matrix4: () => Matrix42,\n Mesh: () => Mesh,\n MeshAttachment: () => MeshAttachment,\n MixBlend: () => MixBlend,\n MixDirection: () => MixDirection,\n OrthoCamera: () => OrthoCamera,\n PathAttachment: () => PathAttachment,\n PathConstraint: () => PathConstraint,\n PathConstraintData: () => PathConstraintData,\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\n PointAttachment: () => PointAttachment,\n PolygonBatcher: () => PolygonBatcher,\n Pool: () => Pool,\n Position2Attribute: () => Position2Attribute,\n Position3Attribute: () => Position3Attribute,\n PositionMode: () => PositionMode,\n Pow: () => Pow,\n PowOut: () => PowOut,\n RGB2Timeline: () => RGB2Timeline,\n RGBA2Timeline: () => RGBA2Timeline,\n RGBATimeline: () => RGBATimeline,\n RGBTimeline: () => RGBTimeline,\n RegionAttachment: () => RegionAttachment,\n ResizeMode: () => ResizeMode,\n RotateMode: () => RotateMode,\n RotateTimeline: () => RotateTimeline,\n SETUP: () => SETUP,\n SUBSEQUENT: () => SUBSEQUENT,\n ScaleTimeline: () => ScaleTimeline,\n ScaleXTimeline: () => ScaleXTimeline,\n ScaleYTimeline: () => ScaleYTimeline,\n SceneRenderer: () => SceneRenderer,\n SequenceTimeline: () => SequenceTimeline,\n Shader: () => Shader,\n ShapeRenderer: () => ShapeRenderer,\n ShapeType: () => ShapeType,\n ShearTimeline: () => ShearTimeline,\n ShearXTimeline: () => ShearXTimeline,\n ShearYTimeline: () => ShearYTimeline,\n Skeleton: () => Skeleton,\n SkeletonBinary: () => SkeletonBinary,\n SkeletonBounds: () => SkeletonBounds,\n SkeletonClipping: () => SkeletonClipping,\n SkeletonData: () => SkeletonData,\n SkeletonDebugRenderer: () => SkeletonDebugRenderer,\n SkeletonJson: () => SkeletonJson,\n SkeletonRenderer: () => SkeletonRenderer,\n Skin: () => Skin,\n SkinEntry: () => SkinEntry,\n Slot: () => Slot,\n SlotData: () => SlotData,\n SpacingMode: () => SpacingMode,\n SpineCanvas: () => SpineCanvas,\n StringSet: () => StringSet,\n TexCoordAttribute: () => TexCoordAttribute,\n Texture: () => Texture,\n TextureAtlas: () => TextureAtlas,\n TextureAtlasPage: () => TextureAtlasPage,\n TextureAtlasRegion: () => TextureAtlasRegion,\n TextureFilter: () => TextureFilter,\n TextureRegion: () => TextureRegion,\n TextureWrap: () => TextureWrap,\n TimeKeeper: () => TimeKeeper,\n Timeline: () => Timeline,\n Touch: () => Touch,\n TrackEntry: () => TrackEntry,\n TransformConstraint: () => TransformConstraint,\n TransformConstraintData: () => TransformConstraintData,\n TransformConstraintTimeline: () => TransformConstraintTimeline,\n TransformMode: () => TransformMode,\n TranslateTimeline: () => TranslateTimeline,\n TranslateXTimeline: () => TranslateXTimeline,\n TranslateYTimeline: () => TranslateYTimeline,\n Triangulator: () => Triangulator,\n Utils: () => Utils,\n Vector2: () => Vector2,\n Vector3: () => Vector3,\n VertexAttachment: () => VertexAttachment,\n VertexAttribute: () => VertexAttribute,\n VertexAttributeType: () => VertexAttributeType,\n WebGLBlendModeConverter: () => WebGLBlendModeConverter,\n WindowedMean: () => WindowedMean\n });\n\n // spine-core/src/Utils.ts\n var IntSet = class {\n constructor() {\n this.array = new Array();\n }\n add(value) {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n contains(value) {\n return this.array[value | 0] != void 0;\n }\n remove(value) {\n this.array[value | 0] = void 0;\n }\n clear() {\n this.array.length = 0;\n }\n };\n var StringSet = class {\n constructor() {\n this.entries = {};\n this.size = 0;\n }\n add(value) {\n let contains = this.entries[value];\n this.entries[value] = true;\n if (!contains) {\n this.size++;\n return true;\n }\n return false;\n }\n addAll(values) {\n let oldSize = this.size;\n for (var i = 0, n = values.length; i < n; i++)\n this.add(values[i]);\n return oldSize != this.size;\n }\n contains(value) {\n return this.entries[value];\n }\n clear() {\n this.entries = {};\n this.size = 0;\n }\n };\n var _Color = class {\n constructor(r = 0, g = 0, b = 0, a = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n set(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this.clamp();\n }\n setFromColor(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 setFromString(hex) {\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n return this;\n }\n add(r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n return this.clamp();\n }\n clamp() {\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 static rgba8888ToColor(color, value) {\n color.r = ((value & 4278190080) >>> 24) / 255;\n color.g = ((value & 16711680) >>> 16) / 255;\n color.b = ((value & 65280) >>> 8) / 255;\n color.a = (value & 255) / 255;\n }\n static rgb888ToColor(color, value) {\n color.r = ((value & 16711680) >>> 16) / 255;\n color.g = ((value & 65280) >>> 8) / 255;\n color.b = (value & 255) / 255;\n }\n static fromString(hex) {\n return new _Color().setFromString(hex);\n }\n };\n var Color = _Color;\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 var _MathUtils = class {\n static clamp(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n }\n static cosDeg(degrees) {\n return Math.cos(degrees * _MathUtils.degRad);\n }\n static sinDeg(degrees) {\n return Math.sin(degrees * _MathUtils.degRad);\n }\n static signum(value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n static toInt(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n static cbrt(x) {\n let y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n }\n static randomTriangular(min, max) {\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n static randomTriangularWith(min, max, mode) {\n let u = Math.random();\n let 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 static isPowerOfTwo(value) {\n return value && (value & value - 1) === 0;\n }\n };\n var MathUtils = _MathUtils;\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 var Interpolation = class {\n apply(start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n }\n };\n var Pow = class extends Interpolation {\n constructor(power) {\n super();\n this.power = 2;\n this.power = power;\n }\n applyInternal(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 };\n var PowOut = class extends Pow {\n constructor(power) {\n super(power);\n }\n applyInternal(a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n };\n var _Utils = class {\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n static arrayFill(array, fromIndex, toIndex, value) {\n for (let i = fromIndex; i < toIndex; i++)\n array[i] = value;\n }\n static setArraySize(array, size, value = 0) {\n let oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n }\n static ensureArrayCapacity(array, size, value = 0) {\n if (array.length >= size)\n return array;\n return _Utils.setArraySize(array, size, value);\n }\n static newArray(size, defaultValue) {\n let array = new Array(size);\n for (let i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n }\n static newFloatArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Float32Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static newShortArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Int16Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static toFloatArray(array) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n static toSinglePrecision(value) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n static webkit602BugfixHelper(alpha, blend) {\n }\n static contains(array, element, identity = true) {\n for (var i = 0; i < array.length; i++)\n if (array[i] == element)\n return true;\n return false;\n }\n static enumValue(type, name) {\n return type[name[0].toUpperCase() + name.slice(1)];\n }\n };\n var Utils = _Utils;\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\n var DebugUtils = class {\n static logBones(skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let 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 };\n var Pool = class {\n constructor(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n obtain() {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n free(item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n }\n freeAll(items) {\n for (let i = 0; i < items.length; i++)\n this.free(items[i]);\n }\n clear() {\n this.items.length = 0;\n }\n };\n var Vector2 = class {\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n length() {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n normalize() {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n };\n var TimeKeeper = class {\n constructor() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1e3;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n update() {\n let now = Date.now() / 1e3;\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 };\n var WindowedMean = class {\n constructor(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 hasEnoughData() {\n return this.addedValues >= this.values.length;\n }\n addValue(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 getMean() {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++)\n mean += this.values[i];\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n return 0;\n }\n };\n\n // spine-core/src/attachments/Attachment.ts\n var Attachment = class {\n constructor(name) {\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n };\n var _VertexAttachment = class extends Attachment {\n constructor(name) {\n super(name);\n this.id = _VertexAttachment.nextID++;\n this.bones = null;\n this.vertices = [];\n this.worldVerticesLength = 0;\n this.timelineAttachment = this;\n }\n computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (!bones) {\n if (deformArray.length > 0)\n vertices = deformArray;\n let bone = slot.bone;\n let x = bone.worldX;\n let y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\n let vx = vertices[v2], vy = vertices[v2 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let 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 } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let 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 copyTo(attachment) {\n if (this.bones) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n if (this.vertices) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.timelineAttachment = this.timelineAttachment;\n }\n };\n var VertexAttachment = _VertexAttachment;\n VertexAttachment.nextID = 0;\n\n // spine-core/src/attachments/Sequence.ts\n var _Sequence = class {\n constructor(count) {\n this.id = _Sequence.nextID();\n this.start = 0;\n this.digits = 0;\n this.setupIndex = 0;\n this.regions = new Array(count);\n }\n copy() {\n let copy = new _Sequence(this.regions.length);\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\n copy.start = this.start;\n copy.digits = this.digits;\n copy.setupIndex = this.setupIndex;\n return copy;\n }\n apply(slot, attachment) {\n let index = slot.sequenceIndex;\n if (index == -1)\n index = this.setupIndex;\n if (index >= this.regions.length)\n index = this.regions.length - 1;\n let region = this.regions[index];\n if (attachment.region != region) {\n attachment.region = region;\n attachment.updateRegion();\n }\n }\n getPath(basePath, index) {\n let result = basePath;\n let frame = (this.start + index).toString();\n for (let i = this.digits - frame.length; i > 0; i--)\n result += \"0\";\n result += frame;\n return result;\n }\n static nextID() {\n return _Sequence._nextID++;\n }\n };\n var Sequence = _Sequence;\n Sequence._nextID = 0;\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\n return SequenceMode2;\n })(SequenceMode || {});\n var SequenceModeValues = [\n 0 /* hold */,\n 1 /* once */,\n 2 /* loop */,\n 3 /* pingpong */,\n 4 /* onceReverse */,\n 5 /* loopReverse */,\n 6 /* pingpongReverse */\n ];\n\n // spine-core/src/Animation.ts\n var Animation = class {\n constructor(name, timelines, duration) {\n this.timelines = [];\n this.timelineIds = new StringSet();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n this.setTimelines(timelines);\n this.duration = duration;\n }\n setTimelines(timelines) {\n if (!timelines)\n throw new Error(\"timelines cannot be null.\");\n this.timelines = timelines;\n this.timelineIds.clear();\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds.addAll(timelines[i].getPropertyIds());\n }\n hasTimeline(ids) {\n for (let i = 0; i < ids.length; i++)\n if (this.timelineIds.contains(ids[i]))\n return true;\n return false;\n }\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (!skeleton)\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 let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n };\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\n return MixBlend2;\n })(MixBlend || {});\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\n return MixDirection2;\n })(MixDirection || {});\n var Property = {\n rotate: 0,\n x: 1,\n y: 2,\n scaleX: 3,\n scaleY: 4,\n shearX: 5,\n shearY: 6,\n rgb: 7,\n alpha: 8,\n rgb2: 9,\n attachment: 10,\n deform: 11,\n event: 12,\n drawOrder: 13,\n ikConstraint: 14,\n transformConstraint: 15,\n pathConstraintPosition: 16,\n pathConstraintSpacing: 17,\n pathConstraintMix: 18,\n sequence: 19\n };\n var Timeline = class {\n constructor(frameCount, propertyIds) {\n this.propertyIds = propertyIds;\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\n }\n getPropertyIds() {\n return this.propertyIds;\n }\n getFrameEntries() {\n return 1;\n }\n getFrameCount() {\n return this.frames.length / this.getFrameEntries();\n }\n getDuration() {\n return this.frames[this.frames.length - this.getFrameEntries()];\n }\n static search1(frames, time) {\n let n = frames.length;\n for (let i = 1; i < n; i++)\n if (frames[i] > time)\n return i - 1;\n return n - 1;\n }\n static search(frames, time, step) {\n let n = frames.length;\n for (let i = step; i < n; i += step)\n if (frames[i] > time)\n return i - step;\n return n - step;\n }\n };\n var CurveTimeline = class extends Timeline {\n constructor(frameCount, bezierCount, propertyIds) {\n super(frameCount, propertyIds);\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\n this.curves[frameCount - 1] = 1;\n }\n setLinear(frame) {\n this.curves[frame] = 0;\n }\n setStepped(frame) {\n this.curves[frame] = 1;\n }\n shrink(bezierCount) {\n let size = this.getFrameCount() + bezierCount * 18;\n if (this.curves.length > size) {\n let newCurves = Utils.newFloatArray(size);\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\n this.curves = newCurves;\n }\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = value1 + dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getBezierValue(time, frameIndex, valueOffset, i) {\n let curves = this.curves;\n if (curves[i] > time) {\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n frameIndex += this.getFrameEntries();\n let x = curves[n - 2], y = curves[n - 1];\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\n }\n };\n var CurveTimeline1 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId) {\n super(frameCount, bezierCount, [propertyId]);\n }\n getFrameEntries() {\n return 2;\n }\n setFrame(frame, time, value) {\n frame <<= 1;\n this.frames[frame] = time;\n this.frames[frame + 1] = value;\n }\n getCurveValue(time) {\n let frames = this.frames;\n let i = frames.length - 2;\n for (let ii = 2; ii <= i; ii += 2) {\n if (frames[ii] > time) {\n i = ii - 2;\n break;\n }\n }\n let curveType = this.curves[i >> 1];\n switch (curveType) {\n case 0:\n let before = frames[i], value = frames[i + 1];\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\n case 1:\n return frames[i + 1];\n }\n return this.getBezierValue(time, i, 1, curveType - 2);\n }\n };\n var CurveTimeline2 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\n }\n getFrameEntries() {\n return 3;\n }\n setFrame(frame, time, value1, value2) {\n frame *= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = value1;\n this.frames[frame + 2] = value2;\n }\n };\n var RotateTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n return;\n case 1 /* first */:\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\n }\n return;\n }\n let r = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n r += bone.data.rotation - bone.rotation;\n case 3 /* add */:\n bone.rotation += r * alpha;\n }\n }\n };\n var TranslateTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.x + \"|\" + boneIndex,\n Property.y + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n };\n var TranslateXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n break;\n case 3 /* add */:\n bone.x += x * alpha;\n }\n }\n };\n var TranslateYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case 3 /* add */:\n bone.y += y * alpha;\n }\n }\n };\n var ScaleTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.scaleX + \"|\" + boneIndex,\n Property.scaleY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let x, y;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n x *= bone.data.scaleX;\n y *= bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ScaleXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time) * bone.data.scaleX;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleX += x - bone.data.scaleX;\n else\n bone.scaleX = x;\n } else {\n let bx = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n }\n }\n }\n };\n var ScaleYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time) * bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleY += y - bone.data.scaleY;\n else\n bone.scaleY = y;\n } else {\n let by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n by = bone.data.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = bone.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ShearTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.shearX + \"|\" + boneIndex,\n Property.shearY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n };\n var ShearXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n break;\n case 3 /* add */:\n bone.shearX += x * alpha;\n }\n }\n };\n var ShearYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case 3 /* add */:\n bone.shearY += y * alpha;\n }\n }\n };\n var RGBATimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 5;\n }\n setFrame(frame, time, r, g, b, a) {\n frame *= 5;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.setFromColor(setup);\n return;\n case 1 /* first */:\n color.add(\n (setup.r - color.r) * alpha,\n (setup.g - color.g) * alpha,\n (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha\n );\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0;\n let i = Timeline.search(frames, time, 5);\n let curveType = this.curves[i / 5];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n let t = (time - before) / (frames[i + 5] - before);\n r += (frames[i + 5 + 1] - r) * t;\n g += (frames[i + 5 + 2] - g) * t;\n b += (frames[i + 5 + 3] - b) * t;\n a += (frames[i + 5 + 4] - a) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n }\n if (alpha == 1)\n color.set(r, g, b, a);\n else {\n if (blend == 0 /* 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 };\n var RGBTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, r, g, b) {\n frame <<= 2;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n return;\n case 1 /* first */:\n color.r += (setup.r - color.r) * alpha;\n color.g += (setup.g - color.g) * alpha;\n color.b += (setup.b - color.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n r += (frames[i + 4 + 1] - r) * t;\n g += (frames[i + 4 + 2] - g) * t;\n b += (frames[i + 4 + 3] - b) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (alpha == 1) {\n color.r = r;\n color.g = g;\n color.b = b;\n } else {\n if (blend == 0 /* setup */) {\n let setup = slot.data.color;\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n }\n color.r += (r - color.r) * alpha;\n color.g += (g - color.g) * alpha;\n color.b += (b - color.b) * alpha;\n }\n }\n };\n var AlphaTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let color = slot.color;\n if (time < this.frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.a = setup.a;\n return;\n case 1 /* first */:\n color.a += (setup.a - color.a) * alpha;\n }\n return;\n }\n let a = this.getCurveValue(time);\n if (alpha == 1)\n color.a = a;\n else {\n if (blend == 0 /* setup */)\n color.a = slot.data.color.a;\n color.a += (a - color.a) * alpha;\n }\n }\n };\n var RGBA2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 8;\n }\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\n frame <<= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n this.frames[frame + 5] = r2;\n this.frames[frame + 6] = g2;\n this.frames[frame + 7] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.setFromColor(setupLight);\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.add(\n (setupLight.r - light.r) * alpha,\n (setupLight.g - light.g) * alpha,\n (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha\n );\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 8);\n let curveType = this.curves[i >> 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n let t = (time - before) / (frames[i + 8] - before);\n r += (frames[i + 8 + 1] - r) * t;\n g += (frames[i + 8 + 2] - g) * t;\n b += (frames[i + 8 + 3] - b) * t;\n a += (frames[i + 8 + 4] - a) * t;\n r2 += (frames[i + 8 + 5] - r2) * t;\n g2 += (frames[i + 8 + 6] - g2) * t;\n b2 += (frames[i + 8 + 7] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\n }\n if (alpha == 1) {\n light.set(r, g, b, a);\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n light.setFromColor(slot.data.color);\n let setupDark = slot.data.darkColor;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var RGB2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, r, g, b, r2, g2, b2) {\n frame *= 7;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = r2;\n this.frames[frame + 5] = g2;\n this.frames[frame + 6] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.r += (setupLight.r - light.r) * alpha;\n light.g += (setupLight.g - light.g) * alpha;\n light.b += (setupLight.b - light.b) * alpha;\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n r += (frames[i + 7 + 1] - r) * t;\n g += (frames[i + 7 + 2] - g) * t;\n b += (frames[i + 7 + 3] - b) * t;\n r2 += (frames[i + 7 + 4] - r2) * t;\n g2 += (frames[i + 7 + 5] - g2) * t;\n b2 += (frames[i + 7 + 6] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (alpha == 1) {\n light.r = r;\n light.g = g;\n light.b = b;\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.r += (r - light.r) * alpha;\n light.g += (g - light.g) * alpha;\n light.b += (b - light.b) * alpha;\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var AttachmentTimeline = class extends Timeline {\n constructor(frameCount, slotIndex) {\n super(frameCount, [\n Property.attachment + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachmentNames = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, attachmentName) {\n this.frames[frame] = time;\n this.attachmentNames[frame] = attachmentName;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\n }\n setAttachment(skeleton, slot, attachmentName) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n };\n var DeformTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex, attachment) {\n super(frameCount, bezierCount, [\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n this.vertices = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, vertices) {\n this.frames[frame] = time;\n this.vertices[frame] = vertices;\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getCurvePercent(time, frame) {\n let curves = this.curves;\n let i = curves[frame];\n switch (i) {\n case 0:\n let x2 = this.frames[frame];\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\n case 1:\n return 0;\n }\n i -= 2;\n if (curves[i] > time) {\n let x2 = this.frames[frame];\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n let x = curves[n - 2], y = curves[n - 1];\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.getAttachment();\n if (!slotAttachment)\n return;\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\n return;\n let deform = slot.deform;\n if (deform.length == 0)\n blend = 0 /* setup */;\n let vertices = this.vertices;\n let vertexCount = vertices[0].length;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n deform.length = 0;\n return;\n case 1 /* first */:\n if (alpha == 1) {\n deform.length = 0;\n return;\n }\n deform.length = vertexCount;\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n deform.length = vertexCount;\n if (time >= frames[frames.length - 1]) {\n let lastVertices = vertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] - setupVertices[i2];\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2];\n }\n } else\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let setup = setupVertices[i2];\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] = lastVertices[i2] * alpha;\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] * alpha;\n }\n }\n }\n return;\n }\n let frame = Timeline.search1(frames, time);\n let percent = this.getCurvePercent(time, frame);\n let prevVertices = vertices[frame];\n let nextVertices = vertices[frame + 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2], setup = setupVertices[i2];\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\n }\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n };\n var _EventTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _EventTimeline.propertyIds);\n this.events = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, event) {\n this.frames[frame] = event.time;\n this.events[frame] = event;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (!firedEvents)\n return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n let i = 0;\n if (lastTime < frames[0])\n i = 0;\n else {\n i = Timeline.search1(frames, lastTime) + 1;\n let frameTime = frames[i];\n while (i > 0) {\n if (frames[i - 1] != frameTime)\n break;\n i--;\n }\n }\n for (; i < frameCount && time >= frames[i]; i++)\n firedEvents.push(this.events[i]);\n }\n };\n var EventTimeline = _EventTimeline;\n EventTimeline.propertyIds = [\"\" + Property.event];\n var _DrawOrderTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _DrawOrderTimeline.propertyIds);\n this.drawOrders = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, drawOrder) {\n this.frames[frame] = time;\n this.drawOrders[frame] = drawOrder;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n let idx = Timeline.search1(this.frames, time);\n let drawOrderToSetupIndex = this.drawOrders[idx];\n if (!drawOrderToSetupIndex)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n else {\n let drawOrder = skeleton.drawOrder;\n let slots = skeleton.slots;\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n };\n var DrawOrderTimeline = _DrawOrderTimeline;\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\n var IkConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, ikConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.ikConstraint + \"|\" + ikConstraintIndex\n ]);\n this.ikConstraintIndex = 0;\n this.ikConstraintIndex = ikConstraintIndex;\n }\n getFrameEntries() {\n return 6;\n }\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\n frame *= 6;\n this.frames[frame] = time;\n this.frames[frame + 1] = mix;\n this.frames[frame + 2] = softness;\n this.frames[frame + 3] = bendDirection;\n this.frames[frame + 4] = compress ? 1 : 0;\n this.frames[frame + 5] = stretch ? 1 : 0;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* 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 1 /* 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 let mix = 0, softness = 0;\n let i = Timeline.search(frames, time, 6);\n let curveType = this.curves[i / 6];\n switch (curveType) {\n case 0:\n let before = frames[i];\n mix = frames[i + 1];\n softness = frames[i + 2];\n let t = (time - before) / (frames[i + 6] - before);\n mix += (frames[i + 6 + 1] - mix) * t;\n softness += (frames[i + 6 + 2] - softness) * t;\n break;\n case 1:\n mix = frames[i + 1];\n softness = frames[i + 2];\n break;\n default:\n mix = this.getBezierValue(time, i, 1, curveType - 2);\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n if (blend == 0 /* setup */) {\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\n if (direction == 1 /* mixOut */) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n } else {\n constraint.mix += (mix - constraint.mix) * alpha;\n constraint.softness += (softness - constraint.softness) * alpha;\n if (direction == 0 /* mixIn */) {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n }\n }\n };\n var TransformConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, transformConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.transformConstraint + \"|\" + transformConstraintIndex\n ]);\n this.transformConstraintIndex = 0;\n this.transformConstraintIndex = transformConstraintIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\n let frames = this.frames;\n frame *= 7;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n frames[frame + 4] = mixScaleX;\n frames[frame + 5] = mixScaleY;\n frames[frame + 6] = mixShearY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\n }\n return;\n }\n let rotate, x, y, scaleX, scaleY, shearY;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n rotate += (frames[i + 7 + 1] - rotate) * t;\n x += (frames[i + 7 + 2] - x) * t;\n y += (frames[i + 7 + 3] - y) * t;\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\n shearY += (frames[i + 7 + 6] - shearY) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\n }\n }\n };\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.position = constraint.data.position;\n return;\n case 1 /* first */:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n let position = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n };\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.spacing = constraint.data.spacing;\n return;\n case 1 /* first */:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n let spacing = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n };\n var PathConstraintMixTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\n ]);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, mixRotate, mixX, mixY) {\n let frames = this.frames;\n frame <<= 2;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = constraint.data.mixRotate;\n constraint.mixX = constraint.data.mixX;\n constraint.mixY = constraint.data.mixY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\n }\n return;\n }\n let rotate, x, y;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n rotate += (frames[i + 4 + 1] - rotate) * t;\n x += (frames[i + 4 + 2] - x) * t;\n y += (frames[i + 4 + 3] - y) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n }\n }\n };\n var _SequenceTimeline = class extends Timeline {\n constructor(frameCount, slotIndex, attachment) {\n super(frameCount, [\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\n ]);\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n }\n getFrameEntries() {\n return _SequenceTimeline.ENTRIES;\n }\n getSlotIndex() {\n return this.slotIndex;\n }\n getAttachment() {\n return this.attachment;\n }\n setFrame(frame, time, mode, index, delay) {\n let frames = this.frames;\n frame *= _SequenceTimeline.ENTRIES;\n frames[frame] = time;\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\n frames[frame + _SequenceTimeline.DELAY] = delay;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.attachment;\n let attachment = this.attachment;\n if (slotAttachment != attachment) {\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\n return;\n }\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n slot.sequenceIndex = -1;\n return;\n }\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\n let before = frames[i];\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\n let delay = frames[i + _SequenceTimeline.DELAY];\n if (!this.attachment.sequence)\n return;\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\n let mode = SequenceModeValues[modeAndIndex & 15];\n if (mode != 0 /* hold */) {\n index += (time - before) / delay + 1e-5 | 0;\n switch (mode) {\n case 1 /* once */:\n index = Math.min(count - 1, index);\n break;\n case 2 /* loop */:\n index %= count;\n break;\n case 3 /* pingpong */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : index % n;\n if (index >= count)\n index = n - index;\n break;\n }\n case 4 /* onceReverse */:\n index = Math.max(count - 1 - index, 0);\n break;\n case 5 /* loopReverse */:\n index = count - 1 - index % count;\n break;\n case 6 /* pingpongReverse */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : (index + count - 1) % n;\n if (index >= count)\n index = n - index;\n }\n }\n }\n slot.sequenceIndex = index;\n }\n };\n var SequenceTimeline = _SequenceTimeline;\n SequenceTimeline.ENTRIES = 3;\n SequenceTimeline.MODE = 1;\n SequenceTimeline.DELAY = 2;\n\n // spine-core/src/AnimationState.ts\n var _AnimationState = class {\n constructor(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 StringSet();\n this.animationsChanged = false;\n this.trackEntryPool = new Pool(() => new TrackEntry());\n this.data = data;\n }\n static emptyAnimation() {\n return _AnimationState._emptyAnimation;\n }\n update(delta) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (!current)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n let 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 let next = current.next;\n if (next) {\n let 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) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\n tracks[i] = null;\n this.queue.end(current);\n this.clearNext(current);\n continue;\n }\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from)\n from.mixingTo = null;\n while (from) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n }\n updateMixingFrom(to, delta) {\n let from = to.mixingFrom;\n if (!from)\n return true;\n let 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)\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 apply(skeleton) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\n let current = tracks[i2];\n if (!current || current.delay > 0)\n continue;\n applied = true;\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\n let mix = current.alpha;\n if (current.mixingFrom)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && !current.next)\n mix = 0;\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\n let applyEvents = events;\n if (current.reverse) {\n applyTime = current.animation.duration - applyTime;\n applyEvents = null;\n }\n let timelines = current.animation.timelines;\n let timelineCount = timelines.length;\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\n for (let ii = 0; ii < timelineCount; ii++) {\n Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\n }\n } else {\n let timelineMode = current.timelineMode;\n let shortestRotation = current.shortestRotation;\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n current.timelinesRotation.length = timelineCount << 1;\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline2 = timelines[ii];\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\n } else if (timeline2 instanceof AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\n } else {\n Utils.webkit602BugfixHelper(mix, blend);\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* 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 + 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.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n }\n applyMixingFrom(to, skeleton, blend) {\n let from = to.mixingFrom;\n if (from.mixingFrom)\n this.applyMixingFrom(from, skeleton, blend);\n let mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == 1 /* first */)\n blend = 0 /* setup */;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != 1 /* first */)\n blend = from.mixBlend;\n }\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let timelines = from.animation.timelines;\n let timelineCount = timelines.length;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\n let events = null;\n if (from.reverse)\n applyTime = from.animation.duration - applyTime;\n else if (mix < from.eventThreshold)\n events = this.events;\n if (blend == 3 /* add */) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n let shortestRotation = from.shortestRotation;\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n from.timelinesRotation.length = timelineCount << 1;\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = 1 /* mixOut */;\n let timelineBlend;\n let alpha = 0;\n switch (timelineMode[i]) {\n case SUBSEQUENT:\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaMix;\n break;\n case HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case HOLD_FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = 0 /* setup */;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (!shortestRotation && timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\n else {\n Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\n direction = 0 /* mixIn */;\n timeline.apply(skeleton, animationLast, applyTime, 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 applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n if (time < timeline.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n } else\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + SETUP;\n }\n setAttachment(skeleton, slot, attachmentName, attachments) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n if (attachments)\n slot.attachmentState = this.unkeyedState + CURRENT;\n }\n applyRotateTimeline(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, 0 /* mixIn */);\n return;\n }\n let bone = skeleton.bones[timeline.boneIndex];\n if (!bone.active)\n return;\n let frames = timeline.frames;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case 1 /* first */:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\n r2 = bone.data.rotation + timeline.getCurveValue(time);\n }\n let total = 0, diff = r2 - r1;\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n let current = diff > 0, dir = lastTotal >= 0;\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n bone.rotation = r1 + total * alpha;\n }\n queueEvents(entry, animationTime) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped)\n break;\n if (event.time > animationEnd)\n continue;\n this.queue.event(entry, event);\n }\n let 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 let event = events[i];\n if (event.time < animationStart)\n continue;\n this.queue.event(entry, event);\n }\n }\n clearTracks() {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let 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 clearTrack(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n let current = this.tracks[trackIndex];\n if (!current)\n return;\n this.queue.end(current);\n this.clearNext(current);\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (!from)\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 setCurrent(index, current, interrupt) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n current.previous = null;\n if (from) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom && 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 setAnimation(trackIndex, animationName, loop = false) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n setAnimationWith(trackIndex, animation, loop = false) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.clearNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.clearNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let last = this.expandToIndex(trackIndex);\n if (last) {\n while (last.next)\n last = last.next;\n }\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n if (!last) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n entry.previous = last;\n if (delay <= 0)\n delay += last.getTrackComplete() - entry.mixDuration;\n }\n entry.delay = delay;\n return entry;\n }\n setEmptyAnimation(trackIndex, mixDuration = 0) {\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\n if (delay <= 0)\n entry.delay += entry.mixDuration - mixDuration;\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n setEmptyAnimations(mixDuration = 0) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n expandToIndex(index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n trackEntry(trackIndex, animation, loop, last) {\n let entry = this.trackEntryPool.obtain();\n entry.reset();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.reverse = false;\n entry.shortestRotation = 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.mixTime = 0;\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\n entry.interruptAlpha = 1;\n entry.totalAlpha = 0;\n entry.mixBlend = 2 /* replace */;\n return entry;\n }\n clearNext(entry) {\n let next = entry.next;\n while (next) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n _animationsChanged() {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let entry = tracks[i];\n if (!entry)\n continue;\n while (entry.mixingFrom)\n entry = entry.mixingFrom;\n do {\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry);\n }\n }\n computeHold(entry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n timelineMode.length = timelinesCount;\n let timelineHoldMix = entry.timelineHoldMix;\n timelineHoldMix.length = 0;\n let propertyIDs = this.propertyIDs;\n if (to && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++)\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\n return;\n }\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let ids = timeline.getPropertyIds();\n if (!propertyIDs.addAll(ids))\n timelineMode[i] = SUBSEQUENT;\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\n timelineMode[i] = FIRST;\n } else {\n for (let next = to.mixingTo; next; next = next.mixingTo) {\n if (next.animation.hasTimeline(ids))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = HOLD_MIX;\n timelineHoldMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = HOLD_FIRST;\n }\n }\n }\n getCurrent(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n }\n addListener(listener) {\n if (!listener)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n }\n clearListeners() {\n this.listeners.length = 0;\n }\n clearListenerNotifications() {\n this.queue.clear();\n }\n };\n var AnimationState = _AnimationState;\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\n var TrackEntry = class {\n constructor() {\n this.animation = null;\n this.previous = null;\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.listener = null;\n this.trackIndex = 0;\n this.loop = false;\n this.holdPrevious = false;\n this.reverse = false;\n this.shortestRotation = false;\n this.eventThreshold = 0;\n this.attachmentThreshold = 0;\n this.drawOrderThreshold = 0;\n this.animationStart = 0;\n this.animationEnd = 0;\n this.animationLast = 0;\n this.nextAnimationLast = 0;\n this.delay = 0;\n this.trackTime = 0;\n this.trackLast = 0;\n this.nextTrackLast = 0;\n this.trackEnd = 0;\n this.timeScale = 0;\n this.alpha = 0;\n this.mixTime = 0;\n this.mixDuration = 0;\n this.interruptAlpha = 0;\n this.totalAlpha = 0;\n this.mixBlend = 2 /* replace */;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n reset() {\n this.next = null;\n this.previous = 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 getAnimationTime() {\n if (this.loop) {\n let 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 setAnimationLast(animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n isComplete() {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n resetRotationDirections() {\n this.timelinesRotation.length = 0;\n }\n getTrackComplete() {\n let duration = this.animationEnd - this.animationStart;\n if (duration != 0) {\n if (this.loop)\n return duration * (1 + (this.trackTime / duration | 0));\n if (this.trackTime < duration)\n return duration;\n }\n return this.trackTime;\n }\n };\n var EventQueue = class {\n constructor(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n start(entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n interrupt(entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n end(entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n dispose(entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n complete(entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n event(entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n drain() {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n let objects = this.objects;\n let listeners = this.animState.listeners;\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i];\n let entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener && entry.listener.start)\n entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.start)\n listener.start(entry);\n }\n break;\n case EventType.interrupt:\n if (entry.listener && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.interrupt)\n listener.interrupt(entry);\n }\n break;\n case EventType.end:\n if (entry.listener && entry.listener.end)\n entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.end)\n listener.end(entry);\n }\n case EventType.dispose:\n if (entry.listener && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.dispose)\n listener.dispose(entry);\n }\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener && entry.listener.complete)\n entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.complete)\n listener.complete(entry);\n }\n break;\n case EventType.event:\n let event = objects[i++ + 2];\n if (entry.listener && entry.listener.event)\n entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.event)\n listener.event(entry, event);\n }\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n }\n clear() {\n this.objects.length = 0;\n }\n };\n var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"start\"] = 0] = \"start\";\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\n EventType2[EventType2[\"end\"] = 2] = \"end\";\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\n EventType2[EventType2[\"event\"] = 5] = \"event\";\n return EventType2;\n })(EventType || {});\n var AnimationStateAdapter = class {\n start(entry) {\n }\n interrupt(entry) {\n }\n end(entry) {\n }\n dispose(entry) {\n }\n complete(entry) {\n }\n event(entry, event) {\n }\n };\n var SUBSEQUENT = 0;\n var FIRST = 1;\n var HOLD_SUBSEQUENT = 2;\n var HOLD_FIRST = 3;\n var HOLD_MIX = 4;\n var SETUP = 1;\n var CURRENT = 2;\n\n // spine-core/src/AnimationStateData.ts\n var AnimationStateData = class {\n constructor(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (!skeletonData)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n setMix(fromName, toName, duration) {\n let from = this.skeletonData.findAnimation(fromName);\n if (!from)\n throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (!to)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n setMixWith(from, to, duration) {\n if (!from)\n throw new Error(\"from cannot be null.\");\n if (!to)\n throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n getMix(from, to) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === void 0 ? this.defaultMix : value;\n }\n };\n\n // spine-core/src/attachments/BoundingBoxAttachment.ts\n var BoundingBoxAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/attachments/ClippingAttachment.ts\n var ClippingAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.endSlot = null;\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\n }\n copy() {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/Texture.ts\n var Texture = class {\n constructor(image) {\n this._image = image;\n }\n getImage() {\n return this._image;\n }\n };\n var TextureFilter = /* @__PURE__ */ ((TextureFilter2) => {\n TextureFilter2[TextureFilter2[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter2[TextureFilter2[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter2[TextureFilter2[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter2[TextureFilter2[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter2[TextureFilter2[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter2[TextureFilter2[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter2[TextureFilter2[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n return TextureFilter2;\n })(TextureFilter || {});\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\n return TextureWrap3;\n })(TextureWrap || {});\n var TextureRegion = class {\n constructor() {\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.degrees = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n };\n var FakeTexture = class extends Texture {\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-core/src/TextureAtlas.ts\n var TextureAtlas = class {\n constructor(atlasText) {\n this.pages = new Array();\n this.regions = new Array();\n let reader = new TextureAtlasReader(atlasText);\n let entry = new Array(4);\n let pageFields = {};\n pageFields[\"size\"] = (page2) => {\n page2.width = parseInt(entry[1]);\n page2.height = parseInt(entry[2]);\n };\n pageFields[\"format\"] = () => {\n };\n pageFields[\"filter\"] = (page2) => {\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\n };\n pageFields[\"repeat\"] = (page2) => {\n if (entry[1].indexOf(\"x\") != -1)\n page2.uWrap = 10497 /* Repeat */;\n if (entry[1].indexOf(\"y\") != -1)\n page2.vWrap = 10497 /* Repeat */;\n };\n pageFields[\"pma\"] = (page2) => {\n page2.pma = entry[1] == \"true\";\n };\n var regionFields = {};\n regionFields[\"xy\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n };\n regionFields[\"size\"] = (region) => {\n region.width = parseInt(entry[1]);\n region.height = parseInt(entry[2]);\n };\n regionFields[\"bounds\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n region.width = parseInt(entry[3]);\n region.height = parseInt(entry[4]);\n };\n regionFields[\"offset\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n };\n regionFields[\"orig\"] = (region) => {\n region.originalWidth = parseInt(entry[1]);\n region.originalHeight = parseInt(entry[2]);\n };\n regionFields[\"offsets\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n region.originalWidth = parseInt(entry[3]);\n region.originalHeight = parseInt(entry[4]);\n };\n regionFields[\"rotate\"] = (region) => {\n let value = entry[1];\n if (value == \"true\")\n region.degrees = 90;\n else if (value != \"false\")\n region.degrees = parseInt(value);\n };\n regionFields[\"index\"] = (region) => {\n region.index = parseInt(entry[1]);\n };\n let line = reader.readLine();\n while (line && line.trim().length == 0)\n line = reader.readLine();\n while (true) {\n if (!line || line.trim().length == 0)\n break;\n if (reader.readEntry(entry, line) == 0)\n break;\n line = reader.readLine();\n }\n let page = null;\n let names = null;\n let values = null;\n while (true) {\n if (line === null)\n break;\n if (line.trim().length == 0) {\n page = null;\n line = reader.readLine();\n } else if (!page) {\n page = new TextureAtlasPage(line.trim());\n while (true) {\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\n break;\n let field = pageFields[entry[0]];\n if (field)\n field(page);\n }\n this.pages.push(page);\n } else {\n let region = new TextureAtlasRegion(page, line);\n while (true) {\n let count = reader.readEntry(entry, line = reader.readLine());\n if (count == 0)\n break;\n let field = regionFields[entry[0]];\n if (field)\n field(region);\n else {\n if (!names)\n names = [];\n if (!values)\n values = [];\n names.push(entry[0]);\n let entryValues = [];\n for (let i = 0; i < count; i++)\n entryValues.push(parseInt(entry[i + 1]));\n values.push(entryValues);\n }\n }\n if (region.originalWidth == 0 && region.originalHeight == 0) {\n region.originalWidth = region.width;\n region.originalHeight = region.height;\n }\n if (names && names.length > 0 && values && values.length > 0) {\n region.names = names;\n region.values = values;\n names = null;\n values = null;\n }\n region.u = region.x / page.width;\n region.v = region.y / page.height;\n if (region.degrees == 90) {\n region.u2 = (region.x + region.height) / page.width;\n region.v2 = (region.y + region.width) / page.height;\n } else {\n region.u2 = (region.x + region.width) / page.width;\n region.v2 = (region.y + region.height) / page.height;\n }\n this.regions.push(region);\n }\n }\n }\n findRegion(name) {\n for (let 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 setTextures(assetManager, pathPrefix = \"\") {\n for (let page of this.pages)\n page.setTexture(assetManager.get(pathPrefix + page.name));\n }\n dispose() {\n var _a;\n for (let i = 0; i < this.pages.length; i++) {\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\n }\n }\n };\n var TextureAtlasReader = class {\n constructor(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n readLine() {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n readEntry(entry, line) {\n if (!line)\n return 0;\n line = line.trim();\n if (line.length == 0)\n return 0;\n let colon = line.indexOf(\":\");\n if (colon == -1)\n return 0;\n entry[0] = line.substr(0, colon).trim();\n for (let i = 1, lastMatch = colon + 1; ; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) {\n entry[i] = line.substr(lastMatch).trim();\n return i;\n }\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n if (i == 4)\n return 4;\n }\n }\n };\n var TextureAtlasPage = class {\n constructor(name) {\n this.minFilter = 9728 /* Nearest */;\n this.magFilter = 9728 /* Nearest */;\n this.uWrap = 33071 /* ClampToEdge */;\n this.vWrap = 33071 /* ClampToEdge */;\n this.texture = null;\n this.width = 0;\n this.height = 0;\n this.pma = false;\n this.name = name;\n }\n setTexture(texture) {\n this.texture = texture;\n texture.setFilters(this.minFilter, this.magFilter);\n texture.setWraps(this.uWrap, this.vWrap);\n }\n };\n var TextureAtlasRegion = class extends TextureRegion {\n constructor(page, name) {\n super();\n this.x = 0;\n this.y = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n this.index = 0;\n this.degrees = 0;\n this.names = null;\n this.values = null;\n this.page = page;\n this.name = name;\n }\n };\n\n // spine-core/src/attachments/MeshAttachment.ts\n var MeshAttachment = class extends VertexAttachment {\n constructor(name, path) {\n super(name);\n this.region = null;\n this.regionUVs = [];\n this.uvs = [];\n this.triangles = [];\n this.color = new Color(1, 1, 1, 1);\n this.width = 0;\n this.height = 0;\n this.hullLength = 0;\n this.edges = [];\n this.parentMesh = null;\n this.sequence = null;\n this.tempColor = new Color(0, 0, 0, 0);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let regionUVs = this.regionUVs;\n if (!this.uvs || this.uvs.length != regionUVs.length)\n this.uvs = Utils.newFloatArray(regionUVs.length);\n let uvs = this.uvs;\n let n = this.uvs.length;\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof TextureAtlasRegion) {\n let region = this.region, image = region.page.texture.getImage();\n let textureWidth = image.width, textureHeight = image.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 (let 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 (let 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 (let 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 } else if (!this.region) {\n u = v = 0;\n width = height = 1;\n } else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (let 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 getParentMesh() {\n return this.parentMesh;\n }\n setParentMesh(parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh) {\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 copy() {\n if (this.parentMesh)\n return this.newLinkedMesh();\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n if (this.edges) {\n copy.edges = new Array(this.edges.length);\n 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 computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n super.computeWorldVertices(slot, start, count, worldVertices, offset, stride);\n }\n newLinkedMesh() {\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n copy.timelineAttachment = this.timelineAttachment;\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\n if (copy.region != null)\n copy.updateRegion();\n return copy;\n }\n };\n\n // spine-core/src/attachments/PathAttachment.ts\n var PathAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.lengths = [];\n this.closed = false;\n this.constantSpeed = false;\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n 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 };\n\n // spine-core/src/attachments/PointAttachment.ts\n var PointAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.color = new Color(0.38, 0.94, 0, 1);\n }\n computeWorldPosition(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 computeWorldRotation(bone) {\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * bone.a + sin * bone.b;\n let y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n copy() {\n let copy = new PointAttachment(this.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 };\n\n // spine-core/src/attachments/RegionAttachment.ts\n var _RegionAttachment = class extends Attachment {\n constructor(name, path) {\n super(name);\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 Color(1, 1, 1, 1);\n this.rendererObject = null;\n this.region = null;\n this.sequence = null;\n this.offset = Utils.newFloatArray(8);\n this.uvs = Utils.newFloatArray(8);\n this.tempColor = new Color(1, 1, 1, 1);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let region = this.region;\n let uvs = this.uvs;\n if (region == null) {\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n uvs[4] = 1;\n uvs[5] = 1;\n uvs[6] = 1;\n uvs[7] = 0;\n return;\n }\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let x = this.x, y = this.y;\n let localXCos = localX * cos + x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[0] = localXCos - localYSin;\n offset[1] = localYCos + localXSin;\n offset[2] = localXCos - localY2Sin;\n offset[3] = localY2Cos + localXSin;\n offset[4] = localX2Cos - localY2Sin;\n offset[5] = localY2Cos + localX2Sin;\n offset[6] = localX2Cos - localYSin;\n offset[7] = localYCos + localX2Sin;\n if (region.degrees == 90) {\n uvs[0] = region.u2;\n uvs[1] = region.v2;\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 } 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 computeWorldVertices(slot, worldVertices, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n let bone = slot.bone;\n let vertexOffset = this.offset;\n let x = bone.worldX, y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[0];\n offsetY = vertexOffset[1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[2];\n offsetY = vertexOffset[3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[4];\n offsetY = vertexOffset[5];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[6];\n offsetY = vertexOffset[7];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n }\n copy() {\n let copy = new _RegionAttachment(this.name, this.path);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\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 Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n return copy;\n }\n };\n var RegionAttachment = _RegionAttachment;\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\n // spine-core/src/AtlasAttachmentLoader.ts\n var AtlasAttachmentLoader = class {\n constructor(atlas) {\n this.atlas = atlas;\n }\n loadSequence(name, basePath, sequence) {\n let regions = sequence.regions;\n for (let i = 0, n = regions.length; i < n; i++) {\n let path = sequence.getPath(basePath, i);\n let region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\n regions[i] = region;\n regions[i].renderObject = regions[i];\n }\n }\n newRegionAttachment(skin, name, path, sequence) {\n let attachment = new RegionAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newMeshAttachment(skin, name, path, sequence) {\n let attachment = new MeshAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newBoundingBoxAttachment(skin, name) {\n return new BoundingBoxAttachment(name);\n }\n newPathAttachment(skin, name) {\n return new PathAttachment(name);\n }\n newPointAttachment(skin, name) {\n return new PointAttachment(name);\n }\n newClippingAttachment(skin, name) {\n return new ClippingAttachment(name);\n }\n };\n\n // spine-core/src/BoneData.ts\n var BoneData = class {\n constructor(index, name, parent) {\n this.index = 0;\n this.parent = null;\n this.length = 0;\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 Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n };\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n return TransformMode2;\n })(TransformMode || {});\n\n // spine-core/src/Bone.ts\n var Bone = class {\n constructor(data, skeleton, parent) {\n this.parent = null;\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.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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 isActive() {\n return this.active;\n }\n update() {\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\n }\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n updateWorldTransformWith(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 let parent = this.parent;\n if (!parent) {\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n let sx = skeleton.scaleX;\n let sy = skeleton.scaleY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n let 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 0 /* Normal */: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = 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 1 /* OnlyTranslation */: {\n let rotationY = rotation + 90 + shearY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case 2 /* NoRotationOrReflection */: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 1e-4) {\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) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = 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 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 1e-5)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = 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 setToSetupPose() {\n let 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 getWorldRotationX() {\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\n }\n getWorldRotationY() {\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\n }\n getWorldScaleX() {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n }\n getWorldScaleY() {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n }\n updateAppliedTransform() {\n let parent = this.parent;\n if (!parent) {\n this.ax = this.worldX - this.skeleton.x;\n this.ay = this.worldY - this.skeleton.y;\n this.arotation = Math.atan2(this.c, this.a) * 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) * MathUtils.radDeg;\n return;\n }\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n let pid = 1 / (pa * pd - pb * pc);\n let 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 let ia = pid * pd;\n let id = pid * pa;\n let ib = pid * pb;\n let ic = pid * pc;\n let ra = ia * this.a - ib * this.c;\n let rb = ia * this.b - ib * this.d;\n let rc = id * this.c - ic * this.a;\n let rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 1e-4) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\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) * MathUtils.radDeg;\n }\n }\n worldToLocal(world) {\n let invDet = 1 / (this.a * this.d - this.b * this.c);\n let x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = x * this.d * invDet - y * this.b * invDet;\n world.y = y * this.a * invDet - x * this.c * invDet;\n return world;\n }\n localToWorld(local) {\n let 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 worldToLocalRotation(worldRotation) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\n }\n localToWorldRotation(localRotation) {\n localRotation -= this.rotation - this.shearX;\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\n }\n rotateWorld(degrees) {\n let a = this.a, b = this.b, c = this.c, d = this.d;\n let cos = MathUtils.cosDeg(degrees), sin = 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 }\n };\n\n // spine-core/src/ConstraintData.ts\n var ConstraintData = class {\n constructor(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n };\n\n // spine-core/src/AssetManagerBase.ts\n var AssetManagerBase = class {\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\n this.pathPrefix = \"\";\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n this.downloader = downloader;\n }\n start(path) {\n this.toLoad++;\n return this.pathPrefix + path;\n }\n success(callback, path, asset) {\n this.toLoad--;\n this.loaded++;\n this.assets[path] = asset;\n if (callback)\n callback(path, asset);\n }\n error(callback, path, message) {\n this.toLoad--;\n this.loaded++;\n this.errors[path] = message;\n if (callback)\n callback(path, message);\n }\n loadAll() {\n let promise = new Promise((resolve, reject) => {\n let check = () => {\n if (this.isLoadingComplete()) {\n if (this.hasErrors())\n reject(this.errors);\n else\n resolve(this);\n return;\n }\n requestAnimationFrame(check);\n };\n requestAnimationFrame(check);\n });\n return promise;\n }\n setRawDataURI(path, data) {\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\n }\n loadBinary(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadBinary(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\n });\n }\n loadText(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadText(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\n });\n }\n loadJson(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadJson(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\n });\n }\n loadTexture(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\n let isWebWorker = !isBrowser;\n if (isWebWorker) {\n fetch(path, { mode: \"cors\" }).then((response) => {\n if (response.ok)\n return response.blob();\n this.error(error, path, `Couldn't load image: ${path}`);\n return null;\n }).then((blob) => {\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\n }).then((bitmap) => {\n if (bitmap)\n this.success(success, path, this.textureLoader(bitmap));\n });\n } else {\n let image = new Image();\n image.crossOrigin = \"anonymous\";\n image.onload = () => {\n this.success(success, path, this.textureLoader(image));\n };\n image.onerror = () => {\n this.error(error, path, `Couldn't load image: ${path}`);\n };\n if (this.downloader.rawDataUris[path])\n path = this.downloader.rawDataUris[path];\n image.src = path;\n }\n }\n loadTextureAtlas(path, success = () => {\n }, error = () => {\n }, fileAlias) {\n let index = path.lastIndexOf(\"/\");\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\n path = this.start(path);\n this.downloader.downloadText(path, (atlasText) => {\n try {\n let atlas = new TextureAtlas(atlasText);\n let toLoad = atlas.pages.length, abort = false;\n for (let page of atlas.pages) {\n this.loadTexture(\n !fileAlias ? parent + page.name : fileAlias[page.name],\n (imagePath, texture) => {\n if (!abort) {\n page.setTexture(texture);\n if (--toLoad == 0)\n this.success(success, path, atlas);\n }\n },\n (imagePath, message) => {\n if (!abort)\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\n abort = true;\n }\n );\n }\n } catch (e) {\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\n }\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\n });\n }\n get(path) {\n return this.assets[this.pathPrefix + path];\n }\n require(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset)\n return asset;\n let error = this.errors[path];\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\n }\n remove(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n delete this.assets[path];\n return asset;\n }\n removeAll() {\n for (let key in this.assets) {\n let asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n }\n isLoadingComplete() {\n return this.toLoad == 0;\n }\n getToLoad() {\n return this.toLoad;\n }\n getLoaded() {\n return this.loaded;\n }\n dispose() {\n this.removeAll();\n }\n hasErrors() {\n return Object.keys(this.errors).length > 0;\n }\n getErrors() {\n return this.errors;\n }\n };\n var Downloader = class {\n constructor() {\n this.callbacks = {};\n this.rawDataUris = {};\n }\n dataUriToString(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx != -1) {\n base64Idx += \"base64,\".length;\n return atob(dataUri.substr(base64Idx));\n } else {\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\n }\n }\n base64ToUint8Array(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n }\n dataUriToUint8Array(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx == -1)\n throw new Error(\"Not a binary data URI.\");\n base64Idx += \"base64,\".length;\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\n }\n downloadText(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToString(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.open(\"GET\", url, true);\n let done = () => {\n this.finish(url, request.status, request.responseText);\n };\n request.onload = done;\n request.onerror = done;\n request.send();\n }\n downloadJson(url, success, error) {\n this.downloadText(url, (data) => {\n success(JSON.parse(data));\n }, error);\n }\n downloadBinary(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n let onerror = () => {\n this.finish(url, request.status, request.response);\n };\n request.onload = () => {\n if (request.status == 200 || request.status == 0)\n this.finish(url, 200, new Uint8Array(request.response));\n else\n onerror();\n };\n request.onerror = onerror;\n request.send();\n }\n start(url, success, error) {\n let callbacks = this.callbacks[url];\n try {\n if (callbacks)\n return true;\n this.callbacks[url] = callbacks = [];\n } finally {\n callbacks.push(success, error);\n }\n }\n finish(url, status, data) {\n let callbacks = this.callbacks[url];\n delete this.callbacks[url];\n let args = status == 200 || status == 0 ? [data] : [status, data];\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\n callbacks[i].apply(null, args);\n }\n };\n\n // spine-core/src/Event.ts\n var Event = class {\n constructor(time, data) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.time = 0;\n this.volume = 0;\n this.balance = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n };\n\n // spine-core/src/EventData.ts\n var EventData = class {\n constructor(name) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.audioPath = null;\n this.volume = 0;\n this.balance = 0;\n this.name = name;\n }\n };\n\n // spine-core/src/IkConstraint.ts\n var IkConstraint = class {\n constructor(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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find bone ${data.target.name}`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mix == 0)\n return;\n let target = this.target;\n let 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.data.uniform, this.softness, this.mix);\n break;\n }\n }\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\n let p = bone.parent;\n if (!p)\n throw new Error(\"IK bone must have parent.\");\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case 1 /* OnlyTranslation */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case 2 /* NoRotationOrReflection */:\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n let sa = pa / bone.skeleton.scaleX;\n let 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) * MathUtils.radDeg;\n default:\n let x = targetX - p.worldX, y = targetY - p.worldY;\n let 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) * 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 let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(\n bone.ax,\n bone.ay,\n bone.arotation + rotationIK * alpha,\n sx,\n sy,\n bone.ashearX,\n bone.ashearY\n );\n }\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\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 } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n let u = Math.abs(psx - psy) <= 1e-4;\n if (!u || stretch) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n let pp = parent.parent;\n if (!pp)\n throw new Error(\"IK parent must itself have a parent.\");\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 1e-4) {\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 let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) * 0.5;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let 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:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1) {\n cos = -1;\n a2 = Math.PI * bendDir;\n } else if (cos > 1) {\n cos = 1;\n a2 = 0;\n if (stretch) {\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n sx *= a;\n if (uniform)\n sy *= a;\n }\n } else\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 } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) * 0.5;\n let r0 = q / c2, r1 = c / q;\n let 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 let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let 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) * 0.5) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * 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, sy, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * 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 };\n\n // spine-core/src/IkConstraintData.ts\n var IkConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/PathConstraintData.ts\n var PathConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.positionMode = PositionMode.Fixed;\n this.spacingMode = SpacingMode.Fixed;\n this.rotateMode = RotateMode.Chain;\n this.offsetRotation = 0;\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n }\n set target(slotData) {\n this._target = slotData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"SlotData not set.\");\n else\n return this._target;\n }\n };\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\n return PositionMode2;\n })(PositionMode || {});\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\n return SpacingMode2;\n })(SpacingMode || {});\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\n return RotateMode2;\n })(RotateMode || {});\n\n // spine-core/src/PathConstraint.ts\n var _PathConstraint = class {\n constructor(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findSlot(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}`);\n this.target = target;\n this.position = data.position;\n this.spacing = data.spacing;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n }\n isActive() {\n return this.active;\n }\n update() {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment))\n return;\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\n return;\n let data = this.data;\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\n let bones = this.bones;\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\n let spacing = this.spacing;\n switch (data.spacingMode) {\n case 2 /* Percent */:\n if (scale) {\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon)\n lengths[i] = 0;\n else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n lengths[i] = Math.sqrt(x * x + y * y);\n }\n }\n }\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\n break;\n case 3 /* Proportional */:\n let sum = 0;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = length;\n sum += length;\n }\n }\n if (sum > 0) {\n sum = spacesCount / sum * spacing;\n for (let i = 1; i < spacesCount; i++)\n spaces[i] *= sum;\n }\n break;\n default:\n let lengthSpacing = data.spacingMode == 0 /* Length */;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n }\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = data.rotateMode == 1 /* Chain */;\n else {\n tip = false;\n let p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * mixX;\n bone.worldY += (boneY - bone.worldY) * mixY;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (mixRotate > 0) {\n let 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 let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\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.updateAppliedTransform();\n }\n }\n computeWorldPositions(path, spacesCount, tangents) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\n let closed2 = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed2 ? 1 : 2;\n let pathLength2 = lengths[curveCount];\n if (this.data.positionMode == 1 /* Percent */)\n position *= pathLength2;\n let multiplier2;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier2 = pathLength2;\n break;\n case 3 /* Proportional */:\n multiplier2 = pathLength2 / spacesCount;\n break;\n default:\n multiplier2 = 1;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier2;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength2;\n if (p < 0)\n p += pathLength2;\n curve = 0;\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 } else if (p > pathLength2) {\n if (prevCurve != _PathConstraint.AFTER) {\n prevCurve = _PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = lengths[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed2 && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(\n p,\n world[0],\n world[1],\n world[2],\n world[3],\n world[4],\n world[5],\n world[6],\n world[7],\n out,\n o,\n tangents || i > 0 && space == 0\n );\n }\n return out;\n }\n if (closed2) {\n verticesLength += 2;\n world = 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 } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let 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 (this.data.positionMode == 1 /* Percent */)\n position *= pathLength;\n let multiplier;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier = pathLength;\n break;\n case 3 /* Proportional */:\n multiplier = pathLength / spacesCount;\n break;\n default:\n multiplier = 1;\n }\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = curves[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n let 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) * 6e-3;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\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 let length = segments[segment];\n if (p > length)\n continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - 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 addBeforePosition(p, temp, i, out, o) {\n let 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 addAfterPosition(p, temp, i, out, o) {\n let 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 addCurvePosition(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 let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let 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 < 1e-3)\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 };\n var PathConstraint = _PathConstraint;\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 1e-5;\n\n // spine-core/src/Slot.ts\n var Slot = class {\n constructor(data, bone) {\n this.darkColor = null;\n this.attachment = null;\n this.attachmentState = 0;\n this.sequenceIndex = -1;\n this.deform = new Array();\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!bone)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = !data.darkColor ? null : new Color();\n this.setToSetupPose();\n }\n getSkeleton() {\n return this.bone.skeleton;\n }\n getAttachment() {\n return this.attachment;\n }\n setAttachment(attachment) {\n if (this.attachment == attachment)\n return;\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\n this.deform.length = 0;\n }\n this.attachment = attachment;\n this.sequenceIndex = -1;\n }\n setToSetupPose() {\n this.color.setFromColor(this.data.color);\n if (this.darkColor)\n this.darkColor.setFromColor(this.data.darkColor);\n if (!this.data.attachmentName)\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 };\n\n // spine-core/src/TransformConstraint.ts\n var TransformConstraint = class {\n constructor(data, skeleton) {\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 0;\n this.temp = new Vector2();\n this.active = false;\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n this.mixScaleX = data.mixScaleX;\n this.mixScaleY = data.mixScaleY;\n this.mixShearY = data.mixShearY;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\n return;\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n applyAbsoluteWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * mixX;\n bone.worldY += (temp.y - bone.worldY) * mixY;\n }\n if (mixScaleX != 0) {\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n if (s != 0)\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n if (s != 0)\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let b = bone.b, d = bone.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyRelativeWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * mixX;\n bone.worldY += temp.y * mixY;\n }\n if (mixScaleX != 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n let b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyAbsoluteLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation;\n if (mixRotate != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n rotation += r * mixRotate;\n }\n let x = bone.ax, y = bone.ay;\n x += (target.ax - x + this.data.offsetX) * mixX;\n y += (target.ay - y + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (mixScaleX != 0 && scaleX != 0)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\n if (mixScaleY != 0 && scaleY != 0)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\n let shearY = bone.ashearY;\n if (mixShearY != 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n shearY += r * mixShearY;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n applyRelativeLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n };\n\n // spine-core/src/Skeleton.ts\n var _Skeleton = class {\n constructor(data) {\n this._updateCache = new Array();\n this.skin = null;\n this.scaleX = 1;\n this._scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone;\n if (!boneData.parent)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n get scaleY() {\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\n }\n set scaleY(scaleY) {\n this._scaleY = scaleY;\n }\n updateCache() {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone);\n }\n }\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n sortIkConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let target = constraint.target;\n this.sortBone(target);\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length == 1) {\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n } else {\n let child = constrained[constrained.length - 1];\n this.sortBone(child);\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n child.sorted = true;\n }\n }\n sortPathConstraint(constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortTransformConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n this.sortBone(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n sortPathConstraintAttachmentWith(attachment, slotBone) {\n if (!(attachment instanceof PathAttachment))\n return;\n let pathBones = attachment.bones;\n if (!pathBones)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n for (let i = 0, n = pathBones.length; i < n; ) {\n let nn = pathBones[i++];\n nn += i;\n while (i < nn)\n this.sortBone(bones[pathBones[i++]]);\n }\n }\n }\n sortBone(bone) {\n if (!bone)\n return;\n if (bone.sorted)\n return;\n let parent = bone.parent;\n if (parent)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n sortReset(bones) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let 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 updateWorldTransform() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[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 }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n updateWorldTransformWith(parent) {\n let rootBone = this.getRootBone();\n if (!rootBone)\n throw new Error(\"Root bone must not be null.\");\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++) {\n let updatable = updateCache[i];\n if (updatable != rootBone)\n updatable.update();\n }\n }\n setToSetupPose() {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n setBonesToSetupPose() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let 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 let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n }\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n }\n }\n setSlotsToSetupPose() {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n getRootBone() {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n }\n setSkinByName(skinName) {\n let skin = this.data.findSkin(skinName);\n if (!skin)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n setSkin(newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin) {\n if (this.skin)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name) {\n let attachment = newSkin.getAttachment(i, name);\n if (attachment)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n getAttachmentByName(slotName, attachmentName) {\n let slot = this.data.findSlot(slotName);\n if (!slot)\n throw new Error(`Can't find slot with name ${slotName}`);\n return this.getAttachment(slot.index, attachmentName);\n }\n getAttachment(slotIndex, attachmentName) {\n if (!attachmentName)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin) {\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment)\n return attachment;\n }\n if (this.data.defaultSkin)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n setAttachment(slotName, attachmentName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment = null;\n if (attachmentName) {\n attachment = this.getAttachment(i, attachmentName);\n if (!attachment)\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 findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n getBoundsRect() {\n let offset = new Vector2();\n let size = new Vector2();\n this.getBounds(offset, size);\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\n }\n getBounds(offset, size, temp = new Array(2)) {\n if (!offset)\n throw new Error(\"offset cannot be null.\");\n if (!size)\n throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n let verticesLength = 0;\n let vertices = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let 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 };\n var Skeleton = _Skeleton;\n Skeleton.yDown = false;\n\n // spine-core/src/SkeletonData.ts\n var SkeletonData = class {\n constructor() {\n this.name = null;\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.defaultSkin = null;\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.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n this.version = null;\n this.hash = null;\n this.fps = 0;\n this.imagesPath = null;\n this.audioPath = null;\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n }\n findSkin(skinName) {\n if (!skinName)\n throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n }\n findEvent(eventDataName) {\n if (!eventDataName)\n throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName)\n return event;\n }\n return null;\n }\n findAnimation(animationName) {\n if (!animationName)\n throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n }\n findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n };\n\n // spine-core/src/Skin.ts\n var SkinEntry = class {\n constructor(slotIndex = 0, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n };\n var Skin = class {\n constructor(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n setAttachment(slotIndex, name, attachment) {\n if (!attachment)\n throw new Error(\"attachment cannot be null.\");\n let 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 addSkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n copySkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (!attachment.attachment)\n continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n getAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n removeAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary)\n delete dictionary[name];\n }\n getAttachments() {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n getAttachmentsForSlot(slotIndex, attachments) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n clear() {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n attachAll(skeleton, oldSkin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n };\n\n // spine-core/src/SlotData.ts\n var SlotData = class {\n constructor(index, name, boneData) {\n this.index = 0;\n this.color = new Color(1, 1, 1, 1);\n this.darkColor = null;\n this.attachmentName = null;\n this.blendMode = BlendMode.Normal;\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n if (!boneData)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n };\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\n return BlendMode3;\n })(BlendMode || {});\n\n // spine-core/src/TransformConstraintData.ts\n var TransformConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/SkeletonBinary.ts\n var SkeletonBinary = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(binary) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n skeletonData.name = \"\";\n let input = new BinaryInput(binary);\n let lowHash = input.readInt32();\n let highHash = input.readInt32();\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n let nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n let n = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let str = input.readString();\n if (!str)\n throw new Error(\"String in string table must not be null.\");\n input.strings.push(str);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Bone name must not be null.\");\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n let data = new BoneData(i, name, parent);\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 = input.readInt(true);\n data.skinRequired = input.readBoolean();\n if (nonessential)\n Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let slotName = input.readString();\n if (!slotName)\n throw new Error(\"Slot name must not be null.\");\n let boneData = skeletonData.bones[input.readInt(true)];\n let data = new SlotData(i, slotName, boneData);\n Color.rgba8888ToColor(data.color, input.readInt32());\n let darkColor = input.readInt32();\n if (darkColor != -1)\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = input.readInt(true);\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"IK constraint data name must not be null.\");\n let data = new IkConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Transform constraint data name must not be null.\");\n let data = new TransformConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n data.mixScaleX = input.readFloat();\n data.mixScaleY = input.readFloat();\n data.mixShearY = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Path constraint data name must not be null.\");\n let data = new PathConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 = input.readInt(true);\n data.spacingMode = input.readInt(true);\n data.rotateMode = input.readInt(true);\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n let i = skeletonData.skins.length;\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++) {\n let skin = this.readSkin(input, skeletonData, false, nonessential);\n if (!skin)\n throw new Error(\"readSkin() should not have returned null.\");\n skeletonData.skins[i] = skin;\n }\n }\n n = this.linkedMeshes.length;\n for (let i = 0; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(\"Not skin found for linked mesh.\");\n if (!linkedMesh.parent)\n throw new Error(\"Linked mesh parent must not be null\");\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let eventName = input.readStringRef();\n if (!eventName)\n throw new Error();\n let data = new EventData(eventName);\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) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let animationName = input.readString();\n if (!animationName)\n throw new Error(\"Animatio name must not be null.\");\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\n }\n return skeletonData;\n }\n readSkin(input, skeletonData, defaultSkin, nonessential) {\n let skin = null;\n let slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new Skin(\"default\");\n } else {\n let skinName = input.readStringRef();\n if (!skinName)\n throw new Error(\"Skin name must not be null.\");\n skin = new Skin(skinName);\n skin.bones.length = input.readInt(true);\n for (let i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (let 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 (let i = 0; i < slotCount; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let name = input.readStringRef();\n if (!name)\n throw new Error(\"Attachment name must not be null\");\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n if (attachment)\n skin.setAttachment(slotIndex, name, attachment);\n }\n }\n return skin;\n }\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n let scale = this.scale;\n let name = input.readStringRef();\n if (!name)\n name = attachmentName;\n switch (input.readByte()) {\n case AttachmentType.Region: {\n let path = input.readStringRef();\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let scaleX = input.readFloat();\n let scaleY = input.readFloat();\n let width = input.readFloat();\n let height = input.readFloat();\n let color = input.readInt32();\n let sequence = this.readSequence(input);\n if (!path)\n path = name;\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\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 Color.rgba8888ToColor(region.color, color);\n region.sequence = sequence;\n if (sequence == null)\n region.updateRegion();\n return region;\n }\n case AttachmentType.BoundingBox: {\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case AttachmentType.Mesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let vertexCount = input.readInt(true);\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\n let triangles = this.readShortArray(input);\n let vertices = this.readVertices(input, vertexCount);\n let hullLength = input.readInt(true);\n let sequence = this.readSequence(input);\n let edges = [];\n let width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n 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 if (sequence == null)\n mesh.updateRegion();\n mesh.hullLength = hullLength << 1;\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case AttachmentType.LinkedMesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let skinName = input.readStringRef();\n let parent = input.readStringRef();\n let inheritTimelines = input.readBoolean();\n let sequence = this.readSequence(input);\n let width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n Color.rgba8888ToColor(mesh.color, color);\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\n return mesh;\n }\n case AttachmentType.Path: {\n let closed2 = input.readBoolean();\n let constantSpeed = input.readBoolean();\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n let color = nonessential ? input.readInt32() : 0;\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = closed2;\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 Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case AttachmentType.Point: {\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let color = nonessential ? input.readInt32() : 0;\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case AttachmentType.Clipping: {\n let endSlotIndex = input.readInt(true);\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\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 Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n }\n readSequence(input) {\n if (!input.readBoolean())\n return null;\n let sequence = new Sequence(input.readInt(true));\n sequence.start = input.readInt(true);\n sequence.digits = input.readInt(true);\n sequence.setupIndex = input.readInt(true);\n return sequence;\n }\n readVertices(input, vertexCount) {\n let scale = this.scale;\n let verticesLength = vertexCount << 1;\n let vertices = new Vertices();\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n let weights = new Array();\n let bonesArray = new Array();\n for (let i = 0; i < vertexCount; i++) {\n let boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n }\n readFloatArray(input, n, scale) {\n let array = new Array(n);\n if (scale == 1) {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat();\n } else {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n }\n readShortArray(input) {\n let n = input.readInt(true);\n let array = new Array(n);\n for (let i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n }\n readAnimation(input, name, skeletonData) {\n input.readInt(true);\n let timelines = new Array();\n let scale = this.scale;\n let tempColor1 = new Color();\n let tempColor2 = new Color();\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case SLOT_ATTACHMENT: {\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\n for (let frame = 0; frame < frameCount; frame++)\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n a = a2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let na = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n a = na;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_ALPHA: {\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n }\n time = time2;\n a = a2;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let boneIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\n switch (type) {\n case BONE_ROTATE:\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_TRANSLATE:\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEX:\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEY:\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_SCALE:\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEX:\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEY:\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEAR:\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARX:\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARY:\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixShearY = mixShearY2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true);\n let data = skeletonData.pathConstraints[index];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n switch (input.readByte()) {\n case PATH_POSITION:\n timelines.push(readTimeline1(\n input,\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\n data.positionMode == 0 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_SPACING:\n timelines.push(readTimeline1(\n input,\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_MIX:\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n }\n timelines.push(timeline);\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let skin = skeletonData.skins[input.readInt(true)];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let slotIndex = input.readInt(true);\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n let attachmentName = input.readStringRef();\n if (!attachmentName)\n throw new Error(\"attachmentName must not be null.\");\n let attachment = skin.getAttachment(slotIndex, attachmentName);\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case ATTACHMENT_DEFORM: {\n let vertexAttachment = attachment;\n let weighted = vertexAttachment.bones;\n let vertices = vertexAttachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let bezierCount = input.readInt(true);\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\n let time = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let end = input.readInt(true);\n if (end == 0)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat();\n } else {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (let v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frame, time, deform);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n }\n time = time2;\n }\n timelines.push(timeline);\n break;\n }\n case ATTACHMENT_SEQUENCE: {\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\n for (let frame = 0; frame < frameCount; frame++) {\n let time = input.readFloat();\n let modeAndIndex = input.readInt32();\n timeline.setFrame(\n frame,\n time,\n SequenceModeValues[modeAndIndex & 15],\n modeAndIndex >> 4,\n input.readFloat()\n );\n }\n timelines.push(timeline);\n break;\n }\n }\n }\n }\n }\n let drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n let timeline = new DrawOrderTimeline(drawOrderCount);\n let slotCount = skeletonData.slots.length;\n for (let i = 0; i < drawOrderCount; i++) {\n let time = input.readFloat();\n let offsetCount = input.readInt(true);\n let drawOrder = Utils.newArray(slotCount, 0);\n for (let ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsetCount; ii++) {\n let 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 (let 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 }\n let eventCount = input.readInt(true);\n if (eventCount > 0) {\n let timeline = new EventTimeline(eventCount);\n for (let i = 0; i < eventCount; i++) {\n let time = input.readFloat();\n let eventData = skeletonData.events[input.readInt(true)];\n let event = new Event(time, eventData);\n event.intValue = input.readInt(false);\n event.floatValue = input.readFloat();\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event.data.audioPath) {\n event.volume = input.readFloat();\n event.balance = input.readFloat();\n }\n timeline.setFrame(i, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n return new Animation(name, timelines, duration);\n }\n };\n var BinaryInput = class {\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n readByte() {\n return this.buffer.getInt8(this.index++);\n }\n readUnsignedByte() {\n return this.buffer.getUint8(this.index++);\n }\n readShort() {\n let value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n }\n readInt32() {\n let value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n }\n readInt(optimizePositive) {\n let b = this.readByte();\n let result = b & 127;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 7;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 14;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 21;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\n }\n readStringRef() {\n let index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n }\n readString() {\n let byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n let chars = \"\";\n let charCount = 0;\n for (let i = 0; i < byteCount; ) {\n let b = this.readUnsignedByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n }\n readFloat() {\n let value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n }\n readBoolean() {\n return this.readByte() != 0;\n }\n };\n var LinkedMesh = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n var Vertices = class {\n constructor(bones = null, vertices = null) {\n this.bones = bones;\n this.vertices = vertices;\n }\n };\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\n return AttachmentType2;\n })(AttachmentType || {});\n function readTimeline1(input, timeline, scale) {\n let time = input.readFloat(), value = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n }\n time = time2;\n value = value2;\n }\n return timeline;\n }\n function readTimeline2(input, timeline, scale) {\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n }\n return timeline;\n }\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\n }\n var BONE_ROTATE = 0;\n var BONE_TRANSLATE = 1;\n var BONE_TRANSLATEX = 2;\n var BONE_TRANSLATEY = 3;\n var BONE_SCALE = 4;\n var BONE_SCALEX = 5;\n var BONE_SCALEY = 6;\n var BONE_SHEAR = 7;\n var BONE_SHEARX = 8;\n var BONE_SHEARY = 9;\n var SLOT_ATTACHMENT = 0;\n var SLOT_RGBA = 1;\n var SLOT_RGB = 2;\n var SLOT_RGBA2 = 3;\n var SLOT_RGB2 = 4;\n var SLOT_ALPHA = 5;\n var ATTACHMENT_DEFORM = 0;\n var ATTACHMENT_SEQUENCE = 1;\n var PATH_POSITION = 0;\n var PATH_SPACING = 1;\n var PATH_MIX = 2;\n var CURVE_STEPPED = 1;\n var CURVE_BEZIER = 2;\n\n // spine-core/src/SkeletonBounds.ts\n var SkeletonBounds = class {\n constructor() {\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 Pool(() => {\n return Utils.newFloatArray(16);\n });\n }\n update(skeleton, updateAabb) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = 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 } 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 aabbCompute() {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let 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 aabbContainsPoint(x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n aabbIntersectsSegment(x1, y1, x2, y2) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let 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 let m = (y2 - y1) / (x2 - x1);\n let 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 let 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 aabbIntersectsSkeleton(bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n containsPoint(x, y) {\n let polygons = this.polygons;\n for (let 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 containsPointPolygon(polygon, x, y) {\n let vertices = polygon;\n let nn = polygon.length;\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\n let 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 intersectsSegment(x1, y1, x2, y2) {\n let polygons = this.polygons;\n for (let 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 intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\n let vertices = polygon;\n let nn = polygon.length;\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let 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 let 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 getPolygon(boundingBox) {\n if (!boundingBox)\n throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n getWidth() {\n return this.maxX - this.minX;\n }\n getHeight() {\n return this.maxY - this.minY;\n }\n };\n\n // spine-core/src/Triangulator.ts\n var Triangulator = class {\n constructor() {\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 Pool(() => {\n return new Array();\n });\n this.polygonIndicesPool = new Pool(() => {\n return new Array();\n });\n }\n triangulate(verticesArray) {\n let vertices = verticesArray;\n let vertexCount = verticesArray.length >> 1;\n let indices = this.indicesArray;\n indices.length = 0;\n for (let i = 0; i < vertexCount; i++)\n indices[i] = i;\n let isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (let i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n let triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n let previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer:\n if (!isConcave[i]) {\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n let v = indices[ii] << 1;\n let 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 let previousIndex = (vertexCount + i - 1) % vertexCount;\n let 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 decompose(verticesArray, triangles) {\n let vertices = verticesArray;\n let convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n let convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n let polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n let polygon = this.polygonPool.obtain();\n polygon.length = 0;\n let fanBaseIndex = -1, lastWinding = 0;\n for (let i = 0, n = triangles.length; i < n; i += 3) {\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\n let merged = false;\n if (fanBaseIndex == t1) {\n let o = polygon.length - 4;\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n let 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 } 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 (let i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n let firstIndex = polygonIndices[0];\n let lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n let o = polygon.length - 4;\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\n let firstX = polygon[0], firstY = polygon[1];\n let secondX = polygon[2], secondY = polygon[3];\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (let ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n let otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n let otherFirstIndex = otherIndices[0];\n let otherSecondIndex = otherIndices[1];\n let otherLastIndex = otherIndices[2];\n let otherPoly = convexPolygons[ii];\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n let 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 (let 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 static isConcave(index, vertexCount, vertices, indices) {\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n let current = indices[index] << 1;\n let next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(\n vertices[previous],\n vertices[previous + 1],\n vertices[current],\n vertices[current + 1],\n vertices[next],\n vertices[next + 1]\n );\n }\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n }\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\n let px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n }\n };\n\n // spine-core/src/SkeletonClipping.ts\n var SkeletonClipping = class {\n constructor() {\n this.triangulator = new 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 this.clipAttachment = null;\n this.clippingPolygons = null;\n }\n clipStart(slot, clip) {\n if (this.clipAttachment)\n return 0;\n this.clipAttachment = clip;\n let n = clip.worldVerticesLength;\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n let clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\n let polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n }\n clipEndWithSlot(slot) {\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n }\n clipEnd() {\n if (!this.clipAttachment)\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 isClipping() {\n return this.clipAttachment != null;\n }\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n let clippedTriangles = this.clippedTriangles;\n let polygons = this.clippingPolygons;\n let polygonsCount = polygons.length;\n let vertexSize = twoColor ? 12 : 8;\n let index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer:\n for (let i = 0; i < trianglesLength; i += 3) {\n let vertexOffset = triangles[i] << 1;\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (let p = 0; p < polygonsCount; p++) {\n let s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n let clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\n let clipOutputCount = clipOutputLength >> 1;\n let clipOutputItems = this.clipOutput;\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\n let 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 let c0 = x - x3, c1 = y - y3;\n let a = (d0 * c0 + d1 * c1) * d;\n let b = (d4 * c0 + d2 * c1) * d;\n let 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 let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (let 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 } else {\n let clippedVerticesItems = 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 } 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 let clippedTrianglesItems = 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 clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\n let originalOutput = output;\n let clipped = false;\n let input;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\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 let clippingVertices = clippingArea;\n let clippingVerticesLast = clippingArea.length - 4;\n for (let i = 0; ; i += 2) {\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n let inputVertices = input;\n let inputVerticesLength = input.length - 2, outputStart = output.length;\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n let 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 let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n } else {\n output.push(edgeX);\n output.push(edgeY);\n }\n } else if (side2) {\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\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 let temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (let i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n } else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n }\n static makeClockwise(polygon) {\n let vertices = polygon;\n let verticeslength = polygon.length;\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (let 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 (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n let x = vertices[i], y = vertices[i + 1];\n let 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 };\n\n // spine-core/src/SkeletonJson.ts\n var SkeletonJson = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(json) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\n let skeletonMap = root.skeleton;\n if (skeletonMap) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.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 (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n let parent = null;\n let parentName = getValue(boneMap, \"parent\", null);\n if (parentName)\n parent = skeletonData.findBone(parentName);\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = getValue(boneMap, \"length\", 0) * scale;\n data.x = getValue(boneMap, \"x\", 0) * scale;\n data.y = getValue(boneMap, \"y\", 0) * scale;\n data.rotation = getValue(boneMap, \"rotation\", 0);\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\n data.shearX = getValue(boneMap, \"shearX\", 0);\n data.shearY = getValue(boneMap, \"shearY\", 0);\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\n data.skinRequired = getValue(boneMap, \"skin\", false);\n let color = getValue(boneMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let boneData = skeletonData.findBone(slotMap.bone);\n if (!boneData)\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\n let color = getValue(slotMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n let dark = getValue(slotMap, \"dark\", null);\n if (dark)\n data.darkColor = Color.fromString(dark);\n data.attachmentName = getValue(slotMap, \"attachment\", null);\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\n if (!bone)\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let target = skeletonData.findBone(constraintMap.target);\n ;\n if (!target)\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\n data.target = target;\n data.mix = getValue(constraintMap, \"mix\", 1);\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = getValue(constraintMap, \"compress\", false);\n data.stretch = getValue(constraintMap, \"stretch\", false);\n data.uniform = getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findBone(targetName);\n if (!target)\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\n data.target = target;\n data.local = getValue(constraintMap, \"local\", false);\n data.relative = getValue(constraintMap, \"relative\", false);\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findSlot(targetName);\n if (!target)\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\n data.target = target;\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.position = getValue(constraintMap, \"position\", 0);\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i];\n let skin = new Skin(skinMap.name);\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let boneName = skinMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraintName = skinMap.ik[ii];\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraintName = skinMap.transform[ii];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraintName = skinMap.path[ii];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment)\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 (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = getValue(eventMap, \"int\", 0);\n data.floatValue = getValue(eventMap, \"float\", 0);\n data.stringValue = getValue(eventMap, \"string\", \"\");\n data.audioPath = getValue(eventMap, \"audio\", null);\n if (data.audioPath) {\n data.volume = getValue(eventMap, \"volume\", 1);\n data.balance = getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n }\n readAttachment(map, skin, slotIndex, name, skeletonData) {\n let scale = this.scale;\n name = getValue(map, \"name\", name);\n switch (getValue(map, \"type\", \"region\")) {\n case \"region\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\n return null;\n region.path = path;\n region.x = getValue(map, \"x\", 0) * scale;\n region.y = getValue(map, \"y\", 0) * scale;\n region.scaleX = getValue(map, \"scaleX\", 1);\n region.scaleY = getValue(map, \"scaleY\", 1);\n region.rotation = getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n region.sequence = sequence;\n let color = getValue(map, \"color\", null);\n if (color)\n region.color.setFromString(color);\n if (region.region != null)\n region.updateRegion();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n let color = getValue(map, \"color\", null);\n if (color)\n mesh.color.setFromString(color);\n mesh.width = getValue(map, \"width\", 0) * scale;\n mesh.height = getValue(map, \"height\", 0) * scale;\n mesh.sequence = sequence;\n let parent = getValue(map, \"parent\", null);\n if (parent) {\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\n return mesh;\n }\n let uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n if (mesh.region != null)\n mesh.updateRegion();\n mesh.edges = getValue(map, \"edges\", null);\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = getValue(map, \"closed\", false);\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n let color = getValue(map, \"color\", null);\n if (color)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = getValue(map, \"x\", 0) * scale;\n point.y = getValue(map, \"y\", 0) * scale;\n point.rotation = getValue(map, \"rotation\", 0);\n let color = getValue(map, \"color\", null);\n if (color)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\n return null;\n let end = getValue(map, \"end\", null);\n if (end)\n clip.endSlot = skeletonData.findSlot(end);\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n readSequence(map) {\n if (map == null)\n return null;\n let sequence = new Sequence(getValue(map, \"count\", 0));\n sequence.start = getValue(map, \"start\", 1);\n sequence.digits = getValue(map, \"digits\", 0);\n sequence.setupIndex = getValue(map, \"setup\", 0);\n return sequence;\n }\n readVertices(map, attachment, verticesLength) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n; ) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n }\n readAnimation(map, name, skeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotName);\n let slotIndex = slot.index;\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (!timelineMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(frames, slotIndex);\n for (let frame = 0; frame < frames; frame++) {\n let keyMap = timelineMap[frame];\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgba\") {\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb\") {\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"alpha\") {\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\n } else if (timelineName == \"rgba2\") {\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb2\") {\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(\"Bone not found: \" + boneName);\n let boneIndex = bone.index;\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n let frames = timelineMap.length;\n if (frames == 0)\n continue;\n if (timelineName === \"rotate\") {\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\n } else if (timelineName === \"translate\") {\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\n } else if (timelineName === \"translatex\") {\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"translatey\") {\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"scale\") {\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\n } else if (timelineName === \"scalex\") {\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"scaley\") {\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"shear\") {\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\n } else if (timelineName === \"shearx\") {\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n } else if (timelineName === \"sheary\") {\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n }\n }\n }\n }\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let keyMap = constraintMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(\"IK Constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mix = getValue(keyMap, \"mix\", 1);\n let softness = getValue(keyMap, \"softness\", 0) * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\n let nextMap = constraintMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mix2 = getValue(nextMap, \"mix\", 1);\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.transform) {\n for (let constraintName in map.transform) {\n let timelineMap = map.transform[constraintName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Transform constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixScaleX = mixScaleX2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Path constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName === \"position\") {\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"spacing\") {\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.attachments) {\n for (let attachmentsName in map.attachments) {\n let attachmentsMap = map.attachments[attachmentsName];\n let skin = skeletonData.findSkin(attachmentsName);\n if (!skin)\n throw new Error(\"Skin not found: \" + attachmentsName);\n for (let slotMapName in attachmentsMap) {\n let slotMap = attachmentsMap[slotMapName];\n let slot = skeletonData.findSlot(slotMapName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotMapName);\n let slotIndex = slot.index;\n for (let attachmentMapName in slotMap) {\n let attachmentMap = slotMap[attachmentMapName];\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\n for (let timelineMapName in attachmentMap) {\n let timelineMap = attachmentMap[timelineMapName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n if (timelineMapName == \"deform\") {\n let weighted = attachment.bones;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\n let time = getValue(keyMap, \"time\", 0);\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let verticesValue = getValue(keyMap, \"vertices\", null);\n if (!verticesValue)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = getValue(keyMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frame, time, deform);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let curve = keyMap.curve;\n if (curve)\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n time = time2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineMapName == \"sequence\") {\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\n let lastDelay = 0;\n for (let frame = 0; frame < timelineMap.length; frame++) {\n let delay = getValue(keyMap, \"delay\", lastDelay);\n let time = getValue(keyMap, \"time\", 0);\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\n let index = getValue(keyMap, \"index\", 0);\n timeline.setFrame(frame, time, mode, index, delay);\n lastDelay = delay;\n keyMap = timelineMap[frame + 1];\n }\n timelines.push(timeline);\n }\n }\n }\n }\n }\n }\n if (map.drawOrder) {\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\n let slotCount = skeletonData.slots.length;\n let frame = 0;\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\n let drawOrderMap = map.drawOrder[i];\n let drawOrder = null;\n let offsets = getValue(drawOrderMap, \"offsets\", null);\n if (offsets) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsets.length; ii++) {\n let offsetMap = offsets[ii];\n let slot = skeletonData.findSlot(offsetMap.slot);\n if (!slot)\n throw new Error(\"Slot not found: \" + slot);\n let slotIndex = slot.index;\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 (let ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n }\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frame = 0;\n for (let i = 0; i < map.events.length; i++, frame++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (!eventData)\n throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath) {\n event.volume = getValue(eventMap, \"volume\", 1);\n event.balance = getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frame, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n };\n var LinkedMesh2 = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n function readTimeline12(keys, timeline, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\n if (keyMap.curve)\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n time = time2;\n value = value2;\n keyMap = nextMap;\n }\n }\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n keyMap = nextMap;\n }\n }\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n if (curve == \"stepped\") {\n timeline.setStepped(frame);\n return bezier;\n }\n let i = value << 2;\n let cx1 = curve[i];\n let cy1 = curve[i + 1] * scale;\n let cx2 = curve[i + 2];\n let cy2 = curve[i + 3] * scale;\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n return bezier + 1;\n }\n function getValue(map, property, defaultValue) {\n return map[property] !== void 0 ? map[property] : defaultValue;\n }\n\n // spine-core/src/polyfills.ts\n (() => {\n if (typeof Math.fround === \"undefined\") {\n Math.fround = function(array) {\n return function(x) {\n return array[0] = x, array[0];\n };\n }(new Float32Array(1));\n }\n })();\n\n // spine-webgl/src/WebGL.ts\n var ManagedWebGLRenderingContext = class {\n constructor(canvasOrContext, contextConfig = { alpha: \"true\" }) {\n this.restorables = new Array();\n if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== \"undefined\" && canvasOrContext instanceof WebGL2RenderingContext)) {\n let canvas = canvasOrContext;\n this.gl = canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig);\n this.canvas = canvas;\n canvas.addEventListener(\"webglcontextlost\", (e) => {\n let event = e;\n if (e)\n e.preventDefault();\n });\n canvas.addEventListener(\"webglcontextrestored\", (e) => {\n for (let i = 0, n = this.restorables.length; i < n; i++)\n this.restorables[i].restore();\n });\n } else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n addRestorable(restorable) {\n this.restorables.push(restorable);\n }\n removeRestorable(restorable) {\n let index = this.restorables.indexOf(restorable);\n if (index > -1)\n this.restorables.splice(index, 1);\n }\n };\n var ONE = 1;\n var ONE_MINUS_SRC_COLOR = 769;\n var SRC_ALPHA = 770;\n var ONE_MINUS_SRC_ALPHA = 771;\n var DST_COLOR = 774;\n var WebGLBlendModeConverter = class {\n static getDestGLBlendMode(blendMode) {\n switch (blendMode) {\n case 0 /* Normal */:\n return ONE_MINUS_SRC_ALPHA;\n case 1 /* Additive */:\n return ONE;\n case 2 /* Multiply */:\n return ONE_MINUS_SRC_ALPHA;\n case 3 /* Screen */:\n return ONE_MINUS_SRC_ALPHA;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n static getSourceColorGLBlendMode(blendMode, premultipliedAlpha = false) {\n switch (blendMode) {\n case 0 /* Normal */:\n return premultipliedAlpha ? ONE : SRC_ALPHA;\n case 1 /* Additive */:\n return premultipliedAlpha ? ONE : SRC_ALPHA;\n case 2 /* Multiply */:\n return DST_COLOR;\n case 3 /* Screen */:\n return ONE;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n static getSourceAlphaGLBlendMode(blendMode) {\n switch (blendMode) {\n case 0 /* Normal */:\n return ONE;\n case 1 /* Additive */:\n return ONE;\n case 2 /* Multiply */:\n return ONE_MINUS_SRC_ALPHA;\n case 3 /* Screen */:\n return ONE_MINUS_SRC_COLOR;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n };\n\n // spine-webgl/src/GLTexture.ts\n var _GLTexture = class extends Texture {\n constructor(context, image, useMipMaps = false) {\n super(image);\n this.texture = null;\n this.boundUnit = 0;\n this.useMipMaps = false;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.useMipMaps = useMipMaps;\n this.restore();\n this.context.addRestorable(this);\n }\n setFilters(minFilter, magFilter) {\n let 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 this.useMipMaps = _GLTexture.usesMipMaps(minFilter);\n if (this.useMipMaps)\n gl.generateMipmap(gl.TEXTURE_2D);\n }\n static validateMagFilter(magFilter) {\n switch (magFilter) {\n case 9987 /* MipMap */:\n case 9987 /* MipMapLinearLinear */:\n case 9985 /* MipMapLinearNearest */:\n case 9986 /* MipMapNearestLinear */:\n case 9984 /* MipMapNearestNearest */:\n return 9729 /* Linear */;\n default:\n return magFilter;\n }\n }\n static usesMipMaps(filter) {\n switch (filter) {\n case 9987 /* MipMap */:\n case 9987 /* MipMapLinearLinear */:\n case 9985 /* MipMapLinearNearest */:\n case 9986 /* MipMapNearestLinear */:\n case 9984 /* MipMapNearestNearest */:\n return true;\n default:\n return false;\n }\n }\n setWraps(uWrap, vWrap) {\n let 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 update(useMipMaps) {\n let gl = this.context.gl;\n if (!this.texture)\n this.texture = this.context.gl.createTexture();\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 restore() {\n this.texture = null;\n this.update(this.useMipMaps);\n }\n bind(unit = 0) {\n let gl = this.context.gl;\n this.boundUnit = unit;\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n }\n unbind() {\n let gl = this.context.gl;\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n dispose() {\n this.context.removeRestorable(this);\n let gl = this.context.gl;\n gl.deleteTexture(this.texture);\n }\n };\n var GLTexture = _GLTexture;\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\n\n // spine-webgl/src/AssetManager.ts\n var AssetManager = class extends AssetManagerBase {\n constructor(context, pathPrefix = \"\", downloader = new Downloader()) {\n super((image) => {\n return new GLTexture(context, image);\n }, pathPrefix, downloader);\n }\n };\n\n // spine-webgl/src/Vector3.ts\n var Vector3 = class {\n constructor(x = 0, y = 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 setFrom(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n }\n set(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n }\n scale(s) {\n this.x *= s;\n this.y *= s;\n this.z *= s;\n return this;\n }\n normalize() {\n let 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 cross(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 multiply(matrix) {\n let l_mat = matrix.values;\n return this.set(\n this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03],\n this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13],\n this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]\n );\n }\n project(matrix) {\n let l_mat = matrix.values;\n let l_w = 1 / (this.x * l_mat[M30] + this.y * l_mat[M31] + this.z * l_mat[M32] + l_mat[M33]);\n return this.set(\n (this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03]) * l_w,\n (this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13]) * l_w,\n (this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]) * l_w\n );\n }\n dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n distance(v) {\n let a = v.x - this.x;\n let b = v.y - this.y;\n let c = v.z - this.z;\n return Math.sqrt(a * a + b * b + c * c);\n }\n };\n\n // spine-webgl/src/Matrix4.ts\n var M00 = 0;\n var M01 = 4;\n var M02 = 8;\n var M03 = 12;\n var M10 = 1;\n var M11 = 5;\n var M12 = 9;\n var M13 = 13;\n var M20 = 2;\n var M21 = 6;\n var M22 = 10;\n var M23 = 14;\n var M30 = 3;\n var M31 = 7;\n var M32 = 11;\n var M33 = 15;\n var _Matrix4 = class {\n constructor() {\n this.temp = new Float32Array(16);\n this.values = new Float32Array(16);\n let v = this.values;\n v[M00] = 1;\n v[M11] = 1;\n v[M22] = 1;\n v[M33] = 1;\n }\n set(values) {\n this.values.set(values);\n return this;\n }\n transpose() {\n let t = this.temp;\n let v = this.values;\n t[M00] = v[M00];\n t[M01] = v[M10];\n t[M02] = v[M20];\n t[M03] = v[M30];\n t[M10] = v[M01];\n t[M11] = v[M11];\n t[M12] = v[M21];\n t[M13] = v[M31];\n t[M20] = v[M02];\n t[M21] = v[M12];\n t[M22] = v[M22];\n t[M23] = v[M32];\n t[M30] = v[M03];\n t[M31] = v[M13];\n t[M32] = v[M23];\n t[M33] = v[M33];\n return this.set(t);\n }\n identity() {\n let v = this.values;\n v[M00] = 1;\n v[M01] = 0;\n v[M02] = 0;\n v[M03] = 0;\n v[M10] = 0;\n v[M11] = 1;\n v[M12] = 0;\n v[M13] = 0;\n v[M20] = 0;\n v[M21] = 0;\n v[M22] = 1;\n v[M23] = 0;\n v[M30] = 0;\n v[M31] = 0;\n v[M32] = 0;\n v[M33] = 1;\n return this;\n }\n invert() {\n let v = this.values;\n let t = this.temp;\n let l_det = v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\n if (l_det == 0)\n throw new Error(\"non-invertible matrix\");\n let inv_det = 1 / l_det;\n t[M00] = v[M12] * v[M23] * v[M31] - v[M13] * v[M22] * v[M31] + v[M13] * v[M21] * v[M32] - v[M11] * v[M23] * v[M32] - v[M12] * v[M21] * v[M33] + v[M11] * v[M22] * v[M33];\n t[M01] = v[M03] * v[M22] * v[M31] - v[M02] * v[M23] * v[M31] - v[M03] * v[M21] * v[M32] + v[M01] * v[M23] * v[M32] + v[M02] * v[M21] * v[M33] - v[M01] * v[M22] * v[M33];\n t[M02] = v[M02] * v[M13] * v[M31] - v[M03] * v[M12] * v[M31] + v[M03] * v[M11] * v[M32] - v[M01] * v[M13] * v[M32] - v[M02] * v[M11] * v[M33] + v[M01] * v[M12] * v[M33];\n t[M03] = v[M03] * v[M12] * v[M21] - v[M02] * v[M13] * v[M21] - v[M03] * v[M11] * v[M22] + v[M01] * v[M13] * v[M22] + v[M02] * v[M11] * v[M23] - v[M01] * v[M12] * v[M23];\n t[M10] = v[M13] * v[M22] * v[M30] - v[M12] * v[M23] * v[M30] - v[M13] * v[M20] * v[M32] + v[M10] * v[M23] * v[M32] + v[M12] * v[M20] * v[M33] - v[M10] * v[M22] * v[M33];\n t[M11] = v[M02] * v[M23] * v[M30] - v[M03] * v[M22] * v[M30] + v[M03] * v[M20] * v[M32] - v[M00] * v[M23] * v[M32] - v[M02] * v[M20] * v[M33] + v[M00] * v[M22] * v[M33];\n t[M12] = v[M03] * v[M12] * v[M30] - v[M02] * v[M13] * v[M30] - v[M03] * v[M10] * v[M32] + v[M00] * v[M13] * v[M32] + v[M02] * v[M10] * v[M33] - v[M00] * v[M12] * v[M33];\n t[M13] = v[M02] * v[M13] * v[M20] - v[M03] * v[M12] * v[M20] + v[M03] * v[M10] * v[M22] - v[M00] * v[M13] * v[M22] - v[M02] * v[M10] * v[M23] + v[M00] * v[M12] * v[M23];\n t[M20] = v[M11] * v[M23] * v[M30] - v[M13] * v[M21] * v[M30] + v[M13] * v[M20] * v[M31] - v[M10] * v[M23] * v[M31] - v[M11] * v[M20] * v[M33] + v[M10] * v[M21] * v[M33];\n t[M21] = v[M03] * v[M21] * v[M30] - v[M01] * v[M23] * v[M30] - v[M03] * v[M20] * v[M31] + v[M00] * v[M23] * v[M31] + v[M01] * v[M20] * v[M33] - v[M00] * v[M21] * v[M33];\n t[M22] = v[M01] * v[M13] * v[M30] - v[M03] * v[M11] * v[M30] + v[M03] * v[M10] * v[M31] - v[M00] * v[M13] * v[M31] - v[M01] * v[M10] * v[M33] + v[M00] * v[M11] * v[M33];\n t[M23] = v[M03] * v[M11] * v[M20] - v[M01] * v[M13] * v[M20] - v[M03] * v[M10] * v[M21] + v[M00] * v[M13] * v[M21] + v[M01] * v[M10] * v[M23] - v[M00] * v[M11] * v[M23];\n t[M30] = v[M12] * v[M21] * v[M30] - v[M11] * v[M22] * v[M30] - v[M12] * v[M20] * v[M31] + v[M10] * v[M22] * v[M31] + v[M11] * v[M20] * v[M32] - v[M10] * v[M21] * v[M32];\n t[M31] = v[M01] * v[M22] * v[M30] - v[M02] * v[M21] * v[M30] + v[M02] * v[M20] * v[M31] - v[M00] * v[M22] * v[M31] - v[M01] * v[M20] * v[M32] + v[M00] * v[M21] * v[M32];\n t[M32] = v[M02] * v[M11] * v[M30] - v[M01] * v[M12] * v[M30] - v[M02] * v[M10] * v[M31] + v[M00] * v[M12] * v[M31] + v[M01] * v[M10] * v[M32] - v[M00] * v[M11] * v[M32];\n t[M33] = v[M01] * v[M12] * v[M20] - v[M02] * v[M11] * v[M20] + v[M02] * v[M10] * v[M21] - v[M00] * v[M12] * v[M21] - v[M01] * v[M10] * v[M22] + v[M00] * v[M11] * v[M22];\n v[M00] = t[M00] * inv_det;\n v[M01] = t[M01] * inv_det;\n v[M02] = t[M02] * inv_det;\n v[M03] = t[M03] * inv_det;\n v[M10] = t[M10] * inv_det;\n v[M11] = t[M11] * inv_det;\n v[M12] = t[M12] * inv_det;\n v[M13] = t[M13] * inv_det;\n v[M20] = t[M20] * inv_det;\n v[M21] = t[M21] * inv_det;\n v[M22] = t[M22] * inv_det;\n v[M23] = t[M23] * inv_det;\n v[M30] = t[M30] * inv_det;\n v[M31] = t[M31] * inv_det;\n v[M32] = t[M32] * inv_det;\n v[M33] = t[M33] * inv_det;\n return this;\n }\n determinant() {\n let v = this.values;\n return v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\n }\n translate(x, y, z) {\n let v = this.values;\n v[M03] += x;\n v[M13] += y;\n v[M23] += z;\n return this;\n }\n copy() {\n return new _Matrix4().set(this.values);\n }\n projection(near, far, fovy, aspectRatio) {\n this.identity();\n let l_fd = 1 / Math.tan(fovy * (Math.PI / 180) / 2);\n let l_a1 = (far + near) / (near - far);\n let l_a2 = 2 * far * near / (near - far);\n let v = this.values;\n v[M00] = l_fd / aspectRatio;\n v[M10] = 0;\n v[M20] = 0;\n v[M30] = 0;\n v[M01] = 0;\n v[M11] = l_fd;\n v[M21] = 0;\n v[M31] = 0;\n v[M02] = 0;\n v[M12] = 0;\n v[M22] = l_a1;\n v[M32] = -1;\n v[M03] = 0;\n v[M13] = 0;\n v[M23] = l_a2;\n v[M33] = 0;\n return this;\n }\n ortho2d(x, y, width, height) {\n return this.ortho(x, x + width, y, y + height, 0, 1);\n }\n ortho(left, right, bottom, top, near, far) {\n this.identity();\n let x_orth = 2 / (right - left);\n let y_orth = 2 / (top - bottom);\n let z_orth = -2 / (far - near);\n let tx = -(right + left) / (right - left);\n let ty = -(top + bottom) / (top - bottom);\n let tz = -(far + near) / (far - near);\n let v = this.values;\n v[M00] = x_orth;\n v[M10] = 0;\n v[M20] = 0;\n v[M30] = 0;\n v[M01] = 0;\n v[M11] = y_orth;\n v[M21] = 0;\n v[M31] = 0;\n v[M02] = 0;\n v[M12] = 0;\n v[M22] = z_orth;\n v[M32] = 0;\n v[M03] = tx;\n v[M13] = ty;\n v[M23] = tz;\n v[M33] = 1;\n return this;\n }\n multiply(matrix) {\n let t = this.temp;\n let v = this.values;\n let m = matrix.values;\n t[M00] = v[M00] * m[M00] + v[M01] * m[M10] + v[M02] * m[M20] + v[M03] * m[M30];\n t[M01] = v[M00] * m[M01] + v[M01] * m[M11] + v[M02] * m[M21] + v[M03] * m[M31];\n t[M02] = v[M00] * m[M02] + v[M01] * m[M12] + v[M02] * m[M22] + v[M03] * m[M32];\n t[M03] = v[M00] * m[M03] + v[M01] * m[M13] + v[M02] * m[M23] + v[M03] * m[M33];\n t[M10] = v[M10] * m[M00] + v[M11] * m[M10] + v[M12] * m[M20] + v[M13] * m[M30];\n t[M11] = v[M10] * m[M01] + v[M11] * m[M11] + v[M12] * m[M21] + v[M13] * m[M31];\n t[M12] = v[M10] * m[M02] + v[M11] * m[M12] + v[M12] * m[M22] + v[M13] * m[M32];\n t[M13] = v[M10] * m[M03] + v[M11] * m[M13] + v[M12] * m[M23] + v[M13] * m[M33];\n t[M20] = v[M20] * m[M00] + v[M21] * m[M10] + v[M22] * m[M20] + v[M23] * m[M30];\n t[M21] = v[M20] * m[M01] + v[M21] * m[M11] + v[M22] * m[M21] + v[M23] * m[M31];\n t[M22] = v[M20] * m[M02] + v[M21] * m[M12] + v[M22] * m[M22] + v[M23] * m[M32];\n t[M23] = v[M20] * m[M03] + v[M21] * m[M13] + v[M22] * m[M23] + v[M23] * m[M33];\n t[M30] = v[M30] * m[M00] + v[M31] * m[M10] + v[M32] * m[M20] + v[M33] * m[M30];\n t[M31] = v[M30] * m[M01] + v[M31] * m[M11] + v[M32] * m[M21] + v[M33] * m[M31];\n t[M32] = v[M30] * m[M02] + v[M31] * m[M12] + v[M32] * m[M22] + v[M33] * m[M32];\n t[M33] = v[M30] * m[M03] + v[M31] * m[M13] + v[M32] * m[M23] + v[M33] * m[M33];\n return this.set(this.temp);\n }\n multiplyLeft(matrix) {\n let t = this.temp;\n let v = this.values;\n let m = matrix.values;\n t[M00] = m[M00] * v[M00] + m[M01] * v[M10] + m[M02] * v[M20] + m[M03] * v[M30];\n t[M01] = m[M00] * v[M01] + m[M01] * v[M11] + m[M02] * v[M21] + m[M03] * v[M31];\n t[M02] = m[M00] * v[M02] + m[M01] * v[M12] + m[M02] * v[M22] + m[M03] * v[M32];\n t[M03] = m[M00] * v[M03] + m[M01] * v[M13] + m[M02] * v[M23] + m[M03] * v[M33];\n t[M10] = m[M10] * v[M00] + m[M11] * v[M10] + m[M12] * v[M20] + m[M13] * v[M30];\n t[M11] = m[M10] * v[M01] + m[M11] * v[M11] + m[M12] * v[M21] + m[M13] * v[M31];\n t[M12] = m[M10] * v[M02] + m[M11] * v[M12] + m[M12] * v[M22] + m[M13] * v[M32];\n t[M13] = m[M10] * v[M03] + m[M11] * v[M13] + m[M12] * v[M23] + m[M13] * v[M33];\n t[M20] = m[M20] * v[M00] + m[M21] * v[M10] + m[M22] * v[M20] + m[M23] * v[M30];\n t[M21] = m[M20] * v[M01] + m[M21] * v[M11] + m[M22] * v[M21] + m[M23] * v[M31];\n t[M22] = m[M20] * v[M02] + m[M21] * v[M12] + m[M22] * v[M22] + m[M23] * v[M32];\n t[M23] = m[M20] * v[M03] + m[M21] * v[M13] + m[M22] * v[M23] + m[M23] * v[M33];\n t[M30] = m[M30] * v[M00] + m[M31] * v[M10] + m[M32] * v[M20] + m[M33] * v[M30];\n t[M31] = m[M30] * v[M01] + m[M31] * v[M11] + m[M32] * v[M21] + m[M33] * v[M31];\n t[M32] = m[M30] * v[M02] + m[M31] * v[M12] + m[M32] * v[M22] + m[M33] * v[M32];\n t[M33] = m[M30] * v[M03] + m[M31] * v[M13] + m[M32] * v[M23] + m[M33] * v[M33];\n return this.set(this.temp);\n }\n lookAt(position, direction, up) {\n let 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 let val = this.values;\n val[M00] = xAxis.x;\n val[M01] = xAxis.y;\n val[M02] = xAxis.z;\n val[M10] = yAxis.x;\n val[M11] = yAxis.y;\n val[M12] = yAxis.z;\n val[M20] = -zAxis.x;\n val[M21] = -zAxis.y;\n val[M22] = -zAxis.z;\n _Matrix4.tmpMatrix.identity();\n _Matrix4.tmpMatrix.values[M03] = -position.x;\n _Matrix4.tmpMatrix.values[M13] = -position.y;\n _Matrix4.tmpMatrix.values[M23] = -position.z;\n this.multiply(_Matrix4.tmpMatrix);\n return this;\n }\n };\n var Matrix42 = _Matrix4;\n Matrix42.xAxis = new Vector3();\n Matrix42.yAxis = new Vector3();\n Matrix42.zAxis = new Vector3();\n Matrix42.tmpMatrix = new _Matrix4();\n\n // spine-webgl/src/Camera.ts\n var OrthoCamera = class {\n constructor(viewportWidth, viewportHeight) {\n this.position = new Vector3(0, 0, 0);\n this.direction = new Vector3(0, 0, -1);\n this.up = new 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 Matrix42();\n this.inverseProjectionView = new Matrix42();\n this.projection = new Matrix42();\n this.view = new Matrix42();\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.update();\n }\n update() {\n let projection = this.projection;\n let view = this.view;\n let projectionView = this.projectionView;\n let inverseProjectionView = this.inverseProjectionView;\n let zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\n projection.ortho(\n zoom * (-viewportWidth / 2),\n zoom * (viewportWidth / 2),\n zoom * (-viewportHeight / 2),\n zoom * (viewportHeight / 2),\n this.near,\n this.far\n );\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 screenToWorld(screenCoords, screenWidth, screenHeight) {\n let x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\n screenCoords.x = 2 * x / screenWidth - 1;\n screenCoords.y = 2 * y / screenHeight - 1;\n screenCoords.z = 2 * screenCoords.z - 1;\n screenCoords.project(this.inverseProjectionView);\n return screenCoords;\n }\n worldToScreen(worldCoords, screenWidth, screenHeight) {\n worldCoords.project(this.projectionView);\n worldCoords.x = screenWidth * (worldCoords.x + 1) / 2;\n worldCoords.y = screenHeight * (worldCoords.y + 1) / 2;\n worldCoords.z = (worldCoords.z + 1) / 2;\n return worldCoords;\n }\n setViewport(viewportWidth, viewportHeight) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n }\n };\n\n // spine-webgl/src/Input.ts\n var Input = class {\n constructor(element) {\n this.mouseX = 0;\n this.mouseY = 0;\n this.buttonDown = false;\n this.touch0 = null;\n this.touch1 = null;\n this.initialPinchDistance = 0;\n this.listeners = new Array();\n this.eventListeners = [];\n this.element = element;\n this.setupCallbacks(element);\n }\n setupCallbacks(element) {\n let mouseDown = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.buttonDown = true;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(this.mouseX, this.mouseY);\n });\n document.addEventListener(\"mousemove\", mouseMove);\n document.addEventListener(\"mouseup\", mouseUp);\n }\n };\n let mouseMove = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.listeners.map((listener) => {\n if (this.buttonDown) {\n if (listener.dragged)\n listener.dragged(this.mouseX, this.mouseY);\n } else {\n if (listener.moved)\n listener.moved(this.mouseX, this.mouseY);\n }\n });\n }\n };\n let mouseUp = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.buttonDown = false;\n this.listeners.map((listener) => {\n if (listener.up)\n listener.up(this.mouseX, this.mouseY);\n });\n document.removeEventListener(\"mousemove\", mouseMove);\n document.removeEventListener(\"mouseup\", mouseUp);\n }\n };\n let mouseWheel = (e) => {\n e.preventDefault();\n let deltaY = e.deltaY;\n if (e.deltaMode == WheelEvent.DOM_DELTA_LINE)\n deltaY *= 8;\n if (e.deltaMode == WheelEvent.DOM_DELTA_PAGE)\n deltaY *= 24;\n this.listeners.map((listener) => {\n if (listener.wheel)\n listener.wheel(e.deltaY);\n });\n };\n element.addEventListener(\"mousedown\", mouseDown, true);\n element.addEventListener(\"mousemove\", mouseMove, true);\n element.addEventListener(\"mouseup\", mouseUp, true);\n element.addEventListener(\"wheel\", mouseWheel, true);\n element.addEventListener(\"touchstart\", (ev) => {\n if (!this.touch0 || !this.touch1) {\n var touches = ev.changedTouches;\n let nativeTouch = touches.item(0);\n if (!nativeTouch)\n return;\n let rect = element.getBoundingClientRect();\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n let touch = new Touch(nativeTouch.identifier, x, y);\n this.mouseX = x;\n this.mouseY = y;\n this.buttonDown = true;\n if (!this.touch0) {\n this.touch0 = touch;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(touch.x, touch.y);\n });\n } else if (!this.touch1) {\n this.touch1 = touch;\n let dx = this.touch1.x - this.touch0.x;\n let dy = this.touch1.x - this.touch0.x;\n this.initialPinchDistance = Math.sqrt(dx * dx + dy * dy);\n this.listeners.map((listener) => {\n if (listener.zoom)\n listener.zoom(this.initialPinchDistance, this.initialPinchDistance);\n });\n }\n }\n ev.preventDefault();\n }, false);\n element.addEventListener(\"touchmove\", (ev) => {\n if (this.touch0) {\n var touches = ev.changedTouches;\n let rect = element.getBoundingClientRect();\n for (var i = 0; i < touches.length; i++) {\n var nativeTouch = touches[i];\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n if (this.touch0.identifier === nativeTouch.identifier) {\n this.touch0.x = this.mouseX = x;\n this.touch0.y = this.mouseY = y;\n this.listeners.map((listener) => {\n if (listener.dragged)\n listener.dragged(x, y);\n });\n }\n if (this.touch1 && this.touch1.identifier === nativeTouch.identifier) {\n this.touch1.x = this.mouseX = x;\n this.touch1.y = this.mouseY = y;\n }\n }\n if (this.touch0 && this.touch1) {\n let dx = this.touch1.x - this.touch0.x;\n let dy = this.touch1.x - this.touch0.x;\n let distance = Math.sqrt(dx * dx + dy * dy);\n this.listeners.map((listener) => {\n if (listener.zoom)\n listener.zoom(this.initialPinchDistance, distance);\n });\n }\n }\n ev.preventDefault();\n }, false);\n let touchEnd = (ev) => {\n if (this.touch0) {\n var touches = ev.changedTouches;\n let rect = element.getBoundingClientRect();\n for (var i = 0; i < touches.length; i++) {\n var nativeTouch = touches[i];\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n if (this.touch0.identifier === nativeTouch.identifier) {\n this.touch0 = null;\n this.mouseX = x;\n this.mouseY = y;\n this.listeners.map((listener) => {\n if (listener.up)\n listener.up(x, y);\n });\n if (!this.touch1) {\n this.buttonDown = false;\n break;\n } else {\n this.touch0 = this.touch1;\n this.touch1 = null;\n this.mouseX = this.touch0.x;\n this.mouseX = this.touch0.x;\n this.buttonDown = true;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(this.touch0.x, this.touch0.y);\n });\n }\n }\n if (this.touch1 && this.touch1.identifier) {\n this.touch1 = null;\n }\n }\n }\n ev.preventDefault();\n };\n element.addEventListener(\"touchend\", touchEnd, false);\n element.addEventListener(\"touchcancel\", touchEnd);\n }\n addListener(listener) {\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let idx = this.listeners.indexOf(listener);\n if (idx > -1) {\n this.listeners.splice(idx, 1);\n }\n }\n };\n var Touch = class {\n constructor(identifier, x, y) {\n this.identifier = identifier;\n this.x = x;\n this.y = y;\n }\n };\n\n // spine-webgl/src/CameraController.ts\n var CameraController = class {\n constructor(canvas, camera) {\n this.canvas = canvas;\n this.camera = camera;\n let cameraX = 0, cameraY = 0, cameraZoom = 0;\n let mouseX = 0, mouseY = 0;\n let lastX = 0, lastY = 0;\n let initialZoom = 0;\n new Input(canvas).addListener({\n down: (x, y) => {\n cameraX = camera.position.x;\n cameraY = camera.position.y;\n mouseX = lastX = x;\n mouseY = lastY = y;\n initialZoom = camera.zoom;\n },\n dragged: (x, y) => {\n let deltaX = x - mouseX;\n let deltaY = y - mouseY;\n let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight);\n let deltaWorld = camera.screenToWorld(new Vector3(deltaX, deltaY), canvas.clientWidth, canvas.clientHeight).sub(originWorld);\n camera.position.set(cameraX - deltaWorld.x, cameraY - deltaWorld.y, 0);\n camera.update();\n lastX = x;\n lastY = y;\n },\n wheel: (delta) => {\n let zoomAmount = delta / 200 * camera.zoom;\n let newZoom = camera.zoom + zoomAmount;\n if (newZoom > 0) {\n let x = 0, y = 0;\n if (delta < 0) {\n x = lastX;\n y = lastY;\n } else {\n let viewCenter = new Vector3(canvas.clientWidth / 2 + 15, canvas.clientHeight / 2);\n let mouseToCenterX = lastX - viewCenter.x;\n let mouseToCenterY = canvas.clientHeight - 1 - lastY - viewCenter.y;\n x = viewCenter.x - mouseToCenterX;\n y = canvas.clientHeight - 1 - viewCenter.y + mouseToCenterY;\n }\n let oldDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\n camera.zoom = newZoom;\n camera.update();\n let newDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\n camera.position.add(oldDistance.sub(newDistance));\n camera.update();\n }\n },\n zoom: (initialDistance, distance) => {\n let newZoom = initialDistance / distance;\n camera.zoom = initialZoom * newZoom;\n },\n up: (x, y) => {\n lastX = x;\n lastY = y;\n },\n moved: (x, y) => {\n lastX = x;\n lastY = y;\n }\n });\n }\n };\n\n // spine-webgl/src/Shader.ts\n var _Shader = class {\n constructor(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 ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.context.addRestorable(this);\n this.compile();\n }\n getProgram() {\n return this.program;\n }\n getVertexShader() {\n return this.vertexShader;\n }\n getFragmentShader() {\n return this.fragmentShader;\n }\n getVertexShaderSource() {\n return this.vsSource;\n }\n getFragmentSource() {\n return this.fsSource;\n }\n compile() {\n let gl = this.context.gl;\n try {\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\n if (!this.vs)\n throw new Error(\"Couldn't compile vertex shader.\");\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\n if (!this.fs)\n throw new Error(\"Couldn#t compile fragment shader.\");\n this.program = this.compileProgram(this.vs, this.fs);\n } catch (e) {\n this.dispose();\n throw e;\n }\n }\n compileShader(type, source) {\n let gl = this.context.gl;\n let shader = gl.createShader(type);\n if (!shader)\n throw new Error(\"Couldn't create shader.\");\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n let 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 compileProgram(vs, fs) {\n let gl = this.context.gl;\n let program = gl.createProgram();\n if (!program)\n throw new Error(\"Couldn't compile program.\");\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n let 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 restore() {\n this.compile();\n }\n bind() {\n this.context.gl.useProgram(this.program);\n }\n unbind() {\n this.context.gl.useProgram(null);\n }\n setUniformi(uniform, value) {\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\n }\n setUniformf(uniform, value) {\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\n }\n setUniform2f(uniform, value, value2) {\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\n }\n setUniform3f(uniform, value, value2, value3) {\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\n }\n setUniform4f(uniform, value, value2, value3, value4) {\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\n }\n setUniform2x2f(uniform, value) {\n let gl = this.context.gl;\n this.tmp2x2.set(value);\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\n }\n setUniform3x3f(uniform, value) {\n let gl = this.context.gl;\n this.tmp3x3.set(value);\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\n }\n setUniform4x4f(uniform, value) {\n let gl = this.context.gl;\n this.tmp4x4.set(value);\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\n }\n getUniformLocation(uniform) {\n let gl = this.context.gl;\n if (!this.program)\n throw new Error(\"Shader not compiled.\");\n let 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 getAttributeLocation(attribute) {\n let gl = this.context.gl;\n if (!this.program)\n throw new Error(\"Shader not compiled.\");\n let 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 dispose() {\n this.context.removeRestorable(this);\n let 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 static newColoredTextured(context) {\n let 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 let 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 static newTwoColoredTextured(context) {\n let 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 let 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 static newColored(context) {\n let 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 let 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 };\n var Shader = _Shader;\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\n // spine-webgl/src/Mesh.ts\n var Mesh = class {\n constructor(context, attributes, maxVertices, maxIndices) {\n this.attributes = attributes;\n this.verticesBuffer = null;\n this.verticesLength = 0;\n this.dirtyVertices = false;\n this.indicesBuffer = null;\n this.indicesLength = 0;\n this.dirtyIndices = false;\n this.elementsPerVertex = 0;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.elementsPerVertex = 0;\n for (let 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 getAttributes() {\n return this.attributes;\n }\n maxVertices() {\n return this.vertices.length / this.elementsPerVertex;\n }\n numVertices() {\n return this.verticesLength / this.elementsPerVertex;\n }\n setVerticesLength(length) {\n this.dirtyVertices = true;\n this.verticesLength = length;\n }\n getVertices() {\n return this.vertices;\n }\n maxIndices() {\n return this.indices.length;\n }\n numIndices() {\n return this.indicesLength;\n }\n setIndicesLength(length) {\n this.dirtyIndices = true;\n this.indicesLength = length;\n }\n getIndices() {\n return this.indices;\n }\n getVertexSizeInFloats() {\n let size = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n let attribute = this.attributes[i];\n size += attribute.numElements;\n }\n return size;\n }\n setVertices(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 setIndices(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 draw(shader, primitiveType) {\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\n }\n drawWithOffset(shader, primitiveType, offset, count) {\n let 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 } else {\n gl.drawArrays(primitiveType, offset, count);\n }\n this.unbind(shader);\n }\n bind(shader) {\n let gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n let offset = 0;\n for (let i = 0; i < this.attributes.length; i++) {\n let attrib = this.attributes[i];\n let location = shader.getAttributeLocation(attrib.name);\n gl.enableVertexAttribArray(location);\n gl.vertexAttribPointer(location, 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 unbind(shader) {\n let gl = this.context.gl;\n for (let i = 0; i < this.attributes.length; i++) {\n let attrib = this.attributes[i];\n let location = shader.getAttributeLocation(attrib.name);\n gl.disableVertexAttribArray(location);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n }\n update() {\n let 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 restore() {\n this.verticesBuffer = null;\n this.indicesBuffer = null;\n this.update();\n }\n dispose() {\n this.context.removeRestorable(this);\n let gl = this.context.gl;\n gl.deleteBuffer(this.verticesBuffer);\n gl.deleteBuffer(this.indicesBuffer);\n }\n };\n var VertexAttribute = class {\n constructor(name, type, numElements) {\n this.name = name;\n this.type = type;\n this.numElements = numElements;\n }\n };\n var Position2Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.POSITION, VertexAttributeType.Float, 2);\n }\n };\n var Position3Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.POSITION, VertexAttributeType.Float, 3);\n }\n };\n var TexCoordAttribute = class extends VertexAttribute {\n constructor(unit = 0) {\n super(Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2);\n }\n };\n var ColorAttribute = class extends VertexAttribute {\n constructor() {\n super(Shader.COLOR, VertexAttributeType.Float, 4);\n }\n };\n var Color2Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.COLOR2, VertexAttributeType.Float, 4);\n }\n };\n var VertexAttributeType = /* @__PURE__ */ ((VertexAttributeType2) => {\n VertexAttributeType2[VertexAttributeType2[\"Float\"] = 0] = \"Float\";\n return VertexAttributeType2;\n })(VertexAttributeType || {});\n\n // spine-webgl/src/PolygonBatcher.ts\n var _PolygonBatcher = class {\n constructor(context, twoColorTint = true, maxVertices = 10920) {\n this.drawCalls = 0;\n this.isDrawing = false;\n this.shader = null;\n this.lastTexture = null;\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.cullWasEnabled = false;\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n let attributes = twoColorTint ? [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute(), new Color2Attribute()] : [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute()];\n this.mesh = new Mesh(context, attributes, maxVertices, maxVertices * 3);\n let gl = this.context.gl;\n this.srcColorBlend = gl.SRC_ALPHA;\n this.srcAlphaBlend = gl.ONE;\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\n }\n begin(shader) {\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 let gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\n this.cullWasEnabled = gl.isEnabled(gl.CULL_FACE);\n if (this.cullWasEnabled)\n gl.disable(gl.CULL_FACE);\n }\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\n if (this.srcColorBlend == srcColorBlend && this.srcAlphaBlend == srcAlphaBlend && this.dstBlend == dstBlend)\n return;\n this.srcColorBlend = srcColorBlend;\n this.srcAlphaBlend = srcAlphaBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n let gl = this.context.gl;\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\n }\n }\n draw(texture, vertices, indices) {\n if (texture != this.lastTexture) {\n this.flush();\n this.lastTexture = texture;\n } else if (this.verticesLength + vertices.length > this.mesh.getVertices().length || this.indicesLength + indices.length > this.mesh.getIndices().length) {\n this.flush();\n }\n let indexStart = this.mesh.numVertices();\n this.mesh.getVertices().set(vertices, this.verticesLength);\n this.verticesLength += vertices.length;\n this.mesh.setVerticesLength(this.verticesLength);\n let indicesArray = this.mesh.getIndices();\n for (let 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 flush() {\n if (this.verticesLength == 0)\n return;\n if (!this.lastTexture)\n throw new Error(\"No texture set.\");\n if (!this.shader)\n throw new Error(\"No shader set.\");\n this.lastTexture.bind();\n this.mesh.draw(this.shader, this.context.gl.TRIANGLES);\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.mesh.setVerticesLength(0);\n this.mesh.setIndicesLength(0);\n this.drawCalls++;\n _PolygonBatcher.globalDrawCalls++;\n }\n end() {\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 let gl = this.context.gl;\n gl.disable(gl.BLEND);\n if (this.cullWasEnabled)\n gl.enable(gl.CULL_FACE);\n }\n getDrawCalls() {\n return this.drawCalls;\n }\n static getAndResetGlobalDrawCalls() {\n let result = _PolygonBatcher.globalDrawCalls;\n _PolygonBatcher.globalDrawCalls = 0;\n return result;\n }\n dispose() {\n this.mesh.dispose();\n }\n };\n var PolygonBatcher = _PolygonBatcher;\n PolygonBatcher.globalDrawCalls = 0;\n\n // spine-webgl/src/ShapeRenderer.ts\n var ShapeRenderer = class {\n constructor(context, maxVertices = 10920) {\n this.isDrawing = false;\n this.shapeType = ShapeType.Filled;\n this.color = new Color(1, 1, 1, 1);\n this.shader = null;\n this.vertexIndex = 0;\n this.tmp = new Vector2();\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.mesh = new Mesh(context, [new Position2Attribute(), new ColorAttribute()], maxVertices, 0);\n let gl = this.context.gl;\n this.srcColorBlend = gl.SRC_ALPHA;\n this.srcAlphaBlend = gl.ONE;\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\n }\n begin(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 let gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\n }\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\n this.srcColorBlend = srcColorBlend;\n this.srcAlphaBlend = srcAlphaBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n let gl = this.context.gl;\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\n }\n }\n setColor(color) {\n this.color.setFromColor(color);\n }\n setColorWith(r, g, b, a) {\n this.color.set(r, g, b, a);\n }\n point(x, y, color) {\n this.check(ShapeType.Point, 1);\n if (!color)\n color = this.color;\n this.vertex(x, y, color);\n }\n line(x, y, x2, y2, color) {\n this.check(ShapeType.Line, 2);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n this.vertex(x, y, color);\n this.vertex(x2, y2, color);\n }\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n if (!color2)\n color2 = this.color;\n if (!color3)\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 } 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 quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n if (!color2)\n color2 = this.color;\n if (!color3)\n color3 = this.color;\n if (!color4)\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 } 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 rect(filled, x, y, width, height, color) {\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\n }\n rectLine(filled, x1, y1, x2, y2, width, color) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\n if (!color)\n color = this.color;\n let t = this.tmp.set(y2 - y1, x1 - x2);\n t.normalize();\n width *= 0.5;\n let tx = t.x * width;\n let 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 } 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 x(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 polygon(polygonVertices, offset, count, color) {\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)\n color = this.color;\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n offset <<= 1;\n count <<= 1;\n let firstX = polygonVertices[offset];\n let firstY = polygonVertices[offset + 1];\n let last = offset + count;\n for (let i = offset, n = offset + count - 2; i < n; i += 2) {\n let x1 = polygonVertices[i];\n let y1 = polygonVertices[i + 1];\n let x2 = 0;\n let y2 = 0;\n if (i + 2 >= last) {\n x2 = firstX;\n y2 = firstY;\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 circle(filled, x, y, radius, color, segments = 0) {\n if (segments == 0)\n segments = Math.max(1, 6 * MathUtils.cbrt(radius) | 0);\n if (segments <= 0)\n throw new Error(\"segments must be > 0.\");\n if (!color)\n color = this.color;\n let angle = 2 * MathUtils.PI / segments;\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n let cx = radius, cy = 0;\n if (!filled) {\n this.check(ShapeType.Line, segments * 2 + 2);\n for (let i = 0; i < segments; i++) {\n this.vertex(x + cx, y + cy, color);\n let temp2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp2 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x + cx, y + cy, color);\n } else {\n this.check(ShapeType.Filled, segments * 3 + 3);\n segments--;\n for (let i = 0; i < segments; i++) {\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n let temp2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp2 + 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 let temp = cx;\n cx = radius;\n cy = 0;\n this.vertex(x + cx, y + cy, color);\n }\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n this.check(ShapeType.Line, segments * 2 + 2);\n if (!color)\n color = this.color;\n let subdiv_step = 1 / segments;\n let subdiv_step2 = subdiv_step * subdiv_step;\n let subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\n let pre1 = 3 * subdiv_step;\n let pre2 = 3 * subdiv_step2;\n let pre4 = 6 * subdiv_step2;\n let pre5 = 6 * subdiv_step3;\n let tmp1x = x1 - cx1 * 2 + cx2;\n let tmp1y = y1 - cy1 * 2 + cy2;\n let tmp2x = (cx1 - cx2) * 3 - x1 + x2;\n let tmp2y = (cy1 - cy2) * 3 - y1 + y2;\n let fx = x1;\n let fy = y1;\n let dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\n let dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\n let ddfx = tmp1x * pre4 + tmp2x * pre5;\n let ddfy = tmp1y * pre4 + tmp2y * pre5;\n let dddfx = tmp2x * pre5;\n let 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 vertex(x, y, color) {\n let idx = this.vertexIndex;\n let 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 end() {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n this.flush();\n let gl = this.context.gl;\n gl.disable(gl.BLEND);\n this.isDrawing = false;\n }\n flush() {\n if (this.vertexIndex == 0)\n return;\n if (!this.shader)\n throw new Error(\"No shader set.\");\n this.mesh.setVerticesLength(this.vertexIndex);\n this.mesh.draw(this.shader, this.shapeType);\n this.vertexIndex = 0;\n }\n check(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 } else {\n this.flush();\n this.shapeType = shapeType;\n }\n }\n dispose() {\n this.mesh.dispose();\n }\n };\n var ShapeType = /* @__PURE__ */ ((ShapeType2) => {\n ShapeType2[ShapeType2[\"Point\"] = 0] = \"Point\";\n ShapeType2[ShapeType2[\"Line\"] = 1] = \"Line\";\n ShapeType2[ShapeType2[\"Filled\"] = 4] = \"Filled\";\n return ShapeType2;\n })(ShapeType || {});\n\n // spine-webgl/src/SkeletonDebugRenderer.ts\n var _SkeletonDebugRenderer = class {\n constructor(context) {\n this.boneLineColor = new Color(1, 0, 0, 1);\n this.boneOriginColor = new Color(0, 1, 0, 1);\n this.attachmentLineColor = new Color(0, 0, 1, 0.5);\n this.triangleLineColor = new Color(1, 0.64, 0, 0.5);\n this.pathColor = new Color().setFromString(\"FF7F00\");\n this.clipColor = new Color(0.8, 0, 0, 2);\n this.aabbColor = new 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 SkeletonBounds();\n this.temp = new Array();\n this.vertices = Utils.newFloatArray(2 * 1024);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n }\n draw(shapes, skeleton, ignoredBones) {\n let skeletonX = skeleton.x;\n let skeletonY = skeleton.y;\n let gl = this.context.gl;\n let srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\n shapes.setBlendMode(srcFunc, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n let bones = skeleton.bones;\n if (this.drawBones) {\n shapes.setColor(this.boneLineColor);\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n if (!bone.parent)\n continue;\n let x = bone.data.length * bone.a + bone.worldX;\n let y = bone.data.length * bone.c + bone.worldY;\n shapes.rectLine(true, bone.worldX, 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 let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n let regionAttachment = attachment;\n let vertices = this.vertices;\n regionAttachment.computeWorldVertices(slot, 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 let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof MeshAttachment))\n continue;\n let mesh = attachment;\n let vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\n let triangles = mesh.triangles;\n let hullLength = mesh.hullLength;\n if (this.drawMeshTriangles) {\n shapes.setColor(this.triangleLineColor);\n for (let ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n let v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\n shapes.triangle(\n false,\n vertices[v1],\n vertices[v1 + 1],\n vertices[v2],\n vertices[v2 + 1],\n vertices[v3],\n vertices[v3 + 1]\n );\n }\n }\n if (this.drawMeshHull && hullLength > 0) {\n shapes.setColor(this.attachmentLineColor);\n hullLength = (hullLength >> 1) * 2;\n let lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\n for (let ii = 0, nn = hullLength; ii < nn; ii += 2) {\n let 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 let 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 let polygons = bounds.polygons;\n let boxes = bounds.boundingBoxes;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n shapes.setColor(boxes[i].color);\n shapes.polygon(polygon, 0, polygon.length);\n }\n }\n if (this.drawPaths) {\n let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof PathAttachment))\n continue;\n let path = attachment;\n let nn = path.worldVerticesLength;\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\n let color = this.pathColor;\n let x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\n if (path.closed) {\n shapes.setColor(color);\n let 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 (let ii = 4; ii < nn; ii += 6) {\n let 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 (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n shapes.circle(true, bone.worldX, bone.worldY, 3 * this.scale, this.boneOriginColor, 8);\n }\n }\n if (this.drawClipping) {\n let slots = skeleton.slots;\n shapes.setColor(this.clipColor);\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof ClippingAttachment))\n continue;\n let clip = attachment;\n let nn = clip.worldVerticesLength;\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\n for (let i2 = 0, n2 = world.length; i2 < n2; i2 += 2) {\n let x = world[i2];\n let y = world[i2 + 1];\n let x2 = world[(i2 + 2) % world.length];\n let y2 = world[(i2 + 3) % world.length];\n shapes.line(x, y, x2, y2);\n }\n }\n }\n }\n dispose() {\n }\n };\n var SkeletonDebugRenderer = _SkeletonDebugRenderer;\n SkeletonDebugRenderer.LIGHT_GRAY = new Color(192 / 255, 192 / 255, 192 / 255, 1);\n SkeletonDebugRenderer.GREEN = new Color(0, 1, 0, 1);\n\n // spine-webgl/src/SkeletonRenderer.ts\n var Renderable = class {\n constructor(vertices, numVertices, numFloats) {\n this.vertices = vertices;\n this.numVertices = numVertices;\n this.numFloats = numFloats;\n }\n };\n var _SkeletonRenderer = class {\n constructor(context, twoColorTint = true) {\n this.premultipliedAlpha = false;\n this.tempColor = new Color();\n this.tempColor2 = new Color();\n this.vertexSize = 2 + 2 + 4;\n this.twoColorTint = false;\n this.renderable = new Renderable([], 0, 0);\n this.clipper = new SkeletonClipping();\n this.temp = new Vector2();\n this.temp2 = new Vector2();\n this.temp3 = new Color();\n this.temp4 = new Color();\n this.twoColorTint = twoColorTint;\n if (twoColorTint)\n this.vertexSize += 4;\n this.vertices = Utils.newFloatArray(this.vertexSize * 1024);\n }\n draw(batcher, skeleton, slotRangeStart = -1, slotRangeEnd = -1, transformer = null) {\n let clipper = this.clipper;\n let premultipliedAlpha = this.premultipliedAlpha;\n let twoColorTint = this.twoColorTint;\n let blendMode = null;\n let tempPos = this.temp;\n let tempUv = this.temp2;\n let tempLight = this.temp3;\n let tempDark = this.temp4;\n let renderable = this.renderable;\n let uvs;\n let triangles;\n let drawOrder = skeleton.drawOrder;\n let attachmentColor;\n let skeletonColor = skeleton.color;\n let vertexSize = twoColorTint ? 12 : 8;\n let inRange = false;\n if (slotRangeStart == -1)\n inRange = true;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\n let 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 let attachment = slot.getAttachment();\n let texture;\n if (attachment instanceof RegionAttachment) {\n let region = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = 4;\n renderable.numFloats = clippedVertexSize << 2;\n region.computeWorldVertices(slot, renderable.vertices, 0, clippedVertexSize);\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\n uvs = region.uvs;\n texture = region.region.renderObject.page.texture;\n attachmentColor = region.color;\n } else if (attachment instanceof MeshAttachment) {\n let 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 = 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.page.texture;\n uvs = mesh.uvs;\n attachmentColor = mesh.color;\n } else if (attachment instanceof ClippingAttachment) {\n let clip = attachment;\n clipper.clipStart(slot, clip);\n continue;\n } else {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (texture) {\n let slotColor = slot.color;\n let 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 let darkColor = this.tempColor2;\n if (!slot.darkColor)\n darkColor.set(0, 0, 0, 1);\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 } else {\n darkColor.setFromColor(slot.darkColor);\n }\n darkColor.a = premultipliedAlpha ? 1 : 0;\n }\n let slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n batcher.setBlendMode(\n WebGLBlendModeConverter.getSourceColorGLBlendMode(blendMode, premultipliedAlpha),\n WebGLBlendModeConverter.getSourceAlphaGLBlendMode(blendMode),\n WebGLBlendModeConverter.getDestGLBlendMode(blendMode)\n );\n }\n if (clipper.isClipping()) {\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\n let clippedVertices = new Float32Array(clipper.clippedVertices);\n let clippedTriangles = clipper.clippedTriangles;\n if (transformer)\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\n batcher.draw(texture, clippedVertices, clippedTriangles);\n } else {\n let verts = renderable.vertices;\n if (!twoColorTint) {\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; 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 } else {\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; 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 let view = renderable.vertices.subarray(0, renderable.numFloats);\n if (transformer)\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\n batcher.draw(texture, view, triangles);\n }\n }\n clipper.clipEndWithSlot(slot);\n }\n clipper.clipEnd();\n }\n };\n var SkeletonRenderer = _SkeletonRenderer;\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n\n // spine-webgl/src/SceneRenderer.ts\n var quad = [\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0\n ];\n var QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n var WHITE = new Color(1, 1, 1, 1);\n var SceneRenderer = class {\n constructor(canvas, context, twoColorTint = true) {\n this.twoColorTint = false;\n this.activeRenderer = null;\n this.canvas = canvas;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.twoColorTint = twoColorTint;\n this.camera = new OrthoCamera(canvas.width, canvas.height);\n this.batcherShader = twoColorTint ? Shader.newTwoColoredTextured(this.context) : Shader.newColoredTextured(this.context);\n this.batcher = new PolygonBatcher(this.context, twoColorTint);\n this.shapesShader = Shader.newColored(this.context);\n this.shapes = new ShapeRenderer(this.context);\n this.skeletonRenderer = new SkeletonRenderer(this.context, twoColorTint);\n this.skeletonDebugRenderer = new SkeletonDebugRenderer(this.context);\n }\n dispose() {\n this.batcher.dispose();\n this.batcherShader.dispose();\n this.shapes.dispose();\n this.shapesShader.dispose();\n this.skeletonDebugRenderer.dispose();\n }\n begin() {\n this.camera.update();\n this.enableRenderer(this.batcher);\n }\n drawSkeleton(skeleton, premultipliedAlpha = false, slotRangeStart = -1, slotRangeEnd = -1, transform = null) {\n this.enableRenderer(this.batcher);\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd, transform);\n }\n drawSkeletonDebug(skeleton, premultipliedAlpha = false, ignoredBones) {\n this.enableRenderer(this.shapes);\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\n }\n drawTexture(texture, x, y, width, height, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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, QUAD_TRIANGLES);\n }\n drawTextureUV(texture, x, y, width, height, u, v, u2, v2, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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, QUAD_TRIANGLES);\n }\n drawTextureRotated(texture, x, y, width, height, pivotX, pivotY, angle, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\n let worldOriginX = x + pivotX;\n let worldOriginY = y + pivotY;\n let fx = -pivotX;\n let fy = -pivotY;\n let fx2 = width - pivotX;\n let fy2 = height - pivotY;\n let p1x = fx;\n let p1y = fy;\n let p2x = fx;\n let p2y = fy2;\n let p3x = fx2;\n let p3y = fy2;\n let p4x = fx2;\n let p4y = fy;\n let x1 = 0;\n let y1 = 0;\n let x2 = 0;\n let y2 = 0;\n let x3 = 0;\n let y3 = 0;\n let x4 = 0;\n let y4 = 0;\n if (angle != 0) {\n let cos = MathUtils.cosDeg(angle);\n let sin = 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 } 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, QUAD_TRIANGLES);\n }\n drawRegion(region, x, y, width, height, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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.page.texture, quad, QUAD_TRIANGLES);\n }\n line(x, y, x2, y2, color, color2) {\n this.enableRenderer(this.shapes);\n this.shapes.line(x, y, x2, y2, color);\n }\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n this.enableRenderer(this.shapes);\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\n }\n quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n this.enableRenderer(this.shapes);\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\n }\n rect(filled, x, y, width, height, color) {\n this.enableRenderer(this.shapes);\n this.shapes.rect(filled, x, y, width, height, color);\n }\n rectLine(filled, x1, y1, x2, y2, width, color) {\n this.enableRenderer(this.shapes);\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\n }\n polygon(polygonVertices, offset, count, color) {\n this.enableRenderer(this.shapes);\n this.shapes.polygon(polygonVertices, offset, count, color);\n }\n circle(filled, x, y, radius, color, segments = 0) {\n this.enableRenderer(this.shapes);\n this.shapes.circle(filled, x, y, radius, color, segments);\n }\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n this.enableRenderer(this.shapes);\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\n }\n end() {\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 resize(resizeMode) {\n let canvas = this.canvas;\n var dpr = window.devicePixelRatio || 1;\n var w = Math.round(canvas.clientWidth * dpr);\n var h = Math.round(canvas.clientHeight * dpr);\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.Expand)\n this.camera.setViewport(w, h);\n else if (resizeMode === ResizeMode.Fit) {\n let sourceWidth = canvas.width, sourceHeight = canvas.height;\n let targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\n let targetRatio = targetHeight / targetWidth;\n let sourceRatio = sourceHeight / sourceWidth;\n let scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\n this.camera.setViewport(sourceWidth * scale, sourceHeight * scale);\n }\n this.camera.update();\n }\n enableRenderer(renderer) {\n if (this.activeRenderer === renderer)\n return;\n this.end();\n if (renderer instanceof PolygonBatcher) {\n this.batcherShader.bind();\n this.batcherShader.setUniform4x4f(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 } else if (renderer instanceof ShapeRenderer) {\n this.shapesShader.bind();\n this.shapesShader.setUniform4x4f(Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.shapes.begin(this.shapesShader);\n this.activeRenderer = this.shapes;\n } else\n this.activeRenderer = this.skeletonDebugRenderer;\n }\n };\n var ResizeMode = /* @__PURE__ */ ((ResizeMode2) => {\n ResizeMode2[ResizeMode2[\"Stretch\"] = 0] = \"Stretch\";\n ResizeMode2[ResizeMode2[\"Expand\"] = 1] = \"Expand\";\n ResizeMode2[ResizeMode2[\"Fit\"] = 2] = \"Fit\";\n return ResizeMode2;\n })(ResizeMode || {});\n\n // spine-webgl/src/LoadingScreen.ts\n var spinnerImage;\n var logoImage;\n var loaded = 0;\n var FADE_IN = 1;\n var FADE_OUT = 1;\n var logoWidth = 165;\n var logoHeight = 108;\n var spinnerSize = 163;\n var LoadingScreen = class {\n constructor(renderer) {\n this.logo = null;\n this.spinner = null;\n this.angle = 0;\n this.fadeOut = 0;\n this.fadeIn = 0;\n this.timeKeeper = new TimeKeeper();\n this.backgroundColor = new Color(0.135, 0.135, 0.135, 1);\n this.tempColor = new Color();\n this.renderer = renderer;\n this.timeKeeper.maxDelta = 9;\n if (!logoImage) {\n let isSafari = navigator.userAgent.indexOf(\"Safari\") > -1;\n let onload = () => loaded++;\n logoImage = new Image();\n logoImage.src = SPINE_LOGO_DATA;\n if (!isSafari)\n logoImage.crossOrigin = \"anonymous\";\n logoImage.onload = onload;\n spinnerImage = new Image();\n spinnerImage.src = SPINNER_DATA;\n if (!isSafari)\n spinnerImage.crossOrigin = \"anonymous\";\n spinnerImage.onload = onload;\n }\n }\n dispose() {\n var _a, _b;\n (_a = this.logo) == null ? void 0 : _a.dispose();\n (_b = this.spinner) == null ? void 0 : _b.dispose();\n }\n draw(complete = false) {\n if (loaded < 2 || complete && this.fadeOut > FADE_OUT)\n return;\n this.timeKeeper.update();\n let a = Math.abs(Math.sin(this.timeKeeper.totalTime + 0.25));\n this.angle -= this.timeKeeper.delta * 200 * (1 + 1.5 * Math.pow(a, 5));\n let tempColor = this.tempColor;\n let renderer = this.renderer;\n let canvas = renderer.canvas;\n let gl = renderer.context.gl;\n renderer.resize(1 /* Expand */);\n renderer.camera.position.set(canvas.width / 2, canvas.height / 2, 0);\n renderer.batcher.setBlendMode(gl.ONE, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n if (complete) {\n this.fadeOut += this.timeKeeper.delta * (this.timeKeeper.totalTime < 1 ? 2 : 1);\n if (this.fadeOut > FADE_OUT)\n return;\n tempColor.setFromColor(this.backgroundColor);\n a = 1 - this.fadeOut / FADE_OUT;\n a = 1 - (a - 1) * (a - 1);\n tempColor.a *= a;\n if (tempColor.a > 0) {\n renderer.camera.zoom = 1;\n renderer.begin();\n renderer.quad(\n true,\n 0,\n 0,\n canvas.width,\n 0,\n canvas.width,\n canvas.height,\n 0,\n canvas.height,\n tempColor,\n tempColor,\n tempColor,\n tempColor\n );\n renderer.end();\n }\n } else {\n this.fadeIn += this.timeKeeper.delta;\n if (this.backgroundColor.a > 0) {\n gl.clearColor(this.backgroundColor.r, this.backgroundColor.g, this.backgroundColor.b, this.backgroundColor.a);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n a = 1;\n }\n a *= Math.min(this.fadeIn / FADE_IN, 1);\n tempColor.set(a, a, a, a);\n if (!this.logo) {\n this.logo = new GLTexture(renderer.context, logoImage);\n this.spinner = new GLTexture(renderer.context, spinnerImage);\n }\n renderer.camera.zoom = Math.max(1, spinnerSize / canvas.height);\n renderer.begin();\n renderer.drawTexture(this.logo, (canvas.width - logoWidth) / 2, (canvas.height - logoHeight) / 2, logoWidth, logoHeight, tempColor);\n if (this.spinner)\n renderer.drawTextureRotated(this.spinner, (canvas.width - spinnerSize) / 2, (canvas.height - spinnerSize) / 2, spinnerSize, spinnerSize, spinnerSize / 2, spinnerSize / 2, this.angle, tempColor);\n renderer.end();\n }\n };\n var SPINNER_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC\";\n var SPINE_LOGO_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=\";\n\n // spine-webgl/src/SpineCanvas.ts\n var SpineCanvas = class {\n constructor(canvas, config) {\n this.time = new TimeKeeper();\n if (!config.pathPrefix)\n config.pathPrefix = \"\";\n if (!config.app)\n config.app = {\n loadAssets: () => {\n },\n initialize: () => {\n },\n update: () => {\n },\n render: () => {\n },\n error: () => {\n }\n };\n if (config.webglConfig)\n config.webglConfig = { alpha: true };\n this.htmlCanvas = canvas;\n this.context = new ManagedWebGLRenderingContext(canvas, config.webglConfig);\n this.renderer = new SceneRenderer(canvas, this.context);\n this.gl = this.context.gl;\n this.assetManager = new AssetManager(this.context, config.pathPrefix);\n this.input = new Input(canvas);\n if (config.app.loadAssets)\n config.app.loadAssets(this);\n let loop = () => {\n requestAnimationFrame(loop);\n this.time.update();\n if (config.app.update)\n config.app.update(this, this.time.delta);\n if (config.app.render)\n config.app.render(this);\n };\n let waitForAssets = () => {\n if (this.assetManager.isLoadingComplete()) {\n if (this.assetManager.hasErrors()) {\n if (config.app.error)\n config.app.error(this, this.assetManager.getErrors());\n } else {\n if (config.app.initialize)\n config.app.initialize(this);\n loop();\n }\n return;\n }\n requestAnimationFrame(waitForAssets);\n };\n requestAnimationFrame(waitForAssets);\n }\n clear(r, g, b, a) {\n this.gl.clearColor(r, g, b, a);\n this.gl.clear(this.gl.COLOR_BUFFER_BIT);\n }\n };\n return __toCommonJS(src_exports);\n})();\n//# sourceMappingURL=spine-webgl.js.map\n\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/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GetCalcMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/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/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-canvas.js","webpack:///./runtimes/spine-webgl.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,4FAA8B;;AAE5D;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChEA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;;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;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,kBAAkB,mBAAO,CAAC,+CAAa;AACvC,iBAAiB,mBAAO,CAAC,6CAAY;AACrC;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;AC/tCA;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;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;;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvHA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1IA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA,sDAAsD,iBAAiB,cAAc;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC7E;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;AACjD;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA,GAAG,oBAAoB;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,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,OAAO;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,6BAA6B,iBAAiB;AAC9C;AACA,aAAa;AACb;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA,WAAW;AACX,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;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,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,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;AACpB;AACA;AACA;AACA;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;AACA;AACA;AACA;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;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;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;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wDAAwD,KAAK,WAAW,OAAO,IAAI,aAAa;AAChG,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA,SAAS;AACT,iDAAiD,yDAAyD;AAC1G,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,yEAAyE,KAAK,eAAe,UAAU;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,KAAK,IAAI,UAAU;AACrF;AACA,OAAO;AACP,+DAA+D,KAAK,WAAW,OAAO,IAAI,aAAa;AACvG,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,8CAA8C,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;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,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc,EAAE;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,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,EAAE;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;;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;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;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,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,qBAAqB,eAAe;AACpC;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;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,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;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;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;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;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;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;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,qBAAqB,2BAA2B;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;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,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,kDAAkD,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO;AACP,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;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;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,EAAE;AACzF;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,kDAAkD,SAAS;AAC3D;AACA,sDAAsD,WAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,qBAAqB;AACrB,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;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,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,6CAA6C,SAAS;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,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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,OAAO;AAClD;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;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;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;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,QAAQ;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;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,8BAA8B,sBAAsB;AACpD;AACA;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,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;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,8CAA8C,OAAO;AACrD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,OAAO;AACjF;AACA;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;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,kDAAkD,aAAa,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA,oDAAoD,wBAAwB,qBAAqB,mBAAmB;AACpH;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB,qBAAqB,mBAAmB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,4BAA4B,mBAAmB;AAC5G;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,4BAA4B,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,uBAAuB,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,uBAAuB,mBAAmB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,sDAAsD,SAAS,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA,+DAA+D,eAAe,YAAY,aAAa;AACvG;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,sEAAsE,eAAe,YAAY,aAAa;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,iEAAiE,eAAe,YAAY,aAAa;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,YAAY,aAAa;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,OAAO;AAChF;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,2CAA2C,OAAO;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,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,sBAAsB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;;AAEA,CAAC;;;;;;;;;;;;ACv0SD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA,sDAAsD,iBAAiB,cAAc;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC7E;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;AACjD;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA,GAAG,oBAAoB;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,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,OAAO;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,6BAA6B,iBAAiB;AAC9C;AACA,aAAa;AACb;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA,WAAW;AACX,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;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,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,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;AACpB;AACA;AACA;AACA;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;AACA;AACA;AACA;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;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;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;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wDAAwD,KAAK,WAAW,OAAO,IAAI,aAAa;AAChG,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA,SAAS;AACT,iDAAiD,yDAAyD;AAC1G,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,yEAAyE,KAAK,eAAe,UAAU;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,KAAK,IAAI,UAAU;AACrF;AACA,OAAO;AACP,+DAA+D,KAAK,WAAW,OAAO,IAAI,aAAa;AACvG,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,8CAA8C,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;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,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc,EAAE;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,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,EAAE;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;;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;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;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,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,qBAAqB,eAAe;AACpC;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;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,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;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;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;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;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;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;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,qBAAqB,2BAA2B;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;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,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,kDAAkD,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO;AACP,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;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;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,EAAE;AACzF;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,kDAAkD,SAAS;AAC3D;AACA,sDAAsD,WAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,qBAAqB;AACrB,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;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,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,6CAA6C,SAAS;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,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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,OAAO;AAClD;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;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;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;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,QAAQ;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;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,8BAA8B,sBAAsB;AACpD;AACA;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,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;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,8CAA8C,OAAO;AACrD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,OAAO;AACjF;AACA;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;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,kDAAkD,aAAa,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA,oDAAoD,wBAAwB,qBAAqB,mBAAmB;AACpH;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB,qBAAqB,mBAAmB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,4BAA4B,mBAAmB;AAC5G;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,4BAA4B,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,uBAAuB,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,uBAAuB,mBAAmB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,sDAAsD,SAAS,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA,+DAA+D,eAAe,YAAY,aAAa;AACvG;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,sEAAsE,eAAe,YAAY,aAAa;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,iEAAiE,eAAe,YAAY,aAAa;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,YAAY,aAAa;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,OAAO;AAChF;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sDAAsD,OAAO;AAC7D;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;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;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;AACA;;AAEA;AACA,iBAAiB;AACjB,qBAAqB;AACrB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB,gBAAgB;AAChB,qBAAqB;AACrB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;;AAEA;AACA,iBAAiB;AACjB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,2BAA2B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oBAAoB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,uBAAuB,cAAc;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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,SAAS;AACT;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;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,+DAA+D,QAAQ;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,+DAA+D,QAAQ;AACvE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,wCAAwC;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TransformMatrix = require('./components/TransformMatrix');\n\nvar tempMatrix1 = new TransformMatrix();\nvar tempMatrix2 = new TransformMatrix();\nvar tempMatrix3 = new TransformMatrix();\n\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\n\n/**\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\n * the parent matrix if provided.\n *\n * Note that the object this results contains _references_ to the Transform Matrices,\n * not new instances of them. Therefore, you should use their values immediately, or\n * copy them to your own matrix, as they will be replaced as soon as another Game\n * Object is rendered.\n *\n * @function Phaser.GameObjects.GetCalcMatrix\n * @memberof Phaser.GameObjects\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\n *\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\n */\nvar GetCalcMatrix = function (src, camera, parentMatrix)\n{\n var camMatrix = tempMatrix1;\n var spriteMatrix = tempMatrix2;\n var calcMatrix = tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, 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 else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n }\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n return result;\n};\n\nmodule.exports = GetCalcMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\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, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\n\n var children = container.list;\n var childCount = children.length;\n\n if (childCount === 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 renderer.pipelines.preBatch(container);\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 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) ? (children[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, camera, transformMatrix, container);\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 renderer.pipelines.postBatch(container);\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = [ content[0] ];\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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 SpineCanvas = require('SpineCanvas');\nvar SpineWebgl = require('SpineWebgl');\nvar Spine = {\n canvas: SpineCanvas,\n webgl: SpineWebgl\n};\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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 this.runtime.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 this.runtime.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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n \n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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 this.runtime.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new this.runtime.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new this.runtime.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 this.runtime.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 var gl = this.gl;\n var i;\n var atlasPage;\n var realTextureKey;\n\n if (this.isWebGL)\n {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n }\n\n for (i = 0; i < atlas.pages.length; i ++)\n {\n atlasPage = atlas.pages[i];\n realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;\n if (this.isWebGL)\n {\n atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));\n }\n else\n {\n atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));\n }\n }\n \n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new this.runtime.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new this.runtime.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 this.runtime.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 this.runtime.AnimationStateData(skeleton.data);\n\n var state = new this.runtime.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 this.runtime.Vector2();\n var size = new this.runtime.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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 {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, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\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, 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 2022 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 2022 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 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 {SpineContainer} container - The Game Object being rendered in this call.\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, 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.pipelines.rebind();\n }\n\n return;\n }\n\n camera.addToRenderList(container);\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 if (renderer.newType)\n {\n // flush + clear if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var rendererNextType = renderer.nextTypeMatch;\n\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\n renderer.nextTypeMatch = true;\n renderer.newType = false;\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (child.willRender(camera, container))\n {\n var mask = child.mask;\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.preRenderWebGL(renderer, child, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.postRenderWebGL(renderer, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n }\n }\n\n renderer.nextTypeMatch = rendererNextType;\n\n if (!rendererNextType)\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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 {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, 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 camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n camera.addToRenderList(src);\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 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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Directly 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#renderDirect\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 {SpineGameObject} src - The Game Object being rendered in this call.\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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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 // 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.pipelines.rebind();\n};\n\nmodule.exports = SpineGameObjectWebGLDirect;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (renderer.newType)\n {\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\n\"use strict\";\nvar spine = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // spine-canvas/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n AlphaTimeline: () => AlphaTimeline,\n Animation: () => Animation,\n AnimationState: () => AnimationState,\n AnimationStateAdapter: () => AnimationStateAdapter,\n AnimationStateData: () => AnimationStateData,\n AssetManager: () => AssetManager,\n AssetManagerBase: () => AssetManagerBase,\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\n Attachment: () => Attachment,\n AttachmentTimeline: () => AttachmentTimeline,\n BinaryInput: () => BinaryInput,\n BlendMode: () => BlendMode,\n Bone: () => Bone,\n BoneData: () => BoneData,\n BoundingBoxAttachment: () => BoundingBoxAttachment,\n CURRENT: () => CURRENT,\n CanvasTexture: () => CanvasTexture,\n ClippingAttachment: () => ClippingAttachment,\n Color: () => Color,\n ConstraintData: () => ConstraintData,\n CurveTimeline: () => CurveTimeline,\n CurveTimeline1: () => CurveTimeline1,\n CurveTimeline2: () => CurveTimeline2,\n DebugUtils: () => DebugUtils,\n DeformTimeline: () => DeformTimeline,\n Downloader: () => Downloader,\n DrawOrderTimeline: () => DrawOrderTimeline,\n Event: () => Event,\n EventData: () => EventData,\n EventQueue: () => EventQueue,\n EventTimeline: () => EventTimeline,\n EventType: () => EventType,\n FIRST: () => FIRST,\n FakeTexture: () => FakeTexture,\n HOLD_FIRST: () => HOLD_FIRST,\n HOLD_MIX: () => HOLD_MIX,\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\n IkConstraint: () => IkConstraint,\n IkConstraintData: () => IkConstraintData,\n IkConstraintTimeline: () => IkConstraintTimeline,\n IntSet: () => IntSet,\n Interpolation: () => Interpolation,\n MathUtils: () => MathUtils,\n MeshAttachment: () => MeshAttachment,\n MixBlend: () => MixBlend,\n MixDirection: () => MixDirection,\n PathAttachment: () => PathAttachment,\n PathConstraint: () => PathConstraint,\n PathConstraintData: () => PathConstraintData,\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\n PointAttachment: () => PointAttachment,\n Pool: () => Pool,\n PositionMode: () => PositionMode,\n Pow: () => Pow,\n PowOut: () => PowOut,\n RGB2Timeline: () => RGB2Timeline,\n RGBA2Timeline: () => RGBA2Timeline,\n RGBATimeline: () => RGBATimeline,\n RGBTimeline: () => RGBTimeline,\n RegionAttachment: () => RegionAttachment,\n RotateMode: () => RotateMode,\n RotateTimeline: () => RotateTimeline,\n SETUP: () => SETUP,\n SUBSEQUENT: () => SUBSEQUENT,\n ScaleTimeline: () => ScaleTimeline,\n ScaleXTimeline: () => ScaleXTimeline,\n ScaleYTimeline: () => ScaleYTimeline,\n SequenceTimeline: () => SequenceTimeline,\n ShearTimeline: () => ShearTimeline,\n ShearXTimeline: () => ShearXTimeline,\n ShearYTimeline: () => ShearYTimeline,\n Skeleton: () => Skeleton,\n SkeletonBinary: () => SkeletonBinary,\n SkeletonBounds: () => SkeletonBounds,\n SkeletonClipping: () => SkeletonClipping,\n SkeletonData: () => SkeletonData,\n SkeletonJson: () => SkeletonJson,\n SkeletonRenderer: () => SkeletonRenderer,\n Skin: () => Skin,\n SkinEntry: () => SkinEntry,\n Slot: () => Slot,\n SlotData: () => SlotData,\n SpacingMode: () => SpacingMode,\n StringSet: () => StringSet,\n Texture: () => Texture,\n TextureAtlas: () => TextureAtlas,\n TextureAtlasPage: () => TextureAtlasPage,\n TextureAtlasRegion: () => TextureAtlasRegion,\n TextureFilter: () => TextureFilter,\n TextureRegion: () => TextureRegion,\n TextureWrap: () => TextureWrap,\n TimeKeeper: () => TimeKeeper,\n Timeline: () => Timeline,\n TrackEntry: () => TrackEntry,\n TransformConstraint: () => TransformConstraint,\n TransformConstraintData: () => TransformConstraintData,\n TransformConstraintTimeline: () => TransformConstraintTimeline,\n TransformMode: () => TransformMode,\n TranslateTimeline: () => TranslateTimeline,\n TranslateXTimeline: () => TranslateXTimeline,\n TranslateYTimeline: () => TranslateYTimeline,\n Triangulator: () => Triangulator,\n Utils: () => Utils,\n Vector2: () => Vector2,\n VertexAttachment: () => VertexAttachment,\n WindowedMean: () => WindowedMean\n });\n\n // spine-core/src/Utils.ts\n var IntSet = class {\n constructor() {\n this.array = new Array();\n }\n add(value) {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n contains(value) {\n return this.array[value | 0] != void 0;\n }\n remove(value) {\n this.array[value | 0] = void 0;\n }\n clear() {\n this.array.length = 0;\n }\n };\n var StringSet = class {\n constructor() {\n this.entries = {};\n this.size = 0;\n }\n add(value) {\n let contains = this.entries[value];\n this.entries[value] = true;\n if (!contains) {\n this.size++;\n return true;\n }\n return false;\n }\n addAll(values) {\n let oldSize = this.size;\n for (var i = 0, n = values.length; i < n; i++)\n this.add(values[i]);\n return oldSize != this.size;\n }\n contains(value) {\n return this.entries[value];\n }\n clear() {\n this.entries = {};\n this.size = 0;\n }\n };\n var _Color = class {\n constructor(r = 0, g = 0, b = 0, a = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n set(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this.clamp();\n }\n setFromColor(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 setFromString(hex) {\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n return this;\n }\n add(r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n return this.clamp();\n }\n clamp() {\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 static rgba8888ToColor(color, value) {\n color.r = ((value & 4278190080) >>> 24) / 255;\n color.g = ((value & 16711680) >>> 16) / 255;\n color.b = ((value & 65280) >>> 8) / 255;\n color.a = (value & 255) / 255;\n }\n static rgb888ToColor(color, value) {\n color.r = ((value & 16711680) >>> 16) / 255;\n color.g = ((value & 65280) >>> 8) / 255;\n color.b = (value & 255) / 255;\n }\n static fromString(hex) {\n return new _Color().setFromString(hex);\n }\n };\n var Color = _Color;\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 var _MathUtils = class {\n static clamp(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n }\n static cosDeg(degrees) {\n return Math.cos(degrees * _MathUtils.degRad);\n }\n static sinDeg(degrees) {\n return Math.sin(degrees * _MathUtils.degRad);\n }\n static signum(value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n static toInt(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n static cbrt(x) {\n let y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n }\n static randomTriangular(min, max) {\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n static randomTriangularWith(min, max, mode) {\n let u = Math.random();\n let 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 static isPowerOfTwo(value) {\n return value && (value & value - 1) === 0;\n }\n };\n var MathUtils = _MathUtils;\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 var Interpolation = class {\n apply(start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n }\n };\n var Pow = class extends Interpolation {\n constructor(power) {\n super();\n this.power = 2;\n this.power = power;\n }\n applyInternal(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 };\n var PowOut = class extends Pow {\n constructor(power) {\n super(power);\n }\n applyInternal(a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n };\n var _Utils = class {\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n static arrayFill(array, fromIndex, toIndex, value) {\n for (let i = fromIndex; i < toIndex; i++)\n array[i] = value;\n }\n static setArraySize(array, size, value = 0) {\n let oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n }\n static ensureArrayCapacity(array, size, value = 0) {\n if (array.length >= size)\n return array;\n return _Utils.setArraySize(array, size, value);\n }\n static newArray(size, defaultValue) {\n let array = new Array(size);\n for (let i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n }\n static newFloatArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Float32Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static newShortArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Int16Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static toFloatArray(array) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n static toSinglePrecision(value) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n static webkit602BugfixHelper(alpha, blend) {\n }\n static contains(array, element, identity = true) {\n for (var i = 0; i < array.length; i++)\n if (array[i] == element)\n return true;\n return false;\n }\n static enumValue(type, name) {\n return type[name[0].toUpperCase() + name.slice(1)];\n }\n };\n var Utils = _Utils;\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\n var DebugUtils = class {\n static logBones(skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let 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 };\n var Pool = class {\n constructor(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n obtain() {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n free(item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n }\n freeAll(items) {\n for (let i = 0; i < items.length; i++)\n this.free(items[i]);\n }\n clear() {\n this.items.length = 0;\n }\n };\n var Vector2 = class {\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n length() {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n normalize() {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n };\n var TimeKeeper = class {\n constructor() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1e3;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n update() {\n let now = Date.now() / 1e3;\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 };\n var WindowedMean = class {\n constructor(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 hasEnoughData() {\n return this.addedValues >= this.values.length;\n }\n addValue(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 getMean() {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++)\n mean += this.values[i];\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n return 0;\n }\n };\n\n // spine-core/src/attachments/Attachment.ts\n var Attachment = class {\n constructor(name) {\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n };\n var _VertexAttachment = class extends Attachment {\n constructor(name) {\n super(name);\n this.id = _VertexAttachment.nextID++;\n this.bones = null;\n this.vertices = [];\n this.worldVerticesLength = 0;\n this.timelineAttachment = this;\n }\n computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (!bones) {\n if (deformArray.length > 0)\n vertices = deformArray;\n let bone = slot.bone;\n let x = bone.worldX;\n let y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\n let vx = vertices[v2], vy = vertices[v2 + 1];\n worldVertices2[w] = vx * a + vy * b + x;\n worldVertices2[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let 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 worldVertices2[w] = wx;\n worldVertices2[w + 1] = wy;\n }\n } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let 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 worldVertices2[w] = wx;\n worldVertices2[w + 1] = wy;\n }\n }\n }\n copyTo(attachment) {\n if (this.bones) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n if (this.vertices) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.timelineAttachment = this.timelineAttachment;\n }\n };\n var VertexAttachment = _VertexAttachment;\n VertexAttachment.nextID = 0;\n\n // spine-core/src/attachments/Sequence.ts\n var _Sequence = class {\n constructor(count) {\n this.id = _Sequence.nextID();\n this.start = 0;\n this.digits = 0;\n this.setupIndex = 0;\n this.regions = new Array(count);\n }\n copy() {\n let copy = new _Sequence(this.regions.length);\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\n copy.start = this.start;\n copy.digits = this.digits;\n copy.setupIndex = this.setupIndex;\n return copy;\n }\n apply(slot, attachment) {\n let index = slot.sequenceIndex;\n if (index == -1)\n index = this.setupIndex;\n if (index >= this.regions.length)\n index = this.regions.length - 1;\n let region = this.regions[index];\n if (attachment.region != region) {\n attachment.region = region;\n attachment.updateRegion();\n }\n }\n getPath(basePath, index) {\n let result = basePath;\n let frame = (this.start + index).toString();\n for (let i = this.digits - frame.length; i > 0; i--)\n result += \"0\";\n result += frame;\n return result;\n }\n static nextID() {\n return _Sequence._nextID++;\n }\n };\n var Sequence = _Sequence;\n Sequence._nextID = 0;\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\n return SequenceMode2;\n })(SequenceMode || {});\n var SequenceModeValues = [\n 0 /* hold */,\n 1 /* once */,\n 2 /* loop */,\n 3 /* pingpong */,\n 4 /* onceReverse */,\n 5 /* loopReverse */,\n 6 /* pingpongReverse */\n ];\n\n // spine-core/src/Animation.ts\n var Animation = class {\n constructor(name, timelines, duration) {\n this.timelines = [];\n this.timelineIds = new StringSet();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n this.setTimelines(timelines);\n this.duration = duration;\n }\n setTimelines(timelines) {\n if (!timelines)\n throw new Error(\"timelines cannot be null.\");\n this.timelines = timelines;\n this.timelineIds.clear();\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds.addAll(timelines[i].getPropertyIds());\n }\n hasTimeline(ids) {\n for (let i = 0; i < ids.length; i++)\n if (this.timelineIds.contains(ids[i]))\n return true;\n return false;\n }\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (!skeleton)\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 let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n };\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\n return MixBlend2;\n })(MixBlend || {});\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\n return MixDirection2;\n })(MixDirection || {});\n var Property = {\n rotate: 0,\n x: 1,\n y: 2,\n scaleX: 3,\n scaleY: 4,\n shearX: 5,\n shearY: 6,\n rgb: 7,\n alpha: 8,\n rgb2: 9,\n attachment: 10,\n deform: 11,\n event: 12,\n drawOrder: 13,\n ikConstraint: 14,\n transformConstraint: 15,\n pathConstraintPosition: 16,\n pathConstraintSpacing: 17,\n pathConstraintMix: 18,\n sequence: 19\n };\n var Timeline = class {\n constructor(frameCount, propertyIds) {\n this.propertyIds = propertyIds;\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\n }\n getPropertyIds() {\n return this.propertyIds;\n }\n getFrameEntries() {\n return 1;\n }\n getFrameCount() {\n return this.frames.length / this.getFrameEntries();\n }\n getDuration() {\n return this.frames[this.frames.length - this.getFrameEntries()];\n }\n static search1(frames, time) {\n let n = frames.length;\n for (let i = 1; i < n; i++)\n if (frames[i] > time)\n return i - 1;\n return n - 1;\n }\n static search(frames, time, step) {\n let n = frames.length;\n for (let i = step; i < n; i += step)\n if (frames[i] > time)\n return i - step;\n return n - step;\n }\n };\n var CurveTimeline = class extends Timeline {\n constructor(frameCount, bezierCount, propertyIds) {\n super(frameCount, propertyIds);\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\n this.curves[frameCount - 1] = 1;\n }\n setLinear(frame) {\n this.curves[frame] = 0;\n }\n setStepped(frame) {\n this.curves[frame] = 1;\n }\n shrink(bezierCount) {\n let size = this.getFrameCount() + bezierCount * 18;\n if (this.curves.length > size) {\n let newCurves = Utils.newFloatArray(size);\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\n this.curves = newCurves;\n }\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = value1 + dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getBezierValue(time, frameIndex, valueOffset, i) {\n let curves = this.curves;\n if (curves[i] > time) {\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n frameIndex += this.getFrameEntries();\n let x = curves[n - 2], y = curves[n - 1];\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\n }\n };\n var CurveTimeline1 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId) {\n super(frameCount, bezierCount, [propertyId]);\n }\n getFrameEntries() {\n return 2;\n }\n setFrame(frame, time, value) {\n frame <<= 1;\n this.frames[frame] = time;\n this.frames[frame + 1] = value;\n }\n getCurveValue(time) {\n let frames = this.frames;\n let i = frames.length - 2;\n for (let ii = 2; ii <= i; ii += 2) {\n if (frames[ii] > time) {\n i = ii - 2;\n break;\n }\n }\n let curveType = this.curves[i >> 1];\n switch (curveType) {\n case 0:\n let before = frames[i], value = frames[i + 1];\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\n case 1:\n return frames[i + 1];\n }\n return this.getBezierValue(time, i, 1, curveType - 2);\n }\n };\n var CurveTimeline2 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\n }\n getFrameEntries() {\n return 3;\n }\n setFrame(frame, time, value1, value2) {\n frame *= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = value1;\n this.frames[frame + 2] = value2;\n }\n };\n var RotateTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n return;\n case 1 /* first */:\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\n }\n return;\n }\n let r = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n r += bone.data.rotation - bone.rotation;\n case 3 /* add */:\n bone.rotation += r * alpha;\n }\n }\n };\n var TranslateTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.x + \"|\" + boneIndex,\n Property.y + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n };\n var TranslateXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n break;\n case 3 /* add */:\n bone.x += x * alpha;\n }\n }\n };\n var TranslateYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case 3 /* add */:\n bone.y += y * alpha;\n }\n }\n };\n var ScaleTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.scaleX + \"|\" + boneIndex,\n Property.scaleY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let x, y;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n x *= bone.data.scaleX;\n y *= bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ScaleXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time) * bone.data.scaleX;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleX += x - bone.data.scaleX;\n else\n bone.scaleX = x;\n } else {\n let bx = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n }\n }\n }\n };\n var ScaleYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time) * bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleY += y - bone.data.scaleY;\n else\n bone.scaleY = y;\n } else {\n let by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n by = bone.data.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = bone.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ShearTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.shearX + \"|\" + boneIndex,\n Property.shearY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n };\n var ShearXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n break;\n case 3 /* add */:\n bone.shearX += x * alpha;\n }\n }\n };\n var ShearYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case 3 /* add */:\n bone.shearY += y * alpha;\n }\n }\n };\n var RGBATimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 5;\n }\n setFrame(frame, time, r, g, b, a) {\n frame *= 5;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.setFromColor(setup);\n return;\n case 1 /* first */:\n color.add(\n (setup.r - color.r) * alpha,\n (setup.g - color.g) * alpha,\n (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha\n );\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0;\n let i = Timeline.search(frames, time, 5);\n let curveType = this.curves[i / 5];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n let t = (time - before) / (frames[i + 5] - before);\n r += (frames[i + 5 + 1] - r) * t;\n g += (frames[i + 5 + 2] - g) * t;\n b += (frames[i + 5 + 3] - b) * t;\n a += (frames[i + 5 + 4] - a) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n }\n if (alpha == 1)\n color.set(r, g, b, a);\n else {\n if (blend == 0 /* 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 };\n var RGBTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, r, g, b) {\n frame <<= 2;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n return;\n case 1 /* first */:\n color.r += (setup.r - color.r) * alpha;\n color.g += (setup.g - color.g) * alpha;\n color.b += (setup.b - color.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n r += (frames[i + 4 + 1] - r) * t;\n g += (frames[i + 4 + 2] - g) * t;\n b += (frames[i + 4 + 3] - b) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (alpha == 1) {\n color.r = r;\n color.g = g;\n color.b = b;\n } else {\n if (blend == 0 /* setup */) {\n let setup = slot.data.color;\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n }\n color.r += (r - color.r) * alpha;\n color.g += (g - color.g) * alpha;\n color.b += (b - color.b) * alpha;\n }\n }\n };\n var AlphaTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let color = slot.color;\n if (time < this.frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.a = setup.a;\n return;\n case 1 /* first */:\n color.a += (setup.a - color.a) * alpha;\n }\n return;\n }\n let a = this.getCurveValue(time);\n if (alpha == 1)\n color.a = a;\n else {\n if (blend == 0 /* setup */)\n color.a = slot.data.color.a;\n color.a += (a - color.a) * alpha;\n }\n }\n };\n var RGBA2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 8;\n }\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\n frame <<= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n this.frames[frame + 5] = r2;\n this.frames[frame + 6] = g2;\n this.frames[frame + 7] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.setFromColor(setupLight);\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.add(\n (setupLight.r - light.r) * alpha,\n (setupLight.g - light.g) * alpha,\n (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha\n );\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 8);\n let curveType = this.curves[i >> 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n let t = (time - before) / (frames[i + 8] - before);\n r += (frames[i + 8 + 1] - r) * t;\n g += (frames[i + 8 + 2] - g) * t;\n b += (frames[i + 8 + 3] - b) * t;\n a += (frames[i + 8 + 4] - a) * t;\n r2 += (frames[i + 8 + 5] - r2) * t;\n g2 += (frames[i + 8 + 6] - g2) * t;\n b2 += (frames[i + 8 + 7] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\n }\n if (alpha == 1) {\n light.set(r, g, b, a);\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n light.setFromColor(slot.data.color);\n let setupDark = slot.data.darkColor;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var RGB2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, r, g, b, r2, g2, b2) {\n frame *= 7;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = r2;\n this.frames[frame + 5] = g2;\n this.frames[frame + 6] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.r += (setupLight.r - light.r) * alpha;\n light.g += (setupLight.g - light.g) * alpha;\n light.b += (setupLight.b - light.b) * alpha;\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n r += (frames[i + 7 + 1] - r) * t;\n g += (frames[i + 7 + 2] - g) * t;\n b += (frames[i + 7 + 3] - b) * t;\n r2 += (frames[i + 7 + 4] - r2) * t;\n g2 += (frames[i + 7 + 5] - g2) * t;\n b2 += (frames[i + 7 + 6] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (alpha == 1) {\n light.r = r;\n light.g = g;\n light.b = b;\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.r += (r - light.r) * alpha;\n light.g += (g - light.g) * alpha;\n light.b += (b - light.b) * alpha;\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var AttachmentTimeline = class extends Timeline {\n constructor(frameCount, slotIndex) {\n super(frameCount, [\n Property.attachment + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachmentNames = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, attachmentName) {\n this.frames[frame] = time;\n this.attachmentNames[frame] = attachmentName;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\n }\n setAttachment(skeleton, slot, attachmentName) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n };\n var DeformTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex, attachment) {\n super(frameCount, bezierCount, [\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n this.vertices = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, vertices) {\n this.frames[frame] = time;\n this.vertices[frame] = vertices;\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getCurvePercent(time, frame) {\n let curves = this.curves;\n let i = curves[frame];\n switch (i) {\n case 0:\n let x2 = this.frames[frame];\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\n case 1:\n return 0;\n }\n i -= 2;\n if (curves[i] > time) {\n let x2 = this.frames[frame];\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n let x = curves[n - 2], y = curves[n - 1];\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.getAttachment();\n if (!slotAttachment)\n return;\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\n return;\n let deform = slot.deform;\n if (deform.length == 0)\n blend = 0 /* setup */;\n let vertices = this.vertices;\n let vertexCount = vertices[0].length;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n deform.length = 0;\n return;\n case 1 /* first */:\n if (alpha == 1) {\n deform.length = 0;\n return;\n }\n deform.length = vertexCount;\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n deform.length = vertexCount;\n if (time >= frames[frames.length - 1]) {\n let lastVertices = vertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] - setupVertices[i2];\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2];\n }\n } else\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let setup = setupVertices[i2];\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] = lastVertices[i2] * alpha;\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] * alpha;\n }\n }\n }\n return;\n }\n let frame = Timeline.search1(frames, time);\n let percent = this.getCurvePercent(time, frame);\n let prevVertices = vertices[frame];\n let nextVertices = vertices[frame + 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2], setup = setupVertices[i2];\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\n }\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n };\n var _EventTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _EventTimeline.propertyIds);\n this.events = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, event) {\n this.frames[frame] = event.time;\n this.events[frame] = event;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (!firedEvents)\n return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n let i = 0;\n if (lastTime < frames[0])\n i = 0;\n else {\n i = Timeline.search1(frames, lastTime) + 1;\n let frameTime = frames[i];\n while (i > 0) {\n if (frames[i - 1] != frameTime)\n break;\n i--;\n }\n }\n for (; i < frameCount && time >= frames[i]; i++)\n firedEvents.push(this.events[i]);\n }\n };\n var EventTimeline = _EventTimeline;\n EventTimeline.propertyIds = [\"\" + Property.event];\n var _DrawOrderTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _DrawOrderTimeline.propertyIds);\n this.drawOrders = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, drawOrder) {\n this.frames[frame] = time;\n this.drawOrders[frame] = drawOrder;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n let idx = Timeline.search1(this.frames, time);\n let drawOrderToSetupIndex = this.drawOrders[idx];\n if (!drawOrderToSetupIndex)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n else {\n let drawOrder = skeleton.drawOrder;\n let slots = skeleton.slots;\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n };\n var DrawOrderTimeline = _DrawOrderTimeline;\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\n var IkConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, ikConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.ikConstraint + \"|\" + ikConstraintIndex\n ]);\n this.ikConstraintIndex = 0;\n this.ikConstraintIndex = ikConstraintIndex;\n }\n getFrameEntries() {\n return 6;\n }\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\n frame *= 6;\n this.frames[frame] = time;\n this.frames[frame + 1] = mix;\n this.frames[frame + 2] = softness;\n this.frames[frame + 3] = bendDirection;\n this.frames[frame + 4] = compress ? 1 : 0;\n this.frames[frame + 5] = stretch ? 1 : 0;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* 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 1 /* 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 let mix = 0, softness = 0;\n let i = Timeline.search(frames, time, 6);\n let curveType = this.curves[i / 6];\n switch (curveType) {\n case 0:\n let before = frames[i];\n mix = frames[i + 1];\n softness = frames[i + 2];\n let t = (time - before) / (frames[i + 6] - before);\n mix += (frames[i + 6 + 1] - mix) * t;\n softness += (frames[i + 6 + 2] - softness) * t;\n break;\n case 1:\n mix = frames[i + 1];\n softness = frames[i + 2];\n break;\n default:\n mix = this.getBezierValue(time, i, 1, curveType - 2);\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n if (blend == 0 /* setup */) {\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\n if (direction == 1 /* mixOut */) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n } else {\n constraint.mix += (mix - constraint.mix) * alpha;\n constraint.softness += (softness - constraint.softness) * alpha;\n if (direction == 0 /* mixIn */) {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n }\n }\n };\n var TransformConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, transformConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.transformConstraint + \"|\" + transformConstraintIndex\n ]);\n this.transformConstraintIndex = 0;\n this.transformConstraintIndex = transformConstraintIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\n let frames = this.frames;\n frame *= 7;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n frames[frame + 4] = mixScaleX;\n frames[frame + 5] = mixScaleY;\n frames[frame + 6] = mixShearY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\n }\n return;\n }\n let rotate, x, y, scaleX, scaleY, shearY;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n rotate += (frames[i + 7 + 1] - rotate) * t;\n x += (frames[i + 7 + 2] - x) * t;\n y += (frames[i + 7 + 3] - y) * t;\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\n shearY += (frames[i + 7 + 6] - shearY) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\n }\n }\n };\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.position = constraint.data.position;\n return;\n case 1 /* first */:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n let position = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n };\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.spacing = constraint.data.spacing;\n return;\n case 1 /* first */:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n let spacing = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n };\n var PathConstraintMixTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\n ]);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, mixRotate, mixX, mixY) {\n let frames = this.frames;\n frame <<= 2;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = constraint.data.mixRotate;\n constraint.mixX = constraint.data.mixX;\n constraint.mixY = constraint.data.mixY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\n }\n return;\n }\n let rotate, x, y;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n rotate += (frames[i + 4 + 1] - rotate) * t;\n x += (frames[i + 4 + 2] - x) * t;\n y += (frames[i + 4 + 3] - y) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n }\n }\n };\n var _SequenceTimeline = class extends Timeline {\n constructor(frameCount, slotIndex, attachment) {\n super(frameCount, [\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\n ]);\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n }\n getFrameEntries() {\n return _SequenceTimeline.ENTRIES;\n }\n getSlotIndex() {\n return this.slotIndex;\n }\n getAttachment() {\n return this.attachment;\n }\n setFrame(frame, time, mode, index, delay) {\n let frames = this.frames;\n frame *= _SequenceTimeline.ENTRIES;\n frames[frame] = time;\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\n frames[frame + _SequenceTimeline.DELAY] = delay;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.attachment;\n let attachment = this.attachment;\n if (slotAttachment != attachment) {\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\n return;\n }\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n slot.sequenceIndex = -1;\n return;\n }\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\n let before = frames[i];\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\n let delay = frames[i + _SequenceTimeline.DELAY];\n if (!this.attachment.sequence)\n return;\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\n let mode = SequenceModeValues[modeAndIndex & 15];\n if (mode != 0 /* hold */) {\n index += (time - before) / delay + 1e-5 | 0;\n switch (mode) {\n case 1 /* once */:\n index = Math.min(count - 1, index);\n break;\n case 2 /* loop */:\n index %= count;\n break;\n case 3 /* pingpong */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : index % n;\n if (index >= count)\n index = n - index;\n break;\n }\n case 4 /* onceReverse */:\n index = Math.max(count - 1 - index, 0);\n break;\n case 5 /* loopReverse */:\n index = count - 1 - index % count;\n break;\n case 6 /* pingpongReverse */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : (index + count - 1) % n;\n if (index >= count)\n index = n - index;\n }\n }\n }\n slot.sequenceIndex = index;\n }\n };\n var SequenceTimeline = _SequenceTimeline;\n SequenceTimeline.ENTRIES = 3;\n SequenceTimeline.MODE = 1;\n SequenceTimeline.DELAY = 2;\n\n // spine-core/src/AnimationState.ts\n var _AnimationState = class {\n constructor(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 StringSet();\n this.animationsChanged = false;\n this.trackEntryPool = new Pool(() => new TrackEntry());\n this.data = data;\n }\n static emptyAnimation() {\n return _AnimationState._emptyAnimation;\n }\n update(delta) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (!current)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n let 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 let next = current.next;\n if (next) {\n let 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) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\n tracks[i] = null;\n this.queue.end(current);\n this.clearNext(current);\n continue;\n }\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from)\n from.mixingTo = null;\n while (from) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n }\n updateMixingFrom(to, delta) {\n let from = to.mixingFrom;\n if (!from)\n return true;\n let 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)\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 apply(skeleton) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\n let current = tracks[i2];\n if (!current || current.delay > 0)\n continue;\n applied = true;\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\n let mix = current.alpha;\n if (current.mixingFrom)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && !current.next)\n mix = 0;\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\n let applyEvents = events;\n if (current.reverse) {\n applyTime = current.animation.duration - applyTime;\n applyEvents = null;\n }\n let timelines = current.animation.timelines;\n let timelineCount = timelines.length;\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\n for (let ii = 0; ii < timelineCount; ii++) {\n Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\n }\n } else {\n let timelineMode = current.timelineMode;\n let shortestRotation = current.shortestRotation;\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n current.timelinesRotation.length = timelineCount << 1;\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline2 = timelines[ii];\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\n } else if (timeline2 instanceof AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\n } else {\n Utils.webkit602BugfixHelper(mix, blend);\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* 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 + 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.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n }\n applyMixingFrom(to, skeleton, blend) {\n let from = to.mixingFrom;\n if (from.mixingFrom)\n this.applyMixingFrom(from, skeleton, blend);\n let mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == 1 /* first */)\n blend = 0 /* setup */;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != 1 /* first */)\n blend = from.mixBlend;\n }\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let timelines = from.animation.timelines;\n let timelineCount = timelines.length;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\n let events = null;\n if (from.reverse)\n applyTime = from.animation.duration - applyTime;\n else if (mix < from.eventThreshold)\n events = this.events;\n if (blend == 3 /* add */) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n let shortestRotation = from.shortestRotation;\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n from.timelinesRotation.length = timelineCount << 1;\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = 1 /* mixOut */;\n let timelineBlend;\n let alpha = 0;\n switch (timelineMode[i]) {\n case SUBSEQUENT:\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaMix;\n break;\n case HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case HOLD_FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = 0 /* setup */;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (!shortestRotation && timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\n else {\n Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\n direction = 0 /* mixIn */;\n timeline.apply(skeleton, animationLast, applyTime, 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 applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n if (time < timeline.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n } else\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + SETUP;\n }\n setAttachment(skeleton, slot, attachmentName, attachments) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n if (attachments)\n slot.attachmentState = this.unkeyedState + CURRENT;\n }\n applyRotateTimeline(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, 0 /* mixIn */);\n return;\n }\n let bone = skeleton.bones[timeline.boneIndex];\n if (!bone.active)\n return;\n let frames = timeline.frames;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case 1 /* first */:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\n r2 = bone.data.rotation + timeline.getCurveValue(time);\n }\n let total = 0, diff = r2 - r1;\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n let current = diff > 0, dir = lastTotal >= 0;\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n bone.rotation = r1 + total * alpha;\n }\n queueEvents(entry, animationTime) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped)\n break;\n if (event.time > animationEnd)\n continue;\n this.queue.event(entry, event);\n }\n let 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 let event = events[i];\n if (event.time < animationStart)\n continue;\n this.queue.event(entry, event);\n }\n }\n clearTracks() {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let 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 clearTrack(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n let current = this.tracks[trackIndex];\n if (!current)\n return;\n this.queue.end(current);\n this.clearNext(current);\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (!from)\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 setCurrent(index, current, interrupt) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n current.previous = null;\n if (from) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom && 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 setAnimation(trackIndex, animationName, loop = false) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n setAnimationWith(trackIndex, animation, loop = false) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.clearNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.clearNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let last = this.expandToIndex(trackIndex);\n if (last) {\n while (last.next)\n last = last.next;\n }\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n if (!last) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n entry.previous = last;\n if (delay <= 0)\n delay += last.getTrackComplete() - entry.mixDuration;\n }\n entry.delay = delay;\n return entry;\n }\n setEmptyAnimation(trackIndex, mixDuration = 0) {\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\n if (delay <= 0)\n entry.delay += entry.mixDuration - mixDuration;\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n setEmptyAnimations(mixDuration = 0) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n expandToIndex(index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n trackEntry(trackIndex, animation, loop, last) {\n let entry = this.trackEntryPool.obtain();\n entry.reset();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.reverse = false;\n entry.shortestRotation = 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.mixTime = 0;\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\n entry.interruptAlpha = 1;\n entry.totalAlpha = 0;\n entry.mixBlend = 2 /* replace */;\n return entry;\n }\n clearNext(entry) {\n let next = entry.next;\n while (next) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n _animationsChanged() {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let entry = tracks[i];\n if (!entry)\n continue;\n while (entry.mixingFrom)\n entry = entry.mixingFrom;\n do {\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry);\n }\n }\n computeHold(entry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n timelineMode.length = timelinesCount;\n let timelineHoldMix = entry.timelineHoldMix;\n timelineHoldMix.length = 0;\n let propertyIDs = this.propertyIDs;\n if (to && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++)\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\n return;\n }\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let ids = timeline.getPropertyIds();\n if (!propertyIDs.addAll(ids))\n timelineMode[i] = SUBSEQUENT;\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\n timelineMode[i] = FIRST;\n } else {\n for (let next = to.mixingTo; next; next = next.mixingTo) {\n if (next.animation.hasTimeline(ids))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = HOLD_MIX;\n timelineHoldMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = HOLD_FIRST;\n }\n }\n }\n getCurrent(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n }\n addListener(listener) {\n if (!listener)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n }\n clearListeners() {\n this.listeners.length = 0;\n }\n clearListenerNotifications() {\n this.queue.clear();\n }\n };\n var AnimationState = _AnimationState;\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\n var TrackEntry = class {\n constructor() {\n this.animation = null;\n this.previous = null;\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.listener = null;\n this.trackIndex = 0;\n this.loop = false;\n this.holdPrevious = false;\n this.reverse = false;\n this.shortestRotation = false;\n this.eventThreshold = 0;\n this.attachmentThreshold = 0;\n this.drawOrderThreshold = 0;\n this.animationStart = 0;\n this.animationEnd = 0;\n this.animationLast = 0;\n this.nextAnimationLast = 0;\n this.delay = 0;\n this.trackTime = 0;\n this.trackLast = 0;\n this.nextTrackLast = 0;\n this.trackEnd = 0;\n this.timeScale = 0;\n this.alpha = 0;\n this.mixTime = 0;\n this.mixDuration = 0;\n this.interruptAlpha = 0;\n this.totalAlpha = 0;\n this.mixBlend = 2 /* replace */;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n reset() {\n this.next = null;\n this.previous = 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 getAnimationTime() {\n if (this.loop) {\n let 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 setAnimationLast(animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n isComplete() {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n resetRotationDirections() {\n this.timelinesRotation.length = 0;\n }\n getTrackComplete() {\n let duration = this.animationEnd - this.animationStart;\n if (duration != 0) {\n if (this.loop)\n return duration * (1 + (this.trackTime / duration | 0));\n if (this.trackTime < duration)\n return duration;\n }\n return this.trackTime;\n }\n };\n var EventQueue = class {\n constructor(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n start(entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n interrupt(entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n end(entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n dispose(entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n complete(entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n event(entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n drain() {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n let objects = this.objects;\n let listeners = this.animState.listeners;\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i];\n let entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener && entry.listener.start)\n entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.start)\n listener.start(entry);\n }\n break;\n case EventType.interrupt:\n if (entry.listener && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.interrupt)\n listener.interrupt(entry);\n }\n break;\n case EventType.end:\n if (entry.listener && entry.listener.end)\n entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.end)\n listener.end(entry);\n }\n case EventType.dispose:\n if (entry.listener && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.dispose)\n listener.dispose(entry);\n }\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener && entry.listener.complete)\n entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.complete)\n listener.complete(entry);\n }\n break;\n case EventType.event:\n let event = objects[i++ + 2];\n if (entry.listener && entry.listener.event)\n entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.event)\n listener.event(entry, event);\n }\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n }\n clear() {\n this.objects.length = 0;\n }\n };\n var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"start\"] = 0] = \"start\";\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\n EventType2[EventType2[\"end\"] = 2] = \"end\";\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\n EventType2[EventType2[\"event\"] = 5] = \"event\";\n return EventType2;\n })(EventType || {});\n var AnimationStateAdapter = class {\n start(entry) {\n }\n interrupt(entry) {\n }\n end(entry) {\n }\n dispose(entry) {\n }\n complete(entry) {\n }\n event(entry, event) {\n }\n };\n var SUBSEQUENT = 0;\n var FIRST = 1;\n var HOLD_SUBSEQUENT = 2;\n var HOLD_FIRST = 3;\n var HOLD_MIX = 4;\n var SETUP = 1;\n var CURRENT = 2;\n\n // spine-core/src/AnimationStateData.ts\n var AnimationStateData = class {\n constructor(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (!skeletonData)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n setMix(fromName, toName, duration) {\n let from = this.skeletonData.findAnimation(fromName);\n if (!from)\n throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (!to)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n setMixWith(from, to, duration) {\n if (!from)\n throw new Error(\"from cannot be null.\");\n if (!to)\n throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n getMix(from, to) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === void 0 ? this.defaultMix : value;\n }\n };\n\n // spine-core/src/attachments/BoundingBoxAttachment.ts\n var BoundingBoxAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/attachments/ClippingAttachment.ts\n var ClippingAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.endSlot = null;\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\n }\n copy() {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/Texture.ts\n var Texture = class {\n constructor(image) {\n this._image = image;\n }\n getImage() {\n return this._image;\n }\n };\n var TextureFilter = /* @__PURE__ */ ((TextureFilter3) => {\n TextureFilter3[TextureFilter3[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter3[TextureFilter3[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter3[TextureFilter3[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter3[TextureFilter3[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter3[TextureFilter3[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter3[TextureFilter3[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter3[TextureFilter3[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n return TextureFilter3;\n })(TextureFilter || {});\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\n return TextureWrap3;\n })(TextureWrap || {});\n var TextureRegion = class {\n constructor() {\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.degrees = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n };\n var FakeTexture = class extends Texture {\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-core/src/TextureAtlas.ts\n var TextureAtlas = class {\n constructor(atlasText) {\n this.pages = new Array();\n this.regions = new Array();\n let reader = new TextureAtlasReader(atlasText);\n let entry = new Array(4);\n let pageFields = {};\n pageFields[\"size\"] = (page2) => {\n page2.width = parseInt(entry[1]);\n page2.height = parseInt(entry[2]);\n };\n pageFields[\"format\"] = () => {\n };\n pageFields[\"filter\"] = (page2) => {\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\n };\n pageFields[\"repeat\"] = (page2) => {\n if (entry[1].indexOf(\"x\") != -1)\n page2.uWrap = 10497 /* Repeat */;\n if (entry[1].indexOf(\"y\") != -1)\n page2.vWrap = 10497 /* Repeat */;\n };\n pageFields[\"pma\"] = (page2) => {\n page2.pma = entry[1] == \"true\";\n };\n var regionFields = {};\n regionFields[\"xy\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n };\n regionFields[\"size\"] = (region) => {\n region.width = parseInt(entry[1]);\n region.height = parseInt(entry[2]);\n };\n regionFields[\"bounds\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n region.width = parseInt(entry[3]);\n region.height = parseInt(entry[4]);\n };\n regionFields[\"offset\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n };\n regionFields[\"orig\"] = (region) => {\n region.originalWidth = parseInt(entry[1]);\n region.originalHeight = parseInt(entry[2]);\n };\n regionFields[\"offsets\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n region.originalWidth = parseInt(entry[3]);\n region.originalHeight = parseInt(entry[4]);\n };\n regionFields[\"rotate\"] = (region) => {\n let value = entry[1];\n if (value == \"true\")\n region.degrees = 90;\n else if (value != \"false\")\n region.degrees = parseInt(value);\n };\n regionFields[\"index\"] = (region) => {\n region.index = parseInt(entry[1]);\n };\n let line = reader.readLine();\n while (line && line.trim().length == 0)\n line = reader.readLine();\n while (true) {\n if (!line || line.trim().length == 0)\n break;\n if (reader.readEntry(entry, line) == 0)\n break;\n line = reader.readLine();\n }\n let page = null;\n let names = null;\n let values = null;\n while (true) {\n if (line === null)\n break;\n if (line.trim().length == 0) {\n page = null;\n line = reader.readLine();\n } else if (!page) {\n page = new TextureAtlasPage(line.trim());\n while (true) {\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\n break;\n let field = pageFields[entry[0]];\n if (field)\n field(page);\n }\n this.pages.push(page);\n } else {\n let region = new TextureAtlasRegion(page, line);\n while (true) {\n let count = reader.readEntry(entry, line = reader.readLine());\n if (count == 0)\n break;\n let field = regionFields[entry[0]];\n if (field)\n field(region);\n else {\n if (!names)\n names = [];\n if (!values)\n values = [];\n names.push(entry[0]);\n let entryValues = [];\n for (let i = 0; i < count; i++)\n entryValues.push(parseInt(entry[i + 1]));\n values.push(entryValues);\n }\n }\n if (region.originalWidth == 0 && region.originalHeight == 0) {\n region.originalWidth = region.width;\n region.originalHeight = region.height;\n }\n if (names && names.length > 0 && values && values.length > 0) {\n region.names = names;\n region.values = values;\n names = null;\n values = null;\n }\n region.u = region.x / page.width;\n region.v = region.y / page.height;\n if (region.degrees == 90) {\n region.u2 = (region.x + region.height) / page.width;\n region.v2 = (region.y + region.width) / page.height;\n } else {\n region.u2 = (region.x + region.width) / page.width;\n region.v2 = (region.y + region.height) / page.height;\n }\n this.regions.push(region);\n }\n }\n }\n findRegion(name) {\n for (let 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 setTextures(assetManager, pathPrefix = \"\") {\n for (let page of this.pages)\n page.setTexture(assetManager.get(pathPrefix + page.name));\n }\n dispose() {\n var _a;\n for (let i = 0; i < this.pages.length; i++) {\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\n }\n }\n };\n var TextureAtlasReader = class {\n constructor(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n readLine() {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n readEntry(entry, line) {\n if (!line)\n return 0;\n line = line.trim();\n if (line.length == 0)\n return 0;\n let colon = line.indexOf(\":\");\n if (colon == -1)\n return 0;\n entry[0] = line.substr(0, colon).trim();\n for (let i = 1, lastMatch = colon + 1; ; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) {\n entry[i] = line.substr(lastMatch).trim();\n return i;\n }\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n if (i == 4)\n return 4;\n }\n }\n };\n var TextureAtlasPage = class {\n constructor(name) {\n this.minFilter = 9728 /* Nearest */;\n this.magFilter = 9728 /* Nearest */;\n this.uWrap = 33071 /* ClampToEdge */;\n this.vWrap = 33071 /* ClampToEdge */;\n this.texture = null;\n this.width = 0;\n this.height = 0;\n this.pma = false;\n this.name = name;\n }\n setTexture(texture) {\n this.texture = texture;\n texture.setFilters(this.minFilter, this.magFilter);\n texture.setWraps(this.uWrap, this.vWrap);\n }\n };\n var TextureAtlasRegion = class extends TextureRegion {\n constructor(page, name) {\n super();\n this.x = 0;\n this.y = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n this.index = 0;\n this.degrees = 0;\n this.names = null;\n this.values = null;\n this.page = page;\n this.name = name;\n }\n };\n\n // spine-core/src/attachments/MeshAttachment.ts\n var MeshAttachment = class extends VertexAttachment {\n constructor(name, path) {\n super(name);\n this.region = null;\n this.regionUVs = [];\n this.uvs = [];\n this.triangles = [];\n this.color = new Color(1, 1, 1, 1);\n this.width = 0;\n this.height = 0;\n this.hullLength = 0;\n this.edges = [];\n this.parentMesh = null;\n this.sequence = null;\n this.tempColor = new Color(0, 0, 0, 0);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let regionUVs = this.regionUVs;\n if (!this.uvs || this.uvs.length != regionUVs.length)\n this.uvs = Utils.newFloatArray(regionUVs.length);\n let uvs = this.uvs;\n let n = this.uvs.length;\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof TextureAtlasRegion) {\n let region = this.region, image = region.page.texture.getImage();\n let textureWidth = image.width, textureHeight = image.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 (let 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 (let 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 (let 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 } else if (!this.region) {\n u = v = 0;\n width = height = 1;\n } else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (let 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 getParentMesh() {\n return this.parentMesh;\n }\n setParentMesh(parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh) {\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 copy() {\n if (this.parentMesh)\n return this.newLinkedMesh();\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n if (this.edges) {\n copy.edges = new Array(this.edges.length);\n 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 computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n super.computeWorldVertices(slot, start, count, worldVertices2, offset, stride);\n }\n newLinkedMesh() {\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n copy.timelineAttachment = this.timelineAttachment;\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\n if (copy.region != null)\n copy.updateRegion();\n return copy;\n }\n };\n\n // spine-core/src/attachments/PathAttachment.ts\n var PathAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.lengths = [];\n this.closed = false;\n this.constantSpeed = false;\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n 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 };\n\n // spine-core/src/attachments/PointAttachment.ts\n var PointAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.color = new Color(0.38, 0.94, 0, 1);\n }\n computeWorldPosition(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 computeWorldRotation(bone) {\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * bone.a + sin * bone.b;\n let y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n copy() {\n let copy = new PointAttachment(this.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 };\n\n // spine-core/src/attachments/RegionAttachment.ts\n var _RegionAttachment = class extends Attachment {\n constructor(name, path) {\n super(name);\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 Color(1, 1, 1, 1);\n this.rendererObject = null;\n this.region = null;\n this.sequence = null;\n this.offset = Utils.newFloatArray(8);\n this.uvs = Utils.newFloatArray(8);\n this.tempColor = new Color(1, 1, 1, 1);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let region = this.region;\n let uvs = this.uvs;\n if (region == null) {\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n uvs[4] = 1;\n uvs[5] = 1;\n uvs[6] = 1;\n uvs[7] = 0;\n return;\n }\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let x = this.x, y = this.y;\n let localXCos = localX * cos + x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[0] = localXCos - localYSin;\n offset[1] = localYCos + localXSin;\n offset[2] = localXCos - localY2Sin;\n offset[3] = localY2Cos + localXSin;\n offset[4] = localX2Cos - localY2Sin;\n offset[5] = localY2Cos + localX2Sin;\n offset[6] = localX2Cos - localYSin;\n offset[7] = localYCos + localX2Sin;\n if (region.degrees == 90) {\n uvs[0] = region.u2;\n uvs[1] = region.v2;\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 } 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 computeWorldVertices(slot, worldVertices2, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n let bone = slot.bone;\n let vertexOffset = this.offset;\n let x = bone.worldX, y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[0];\n offsetY = vertexOffset[1];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[2];\n offsetY = vertexOffset[3];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[4];\n offsetY = vertexOffset[5];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[6];\n offsetY = vertexOffset[7];\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\n }\n copy() {\n let copy = new _RegionAttachment(this.name, this.path);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\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 Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n return copy;\n }\n };\n var RegionAttachment = _RegionAttachment;\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\n // spine-core/src/AtlasAttachmentLoader.ts\n var AtlasAttachmentLoader = class {\n constructor(atlas) {\n this.atlas = atlas;\n }\n loadSequence(name, basePath, sequence) {\n let regions = sequence.regions;\n for (let i = 0, n = regions.length; i < n; i++) {\n let path = sequence.getPath(basePath, i);\n let region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\n regions[i] = region;\n regions[i].renderObject = regions[i];\n }\n }\n newRegionAttachment(skin, name, path, sequence) {\n let attachment = new RegionAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newMeshAttachment(skin, name, path, sequence) {\n let attachment = new MeshAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newBoundingBoxAttachment(skin, name) {\n return new BoundingBoxAttachment(name);\n }\n newPathAttachment(skin, name) {\n return new PathAttachment(name);\n }\n newPointAttachment(skin, name) {\n return new PointAttachment(name);\n }\n newClippingAttachment(skin, name) {\n return new ClippingAttachment(name);\n }\n };\n\n // spine-core/src/BoneData.ts\n var BoneData = class {\n constructor(index, name, parent) {\n this.index = 0;\n this.parent = null;\n this.length = 0;\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 Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n };\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n return TransformMode2;\n })(TransformMode || {});\n\n // spine-core/src/Bone.ts\n var Bone = class {\n constructor(data, skeleton, parent) {\n this.parent = null;\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.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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 isActive() {\n return this.active;\n }\n update() {\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\n }\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n updateWorldTransformWith(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 let parent = this.parent;\n if (!parent) {\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n let sx = skeleton.scaleX;\n let sy = skeleton.scaleY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n let 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 0 /* Normal */: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = 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 1 /* OnlyTranslation */: {\n let rotationY = rotation + 90 + shearY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case 2 /* NoRotationOrReflection */: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 1e-4) {\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) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = 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 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 1e-5)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = 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 setToSetupPose() {\n let 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 getWorldRotationX() {\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\n }\n getWorldRotationY() {\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\n }\n getWorldScaleX() {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n }\n getWorldScaleY() {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n }\n updateAppliedTransform() {\n let parent = this.parent;\n if (!parent) {\n this.ax = this.worldX - this.skeleton.x;\n this.ay = this.worldY - this.skeleton.y;\n this.arotation = Math.atan2(this.c, this.a) * 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) * MathUtils.radDeg;\n return;\n }\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n let pid = 1 / (pa * pd - pb * pc);\n let 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 let ia = pid * pd;\n let id = pid * pa;\n let ib = pid * pb;\n let ic = pid * pc;\n let ra = ia * this.a - ib * this.c;\n let rb = ia * this.b - ib * this.d;\n let rc = id * this.c - ic * this.a;\n let rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 1e-4) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\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) * MathUtils.radDeg;\n }\n }\n worldToLocal(world) {\n let invDet = 1 / (this.a * this.d - this.b * this.c);\n let x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = x * this.d * invDet - y * this.b * invDet;\n world.y = y * this.a * invDet - x * this.c * invDet;\n return world;\n }\n localToWorld(local) {\n let 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 worldToLocalRotation(worldRotation) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\n }\n localToWorldRotation(localRotation) {\n localRotation -= this.rotation - this.shearX;\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\n }\n rotateWorld(degrees) {\n let a = this.a, b = this.b, c = this.c, d = this.d;\n let cos = MathUtils.cosDeg(degrees), sin = 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 }\n };\n\n // spine-core/src/ConstraintData.ts\n var ConstraintData = class {\n constructor(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n };\n\n // spine-core/src/AssetManagerBase.ts\n var AssetManagerBase = class {\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\n this.pathPrefix = \"\";\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n this.downloader = downloader;\n }\n start(path) {\n this.toLoad++;\n return this.pathPrefix + path;\n }\n success(callback, path, asset) {\n this.toLoad--;\n this.loaded++;\n this.assets[path] = asset;\n if (callback)\n callback(path, asset);\n }\n error(callback, path, message) {\n this.toLoad--;\n this.loaded++;\n this.errors[path] = message;\n if (callback)\n callback(path, message);\n }\n loadAll() {\n let promise = new Promise((resolve, reject) => {\n let check = () => {\n if (this.isLoadingComplete()) {\n if (this.hasErrors())\n reject(this.errors);\n else\n resolve(this);\n return;\n }\n requestAnimationFrame(check);\n };\n requestAnimationFrame(check);\n });\n return promise;\n }\n setRawDataURI(path, data) {\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\n }\n loadBinary(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadBinary(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\n });\n }\n loadText(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadText(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\n });\n }\n loadJson(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadJson(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\n });\n }\n loadTexture(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\n let isWebWorker = !isBrowser;\n if (isWebWorker) {\n fetch(path, { mode: \"cors\" }).then((response) => {\n if (response.ok)\n return response.blob();\n this.error(error, path, `Couldn't load image: ${path}`);\n return null;\n }).then((blob) => {\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\n }).then((bitmap) => {\n if (bitmap)\n this.success(success, path, this.textureLoader(bitmap));\n });\n } else {\n let image = new Image();\n image.crossOrigin = \"anonymous\";\n image.onload = () => {\n this.success(success, path, this.textureLoader(image));\n };\n image.onerror = () => {\n this.error(error, path, `Couldn't load image: ${path}`);\n };\n if (this.downloader.rawDataUris[path])\n path = this.downloader.rawDataUris[path];\n image.src = path;\n }\n }\n loadTextureAtlas(path, success = () => {\n }, error = () => {\n }, fileAlias) {\n let index = path.lastIndexOf(\"/\");\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\n path = this.start(path);\n this.downloader.downloadText(path, (atlasText) => {\n try {\n let atlas = new TextureAtlas(atlasText);\n let toLoad = atlas.pages.length, abort = false;\n for (let page of atlas.pages) {\n this.loadTexture(\n !fileAlias ? parent + page.name : fileAlias[page.name],\n (imagePath, texture) => {\n if (!abort) {\n page.setTexture(texture);\n if (--toLoad == 0)\n this.success(success, path, atlas);\n }\n },\n (imagePath, message) => {\n if (!abort)\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\n abort = true;\n }\n );\n }\n } catch (e) {\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\n }\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\n });\n }\n get(path) {\n return this.assets[this.pathPrefix + path];\n }\n require(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset)\n return asset;\n let error = this.errors[path];\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\n }\n remove(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n delete this.assets[path];\n return asset;\n }\n removeAll() {\n for (let key in this.assets) {\n let asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n }\n isLoadingComplete() {\n return this.toLoad == 0;\n }\n getToLoad() {\n return this.toLoad;\n }\n getLoaded() {\n return this.loaded;\n }\n dispose() {\n this.removeAll();\n }\n hasErrors() {\n return Object.keys(this.errors).length > 0;\n }\n getErrors() {\n return this.errors;\n }\n };\n var Downloader = class {\n constructor() {\n this.callbacks = {};\n this.rawDataUris = {};\n }\n dataUriToString(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx != -1) {\n base64Idx += \"base64,\".length;\n return atob(dataUri.substr(base64Idx));\n } else {\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\n }\n }\n base64ToUint8Array(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n }\n dataUriToUint8Array(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx == -1)\n throw new Error(\"Not a binary data URI.\");\n base64Idx += \"base64,\".length;\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\n }\n downloadText(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToString(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.open(\"GET\", url, true);\n let done = () => {\n this.finish(url, request.status, request.responseText);\n };\n request.onload = done;\n request.onerror = done;\n request.send();\n }\n downloadJson(url, success, error) {\n this.downloadText(url, (data) => {\n success(JSON.parse(data));\n }, error);\n }\n downloadBinary(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n let onerror = () => {\n this.finish(url, request.status, request.response);\n };\n request.onload = () => {\n if (request.status == 200 || request.status == 0)\n this.finish(url, 200, new Uint8Array(request.response));\n else\n onerror();\n };\n request.onerror = onerror;\n request.send();\n }\n start(url, success, error) {\n let callbacks = this.callbacks[url];\n try {\n if (callbacks)\n return true;\n this.callbacks[url] = callbacks = [];\n } finally {\n callbacks.push(success, error);\n }\n }\n finish(url, status, data) {\n let callbacks = this.callbacks[url];\n delete this.callbacks[url];\n let args = status == 200 || status == 0 ? [data] : [status, data];\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\n callbacks[i].apply(null, args);\n }\n };\n\n // spine-core/src/Event.ts\n var Event = class {\n constructor(time, data) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.time = 0;\n this.volume = 0;\n this.balance = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n };\n\n // spine-core/src/EventData.ts\n var EventData = class {\n constructor(name) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.audioPath = null;\n this.volume = 0;\n this.balance = 0;\n this.name = name;\n }\n };\n\n // spine-core/src/IkConstraint.ts\n var IkConstraint = class {\n constructor(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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find bone ${data.target.name}`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mix == 0)\n return;\n let target = this.target;\n let 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.data.uniform, this.softness, this.mix);\n break;\n }\n }\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\n let p = bone.parent;\n if (!p)\n throw new Error(\"IK bone must have parent.\");\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case 1 /* OnlyTranslation */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case 2 /* NoRotationOrReflection */:\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n let sa = pa / bone.skeleton.scaleX;\n let 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) * MathUtils.radDeg;\n default:\n let x = targetX - p.worldX, y = targetY - p.worldY;\n let 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) * 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 let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(\n bone.ax,\n bone.ay,\n bone.arotation + rotationIK * alpha,\n sx,\n sy,\n bone.ashearX,\n bone.ashearY\n );\n }\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\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 } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n let u = Math.abs(psx - psy) <= 1e-4;\n if (!u || stretch) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n let pp = parent.parent;\n if (!pp)\n throw new Error(\"IK parent must itself have a parent.\");\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 1e-4) {\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 let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) * 0.5;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let 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:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1) {\n cos = -1;\n a2 = Math.PI * bendDir;\n } else if (cos > 1) {\n cos = 1;\n a2 = 0;\n if (stretch) {\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n sx *= a;\n if (uniform)\n sy *= a;\n }\n } else\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 } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) * 0.5;\n let r0 = q / c2, r1 = c / q;\n let 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 let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let 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) * 0.5) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * 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, sy, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * 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 };\n\n // spine-core/src/IkConstraintData.ts\n var IkConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/PathConstraintData.ts\n var PathConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.positionMode = PositionMode.Fixed;\n this.spacingMode = SpacingMode.Fixed;\n this.rotateMode = RotateMode.Chain;\n this.offsetRotation = 0;\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n }\n set target(slotData) {\n this._target = slotData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"SlotData not set.\");\n else\n return this._target;\n }\n };\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\n return PositionMode2;\n })(PositionMode || {});\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\n return SpacingMode2;\n })(SpacingMode || {});\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\n return RotateMode2;\n })(RotateMode || {});\n\n // spine-core/src/PathConstraint.ts\n var _PathConstraint = class {\n constructor(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findSlot(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}`);\n this.target = target;\n this.position = data.position;\n this.spacing = data.spacing;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n }\n isActive() {\n return this.active;\n }\n update() {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment))\n return;\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\n return;\n let data = this.data;\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\n let bones = this.bones;\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\n let spacing = this.spacing;\n switch (data.spacingMode) {\n case 2 /* Percent */:\n if (scale) {\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon)\n lengths[i] = 0;\n else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n lengths[i] = Math.sqrt(x * x + y * y);\n }\n }\n }\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\n break;\n case 3 /* Proportional */:\n let sum = 0;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = length;\n sum += length;\n }\n }\n if (sum > 0) {\n sum = spacesCount / sum * spacing;\n for (let i = 1; i < spacesCount; i++)\n spaces[i] *= sum;\n }\n break;\n default:\n let lengthSpacing = data.spacingMode == 0 /* Length */;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n }\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = data.rotateMode == 1 /* Chain */;\n else {\n tip = false;\n let p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * mixX;\n bone.worldY += (boneY - bone.worldY) * mixY;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (mixRotate > 0) {\n let 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 let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\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.updateAppliedTransform();\n }\n }\n computeWorldPositions(path, spacesCount, tangents) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\n let closed2 = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed2 ? 1 : 2;\n let pathLength2 = lengths[curveCount];\n if (this.data.positionMode == 1 /* Percent */)\n position *= pathLength2;\n let multiplier2;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier2 = pathLength2;\n break;\n case 3 /* Proportional */:\n multiplier2 = pathLength2 / spacesCount;\n break;\n default:\n multiplier2 = 1;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier2;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength2;\n if (p < 0)\n p += pathLength2;\n curve = 0;\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 } else if (p > pathLength2) {\n if (prevCurve != _PathConstraint.AFTER) {\n prevCurve = _PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = lengths[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed2 && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(\n p,\n world[0],\n world[1],\n world[2],\n world[3],\n world[4],\n world[5],\n world[6],\n world[7],\n out,\n o,\n tangents || i > 0 && space == 0\n );\n }\n return out;\n }\n if (closed2) {\n verticesLength += 2;\n world = 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 } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let 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 (this.data.positionMode == 1 /* Percent */)\n position *= pathLength;\n let multiplier;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier = pathLength;\n break;\n case 3 /* Proportional */:\n multiplier = pathLength / spacesCount;\n break;\n default:\n multiplier = 1;\n }\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = curves[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n let 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) * 6e-3;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\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 let length = segments[segment];\n if (p > length)\n continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - 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 addBeforePosition(p, temp, i, out, o) {\n let 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 addAfterPosition(p, temp, i, out, o) {\n let 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 addCurvePosition(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 let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let 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 < 1e-3)\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 };\n var PathConstraint = _PathConstraint;\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 1e-5;\n\n // spine-core/src/Slot.ts\n var Slot = class {\n constructor(data, bone) {\n this.darkColor = null;\n this.attachment = null;\n this.attachmentState = 0;\n this.sequenceIndex = -1;\n this.deform = new Array();\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!bone)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = !data.darkColor ? null : new Color();\n this.setToSetupPose();\n }\n getSkeleton() {\n return this.bone.skeleton;\n }\n getAttachment() {\n return this.attachment;\n }\n setAttachment(attachment) {\n if (this.attachment == attachment)\n return;\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\n this.deform.length = 0;\n }\n this.attachment = attachment;\n this.sequenceIndex = -1;\n }\n setToSetupPose() {\n this.color.setFromColor(this.data.color);\n if (this.darkColor)\n this.darkColor.setFromColor(this.data.darkColor);\n if (!this.data.attachmentName)\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 };\n\n // spine-core/src/TransformConstraint.ts\n var TransformConstraint = class {\n constructor(data, skeleton) {\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 0;\n this.temp = new Vector2();\n this.active = false;\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n this.mixScaleX = data.mixScaleX;\n this.mixScaleY = data.mixScaleY;\n this.mixShearY = data.mixShearY;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\n return;\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n applyAbsoluteWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * mixX;\n bone.worldY += (temp.y - bone.worldY) * mixY;\n }\n if (mixScaleX != 0) {\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n if (s != 0)\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n if (s != 0)\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let b = bone.b, d = bone.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyRelativeWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * mixX;\n bone.worldY += temp.y * mixY;\n }\n if (mixScaleX != 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n let b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyAbsoluteLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation;\n if (mixRotate != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n rotation += r * mixRotate;\n }\n let x = bone.ax, y = bone.ay;\n x += (target.ax - x + this.data.offsetX) * mixX;\n y += (target.ay - y + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (mixScaleX != 0 && scaleX != 0)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\n if (mixScaleY != 0 && scaleY != 0)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\n let shearY = bone.ashearY;\n if (mixShearY != 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n shearY += r * mixShearY;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n applyRelativeLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n };\n\n // spine-core/src/Skeleton.ts\n var _Skeleton = class {\n constructor(data) {\n this._updateCache = new Array();\n this.skin = null;\n this.scaleX = 1;\n this._scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone;\n if (!boneData.parent)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n get scaleY() {\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\n }\n set scaleY(scaleY) {\n this._scaleY = scaleY;\n }\n updateCache() {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone);\n }\n }\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n sortIkConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let target = constraint.target;\n this.sortBone(target);\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length == 1) {\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n } else {\n let child = constrained[constrained.length - 1];\n this.sortBone(child);\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n child.sorted = true;\n }\n }\n sortPathConstraint(constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortTransformConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n this.sortBone(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n sortPathConstraintAttachmentWith(attachment, slotBone) {\n if (!(attachment instanceof PathAttachment))\n return;\n let pathBones = attachment.bones;\n if (!pathBones)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n for (let i = 0, n = pathBones.length; i < n; ) {\n let nn = pathBones[i++];\n nn += i;\n while (i < nn)\n this.sortBone(bones[pathBones[i++]]);\n }\n }\n }\n sortBone(bone) {\n if (!bone)\n return;\n if (bone.sorted)\n return;\n let parent = bone.parent;\n if (parent)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n sortReset(bones) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let 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 updateWorldTransform() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[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 }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n updateWorldTransformWith(parent) {\n let rootBone = this.getRootBone();\n if (!rootBone)\n throw new Error(\"Root bone must not be null.\");\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++) {\n let updatable = updateCache[i];\n if (updatable != rootBone)\n updatable.update();\n }\n }\n setToSetupPose() {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n setBonesToSetupPose() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let 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 let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n }\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n }\n }\n setSlotsToSetupPose() {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n getRootBone() {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n }\n setSkinByName(skinName) {\n let skin = this.data.findSkin(skinName);\n if (!skin)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n setSkin(newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin) {\n if (this.skin)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name) {\n let attachment = newSkin.getAttachment(i, name);\n if (attachment)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n getAttachmentByName(slotName, attachmentName) {\n let slot = this.data.findSlot(slotName);\n if (!slot)\n throw new Error(`Can't find slot with name ${slotName}`);\n return this.getAttachment(slot.index, attachmentName);\n }\n getAttachment(slotIndex, attachmentName) {\n if (!attachmentName)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin) {\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment)\n return attachment;\n }\n if (this.data.defaultSkin)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n setAttachment(slotName, attachmentName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment = null;\n if (attachmentName) {\n attachment = this.getAttachment(i, attachmentName);\n if (!attachment)\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 findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n getBoundsRect() {\n let offset = new Vector2();\n let size = new Vector2();\n this.getBounds(offset, size);\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\n }\n getBounds(offset, size, temp = new Array(2)) {\n if (!offset)\n throw new Error(\"offset cannot be null.\");\n if (!size)\n throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n let verticesLength = 0;\n let vertices = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let 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 };\n var Skeleton = _Skeleton;\n Skeleton.yDown = false;\n\n // spine-core/src/SkeletonData.ts\n var SkeletonData = class {\n constructor() {\n this.name = null;\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.defaultSkin = null;\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.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n this.version = null;\n this.hash = null;\n this.fps = 0;\n this.imagesPath = null;\n this.audioPath = null;\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n }\n findSkin(skinName) {\n if (!skinName)\n throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n }\n findEvent(eventDataName) {\n if (!eventDataName)\n throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName)\n return event;\n }\n return null;\n }\n findAnimation(animationName) {\n if (!animationName)\n throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n }\n findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n };\n\n // spine-core/src/Skin.ts\n var SkinEntry = class {\n constructor(slotIndex = 0, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n };\n var Skin = class {\n constructor(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n setAttachment(slotIndex, name, attachment) {\n if (!attachment)\n throw new Error(\"attachment cannot be null.\");\n let 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 addSkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n copySkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (!attachment.attachment)\n continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n getAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n removeAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary)\n delete dictionary[name];\n }\n getAttachments() {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n getAttachmentsForSlot(slotIndex, attachments) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n clear() {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n attachAll(skeleton, oldSkin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n };\n\n // spine-core/src/SlotData.ts\n var SlotData = class {\n constructor(index, name, boneData) {\n this.index = 0;\n this.color = new Color(1, 1, 1, 1);\n this.darkColor = null;\n this.attachmentName = null;\n this.blendMode = BlendMode.Normal;\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n if (!boneData)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n };\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\n return BlendMode3;\n })(BlendMode || {});\n\n // spine-core/src/TransformConstraintData.ts\n var TransformConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/SkeletonBinary.ts\n var SkeletonBinary = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(binary) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n skeletonData.name = \"\";\n let input = new BinaryInput(binary);\n let lowHash = input.readInt32();\n let highHash = input.readInt32();\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n let nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n let n = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let str = input.readString();\n if (!str)\n throw new Error(\"String in string table must not be null.\");\n input.strings.push(str);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Bone name must not be null.\");\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n let data = new BoneData(i, name, parent);\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 = input.readInt(true);\n data.skinRequired = input.readBoolean();\n if (nonessential)\n Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let slotName = input.readString();\n if (!slotName)\n throw new Error(\"Slot name must not be null.\");\n let boneData = skeletonData.bones[input.readInt(true)];\n let data = new SlotData(i, slotName, boneData);\n Color.rgba8888ToColor(data.color, input.readInt32());\n let darkColor = input.readInt32();\n if (darkColor != -1)\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = input.readInt(true);\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"IK constraint data name must not be null.\");\n let data = new IkConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Transform constraint data name must not be null.\");\n let data = new TransformConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n data.mixScaleX = input.readFloat();\n data.mixScaleY = input.readFloat();\n data.mixShearY = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Path constraint data name must not be null.\");\n let data = new PathConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 = input.readInt(true);\n data.spacingMode = input.readInt(true);\n data.rotateMode = input.readInt(true);\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n let i = skeletonData.skins.length;\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++) {\n let skin = this.readSkin(input, skeletonData, false, nonessential);\n if (!skin)\n throw new Error(\"readSkin() should not have returned null.\");\n skeletonData.skins[i] = skin;\n }\n }\n n = this.linkedMeshes.length;\n for (let i = 0; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(\"Not skin found for linked mesh.\");\n if (!linkedMesh.parent)\n throw new Error(\"Linked mesh parent must not be null\");\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let eventName = input.readStringRef();\n if (!eventName)\n throw new Error();\n let data = new EventData(eventName);\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) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let animationName = input.readString();\n if (!animationName)\n throw new Error(\"Animatio name must not be null.\");\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\n }\n return skeletonData;\n }\n readSkin(input, skeletonData, defaultSkin, nonessential) {\n let skin = null;\n let slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new Skin(\"default\");\n } else {\n let skinName = input.readStringRef();\n if (!skinName)\n throw new Error(\"Skin name must not be null.\");\n skin = new Skin(skinName);\n skin.bones.length = input.readInt(true);\n for (let i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (let 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 (let i = 0; i < slotCount; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let name = input.readStringRef();\n if (!name)\n throw new Error(\"Attachment name must not be null\");\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n if (attachment)\n skin.setAttachment(slotIndex, name, attachment);\n }\n }\n return skin;\n }\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n let scale = this.scale;\n let name = input.readStringRef();\n if (!name)\n name = attachmentName;\n switch (input.readByte()) {\n case AttachmentType.Region: {\n let path = input.readStringRef();\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let scaleX = input.readFloat();\n let scaleY = input.readFloat();\n let width = input.readFloat();\n let height = input.readFloat();\n let color = input.readInt32();\n let sequence = this.readSequence(input);\n if (!path)\n path = name;\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\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 Color.rgba8888ToColor(region.color, color);\n region.sequence = sequence;\n if (sequence == null)\n region.updateRegion();\n return region;\n }\n case AttachmentType.BoundingBox: {\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case AttachmentType.Mesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let vertexCount = input.readInt(true);\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\n let triangles = this.readShortArray(input);\n let vertices = this.readVertices(input, vertexCount);\n let hullLength = input.readInt(true);\n let sequence = this.readSequence(input);\n let edges = [];\n let width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n 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 if (sequence == null)\n mesh.updateRegion();\n mesh.hullLength = hullLength << 1;\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case AttachmentType.LinkedMesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let skinName = input.readStringRef();\n let parent = input.readStringRef();\n let inheritTimelines = input.readBoolean();\n let sequence = this.readSequence(input);\n let width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n Color.rgba8888ToColor(mesh.color, color);\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\n return mesh;\n }\n case AttachmentType.Path: {\n let closed2 = input.readBoolean();\n let constantSpeed = input.readBoolean();\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n let color = nonessential ? input.readInt32() : 0;\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = closed2;\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 Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case AttachmentType.Point: {\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let color = nonessential ? input.readInt32() : 0;\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case AttachmentType.Clipping: {\n let endSlotIndex = input.readInt(true);\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\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 Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n }\n readSequence(input) {\n if (!input.readBoolean())\n return null;\n let sequence = new Sequence(input.readInt(true));\n sequence.start = input.readInt(true);\n sequence.digits = input.readInt(true);\n sequence.setupIndex = input.readInt(true);\n return sequence;\n }\n readVertices(input, vertexCount) {\n let scale = this.scale;\n let verticesLength = vertexCount << 1;\n let vertices = new Vertices();\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n let weights = new Array();\n let bonesArray = new Array();\n for (let i = 0; i < vertexCount; i++) {\n let boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n }\n readFloatArray(input, n, scale) {\n let array = new Array(n);\n if (scale == 1) {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat();\n } else {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n }\n readShortArray(input) {\n let n = input.readInt(true);\n let array = new Array(n);\n for (let i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n }\n readAnimation(input, name, skeletonData) {\n input.readInt(true);\n let timelines = new Array();\n let scale = this.scale;\n let tempColor1 = new Color();\n let tempColor2 = new Color();\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case SLOT_ATTACHMENT: {\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\n for (let frame = 0; frame < frameCount; frame++)\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n a = a2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let na = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n a = na;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_ALPHA: {\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n }\n time = time2;\n a = a2;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let boneIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\n switch (type) {\n case BONE_ROTATE:\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_TRANSLATE:\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEX:\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEY:\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_SCALE:\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEX:\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEY:\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEAR:\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARX:\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARY:\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixShearY = mixShearY2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true);\n let data = skeletonData.pathConstraints[index];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n switch (input.readByte()) {\n case PATH_POSITION:\n timelines.push(readTimeline1(\n input,\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\n data.positionMode == 0 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_SPACING:\n timelines.push(readTimeline1(\n input,\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_MIX:\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n }\n timelines.push(timeline);\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let skin = skeletonData.skins[input.readInt(true)];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let slotIndex = input.readInt(true);\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n let attachmentName = input.readStringRef();\n if (!attachmentName)\n throw new Error(\"attachmentName must not be null.\");\n let attachment = skin.getAttachment(slotIndex, attachmentName);\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case ATTACHMENT_DEFORM: {\n let vertexAttachment = attachment;\n let weighted = vertexAttachment.bones;\n let vertices = vertexAttachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let bezierCount = input.readInt(true);\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\n let time = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let end = input.readInt(true);\n if (end == 0)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat();\n } else {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (let v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frame, time, deform);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n }\n time = time2;\n }\n timelines.push(timeline);\n break;\n }\n case ATTACHMENT_SEQUENCE: {\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\n for (let frame = 0; frame < frameCount; frame++) {\n let time = input.readFloat();\n let modeAndIndex = input.readInt32();\n timeline.setFrame(\n frame,\n time,\n SequenceModeValues[modeAndIndex & 15],\n modeAndIndex >> 4,\n input.readFloat()\n );\n }\n timelines.push(timeline);\n break;\n }\n }\n }\n }\n }\n let drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n let timeline = new DrawOrderTimeline(drawOrderCount);\n let slotCount = skeletonData.slots.length;\n for (let i = 0; i < drawOrderCount; i++) {\n let time = input.readFloat();\n let offsetCount = input.readInt(true);\n let drawOrder = Utils.newArray(slotCount, 0);\n for (let ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsetCount; ii++) {\n let 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 (let 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 }\n let eventCount = input.readInt(true);\n if (eventCount > 0) {\n let timeline = new EventTimeline(eventCount);\n for (let i = 0; i < eventCount; i++) {\n let time = input.readFloat();\n let eventData = skeletonData.events[input.readInt(true)];\n let event = new Event(time, eventData);\n event.intValue = input.readInt(false);\n event.floatValue = input.readFloat();\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event.data.audioPath) {\n event.volume = input.readFloat();\n event.balance = input.readFloat();\n }\n timeline.setFrame(i, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n return new Animation(name, timelines, duration);\n }\n };\n var BinaryInput = class {\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n readByte() {\n return this.buffer.getInt8(this.index++);\n }\n readUnsignedByte() {\n return this.buffer.getUint8(this.index++);\n }\n readShort() {\n let value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n }\n readInt32() {\n let value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n }\n readInt(optimizePositive) {\n let b = this.readByte();\n let result = b & 127;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 7;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 14;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 21;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\n }\n readStringRef() {\n let index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n }\n readString() {\n let byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n let chars = \"\";\n let charCount = 0;\n for (let i = 0; i < byteCount; ) {\n let b = this.readUnsignedByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n }\n readFloat() {\n let value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n }\n readBoolean() {\n return this.readByte() != 0;\n }\n };\n var LinkedMesh = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n var Vertices = class {\n constructor(bones = null, vertices = null) {\n this.bones = bones;\n this.vertices = vertices;\n }\n };\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\n return AttachmentType2;\n })(AttachmentType || {});\n function readTimeline1(input, timeline, scale) {\n let time = input.readFloat(), value = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n }\n time = time2;\n value = value2;\n }\n return timeline;\n }\n function readTimeline2(input, timeline, scale) {\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n }\n return timeline;\n }\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\n }\n var BONE_ROTATE = 0;\n var BONE_TRANSLATE = 1;\n var BONE_TRANSLATEX = 2;\n var BONE_TRANSLATEY = 3;\n var BONE_SCALE = 4;\n var BONE_SCALEX = 5;\n var BONE_SCALEY = 6;\n var BONE_SHEAR = 7;\n var BONE_SHEARX = 8;\n var BONE_SHEARY = 9;\n var SLOT_ATTACHMENT = 0;\n var SLOT_RGBA = 1;\n var SLOT_RGB = 2;\n var SLOT_RGBA2 = 3;\n var SLOT_RGB2 = 4;\n var SLOT_ALPHA = 5;\n var ATTACHMENT_DEFORM = 0;\n var ATTACHMENT_SEQUENCE = 1;\n var PATH_POSITION = 0;\n var PATH_SPACING = 1;\n var PATH_MIX = 2;\n var CURVE_STEPPED = 1;\n var CURVE_BEZIER = 2;\n\n // spine-core/src/SkeletonBounds.ts\n var SkeletonBounds = class {\n constructor() {\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 Pool(() => {\n return Utils.newFloatArray(16);\n });\n }\n update(skeleton, updateAabb) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = 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 } 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 aabbCompute() {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let 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 aabbContainsPoint(x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n aabbIntersectsSegment(x1, y1, x2, y2) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let 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 let m = (y2 - y1) / (x2 - x1);\n let 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 let 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 aabbIntersectsSkeleton(bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n containsPoint(x, y) {\n let polygons = this.polygons;\n for (let 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 containsPointPolygon(polygon, x, y) {\n let vertices = polygon;\n let nn = polygon.length;\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\n let 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 intersectsSegment(x1, y1, x2, y2) {\n let polygons = this.polygons;\n for (let 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 intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\n let vertices = polygon;\n let nn = polygon.length;\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let 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 let 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 getPolygon(boundingBox) {\n if (!boundingBox)\n throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n getWidth() {\n return this.maxX - this.minX;\n }\n getHeight() {\n return this.maxY - this.minY;\n }\n };\n\n // spine-core/src/Triangulator.ts\n var Triangulator = class {\n constructor() {\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 Pool(() => {\n return new Array();\n });\n this.polygonIndicesPool = new Pool(() => {\n return new Array();\n });\n }\n triangulate(verticesArray) {\n let vertices = verticesArray;\n let vertexCount = verticesArray.length >> 1;\n let indices = this.indicesArray;\n indices.length = 0;\n for (let i = 0; i < vertexCount; i++)\n indices[i] = i;\n let isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (let i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n let triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n let previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer:\n if (!isConcave[i]) {\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n let v = indices[ii] << 1;\n let 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 let previousIndex = (vertexCount + i - 1) % vertexCount;\n let 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 decompose(verticesArray, triangles) {\n let vertices = verticesArray;\n let convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n let convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n let polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n let polygon = this.polygonPool.obtain();\n polygon.length = 0;\n let fanBaseIndex = -1, lastWinding = 0;\n for (let i = 0, n = triangles.length; i < n; i += 3) {\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\n let merged = false;\n if (fanBaseIndex == t1) {\n let o = polygon.length - 4;\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n let 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 } 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 (let i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n let firstIndex = polygonIndices[0];\n let lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n let o = polygon.length - 4;\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\n let firstX = polygon[0], firstY = polygon[1];\n let secondX = polygon[2], secondY = polygon[3];\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (let ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n let otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n let otherFirstIndex = otherIndices[0];\n let otherSecondIndex = otherIndices[1];\n let otherLastIndex = otherIndices[2];\n let otherPoly = convexPolygons[ii];\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n let 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 (let 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 static isConcave(index, vertexCount, vertices, indices) {\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n let current = indices[index] << 1;\n let next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(\n vertices[previous],\n vertices[previous + 1],\n vertices[current],\n vertices[current + 1],\n vertices[next],\n vertices[next + 1]\n );\n }\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n }\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\n let px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n }\n };\n\n // spine-core/src/SkeletonClipping.ts\n var SkeletonClipping = class {\n constructor() {\n this.triangulator = new 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 this.clipAttachment = null;\n this.clippingPolygons = null;\n }\n clipStart(slot, clip) {\n if (this.clipAttachment)\n return 0;\n this.clipAttachment = clip;\n let n = clip.worldVerticesLength;\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n let clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\n let polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n }\n clipEndWithSlot(slot) {\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n }\n clipEnd() {\n if (!this.clipAttachment)\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 isClipping() {\n return this.clipAttachment != null;\n }\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n let clippedTriangles = this.clippedTriangles;\n let polygons = this.clippingPolygons;\n let polygonsCount = polygons.length;\n let vertexSize = twoColor ? 12 : 8;\n let index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer:\n for (let i = 0; i < trianglesLength; i += 3) {\n let vertexOffset = triangles[i] << 1;\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (let p = 0; p < polygonsCount; p++) {\n let s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n let clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\n let clipOutputCount = clipOutputLength >> 1;\n let clipOutputItems = this.clipOutput;\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\n let 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 let c0 = x - x3, c1 = y - y3;\n let a = (d0 * c0 + d1 * c1) * d;\n let b = (d4 * c0 + d2 * c1) * d;\n let 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 let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (let 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 } else {\n let clippedVerticesItems = 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 } 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 let clippedTrianglesItems = 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 clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\n let originalOutput = output;\n let clipped = false;\n let input;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\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 let clippingVertices = clippingArea;\n let clippingVerticesLast = clippingArea.length - 4;\n for (let i = 0; ; i += 2) {\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n let inputVertices = input;\n let inputVerticesLength = input.length - 2, outputStart = output.length;\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n let 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 let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n } else {\n output.push(edgeX);\n output.push(edgeY);\n }\n } else if (side2) {\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\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 let temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (let i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n } else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n }\n static makeClockwise(polygon) {\n let vertices = polygon;\n let verticeslength = polygon.length;\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (let 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 (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n let x = vertices[i], y = vertices[i + 1];\n let 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 };\n\n // spine-core/src/SkeletonJson.ts\n var SkeletonJson = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(json) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\n let skeletonMap = root.skeleton;\n if (skeletonMap) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.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 (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n let parent = null;\n let parentName = getValue(boneMap, \"parent\", null);\n if (parentName)\n parent = skeletonData.findBone(parentName);\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = getValue(boneMap, \"length\", 0) * scale;\n data.x = getValue(boneMap, \"x\", 0) * scale;\n data.y = getValue(boneMap, \"y\", 0) * scale;\n data.rotation = getValue(boneMap, \"rotation\", 0);\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\n data.shearX = getValue(boneMap, \"shearX\", 0);\n data.shearY = getValue(boneMap, \"shearY\", 0);\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\n data.skinRequired = getValue(boneMap, \"skin\", false);\n let color = getValue(boneMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let boneData = skeletonData.findBone(slotMap.bone);\n if (!boneData)\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\n let color = getValue(slotMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n let dark = getValue(slotMap, \"dark\", null);\n if (dark)\n data.darkColor = Color.fromString(dark);\n data.attachmentName = getValue(slotMap, \"attachment\", null);\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\n if (!bone)\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let target = skeletonData.findBone(constraintMap.target);\n ;\n if (!target)\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\n data.target = target;\n data.mix = getValue(constraintMap, \"mix\", 1);\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = getValue(constraintMap, \"compress\", false);\n data.stretch = getValue(constraintMap, \"stretch\", false);\n data.uniform = getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findBone(targetName);\n if (!target)\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\n data.target = target;\n data.local = getValue(constraintMap, \"local\", false);\n data.relative = getValue(constraintMap, \"relative\", false);\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findSlot(targetName);\n if (!target)\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\n data.target = target;\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.position = getValue(constraintMap, \"position\", 0);\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i];\n let skin = new Skin(skinMap.name);\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let boneName = skinMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraintName = skinMap.ik[ii];\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraintName = skinMap.transform[ii];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraintName = skinMap.path[ii];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment)\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 (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = getValue(eventMap, \"int\", 0);\n data.floatValue = getValue(eventMap, \"float\", 0);\n data.stringValue = getValue(eventMap, \"string\", \"\");\n data.audioPath = getValue(eventMap, \"audio\", null);\n if (data.audioPath) {\n data.volume = getValue(eventMap, \"volume\", 1);\n data.balance = getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n }\n readAttachment(map, skin, slotIndex, name, skeletonData) {\n let scale = this.scale;\n name = getValue(map, \"name\", name);\n switch (getValue(map, \"type\", \"region\")) {\n case \"region\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\n return null;\n region.path = path;\n region.x = getValue(map, \"x\", 0) * scale;\n region.y = getValue(map, \"y\", 0) * scale;\n region.scaleX = getValue(map, \"scaleX\", 1);\n region.scaleY = getValue(map, \"scaleY\", 1);\n region.rotation = getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n region.sequence = sequence;\n let color = getValue(map, \"color\", null);\n if (color)\n region.color.setFromString(color);\n if (region.region != null)\n region.updateRegion();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n let color = getValue(map, \"color\", null);\n if (color)\n mesh.color.setFromString(color);\n mesh.width = getValue(map, \"width\", 0) * scale;\n mesh.height = getValue(map, \"height\", 0) * scale;\n mesh.sequence = sequence;\n let parent = getValue(map, \"parent\", null);\n if (parent) {\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\n return mesh;\n }\n let uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n if (mesh.region != null)\n mesh.updateRegion();\n mesh.edges = getValue(map, \"edges\", null);\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = getValue(map, \"closed\", false);\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n let color = getValue(map, \"color\", null);\n if (color)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = getValue(map, \"x\", 0) * scale;\n point.y = getValue(map, \"y\", 0) * scale;\n point.rotation = getValue(map, \"rotation\", 0);\n let color = getValue(map, \"color\", null);\n if (color)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\n return null;\n let end = getValue(map, \"end\", null);\n if (end)\n clip.endSlot = skeletonData.findSlot(end);\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n readSequence(map) {\n if (map == null)\n return null;\n let sequence = new Sequence(getValue(map, \"count\", 0));\n sequence.start = getValue(map, \"start\", 1);\n sequence.digits = getValue(map, \"digits\", 0);\n sequence.setupIndex = getValue(map, \"setup\", 0);\n return sequence;\n }\n readVertices(map, attachment, verticesLength) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n; ) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n }\n readAnimation(map, name, skeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotName);\n let slotIndex = slot.index;\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (!timelineMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(frames, slotIndex);\n for (let frame = 0; frame < frames; frame++) {\n let keyMap = timelineMap[frame];\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgba\") {\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb\") {\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"alpha\") {\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\n } else if (timelineName == \"rgba2\") {\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb2\") {\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(\"Bone not found: \" + boneName);\n let boneIndex = bone.index;\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n let frames = timelineMap.length;\n if (frames == 0)\n continue;\n if (timelineName === \"rotate\") {\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\n } else if (timelineName === \"translate\") {\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\n } else if (timelineName === \"translatex\") {\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"translatey\") {\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"scale\") {\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\n } else if (timelineName === \"scalex\") {\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"scaley\") {\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"shear\") {\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\n } else if (timelineName === \"shearx\") {\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n } else if (timelineName === \"sheary\") {\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n }\n }\n }\n }\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let keyMap = constraintMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(\"IK Constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mix = getValue(keyMap, \"mix\", 1);\n let softness = getValue(keyMap, \"softness\", 0) * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\n let nextMap = constraintMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mix2 = getValue(nextMap, \"mix\", 1);\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.transform) {\n for (let constraintName in map.transform) {\n let timelineMap = map.transform[constraintName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Transform constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixScaleX = mixScaleX2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Path constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName === \"position\") {\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"spacing\") {\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.attachments) {\n for (let attachmentsName in map.attachments) {\n let attachmentsMap = map.attachments[attachmentsName];\n let skin = skeletonData.findSkin(attachmentsName);\n if (!skin)\n throw new Error(\"Skin not found: \" + attachmentsName);\n for (let slotMapName in attachmentsMap) {\n let slotMap = attachmentsMap[slotMapName];\n let slot = skeletonData.findSlot(slotMapName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotMapName);\n let slotIndex = slot.index;\n for (let attachmentMapName in slotMap) {\n let attachmentMap = slotMap[attachmentMapName];\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\n for (let timelineMapName in attachmentMap) {\n let timelineMap = attachmentMap[timelineMapName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n if (timelineMapName == \"deform\") {\n let weighted = attachment.bones;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\n let time = getValue(keyMap, \"time\", 0);\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let verticesValue = getValue(keyMap, \"vertices\", null);\n if (!verticesValue)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = getValue(keyMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frame, time, deform);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let curve = keyMap.curve;\n if (curve)\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n time = time2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineMapName == \"sequence\") {\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\n let lastDelay = 0;\n for (let frame = 0; frame < timelineMap.length; frame++) {\n let delay = getValue(keyMap, \"delay\", lastDelay);\n let time = getValue(keyMap, \"time\", 0);\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\n let index = getValue(keyMap, \"index\", 0);\n timeline.setFrame(frame, time, mode, index, delay);\n lastDelay = delay;\n keyMap = timelineMap[frame + 1];\n }\n timelines.push(timeline);\n }\n }\n }\n }\n }\n }\n if (map.drawOrder) {\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\n let slotCount = skeletonData.slots.length;\n let frame = 0;\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\n let drawOrderMap = map.drawOrder[i];\n let drawOrder = null;\n let offsets = getValue(drawOrderMap, \"offsets\", null);\n if (offsets) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsets.length; ii++) {\n let offsetMap = offsets[ii];\n let slot = skeletonData.findSlot(offsetMap.slot);\n if (!slot)\n throw new Error(\"Slot not found: \" + slot);\n let slotIndex = slot.index;\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 (let ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n }\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frame = 0;\n for (let i = 0; i < map.events.length; i++, frame++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (!eventData)\n throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath) {\n event.volume = getValue(eventMap, \"volume\", 1);\n event.balance = getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frame, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n };\n var LinkedMesh2 = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n function readTimeline12(keys, timeline, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\n if (keyMap.curve)\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n time = time2;\n value = value2;\n keyMap = nextMap;\n }\n }\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n keyMap = nextMap;\n }\n }\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n if (curve == \"stepped\") {\n timeline.setStepped(frame);\n return bezier;\n }\n let i = value << 2;\n let cx1 = curve[i];\n let cy1 = curve[i + 1] * scale;\n let cx2 = curve[i + 2];\n let cy2 = curve[i + 3] * scale;\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n return bezier + 1;\n }\n function getValue(map, property, defaultValue) {\n return map[property] !== void 0 ? map[property] : defaultValue;\n }\n\n // spine-core/src/polyfills.ts\n (() => {\n if (typeof Math.fround === \"undefined\") {\n Math.fround = function(array) {\n return function(x) {\n return array[0] = x, array[0];\n };\n }(new Float32Array(1));\n }\n })();\n\n // spine-canvas/src/CanvasTexture.ts\n var CanvasTexture = class extends Texture {\n constructor(image) {\n super(image);\n }\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-canvas/src/AssetManager.ts\n var AssetManager = class extends AssetManagerBase {\n constructor(pathPrefix = \"\", downloader = new Downloader()) {\n super((image) => {\n return new CanvasTexture(image);\n }, pathPrefix, downloader);\n }\n };\n\n // spine-canvas/src/SkeletonRenderer.ts\n var worldVertices = Utils.newFloatArray(8);\n var _SkeletonRenderer = class {\n constructor(context) {\n this.triangleRendering = false;\n this.debugRendering = false;\n this.vertices = Utils.newFloatArray(8 * 1024);\n this.tempColor = new Color();\n this.ctx = context;\n }\n draw(skeleton) {\n if (this.triangleRendering)\n this.drawTriangles(skeleton);\n else\n this.drawImages(skeleton);\n }\n drawImages(skeleton) {\n let ctx = this.ctx;\n let color = this.tempColor;\n let skeletonColor = skeleton.color;\n let drawOrder = skeleton.drawOrder;\n if (this.debugRendering)\n ctx.strokeStyle = \"green\";\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let bone = slot.bone;\n if (!bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof RegionAttachment))\n continue;\n attachment.computeWorldVertices(slot, worldVertices, 0, 2);\n let region = attachment.region;\n let image = region.page.texture.getImage();\n let slotColor = slot.color;\n let regionColor = attachment.color;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r,\n skeletonColor.g * slotColor.g * regionColor.g,\n skeletonColor.b * slotColor.b * regionColor.b,\n skeletonColor.a * slotColor.a * regionColor.a\n );\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 let atlasScale = attachment.width / region.originalWidth;\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\n let w = region.width, h = region.height;\n ctx.translate(w / 2, h / 2);\n if (attachment.region.degrees == 90) {\n let 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 ctx.globalAlpha = color.a;\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 }\n drawTriangles(skeleton) {\n let ctx = this.ctx;\n let color = this.tempColor;\n let skeletonColor = skeleton.color;\n let drawOrder = skeleton.drawOrder;\n let blendMode = null;\n let vertices = this.vertices;\n let triangles = null;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n let attachment = slot.getAttachment();\n let texture;\n let region;\n if (attachment instanceof RegionAttachment) {\n let regionAttachment = attachment;\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\n region = regionAttachment.region;\n texture = region.page.texture.getImage();\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n vertices = this.computeMeshVertices(slot, mesh, false);\n triangles = mesh.triangles;\n let region2 = mesh.region.renderObject;\n texture = region2.page.texture.getImage();\n } else\n continue;\n if (texture) {\n if (slot.data.blendMode != blendMode)\n blendMode = slot.data.blendMode;\n let slotColor = slot.color;\n let attachmentColor = attachment.color;\n color.set(\n skeletonColor.r * slotColor.r * attachmentColor.r,\n skeletonColor.g * slotColor.g * attachmentColor.g,\n skeletonColor.b * slotColor.b * attachmentColor.b,\n skeletonColor.a * slotColor.a * attachmentColor.a\n );\n ctx.globalAlpha = color.a;\n for (var j = 0; j < triangles.length; j += 3) {\n let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\n let x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\n let x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\n let 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 drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\n let 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 computeRegionVertices(slot, region, pma) {\n let skeletonColor = slot.bone.skeleton.color;\n let slotColor = slot.color;\n let regionColor = region.color;\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\n let multiplier = pma ? alpha : 1;\n let color = this.tempColor;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\n alpha\n );\n region.computeWorldVertices(slot, this.vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\n let vertices = this.vertices;\n let uvs = region.uvs;\n vertices[RegionAttachment.C1R] = color.r;\n vertices[RegionAttachment.C1G] = color.g;\n vertices[RegionAttachment.C1B] = color.b;\n vertices[RegionAttachment.C1A] = color.a;\n vertices[RegionAttachment.U1] = uvs[0];\n vertices[RegionAttachment.V1] = uvs[1];\n vertices[RegionAttachment.C2R] = color.r;\n vertices[RegionAttachment.C2G] = color.g;\n vertices[RegionAttachment.C2B] = color.b;\n vertices[RegionAttachment.C2A] = color.a;\n vertices[RegionAttachment.U2] = uvs[2];\n vertices[RegionAttachment.V2] = uvs[3];\n vertices[RegionAttachment.C3R] = color.r;\n vertices[RegionAttachment.C3G] = color.g;\n vertices[RegionAttachment.C3B] = color.b;\n vertices[RegionAttachment.C3A] = color.a;\n vertices[RegionAttachment.U3] = uvs[4];\n vertices[RegionAttachment.V3] = uvs[5];\n vertices[RegionAttachment.C4R] = color.r;\n vertices[RegionAttachment.C4G] = color.g;\n vertices[RegionAttachment.C4B] = color.b;\n vertices[RegionAttachment.C4A] = color.a;\n vertices[RegionAttachment.U4] = uvs[6];\n vertices[RegionAttachment.V4] = uvs[7];\n return vertices;\n }\n computeMeshVertices(slot, mesh, pma) {\n let skeletonColor = slot.bone.skeleton.color;\n let slotColor = slot.color;\n let regionColor = mesh.color;\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\n let multiplier = pma ? alpha : 1;\n let color = this.tempColor;\n color.set(\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\n alpha\n );\n let vertexCount = mesh.worldVerticesLength / 2;\n let vertices = this.vertices;\n if (vertices.length < mesh.worldVerticesLength)\n this.vertices = vertices = Utils.newFloatArray(mesh.worldVerticesLength);\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\n let uvs = mesh.uvs;\n for (let i = 0, u = 0, v = 2; i < vertexCount; 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 };\n var SkeletonRenderer = _SkeletonRenderer;\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\n return __toCommonJS(src_exports);\n})();\n//# sourceMappingURL=spine-canvas.js.map\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\n\"use strict\";\nvar spine = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // spine-webgl/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n AlphaTimeline: () => AlphaTimeline,\n Animation: () => Animation,\n AnimationState: () => AnimationState,\n AnimationStateAdapter: () => AnimationStateAdapter,\n AnimationStateData: () => AnimationStateData,\n AssetManager: () => AssetManager,\n AssetManagerBase: () => AssetManagerBase,\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\n Attachment: () => Attachment,\n AttachmentTimeline: () => AttachmentTimeline,\n BinaryInput: () => BinaryInput,\n BlendMode: () => BlendMode,\n Bone: () => Bone,\n BoneData: () => BoneData,\n BoundingBoxAttachment: () => BoundingBoxAttachment,\n CURRENT: () => CURRENT,\n CameraController: () => CameraController,\n ClippingAttachment: () => ClippingAttachment,\n Color: () => Color,\n Color2Attribute: () => Color2Attribute,\n ColorAttribute: () => ColorAttribute,\n ConstraintData: () => ConstraintData,\n CurveTimeline: () => CurveTimeline,\n CurveTimeline1: () => CurveTimeline1,\n CurveTimeline2: () => CurveTimeline2,\n DebugUtils: () => DebugUtils,\n DeformTimeline: () => DeformTimeline,\n Downloader: () => Downloader,\n DrawOrderTimeline: () => DrawOrderTimeline,\n Event: () => Event,\n EventData: () => EventData,\n EventQueue: () => EventQueue,\n EventTimeline: () => EventTimeline,\n EventType: () => EventType,\n FIRST: () => FIRST,\n FakeTexture: () => FakeTexture,\n GLTexture: () => GLTexture,\n HOLD_FIRST: () => HOLD_FIRST,\n HOLD_MIX: () => HOLD_MIX,\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\n IkConstraint: () => IkConstraint,\n IkConstraintData: () => IkConstraintData,\n IkConstraintTimeline: () => IkConstraintTimeline,\n Input: () => Input,\n IntSet: () => IntSet,\n Interpolation: () => Interpolation,\n LoadingScreen: () => LoadingScreen,\n M00: () => M00,\n M01: () => M01,\n M02: () => M02,\n M03: () => M03,\n M10: () => M10,\n M11: () => M11,\n M12: () => M12,\n M13: () => M13,\n M20: () => M20,\n M21: () => M21,\n M22: () => M22,\n M23: () => M23,\n M30: () => M30,\n M31: () => M31,\n M32: () => M32,\n M33: () => M33,\n ManagedWebGLRenderingContext: () => ManagedWebGLRenderingContext,\n MathUtils: () => MathUtils,\n Matrix4: () => Matrix42,\n Mesh: () => Mesh,\n MeshAttachment: () => MeshAttachment,\n MixBlend: () => MixBlend,\n MixDirection: () => MixDirection,\n OrthoCamera: () => OrthoCamera,\n PathAttachment: () => PathAttachment,\n PathConstraint: () => PathConstraint,\n PathConstraintData: () => PathConstraintData,\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\n PointAttachment: () => PointAttachment,\n PolygonBatcher: () => PolygonBatcher,\n Pool: () => Pool,\n Position2Attribute: () => Position2Attribute,\n Position3Attribute: () => Position3Attribute,\n PositionMode: () => PositionMode,\n Pow: () => Pow,\n PowOut: () => PowOut,\n RGB2Timeline: () => RGB2Timeline,\n RGBA2Timeline: () => RGBA2Timeline,\n RGBATimeline: () => RGBATimeline,\n RGBTimeline: () => RGBTimeline,\n RegionAttachment: () => RegionAttachment,\n ResizeMode: () => ResizeMode,\n RotateMode: () => RotateMode,\n RotateTimeline: () => RotateTimeline,\n SETUP: () => SETUP,\n SUBSEQUENT: () => SUBSEQUENT,\n ScaleTimeline: () => ScaleTimeline,\n ScaleXTimeline: () => ScaleXTimeline,\n ScaleYTimeline: () => ScaleYTimeline,\n SceneRenderer: () => SceneRenderer,\n SequenceTimeline: () => SequenceTimeline,\n Shader: () => Shader,\n ShapeRenderer: () => ShapeRenderer,\n ShapeType: () => ShapeType,\n ShearTimeline: () => ShearTimeline,\n ShearXTimeline: () => ShearXTimeline,\n ShearYTimeline: () => ShearYTimeline,\n Skeleton: () => Skeleton,\n SkeletonBinary: () => SkeletonBinary,\n SkeletonBounds: () => SkeletonBounds,\n SkeletonClipping: () => SkeletonClipping,\n SkeletonData: () => SkeletonData,\n SkeletonDebugRenderer: () => SkeletonDebugRenderer,\n SkeletonJson: () => SkeletonJson,\n SkeletonRenderer: () => SkeletonRenderer,\n Skin: () => Skin,\n SkinEntry: () => SkinEntry,\n Slot: () => Slot,\n SlotData: () => SlotData,\n SpacingMode: () => SpacingMode,\n SpineCanvas: () => SpineCanvas,\n StringSet: () => StringSet,\n TexCoordAttribute: () => TexCoordAttribute,\n Texture: () => Texture,\n TextureAtlas: () => TextureAtlas,\n TextureAtlasPage: () => TextureAtlasPage,\n TextureAtlasRegion: () => TextureAtlasRegion,\n TextureFilter: () => TextureFilter,\n TextureRegion: () => TextureRegion,\n TextureWrap: () => TextureWrap,\n TimeKeeper: () => TimeKeeper,\n Timeline: () => Timeline,\n Touch: () => Touch,\n TrackEntry: () => TrackEntry,\n TransformConstraint: () => TransformConstraint,\n TransformConstraintData: () => TransformConstraintData,\n TransformConstraintTimeline: () => TransformConstraintTimeline,\n TransformMode: () => TransformMode,\n TranslateTimeline: () => TranslateTimeline,\n TranslateXTimeline: () => TranslateXTimeline,\n TranslateYTimeline: () => TranslateYTimeline,\n Triangulator: () => Triangulator,\n Utils: () => Utils,\n Vector2: () => Vector2,\n Vector3: () => Vector3,\n VertexAttachment: () => VertexAttachment,\n VertexAttribute: () => VertexAttribute,\n VertexAttributeType: () => VertexAttributeType,\n WebGLBlendModeConverter: () => WebGLBlendModeConverter,\n WindowedMean: () => WindowedMean\n });\n\n // spine-core/src/Utils.ts\n var IntSet = class {\n constructor() {\n this.array = new Array();\n }\n add(value) {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n contains(value) {\n return this.array[value | 0] != void 0;\n }\n remove(value) {\n this.array[value | 0] = void 0;\n }\n clear() {\n this.array.length = 0;\n }\n };\n var StringSet = class {\n constructor() {\n this.entries = {};\n this.size = 0;\n }\n add(value) {\n let contains = this.entries[value];\n this.entries[value] = true;\n if (!contains) {\n this.size++;\n return true;\n }\n return false;\n }\n addAll(values) {\n let oldSize = this.size;\n for (var i = 0, n = values.length; i < n; i++)\n this.add(values[i]);\n return oldSize != this.size;\n }\n contains(value) {\n return this.entries[value];\n }\n clear() {\n this.entries = {};\n this.size = 0;\n }\n };\n var _Color = class {\n constructor(r = 0, g = 0, b = 0, a = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n set(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this.clamp();\n }\n setFromColor(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 setFromString(hex) {\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n return this;\n }\n add(r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n return this.clamp();\n }\n clamp() {\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 static rgba8888ToColor(color, value) {\n color.r = ((value & 4278190080) >>> 24) / 255;\n color.g = ((value & 16711680) >>> 16) / 255;\n color.b = ((value & 65280) >>> 8) / 255;\n color.a = (value & 255) / 255;\n }\n static rgb888ToColor(color, value) {\n color.r = ((value & 16711680) >>> 16) / 255;\n color.g = ((value & 65280) >>> 8) / 255;\n color.b = (value & 255) / 255;\n }\n static fromString(hex) {\n return new _Color().setFromString(hex);\n }\n };\n var Color = _Color;\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 var _MathUtils = class {\n static clamp(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n }\n static cosDeg(degrees) {\n return Math.cos(degrees * _MathUtils.degRad);\n }\n static sinDeg(degrees) {\n return Math.sin(degrees * _MathUtils.degRad);\n }\n static signum(value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n static toInt(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n static cbrt(x) {\n let y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n }\n static randomTriangular(min, max) {\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n static randomTriangularWith(min, max, mode) {\n let u = Math.random();\n let 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 static isPowerOfTwo(value) {\n return value && (value & value - 1) === 0;\n }\n };\n var MathUtils = _MathUtils;\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 var Interpolation = class {\n apply(start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n }\n };\n var Pow = class extends Interpolation {\n constructor(power) {\n super();\n this.power = 2;\n this.power = power;\n }\n applyInternal(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 };\n var PowOut = class extends Pow {\n constructor(power) {\n super(power);\n }\n applyInternal(a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n };\n var _Utils = class {\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n static arrayFill(array, fromIndex, toIndex, value) {\n for (let i = fromIndex; i < toIndex; i++)\n array[i] = value;\n }\n static setArraySize(array, size, value = 0) {\n let oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n }\n static ensureArrayCapacity(array, size, value = 0) {\n if (array.length >= size)\n return array;\n return _Utils.setArraySize(array, size, value);\n }\n static newArray(size, defaultValue) {\n let array = new Array(size);\n for (let i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n }\n static newFloatArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Float32Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static newShortArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Int16Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static toFloatArray(array) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n static toSinglePrecision(value) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n static webkit602BugfixHelper(alpha, blend) {\n }\n static contains(array, element, identity = true) {\n for (var i = 0; i < array.length; i++)\n if (array[i] == element)\n return true;\n return false;\n }\n static enumValue(type, name) {\n return type[name[0].toUpperCase() + name.slice(1)];\n }\n };\n var Utils = _Utils;\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\n var DebugUtils = class {\n static logBones(skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let 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 };\n var Pool = class {\n constructor(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n obtain() {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n free(item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n }\n freeAll(items) {\n for (let i = 0; i < items.length; i++)\n this.free(items[i]);\n }\n clear() {\n this.items.length = 0;\n }\n };\n var Vector2 = class {\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n length() {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n normalize() {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n };\n var TimeKeeper = class {\n constructor() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1e3;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n update() {\n let now = Date.now() / 1e3;\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 };\n var WindowedMean = class {\n constructor(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 hasEnoughData() {\n return this.addedValues >= this.values.length;\n }\n addValue(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 getMean() {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++)\n mean += this.values[i];\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n return 0;\n }\n };\n\n // spine-core/src/attachments/Attachment.ts\n var Attachment = class {\n constructor(name) {\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n };\n var _VertexAttachment = class extends Attachment {\n constructor(name) {\n super(name);\n this.id = _VertexAttachment.nextID++;\n this.bones = null;\n this.vertices = [];\n this.worldVerticesLength = 0;\n this.timelineAttachment = this;\n }\n computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (!bones) {\n if (deformArray.length > 0)\n vertices = deformArray;\n let bone = slot.bone;\n let x = bone.worldX;\n let y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\n let vx = vertices[v2], vy = vertices[v2 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let 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 } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let 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 copyTo(attachment) {\n if (this.bones) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n if (this.vertices) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.timelineAttachment = this.timelineAttachment;\n }\n };\n var VertexAttachment = _VertexAttachment;\n VertexAttachment.nextID = 0;\n\n // spine-core/src/attachments/Sequence.ts\n var _Sequence = class {\n constructor(count) {\n this.id = _Sequence.nextID();\n this.start = 0;\n this.digits = 0;\n this.setupIndex = 0;\n this.regions = new Array(count);\n }\n copy() {\n let copy = new _Sequence(this.regions.length);\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\n copy.start = this.start;\n copy.digits = this.digits;\n copy.setupIndex = this.setupIndex;\n return copy;\n }\n apply(slot, attachment) {\n let index = slot.sequenceIndex;\n if (index == -1)\n index = this.setupIndex;\n if (index >= this.regions.length)\n index = this.regions.length - 1;\n let region = this.regions[index];\n if (attachment.region != region) {\n attachment.region = region;\n attachment.updateRegion();\n }\n }\n getPath(basePath, index) {\n let result = basePath;\n let frame = (this.start + index).toString();\n for (let i = this.digits - frame.length; i > 0; i--)\n result += \"0\";\n result += frame;\n return result;\n }\n static nextID() {\n return _Sequence._nextID++;\n }\n };\n var Sequence = _Sequence;\n Sequence._nextID = 0;\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\n return SequenceMode2;\n })(SequenceMode || {});\n var SequenceModeValues = [\n 0 /* hold */,\n 1 /* once */,\n 2 /* loop */,\n 3 /* pingpong */,\n 4 /* onceReverse */,\n 5 /* loopReverse */,\n 6 /* pingpongReverse */\n ];\n\n // spine-core/src/Animation.ts\n var Animation = class {\n constructor(name, timelines, duration) {\n this.timelines = [];\n this.timelineIds = new StringSet();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n this.setTimelines(timelines);\n this.duration = duration;\n }\n setTimelines(timelines) {\n if (!timelines)\n throw new Error(\"timelines cannot be null.\");\n this.timelines = timelines;\n this.timelineIds.clear();\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds.addAll(timelines[i].getPropertyIds());\n }\n hasTimeline(ids) {\n for (let i = 0; i < ids.length; i++)\n if (this.timelineIds.contains(ids[i]))\n return true;\n return false;\n }\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (!skeleton)\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 let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n };\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\n return MixBlend2;\n })(MixBlend || {});\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\n return MixDirection2;\n })(MixDirection || {});\n var Property = {\n rotate: 0,\n x: 1,\n y: 2,\n scaleX: 3,\n scaleY: 4,\n shearX: 5,\n shearY: 6,\n rgb: 7,\n alpha: 8,\n rgb2: 9,\n attachment: 10,\n deform: 11,\n event: 12,\n drawOrder: 13,\n ikConstraint: 14,\n transformConstraint: 15,\n pathConstraintPosition: 16,\n pathConstraintSpacing: 17,\n pathConstraintMix: 18,\n sequence: 19\n };\n var Timeline = class {\n constructor(frameCount, propertyIds) {\n this.propertyIds = propertyIds;\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\n }\n getPropertyIds() {\n return this.propertyIds;\n }\n getFrameEntries() {\n return 1;\n }\n getFrameCount() {\n return this.frames.length / this.getFrameEntries();\n }\n getDuration() {\n return this.frames[this.frames.length - this.getFrameEntries()];\n }\n static search1(frames, time) {\n let n = frames.length;\n for (let i = 1; i < n; i++)\n if (frames[i] > time)\n return i - 1;\n return n - 1;\n }\n static search(frames, time, step) {\n let n = frames.length;\n for (let i = step; i < n; i += step)\n if (frames[i] > time)\n return i - step;\n return n - step;\n }\n };\n var CurveTimeline = class extends Timeline {\n constructor(frameCount, bezierCount, propertyIds) {\n super(frameCount, propertyIds);\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\n this.curves[frameCount - 1] = 1;\n }\n setLinear(frame) {\n this.curves[frame] = 0;\n }\n setStepped(frame) {\n this.curves[frame] = 1;\n }\n shrink(bezierCount) {\n let size = this.getFrameCount() + bezierCount * 18;\n if (this.curves.length > size) {\n let newCurves = Utils.newFloatArray(size);\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\n this.curves = newCurves;\n }\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = value1 + dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getBezierValue(time, frameIndex, valueOffset, i) {\n let curves = this.curves;\n if (curves[i] > time) {\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n frameIndex += this.getFrameEntries();\n let x = curves[n - 2], y = curves[n - 1];\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\n }\n };\n var CurveTimeline1 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId) {\n super(frameCount, bezierCount, [propertyId]);\n }\n getFrameEntries() {\n return 2;\n }\n setFrame(frame, time, value) {\n frame <<= 1;\n this.frames[frame] = time;\n this.frames[frame + 1] = value;\n }\n getCurveValue(time) {\n let frames = this.frames;\n let i = frames.length - 2;\n for (let ii = 2; ii <= i; ii += 2) {\n if (frames[ii] > time) {\n i = ii - 2;\n break;\n }\n }\n let curveType = this.curves[i >> 1];\n switch (curveType) {\n case 0:\n let before = frames[i], value = frames[i + 1];\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\n case 1:\n return frames[i + 1];\n }\n return this.getBezierValue(time, i, 1, curveType - 2);\n }\n };\n var CurveTimeline2 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\n }\n getFrameEntries() {\n return 3;\n }\n setFrame(frame, time, value1, value2) {\n frame *= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = value1;\n this.frames[frame + 2] = value2;\n }\n };\n var RotateTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n return;\n case 1 /* first */:\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\n }\n return;\n }\n let r = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n r += bone.data.rotation - bone.rotation;\n case 3 /* add */:\n bone.rotation += r * alpha;\n }\n }\n };\n var TranslateTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.x + \"|\" + boneIndex,\n Property.y + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n };\n var TranslateXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n break;\n case 3 /* add */:\n bone.x += x * alpha;\n }\n }\n };\n var TranslateYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case 3 /* add */:\n bone.y += y * alpha;\n }\n }\n };\n var ScaleTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.scaleX + \"|\" + boneIndex,\n Property.scaleY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let x, y;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n x *= bone.data.scaleX;\n y *= bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ScaleXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time) * bone.data.scaleX;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleX += x - bone.data.scaleX;\n else\n bone.scaleX = x;\n } else {\n let bx = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n }\n }\n }\n };\n var ScaleYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time) * bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleY += y - bone.data.scaleY;\n else\n bone.scaleY = y;\n } else {\n let by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n by = bone.data.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = bone.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ShearTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.shearX + \"|\" + boneIndex,\n Property.shearY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n };\n var ShearXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n break;\n case 3 /* add */:\n bone.shearX += x * alpha;\n }\n }\n };\n var ShearYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case 3 /* add */:\n bone.shearY += y * alpha;\n }\n }\n };\n var RGBATimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 5;\n }\n setFrame(frame, time, r, g, b, a) {\n frame *= 5;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.setFromColor(setup);\n return;\n case 1 /* first */:\n color.add(\n (setup.r - color.r) * alpha,\n (setup.g - color.g) * alpha,\n (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha\n );\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0;\n let i = Timeline.search(frames, time, 5);\n let curveType = this.curves[i / 5];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n let t = (time - before) / (frames[i + 5] - before);\n r += (frames[i + 5 + 1] - r) * t;\n g += (frames[i + 5 + 2] - g) * t;\n b += (frames[i + 5 + 3] - b) * t;\n a += (frames[i + 5 + 4] - a) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n }\n if (alpha == 1)\n color.set(r, g, b, a);\n else {\n if (blend == 0 /* 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 };\n var RGBTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, r, g, b) {\n frame <<= 2;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n return;\n case 1 /* first */:\n color.r += (setup.r - color.r) * alpha;\n color.g += (setup.g - color.g) * alpha;\n color.b += (setup.b - color.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n r += (frames[i + 4 + 1] - r) * t;\n g += (frames[i + 4 + 2] - g) * t;\n b += (frames[i + 4 + 3] - b) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (alpha == 1) {\n color.r = r;\n color.g = g;\n color.b = b;\n } else {\n if (blend == 0 /* setup */) {\n let setup = slot.data.color;\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n }\n color.r += (r - color.r) * alpha;\n color.g += (g - color.g) * alpha;\n color.b += (b - color.b) * alpha;\n }\n }\n };\n var AlphaTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let color = slot.color;\n if (time < this.frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.a = setup.a;\n return;\n case 1 /* first */:\n color.a += (setup.a - color.a) * alpha;\n }\n return;\n }\n let a = this.getCurveValue(time);\n if (alpha == 1)\n color.a = a;\n else {\n if (blend == 0 /* setup */)\n color.a = slot.data.color.a;\n color.a += (a - color.a) * alpha;\n }\n }\n };\n var RGBA2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 8;\n }\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\n frame <<= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n this.frames[frame + 5] = r2;\n this.frames[frame + 6] = g2;\n this.frames[frame + 7] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.setFromColor(setupLight);\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.add(\n (setupLight.r - light.r) * alpha,\n (setupLight.g - light.g) * alpha,\n (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha\n );\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 8);\n let curveType = this.curves[i >> 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n let t = (time - before) / (frames[i + 8] - before);\n r += (frames[i + 8 + 1] - r) * t;\n g += (frames[i + 8 + 2] - g) * t;\n b += (frames[i + 8 + 3] - b) * t;\n a += (frames[i + 8 + 4] - a) * t;\n r2 += (frames[i + 8 + 5] - r2) * t;\n g2 += (frames[i + 8 + 6] - g2) * t;\n b2 += (frames[i + 8 + 7] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\n }\n if (alpha == 1) {\n light.set(r, g, b, a);\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n light.setFromColor(slot.data.color);\n let setupDark = slot.data.darkColor;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var RGB2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, r, g, b, r2, g2, b2) {\n frame *= 7;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = r2;\n this.frames[frame + 5] = g2;\n this.frames[frame + 6] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.r += (setupLight.r - light.r) * alpha;\n light.g += (setupLight.g - light.g) * alpha;\n light.b += (setupLight.b - light.b) * alpha;\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n r += (frames[i + 7 + 1] - r) * t;\n g += (frames[i + 7 + 2] - g) * t;\n b += (frames[i + 7 + 3] - b) * t;\n r2 += (frames[i + 7 + 4] - r2) * t;\n g2 += (frames[i + 7 + 5] - g2) * t;\n b2 += (frames[i + 7 + 6] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (alpha == 1) {\n light.r = r;\n light.g = g;\n light.b = b;\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.r += (r - light.r) * alpha;\n light.g += (g - light.g) * alpha;\n light.b += (b - light.b) * alpha;\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var AttachmentTimeline = class extends Timeline {\n constructor(frameCount, slotIndex) {\n super(frameCount, [\n Property.attachment + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachmentNames = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, attachmentName) {\n this.frames[frame] = time;\n this.attachmentNames[frame] = attachmentName;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\n }\n setAttachment(skeleton, slot, attachmentName) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n };\n var DeformTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex, attachment) {\n super(frameCount, bezierCount, [\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n this.vertices = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, vertices) {\n this.frames[frame] = time;\n this.vertices[frame] = vertices;\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getCurvePercent(time, frame) {\n let curves = this.curves;\n let i = curves[frame];\n switch (i) {\n case 0:\n let x2 = this.frames[frame];\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\n case 1:\n return 0;\n }\n i -= 2;\n if (curves[i] > time) {\n let x2 = this.frames[frame];\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n let x = curves[n - 2], y = curves[n - 1];\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.getAttachment();\n if (!slotAttachment)\n return;\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\n return;\n let deform = slot.deform;\n if (deform.length == 0)\n blend = 0 /* setup */;\n let vertices = this.vertices;\n let vertexCount = vertices[0].length;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n deform.length = 0;\n return;\n case 1 /* first */:\n if (alpha == 1) {\n deform.length = 0;\n return;\n }\n deform.length = vertexCount;\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n deform.length = vertexCount;\n if (time >= frames[frames.length - 1]) {\n let lastVertices = vertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] - setupVertices[i2];\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2];\n }\n } else\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let setup = setupVertices[i2];\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] = lastVertices[i2] * alpha;\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] * alpha;\n }\n }\n }\n return;\n }\n let frame = Timeline.search1(frames, time);\n let percent = this.getCurvePercent(time, frame);\n let prevVertices = vertices[frame];\n let nextVertices = vertices[frame + 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2], setup = setupVertices[i2];\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\n }\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n };\n var _EventTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _EventTimeline.propertyIds);\n this.events = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, event) {\n this.frames[frame] = event.time;\n this.events[frame] = event;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (!firedEvents)\n return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n let i = 0;\n if (lastTime < frames[0])\n i = 0;\n else {\n i = Timeline.search1(frames, lastTime) + 1;\n let frameTime = frames[i];\n while (i > 0) {\n if (frames[i - 1] != frameTime)\n break;\n i--;\n }\n }\n for (; i < frameCount && time >= frames[i]; i++)\n firedEvents.push(this.events[i]);\n }\n };\n var EventTimeline = _EventTimeline;\n EventTimeline.propertyIds = [\"\" + Property.event];\n var _DrawOrderTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _DrawOrderTimeline.propertyIds);\n this.drawOrders = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, drawOrder) {\n this.frames[frame] = time;\n this.drawOrders[frame] = drawOrder;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n let idx = Timeline.search1(this.frames, time);\n let drawOrderToSetupIndex = this.drawOrders[idx];\n if (!drawOrderToSetupIndex)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n else {\n let drawOrder = skeleton.drawOrder;\n let slots = skeleton.slots;\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n };\n var DrawOrderTimeline = _DrawOrderTimeline;\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\n var IkConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, ikConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.ikConstraint + \"|\" + ikConstraintIndex\n ]);\n this.ikConstraintIndex = 0;\n this.ikConstraintIndex = ikConstraintIndex;\n }\n getFrameEntries() {\n return 6;\n }\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\n frame *= 6;\n this.frames[frame] = time;\n this.frames[frame + 1] = mix;\n this.frames[frame + 2] = softness;\n this.frames[frame + 3] = bendDirection;\n this.frames[frame + 4] = compress ? 1 : 0;\n this.frames[frame + 5] = stretch ? 1 : 0;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* 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 1 /* 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 let mix = 0, softness = 0;\n let i = Timeline.search(frames, time, 6);\n let curveType = this.curves[i / 6];\n switch (curveType) {\n case 0:\n let before = frames[i];\n mix = frames[i + 1];\n softness = frames[i + 2];\n let t = (time - before) / (frames[i + 6] - before);\n mix += (frames[i + 6 + 1] - mix) * t;\n softness += (frames[i + 6 + 2] - softness) * t;\n break;\n case 1:\n mix = frames[i + 1];\n softness = frames[i + 2];\n break;\n default:\n mix = this.getBezierValue(time, i, 1, curveType - 2);\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n if (blend == 0 /* setup */) {\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\n if (direction == 1 /* mixOut */) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n } else {\n constraint.mix += (mix - constraint.mix) * alpha;\n constraint.softness += (softness - constraint.softness) * alpha;\n if (direction == 0 /* mixIn */) {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n }\n }\n };\n var TransformConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, transformConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.transformConstraint + \"|\" + transformConstraintIndex\n ]);\n this.transformConstraintIndex = 0;\n this.transformConstraintIndex = transformConstraintIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\n let frames = this.frames;\n frame *= 7;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n frames[frame + 4] = mixScaleX;\n frames[frame + 5] = mixScaleY;\n frames[frame + 6] = mixShearY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\n }\n return;\n }\n let rotate, x, y, scaleX, scaleY, shearY;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n rotate += (frames[i + 7 + 1] - rotate) * t;\n x += (frames[i + 7 + 2] - x) * t;\n y += (frames[i + 7 + 3] - y) * t;\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\n shearY += (frames[i + 7 + 6] - shearY) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\n }\n }\n };\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.position = constraint.data.position;\n return;\n case 1 /* first */:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n let position = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n };\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.spacing = constraint.data.spacing;\n return;\n case 1 /* first */:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n let spacing = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n };\n var PathConstraintMixTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\n ]);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, mixRotate, mixX, mixY) {\n let frames = this.frames;\n frame <<= 2;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = constraint.data.mixRotate;\n constraint.mixX = constraint.data.mixX;\n constraint.mixY = constraint.data.mixY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\n }\n return;\n }\n let rotate, x, y;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n rotate += (frames[i + 4 + 1] - rotate) * t;\n x += (frames[i + 4 + 2] - x) * t;\n y += (frames[i + 4 + 3] - y) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n }\n }\n };\n var _SequenceTimeline = class extends Timeline {\n constructor(frameCount, slotIndex, attachment) {\n super(frameCount, [\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\n ]);\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n }\n getFrameEntries() {\n return _SequenceTimeline.ENTRIES;\n }\n getSlotIndex() {\n return this.slotIndex;\n }\n getAttachment() {\n return this.attachment;\n }\n setFrame(frame, time, mode, index, delay) {\n let frames = this.frames;\n frame *= _SequenceTimeline.ENTRIES;\n frames[frame] = time;\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\n frames[frame + _SequenceTimeline.DELAY] = delay;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.attachment;\n let attachment = this.attachment;\n if (slotAttachment != attachment) {\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\n return;\n }\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n slot.sequenceIndex = -1;\n return;\n }\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\n let before = frames[i];\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\n let delay = frames[i + _SequenceTimeline.DELAY];\n if (!this.attachment.sequence)\n return;\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\n let mode = SequenceModeValues[modeAndIndex & 15];\n if (mode != 0 /* hold */) {\n index += (time - before) / delay + 1e-5 | 0;\n switch (mode) {\n case 1 /* once */:\n index = Math.min(count - 1, index);\n break;\n case 2 /* loop */:\n index %= count;\n break;\n case 3 /* pingpong */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : index % n;\n if (index >= count)\n index = n - index;\n break;\n }\n case 4 /* onceReverse */:\n index = Math.max(count - 1 - index, 0);\n break;\n case 5 /* loopReverse */:\n index = count - 1 - index % count;\n break;\n case 6 /* pingpongReverse */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : (index + count - 1) % n;\n if (index >= count)\n index = n - index;\n }\n }\n }\n slot.sequenceIndex = index;\n }\n };\n var SequenceTimeline = _SequenceTimeline;\n SequenceTimeline.ENTRIES = 3;\n SequenceTimeline.MODE = 1;\n SequenceTimeline.DELAY = 2;\n\n // spine-core/src/AnimationState.ts\n var _AnimationState = class {\n constructor(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 StringSet();\n this.animationsChanged = false;\n this.trackEntryPool = new Pool(() => new TrackEntry());\n this.data = data;\n }\n static emptyAnimation() {\n return _AnimationState._emptyAnimation;\n }\n update(delta) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (!current)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n let 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 let next = current.next;\n if (next) {\n let 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) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\n tracks[i] = null;\n this.queue.end(current);\n this.clearNext(current);\n continue;\n }\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from)\n from.mixingTo = null;\n while (from) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n }\n updateMixingFrom(to, delta) {\n let from = to.mixingFrom;\n if (!from)\n return true;\n let 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)\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 apply(skeleton) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\n let current = tracks[i2];\n if (!current || current.delay > 0)\n continue;\n applied = true;\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\n let mix = current.alpha;\n if (current.mixingFrom)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && !current.next)\n mix = 0;\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\n let applyEvents = events;\n if (current.reverse) {\n applyTime = current.animation.duration - applyTime;\n applyEvents = null;\n }\n let timelines = current.animation.timelines;\n let timelineCount = timelines.length;\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\n for (let ii = 0; ii < timelineCount; ii++) {\n Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\n }\n } else {\n let timelineMode = current.timelineMode;\n let shortestRotation = current.shortestRotation;\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n current.timelinesRotation.length = timelineCount << 1;\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline2 = timelines[ii];\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\n } else if (timeline2 instanceof AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\n } else {\n Utils.webkit602BugfixHelper(mix, blend);\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* 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 + 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.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n }\n applyMixingFrom(to, skeleton, blend) {\n let from = to.mixingFrom;\n if (from.mixingFrom)\n this.applyMixingFrom(from, skeleton, blend);\n let mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == 1 /* first */)\n blend = 0 /* setup */;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != 1 /* first */)\n blend = from.mixBlend;\n }\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let timelines = from.animation.timelines;\n let timelineCount = timelines.length;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\n let events = null;\n if (from.reverse)\n applyTime = from.animation.duration - applyTime;\n else if (mix < from.eventThreshold)\n events = this.events;\n if (blend == 3 /* add */) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n let shortestRotation = from.shortestRotation;\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n from.timelinesRotation.length = timelineCount << 1;\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = 1 /* mixOut */;\n let timelineBlend;\n let alpha = 0;\n switch (timelineMode[i]) {\n case SUBSEQUENT:\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaMix;\n break;\n case HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case HOLD_FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = 0 /* setup */;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (!shortestRotation && timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\n else {\n Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\n direction = 0 /* mixIn */;\n timeline.apply(skeleton, animationLast, applyTime, 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 applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n if (time < timeline.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n } else\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + SETUP;\n }\n setAttachment(skeleton, slot, attachmentName, attachments) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n if (attachments)\n slot.attachmentState = this.unkeyedState + CURRENT;\n }\n applyRotateTimeline(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, 0 /* mixIn */);\n return;\n }\n let bone = skeleton.bones[timeline.boneIndex];\n if (!bone.active)\n return;\n let frames = timeline.frames;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case 1 /* first */:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\n r2 = bone.data.rotation + timeline.getCurveValue(time);\n }\n let total = 0, diff = r2 - r1;\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n let current = diff > 0, dir = lastTotal >= 0;\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n bone.rotation = r1 + total * alpha;\n }\n queueEvents(entry, animationTime) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped)\n break;\n if (event.time > animationEnd)\n continue;\n this.queue.event(entry, event);\n }\n let 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 let event = events[i];\n if (event.time < animationStart)\n continue;\n this.queue.event(entry, event);\n }\n }\n clearTracks() {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let 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 clearTrack(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n let current = this.tracks[trackIndex];\n if (!current)\n return;\n this.queue.end(current);\n this.clearNext(current);\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (!from)\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 setCurrent(index, current, interrupt) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n current.previous = null;\n if (from) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom && 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 setAnimation(trackIndex, animationName, loop = false) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n setAnimationWith(trackIndex, animation, loop = false) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.clearNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.clearNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let last = this.expandToIndex(trackIndex);\n if (last) {\n while (last.next)\n last = last.next;\n }\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n if (!last) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n entry.previous = last;\n if (delay <= 0)\n delay += last.getTrackComplete() - entry.mixDuration;\n }\n entry.delay = delay;\n return entry;\n }\n setEmptyAnimation(trackIndex, mixDuration = 0) {\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\n if (delay <= 0)\n entry.delay += entry.mixDuration - mixDuration;\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n setEmptyAnimations(mixDuration = 0) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n expandToIndex(index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n trackEntry(trackIndex, animation, loop, last) {\n let entry = this.trackEntryPool.obtain();\n entry.reset();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.reverse = false;\n entry.shortestRotation = 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.mixTime = 0;\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\n entry.interruptAlpha = 1;\n entry.totalAlpha = 0;\n entry.mixBlend = 2 /* replace */;\n return entry;\n }\n clearNext(entry) {\n let next = entry.next;\n while (next) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n _animationsChanged() {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let entry = tracks[i];\n if (!entry)\n continue;\n while (entry.mixingFrom)\n entry = entry.mixingFrom;\n do {\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry);\n }\n }\n computeHold(entry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n timelineMode.length = timelinesCount;\n let timelineHoldMix = entry.timelineHoldMix;\n timelineHoldMix.length = 0;\n let propertyIDs = this.propertyIDs;\n if (to && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++)\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\n return;\n }\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let ids = timeline.getPropertyIds();\n if (!propertyIDs.addAll(ids))\n timelineMode[i] = SUBSEQUENT;\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\n timelineMode[i] = FIRST;\n } else {\n for (let next = to.mixingTo; next; next = next.mixingTo) {\n if (next.animation.hasTimeline(ids))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = HOLD_MIX;\n timelineHoldMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = HOLD_FIRST;\n }\n }\n }\n getCurrent(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n }\n addListener(listener) {\n if (!listener)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n }\n clearListeners() {\n this.listeners.length = 0;\n }\n clearListenerNotifications() {\n this.queue.clear();\n }\n };\n var AnimationState = _AnimationState;\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\n var TrackEntry = class {\n constructor() {\n this.animation = null;\n this.previous = null;\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.listener = null;\n this.trackIndex = 0;\n this.loop = false;\n this.holdPrevious = false;\n this.reverse = false;\n this.shortestRotation = false;\n this.eventThreshold = 0;\n this.attachmentThreshold = 0;\n this.drawOrderThreshold = 0;\n this.animationStart = 0;\n this.animationEnd = 0;\n this.animationLast = 0;\n this.nextAnimationLast = 0;\n this.delay = 0;\n this.trackTime = 0;\n this.trackLast = 0;\n this.nextTrackLast = 0;\n this.trackEnd = 0;\n this.timeScale = 0;\n this.alpha = 0;\n this.mixTime = 0;\n this.mixDuration = 0;\n this.interruptAlpha = 0;\n this.totalAlpha = 0;\n this.mixBlend = 2 /* replace */;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n reset() {\n this.next = null;\n this.previous = 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 getAnimationTime() {\n if (this.loop) {\n let 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 setAnimationLast(animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n isComplete() {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n resetRotationDirections() {\n this.timelinesRotation.length = 0;\n }\n getTrackComplete() {\n let duration = this.animationEnd - this.animationStart;\n if (duration != 0) {\n if (this.loop)\n return duration * (1 + (this.trackTime / duration | 0));\n if (this.trackTime < duration)\n return duration;\n }\n return this.trackTime;\n }\n };\n var EventQueue = class {\n constructor(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n start(entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n interrupt(entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n end(entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n dispose(entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n complete(entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n event(entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n drain() {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n let objects = this.objects;\n let listeners = this.animState.listeners;\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i];\n let entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener && entry.listener.start)\n entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.start)\n listener.start(entry);\n }\n break;\n case EventType.interrupt:\n if (entry.listener && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.interrupt)\n listener.interrupt(entry);\n }\n break;\n case EventType.end:\n if (entry.listener && entry.listener.end)\n entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.end)\n listener.end(entry);\n }\n case EventType.dispose:\n if (entry.listener && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.dispose)\n listener.dispose(entry);\n }\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener && entry.listener.complete)\n entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.complete)\n listener.complete(entry);\n }\n break;\n case EventType.event:\n let event = objects[i++ + 2];\n if (entry.listener && entry.listener.event)\n entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.event)\n listener.event(entry, event);\n }\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n }\n clear() {\n this.objects.length = 0;\n }\n };\n var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"start\"] = 0] = \"start\";\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\n EventType2[EventType2[\"end\"] = 2] = \"end\";\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\n EventType2[EventType2[\"event\"] = 5] = \"event\";\n return EventType2;\n })(EventType || {});\n var AnimationStateAdapter = class {\n start(entry) {\n }\n interrupt(entry) {\n }\n end(entry) {\n }\n dispose(entry) {\n }\n complete(entry) {\n }\n event(entry, event) {\n }\n };\n var SUBSEQUENT = 0;\n var FIRST = 1;\n var HOLD_SUBSEQUENT = 2;\n var HOLD_FIRST = 3;\n var HOLD_MIX = 4;\n var SETUP = 1;\n var CURRENT = 2;\n\n // spine-core/src/AnimationStateData.ts\n var AnimationStateData = class {\n constructor(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (!skeletonData)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n setMix(fromName, toName, duration) {\n let from = this.skeletonData.findAnimation(fromName);\n if (!from)\n throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (!to)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n setMixWith(from, to, duration) {\n if (!from)\n throw new Error(\"from cannot be null.\");\n if (!to)\n throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n getMix(from, to) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === void 0 ? this.defaultMix : value;\n }\n };\n\n // spine-core/src/attachments/BoundingBoxAttachment.ts\n var BoundingBoxAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/attachments/ClippingAttachment.ts\n var ClippingAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.endSlot = null;\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\n }\n copy() {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/Texture.ts\n var Texture = class {\n constructor(image) {\n this._image = image;\n }\n getImage() {\n return this._image;\n }\n };\n var TextureFilter = /* @__PURE__ */ ((TextureFilter2) => {\n TextureFilter2[TextureFilter2[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter2[TextureFilter2[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter2[TextureFilter2[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter2[TextureFilter2[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter2[TextureFilter2[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter2[TextureFilter2[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter2[TextureFilter2[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n return TextureFilter2;\n })(TextureFilter || {});\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\n return TextureWrap3;\n })(TextureWrap || {});\n var TextureRegion = class {\n constructor() {\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.degrees = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n };\n var FakeTexture = class extends Texture {\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-core/src/TextureAtlas.ts\n var TextureAtlas = class {\n constructor(atlasText) {\n this.pages = new Array();\n this.regions = new Array();\n let reader = new TextureAtlasReader(atlasText);\n let entry = new Array(4);\n let pageFields = {};\n pageFields[\"size\"] = (page2) => {\n page2.width = parseInt(entry[1]);\n page2.height = parseInt(entry[2]);\n };\n pageFields[\"format\"] = () => {\n };\n pageFields[\"filter\"] = (page2) => {\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\n };\n pageFields[\"repeat\"] = (page2) => {\n if (entry[1].indexOf(\"x\") != -1)\n page2.uWrap = 10497 /* Repeat */;\n if (entry[1].indexOf(\"y\") != -1)\n page2.vWrap = 10497 /* Repeat */;\n };\n pageFields[\"pma\"] = (page2) => {\n page2.pma = entry[1] == \"true\";\n };\n var regionFields = {};\n regionFields[\"xy\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n };\n regionFields[\"size\"] = (region) => {\n region.width = parseInt(entry[1]);\n region.height = parseInt(entry[2]);\n };\n regionFields[\"bounds\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n region.width = parseInt(entry[3]);\n region.height = parseInt(entry[4]);\n };\n regionFields[\"offset\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n };\n regionFields[\"orig\"] = (region) => {\n region.originalWidth = parseInt(entry[1]);\n region.originalHeight = parseInt(entry[2]);\n };\n regionFields[\"offsets\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n region.originalWidth = parseInt(entry[3]);\n region.originalHeight = parseInt(entry[4]);\n };\n regionFields[\"rotate\"] = (region) => {\n let value = entry[1];\n if (value == \"true\")\n region.degrees = 90;\n else if (value != \"false\")\n region.degrees = parseInt(value);\n };\n regionFields[\"index\"] = (region) => {\n region.index = parseInt(entry[1]);\n };\n let line = reader.readLine();\n while (line && line.trim().length == 0)\n line = reader.readLine();\n while (true) {\n if (!line || line.trim().length == 0)\n break;\n if (reader.readEntry(entry, line) == 0)\n break;\n line = reader.readLine();\n }\n let page = null;\n let names = null;\n let values = null;\n while (true) {\n if (line === null)\n break;\n if (line.trim().length == 0) {\n page = null;\n line = reader.readLine();\n } else if (!page) {\n page = new TextureAtlasPage(line.trim());\n while (true) {\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\n break;\n let field = pageFields[entry[0]];\n if (field)\n field(page);\n }\n this.pages.push(page);\n } else {\n let region = new TextureAtlasRegion(page, line);\n while (true) {\n let count = reader.readEntry(entry, line = reader.readLine());\n if (count == 0)\n break;\n let field = regionFields[entry[0]];\n if (field)\n field(region);\n else {\n if (!names)\n names = [];\n if (!values)\n values = [];\n names.push(entry[0]);\n let entryValues = [];\n for (let i = 0; i < count; i++)\n entryValues.push(parseInt(entry[i + 1]));\n values.push(entryValues);\n }\n }\n if (region.originalWidth == 0 && region.originalHeight == 0) {\n region.originalWidth = region.width;\n region.originalHeight = region.height;\n }\n if (names && names.length > 0 && values && values.length > 0) {\n region.names = names;\n region.values = values;\n names = null;\n values = null;\n }\n region.u = region.x / page.width;\n region.v = region.y / page.height;\n if (region.degrees == 90) {\n region.u2 = (region.x + region.height) / page.width;\n region.v2 = (region.y + region.width) / page.height;\n } else {\n region.u2 = (region.x + region.width) / page.width;\n region.v2 = (region.y + region.height) / page.height;\n }\n this.regions.push(region);\n }\n }\n }\n findRegion(name) {\n for (let 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 setTextures(assetManager, pathPrefix = \"\") {\n for (let page of this.pages)\n page.setTexture(assetManager.get(pathPrefix + page.name));\n }\n dispose() {\n var _a;\n for (let i = 0; i < this.pages.length; i++) {\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\n }\n }\n };\n var TextureAtlasReader = class {\n constructor(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n readLine() {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n readEntry(entry, line) {\n if (!line)\n return 0;\n line = line.trim();\n if (line.length == 0)\n return 0;\n let colon = line.indexOf(\":\");\n if (colon == -1)\n return 0;\n entry[0] = line.substr(0, colon).trim();\n for (let i = 1, lastMatch = colon + 1; ; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) {\n entry[i] = line.substr(lastMatch).trim();\n return i;\n }\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n if (i == 4)\n return 4;\n }\n }\n };\n var TextureAtlasPage = class {\n constructor(name) {\n this.minFilter = 9728 /* Nearest */;\n this.magFilter = 9728 /* Nearest */;\n this.uWrap = 33071 /* ClampToEdge */;\n this.vWrap = 33071 /* ClampToEdge */;\n this.texture = null;\n this.width = 0;\n this.height = 0;\n this.pma = false;\n this.name = name;\n }\n setTexture(texture) {\n this.texture = texture;\n texture.setFilters(this.minFilter, this.magFilter);\n texture.setWraps(this.uWrap, this.vWrap);\n }\n };\n var TextureAtlasRegion = class extends TextureRegion {\n constructor(page, name) {\n super();\n this.x = 0;\n this.y = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n this.index = 0;\n this.degrees = 0;\n this.names = null;\n this.values = null;\n this.page = page;\n this.name = name;\n }\n };\n\n // spine-core/src/attachments/MeshAttachment.ts\n var MeshAttachment = class extends VertexAttachment {\n constructor(name, path) {\n super(name);\n this.region = null;\n this.regionUVs = [];\n this.uvs = [];\n this.triangles = [];\n this.color = new Color(1, 1, 1, 1);\n this.width = 0;\n this.height = 0;\n this.hullLength = 0;\n this.edges = [];\n this.parentMesh = null;\n this.sequence = null;\n this.tempColor = new Color(0, 0, 0, 0);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let regionUVs = this.regionUVs;\n if (!this.uvs || this.uvs.length != regionUVs.length)\n this.uvs = Utils.newFloatArray(regionUVs.length);\n let uvs = this.uvs;\n let n = this.uvs.length;\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof TextureAtlasRegion) {\n let region = this.region, image = region.page.texture.getImage();\n let textureWidth = image.width, textureHeight = image.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 (let 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 (let 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 (let 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 } else if (!this.region) {\n u = v = 0;\n width = height = 1;\n } else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (let 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 getParentMesh() {\n return this.parentMesh;\n }\n setParentMesh(parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh) {\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 copy() {\n if (this.parentMesh)\n return this.newLinkedMesh();\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n if (this.edges) {\n copy.edges = new Array(this.edges.length);\n 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 computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n super.computeWorldVertices(slot, start, count, worldVertices, offset, stride);\n }\n newLinkedMesh() {\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n copy.timelineAttachment = this.timelineAttachment;\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\n if (copy.region != null)\n copy.updateRegion();\n return copy;\n }\n };\n\n // spine-core/src/attachments/PathAttachment.ts\n var PathAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.lengths = [];\n this.closed = false;\n this.constantSpeed = false;\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n 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 };\n\n // spine-core/src/attachments/PointAttachment.ts\n var PointAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.color = new Color(0.38, 0.94, 0, 1);\n }\n computeWorldPosition(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 computeWorldRotation(bone) {\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * bone.a + sin * bone.b;\n let y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n copy() {\n let copy = new PointAttachment(this.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 };\n\n // spine-core/src/attachments/RegionAttachment.ts\n var _RegionAttachment = class extends Attachment {\n constructor(name, path) {\n super(name);\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 Color(1, 1, 1, 1);\n this.rendererObject = null;\n this.region = null;\n this.sequence = null;\n this.offset = Utils.newFloatArray(8);\n this.uvs = Utils.newFloatArray(8);\n this.tempColor = new Color(1, 1, 1, 1);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let region = this.region;\n let uvs = this.uvs;\n if (region == null) {\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n uvs[4] = 1;\n uvs[5] = 1;\n uvs[6] = 1;\n uvs[7] = 0;\n return;\n }\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let x = this.x, y = this.y;\n let localXCos = localX * cos + x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[0] = localXCos - localYSin;\n offset[1] = localYCos + localXSin;\n offset[2] = localXCos - localY2Sin;\n offset[3] = localY2Cos + localXSin;\n offset[4] = localX2Cos - localY2Sin;\n offset[5] = localY2Cos + localX2Sin;\n offset[6] = localX2Cos - localYSin;\n offset[7] = localYCos + localX2Sin;\n if (region.degrees == 90) {\n uvs[0] = region.u2;\n uvs[1] = region.v2;\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 } 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 computeWorldVertices(slot, worldVertices, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n let bone = slot.bone;\n let vertexOffset = this.offset;\n let x = bone.worldX, y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[0];\n offsetY = vertexOffset[1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[2];\n offsetY = vertexOffset[3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[4];\n offsetY = vertexOffset[5];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[6];\n offsetY = vertexOffset[7];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n }\n copy() {\n let copy = new _RegionAttachment(this.name, this.path);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\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 Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n return copy;\n }\n };\n var RegionAttachment = _RegionAttachment;\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\n // spine-core/src/AtlasAttachmentLoader.ts\n var AtlasAttachmentLoader = class {\n constructor(atlas) {\n this.atlas = atlas;\n }\n loadSequence(name, basePath, sequence) {\n let regions = sequence.regions;\n for (let i = 0, n = regions.length; i < n; i++) {\n let path = sequence.getPath(basePath, i);\n let region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\n regions[i] = region;\n regions[i].renderObject = regions[i];\n }\n }\n newRegionAttachment(skin, name, path, sequence) {\n let attachment = new RegionAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newMeshAttachment(skin, name, path, sequence) {\n let attachment = new MeshAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newBoundingBoxAttachment(skin, name) {\n return new BoundingBoxAttachment(name);\n }\n newPathAttachment(skin, name) {\n return new PathAttachment(name);\n }\n newPointAttachment(skin, name) {\n return new PointAttachment(name);\n }\n newClippingAttachment(skin, name) {\n return new ClippingAttachment(name);\n }\n };\n\n // spine-core/src/BoneData.ts\n var BoneData = class {\n constructor(index, name, parent) {\n this.index = 0;\n this.parent = null;\n this.length = 0;\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 Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n };\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n return TransformMode2;\n })(TransformMode || {});\n\n // spine-core/src/Bone.ts\n var Bone = class {\n constructor(data, skeleton, parent) {\n this.parent = null;\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.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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 isActive() {\n return this.active;\n }\n update() {\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\n }\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n updateWorldTransformWith(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 let parent = this.parent;\n if (!parent) {\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n let sx = skeleton.scaleX;\n let sy = skeleton.scaleY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n let 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 0 /* Normal */: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = 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 1 /* OnlyTranslation */: {\n let rotationY = rotation + 90 + shearY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case 2 /* NoRotationOrReflection */: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 1e-4) {\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) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = 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 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 1e-5)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = 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 setToSetupPose() {\n let 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 getWorldRotationX() {\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\n }\n getWorldRotationY() {\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\n }\n getWorldScaleX() {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n }\n getWorldScaleY() {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n }\n updateAppliedTransform() {\n let parent = this.parent;\n if (!parent) {\n this.ax = this.worldX - this.skeleton.x;\n this.ay = this.worldY - this.skeleton.y;\n this.arotation = Math.atan2(this.c, this.a) * 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) * MathUtils.radDeg;\n return;\n }\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n let pid = 1 / (pa * pd - pb * pc);\n let 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 let ia = pid * pd;\n let id = pid * pa;\n let ib = pid * pb;\n let ic = pid * pc;\n let ra = ia * this.a - ib * this.c;\n let rb = ia * this.b - ib * this.d;\n let rc = id * this.c - ic * this.a;\n let rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 1e-4) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\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) * MathUtils.radDeg;\n }\n }\n worldToLocal(world) {\n let invDet = 1 / (this.a * this.d - this.b * this.c);\n let x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = x * this.d * invDet - y * this.b * invDet;\n world.y = y * this.a * invDet - x * this.c * invDet;\n return world;\n }\n localToWorld(local) {\n let 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 worldToLocalRotation(worldRotation) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\n }\n localToWorldRotation(localRotation) {\n localRotation -= this.rotation - this.shearX;\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\n }\n rotateWorld(degrees) {\n let a = this.a, b = this.b, c = this.c, d = this.d;\n let cos = MathUtils.cosDeg(degrees), sin = 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 }\n };\n\n // spine-core/src/ConstraintData.ts\n var ConstraintData = class {\n constructor(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n };\n\n // spine-core/src/AssetManagerBase.ts\n var AssetManagerBase = class {\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\n this.pathPrefix = \"\";\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n this.downloader = downloader;\n }\n start(path) {\n this.toLoad++;\n return this.pathPrefix + path;\n }\n success(callback, path, asset) {\n this.toLoad--;\n this.loaded++;\n this.assets[path] = asset;\n if (callback)\n callback(path, asset);\n }\n error(callback, path, message) {\n this.toLoad--;\n this.loaded++;\n this.errors[path] = message;\n if (callback)\n callback(path, message);\n }\n loadAll() {\n let promise = new Promise((resolve, reject) => {\n let check = () => {\n if (this.isLoadingComplete()) {\n if (this.hasErrors())\n reject(this.errors);\n else\n resolve(this);\n return;\n }\n requestAnimationFrame(check);\n };\n requestAnimationFrame(check);\n });\n return promise;\n }\n setRawDataURI(path, data) {\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\n }\n loadBinary(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadBinary(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\n });\n }\n loadText(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadText(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\n });\n }\n loadJson(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadJson(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\n });\n }\n loadTexture(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\n let isWebWorker = !isBrowser;\n if (isWebWorker) {\n fetch(path, { mode: \"cors\" }).then((response) => {\n if (response.ok)\n return response.blob();\n this.error(error, path, `Couldn't load image: ${path}`);\n return null;\n }).then((blob) => {\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\n }).then((bitmap) => {\n if (bitmap)\n this.success(success, path, this.textureLoader(bitmap));\n });\n } else {\n let image = new Image();\n image.crossOrigin = \"anonymous\";\n image.onload = () => {\n this.success(success, path, this.textureLoader(image));\n };\n image.onerror = () => {\n this.error(error, path, `Couldn't load image: ${path}`);\n };\n if (this.downloader.rawDataUris[path])\n path = this.downloader.rawDataUris[path];\n image.src = path;\n }\n }\n loadTextureAtlas(path, success = () => {\n }, error = () => {\n }, fileAlias) {\n let index = path.lastIndexOf(\"/\");\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\n path = this.start(path);\n this.downloader.downloadText(path, (atlasText) => {\n try {\n let atlas = new TextureAtlas(atlasText);\n let toLoad = atlas.pages.length, abort = false;\n for (let page of atlas.pages) {\n this.loadTexture(\n !fileAlias ? parent + page.name : fileAlias[page.name],\n (imagePath, texture) => {\n if (!abort) {\n page.setTexture(texture);\n if (--toLoad == 0)\n this.success(success, path, atlas);\n }\n },\n (imagePath, message) => {\n if (!abort)\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\n abort = true;\n }\n );\n }\n } catch (e) {\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\n }\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\n });\n }\n get(path) {\n return this.assets[this.pathPrefix + path];\n }\n require(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset)\n return asset;\n let error = this.errors[path];\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\n }\n remove(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n delete this.assets[path];\n return asset;\n }\n removeAll() {\n for (let key in this.assets) {\n let asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n }\n isLoadingComplete() {\n return this.toLoad == 0;\n }\n getToLoad() {\n return this.toLoad;\n }\n getLoaded() {\n return this.loaded;\n }\n dispose() {\n this.removeAll();\n }\n hasErrors() {\n return Object.keys(this.errors).length > 0;\n }\n getErrors() {\n return this.errors;\n }\n };\n var Downloader = class {\n constructor() {\n this.callbacks = {};\n this.rawDataUris = {};\n }\n dataUriToString(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx != -1) {\n base64Idx += \"base64,\".length;\n return atob(dataUri.substr(base64Idx));\n } else {\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\n }\n }\n base64ToUint8Array(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n }\n dataUriToUint8Array(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx == -1)\n throw new Error(\"Not a binary data URI.\");\n base64Idx += \"base64,\".length;\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\n }\n downloadText(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToString(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.open(\"GET\", url, true);\n let done = () => {\n this.finish(url, request.status, request.responseText);\n };\n request.onload = done;\n request.onerror = done;\n request.send();\n }\n downloadJson(url, success, error) {\n this.downloadText(url, (data) => {\n success(JSON.parse(data));\n }, error);\n }\n downloadBinary(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n let onerror = () => {\n this.finish(url, request.status, request.response);\n };\n request.onload = () => {\n if (request.status == 200 || request.status == 0)\n this.finish(url, 200, new Uint8Array(request.response));\n else\n onerror();\n };\n request.onerror = onerror;\n request.send();\n }\n start(url, success, error) {\n let callbacks = this.callbacks[url];\n try {\n if (callbacks)\n return true;\n this.callbacks[url] = callbacks = [];\n } finally {\n callbacks.push(success, error);\n }\n }\n finish(url, status, data) {\n let callbacks = this.callbacks[url];\n delete this.callbacks[url];\n let args = status == 200 || status == 0 ? [data] : [status, data];\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\n callbacks[i].apply(null, args);\n }\n };\n\n // spine-core/src/Event.ts\n var Event = class {\n constructor(time, data) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.time = 0;\n this.volume = 0;\n this.balance = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n };\n\n // spine-core/src/EventData.ts\n var EventData = class {\n constructor(name) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.audioPath = null;\n this.volume = 0;\n this.balance = 0;\n this.name = name;\n }\n };\n\n // spine-core/src/IkConstraint.ts\n var IkConstraint = class {\n constructor(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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find bone ${data.target.name}`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mix == 0)\n return;\n let target = this.target;\n let 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.data.uniform, this.softness, this.mix);\n break;\n }\n }\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\n let p = bone.parent;\n if (!p)\n throw new Error(\"IK bone must have parent.\");\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case 1 /* OnlyTranslation */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case 2 /* NoRotationOrReflection */:\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n let sa = pa / bone.skeleton.scaleX;\n let 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) * MathUtils.radDeg;\n default:\n let x = targetX - p.worldX, y = targetY - p.worldY;\n let 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) * 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 let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(\n bone.ax,\n bone.ay,\n bone.arotation + rotationIK * alpha,\n sx,\n sy,\n bone.ashearX,\n bone.ashearY\n );\n }\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\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 } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n let u = Math.abs(psx - psy) <= 1e-4;\n if (!u || stretch) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n let pp = parent.parent;\n if (!pp)\n throw new Error(\"IK parent must itself have a parent.\");\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 1e-4) {\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 let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) * 0.5;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let 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:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1) {\n cos = -1;\n a2 = Math.PI * bendDir;\n } else if (cos > 1) {\n cos = 1;\n a2 = 0;\n if (stretch) {\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n sx *= a;\n if (uniform)\n sy *= a;\n }\n } else\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 } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) * 0.5;\n let r0 = q / c2, r1 = c / q;\n let 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 let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let 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) * 0.5) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * 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, sy, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * 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 };\n\n // spine-core/src/IkConstraintData.ts\n var IkConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/PathConstraintData.ts\n var PathConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.positionMode = PositionMode.Fixed;\n this.spacingMode = SpacingMode.Fixed;\n this.rotateMode = RotateMode.Chain;\n this.offsetRotation = 0;\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n }\n set target(slotData) {\n this._target = slotData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"SlotData not set.\");\n else\n return this._target;\n }\n };\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\n return PositionMode2;\n })(PositionMode || {});\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\n return SpacingMode2;\n })(SpacingMode || {});\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\n return RotateMode2;\n })(RotateMode || {});\n\n // spine-core/src/PathConstraint.ts\n var _PathConstraint = class {\n constructor(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findSlot(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}`);\n this.target = target;\n this.position = data.position;\n this.spacing = data.spacing;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n }\n isActive() {\n return this.active;\n }\n update() {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment))\n return;\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\n return;\n let data = this.data;\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\n let bones = this.bones;\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\n let spacing = this.spacing;\n switch (data.spacingMode) {\n case 2 /* Percent */:\n if (scale) {\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon)\n lengths[i] = 0;\n else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n lengths[i] = Math.sqrt(x * x + y * y);\n }\n }\n }\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\n break;\n case 3 /* Proportional */:\n let sum = 0;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = length;\n sum += length;\n }\n }\n if (sum > 0) {\n sum = spacesCount / sum * spacing;\n for (let i = 1; i < spacesCount; i++)\n spaces[i] *= sum;\n }\n break;\n default:\n let lengthSpacing = data.spacingMode == 0 /* Length */;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n }\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = data.rotateMode == 1 /* Chain */;\n else {\n tip = false;\n let p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * mixX;\n bone.worldY += (boneY - bone.worldY) * mixY;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (mixRotate > 0) {\n let 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 let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\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.updateAppliedTransform();\n }\n }\n computeWorldPositions(path, spacesCount, tangents) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\n let closed2 = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed2 ? 1 : 2;\n let pathLength2 = lengths[curveCount];\n if (this.data.positionMode == 1 /* Percent */)\n position *= pathLength2;\n let multiplier2;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier2 = pathLength2;\n break;\n case 3 /* Proportional */:\n multiplier2 = pathLength2 / spacesCount;\n break;\n default:\n multiplier2 = 1;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier2;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength2;\n if (p < 0)\n p += pathLength2;\n curve = 0;\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 } else if (p > pathLength2) {\n if (prevCurve != _PathConstraint.AFTER) {\n prevCurve = _PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = lengths[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed2 && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(\n p,\n world[0],\n world[1],\n world[2],\n world[3],\n world[4],\n world[5],\n world[6],\n world[7],\n out,\n o,\n tangents || i > 0 && space == 0\n );\n }\n return out;\n }\n if (closed2) {\n verticesLength += 2;\n world = 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 } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let 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 (this.data.positionMode == 1 /* Percent */)\n position *= pathLength;\n let multiplier;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier = pathLength;\n break;\n case 3 /* Proportional */:\n multiplier = pathLength / spacesCount;\n break;\n default:\n multiplier = 1;\n }\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = curves[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n let 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) * 6e-3;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\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 let length = segments[segment];\n if (p > length)\n continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - 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 addBeforePosition(p, temp, i, out, o) {\n let 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 addAfterPosition(p, temp, i, out, o) {\n let 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 addCurvePosition(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 let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let 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 < 1e-3)\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 };\n var PathConstraint = _PathConstraint;\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 1e-5;\n\n // spine-core/src/Slot.ts\n var Slot = class {\n constructor(data, bone) {\n this.darkColor = null;\n this.attachment = null;\n this.attachmentState = 0;\n this.sequenceIndex = -1;\n this.deform = new Array();\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!bone)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = !data.darkColor ? null : new Color();\n this.setToSetupPose();\n }\n getSkeleton() {\n return this.bone.skeleton;\n }\n getAttachment() {\n return this.attachment;\n }\n setAttachment(attachment) {\n if (this.attachment == attachment)\n return;\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\n this.deform.length = 0;\n }\n this.attachment = attachment;\n this.sequenceIndex = -1;\n }\n setToSetupPose() {\n this.color.setFromColor(this.data.color);\n if (this.darkColor)\n this.darkColor.setFromColor(this.data.darkColor);\n if (!this.data.attachmentName)\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 };\n\n // spine-core/src/TransformConstraint.ts\n var TransformConstraint = class {\n constructor(data, skeleton) {\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 0;\n this.temp = new Vector2();\n this.active = false;\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n this.mixScaleX = data.mixScaleX;\n this.mixScaleY = data.mixScaleY;\n this.mixShearY = data.mixShearY;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\n return;\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n applyAbsoluteWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * mixX;\n bone.worldY += (temp.y - bone.worldY) * mixY;\n }\n if (mixScaleX != 0) {\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n if (s != 0)\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n if (s != 0)\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let b = bone.b, d = bone.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyRelativeWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * mixX;\n bone.worldY += temp.y * mixY;\n }\n if (mixScaleX != 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n let b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyAbsoluteLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation;\n if (mixRotate != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n rotation += r * mixRotate;\n }\n let x = bone.ax, y = bone.ay;\n x += (target.ax - x + this.data.offsetX) * mixX;\n y += (target.ay - y + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (mixScaleX != 0 && scaleX != 0)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\n if (mixScaleY != 0 && scaleY != 0)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\n let shearY = bone.ashearY;\n if (mixShearY != 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n shearY += r * mixShearY;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n applyRelativeLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n };\n\n // spine-core/src/Skeleton.ts\n var _Skeleton = class {\n constructor(data) {\n this._updateCache = new Array();\n this.skin = null;\n this.scaleX = 1;\n this._scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone;\n if (!boneData.parent)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n get scaleY() {\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\n }\n set scaleY(scaleY) {\n this._scaleY = scaleY;\n }\n updateCache() {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone);\n }\n }\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n sortIkConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let target = constraint.target;\n this.sortBone(target);\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length == 1) {\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n } else {\n let child = constrained[constrained.length - 1];\n this.sortBone(child);\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n child.sorted = true;\n }\n }\n sortPathConstraint(constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortTransformConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n this.sortBone(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n sortPathConstraintAttachmentWith(attachment, slotBone) {\n if (!(attachment instanceof PathAttachment))\n return;\n let pathBones = attachment.bones;\n if (!pathBones)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n for (let i = 0, n = pathBones.length; i < n; ) {\n let nn = pathBones[i++];\n nn += i;\n while (i < nn)\n this.sortBone(bones[pathBones[i++]]);\n }\n }\n }\n sortBone(bone) {\n if (!bone)\n return;\n if (bone.sorted)\n return;\n let parent = bone.parent;\n if (parent)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n sortReset(bones) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let 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 updateWorldTransform() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[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 }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n updateWorldTransformWith(parent) {\n let rootBone = this.getRootBone();\n if (!rootBone)\n throw new Error(\"Root bone must not be null.\");\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++) {\n let updatable = updateCache[i];\n if (updatable != rootBone)\n updatable.update();\n }\n }\n setToSetupPose() {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n setBonesToSetupPose() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let 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 let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n }\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n }\n }\n setSlotsToSetupPose() {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n getRootBone() {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n }\n setSkinByName(skinName) {\n let skin = this.data.findSkin(skinName);\n if (!skin)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n setSkin(newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin) {\n if (this.skin)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name) {\n let attachment = newSkin.getAttachment(i, name);\n if (attachment)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n getAttachmentByName(slotName, attachmentName) {\n let slot = this.data.findSlot(slotName);\n if (!slot)\n throw new Error(`Can't find slot with name ${slotName}`);\n return this.getAttachment(slot.index, attachmentName);\n }\n getAttachment(slotIndex, attachmentName) {\n if (!attachmentName)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin) {\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment)\n return attachment;\n }\n if (this.data.defaultSkin)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n setAttachment(slotName, attachmentName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment = null;\n if (attachmentName) {\n attachment = this.getAttachment(i, attachmentName);\n if (!attachment)\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 findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n getBoundsRect() {\n let offset = new Vector2();\n let size = new Vector2();\n this.getBounds(offset, size);\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\n }\n getBounds(offset, size, temp = new Array(2)) {\n if (!offset)\n throw new Error(\"offset cannot be null.\");\n if (!size)\n throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n let verticesLength = 0;\n let vertices = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let 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 };\n var Skeleton = _Skeleton;\n Skeleton.yDown = false;\n\n // spine-core/src/SkeletonData.ts\n var SkeletonData = class {\n constructor() {\n this.name = null;\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.defaultSkin = null;\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.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n this.version = null;\n this.hash = null;\n this.fps = 0;\n this.imagesPath = null;\n this.audioPath = null;\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n }\n findSkin(skinName) {\n if (!skinName)\n throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n }\n findEvent(eventDataName) {\n if (!eventDataName)\n throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName)\n return event;\n }\n return null;\n }\n findAnimation(animationName) {\n if (!animationName)\n throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n }\n findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n };\n\n // spine-core/src/Skin.ts\n var SkinEntry = class {\n constructor(slotIndex = 0, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n };\n var Skin = class {\n constructor(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n setAttachment(slotIndex, name, attachment) {\n if (!attachment)\n throw new Error(\"attachment cannot be null.\");\n let 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 addSkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n copySkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (!attachment.attachment)\n continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n getAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n removeAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary)\n delete dictionary[name];\n }\n getAttachments() {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n getAttachmentsForSlot(slotIndex, attachments) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n clear() {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n attachAll(skeleton, oldSkin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n };\n\n // spine-core/src/SlotData.ts\n var SlotData = class {\n constructor(index, name, boneData) {\n this.index = 0;\n this.color = new Color(1, 1, 1, 1);\n this.darkColor = null;\n this.attachmentName = null;\n this.blendMode = BlendMode.Normal;\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n if (!boneData)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n };\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\n return BlendMode3;\n })(BlendMode || {});\n\n // spine-core/src/TransformConstraintData.ts\n var TransformConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/SkeletonBinary.ts\n var SkeletonBinary = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(binary) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n skeletonData.name = \"\";\n let input = new BinaryInput(binary);\n let lowHash = input.readInt32();\n let highHash = input.readInt32();\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n let nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n let n = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let str = input.readString();\n if (!str)\n throw new Error(\"String in string table must not be null.\");\n input.strings.push(str);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Bone name must not be null.\");\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n let data = new BoneData(i, name, parent);\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 = input.readInt(true);\n data.skinRequired = input.readBoolean();\n if (nonessential)\n Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let slotName = input.readString();\n if (!slotName)\n throw new Error(\"Slot name must not be null.\");\n let boneData = skeletonData.bones[input.readInt(true)];\n let data = new SlotData(i, slotName, boneData);\n Color.rgba8888ToColor(data.color, input.readInt32());\n let darkColor = input.readInt32();\n if (darkColor != -1)\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = input.readInt(true);\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"IK constraint data name must not be null.\");\n let data = new IkConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Transform constraint data name must not be null.\");\n let data = new TransformConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n data.mixScaleX = input.readFloat();\n data.mixScaleY = input.readFloat();\n data.mixShearY = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Path constraint data name must not be null.\");\n let data = new PathConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 = input.readInt(true);\n data.spacingMode = input.readInt(true);\n data.rotateMode = input.readInt(true);\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n let i = skeletonData.skins.length;\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++) {\n let skin = this.readSkin(input, skeletonData, false, nonessential);\n if (!skin)\n throw new Error(\"readSkin() should not have returned null.\");\n skeletonData.skins[i] = skin;\n }\n }\n n = this.linkedMeshes.length;\n for (let i = 0; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(\"Not skin found for linked mesh.\");\n if (!linkedMesh.parent)\n throw new Error(\"Linked mesh parent must not be null\");\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let eventName = input.readStringRef();\n if (!eventName)\n throw new Error();\n let data = new EventData(eventName);\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) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let animationName = input.readString();\n if (!animationName)\n throw new Error(\"Animatio name must not be null.\");\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\n }\n return skeletonData;\n }\n readSkin(input, skeletonData, defaultSkin, nonessential) {\n let skin = null;\n let slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new Skin(\"default\");\n } else {\n let skinName = input.readStringRef();\n if (!skinName)\n throw new Error(\"Skin name must not be null.\");\n skin = new Skin(skinName);\n skin.bones.length = input.readInt(true);\n for (let i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (let 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 (let i = 0; i < slotCount; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let name = input.readStringRef();\n if (!name)\n throw new Error(\"Attachment name must not be null\");\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n if (attachment)\n skin.setAttachment(slotIndex, name, attachment);\n }\n }\n return skin;\n }\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n let scale = this.scale;\n let name = input.readStringRef();\n if (!name)\n name = attachmentName;\n switch (input.readByte()) {\n case AttachmentType.Region: {\n let path = input.readStringRef();\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let scaleX = input.readFloat();\n let scaleY = input.readFloat();\n let width = input.readFloat();\n let height = input.readFloat();\n let color = input.readInt32();\n let sequence = this.readSequence(input);\n if (!path)\n path = name;\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\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 Color.rgba8888ToColor(region.color, color);\n region.sequence = sequence;\n if (sequence == null)\n region.updateRegion();\n return region;\n }\n case AttachmentType.BoundingBox: {\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case AttachmentType.Mesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let vertexCount = input.readInt(true);\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\n let triangles = this.readShortArray(input);\n let vertices = this.readVertices(input, vertexCount);\n let hullLength = input.readInt(true);\n let sequence = this.readSequence(input);\n let edges = [];\n let width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n 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 if (sequence == null)\n mesh.updateRegion();\n mesh.hullLength = hullLength << 1;\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case AttachmentType.LinkedMesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let skinName = input.readStringRef();\n let parent = input.readStringRef();\n let inheritTimelines = input.readBoolean();\n let sequence = this.readSequence(input);\n let width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n Color.rgba8888ToColor(mesh.color, color);\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\n return mesh;\n }\n case AttachmentType.Path: {\n let closed2 = input.readBoolean();\n let constantSpeed = input.readBoolean();\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n let color = nonessential ? input.readInt32() : 0;\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = closed2;\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 Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case AttachmentType.Point: {\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let color = nonessential ? input.readInt32() : 0;\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case AttachmentType.Clipping: {\n let endSlotIndex = input.readInt(true);\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\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 Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n }\n readSequence(input) {\n if (!input.readBoolean())\n return null;\n let sequence = new Sequence(input.readInt(true));\n sequence.start = input.readInt(true);\n sequence.digits = input.readInt(true);\n sequence.setupIndex = input.readInt(true);\n return sequence;\n }\n readVertices(input, vertexCount) {\n let scale = this.scale;\n let verticesLength = vertexCount << 1;\n let vertices = new Vertices();\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n let weights = new Array();\n let bonesArray = new Array();\n for (let i = 0; i < vertexCount; i++) {\n let boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n }\n readFloatArray(input, n, scale) {\n let array = new Array(n);\n if (scale == 1) {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat();\n } else {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n }\n readShortArray(input) {\n let n = input.readInt(true);\n let array = new Array(n);\n for (let i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n }\n readAnimation(input, name, skeletonData) {\n input.readInt(true);\n let timelines = new Array();\n let scale = this.scale;\n let tempColor1 = new Color();\n let tempColor2 = new Color();\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case SLOT_ATTACHMENT: {\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\n for (let frame = 0; frame < frameCount; frame++)\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n a = a2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let na = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n a = na;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_ALPHA: {\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n }\n time = time2;\n a = a2;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let boneIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\n switch (type) {\n case BONE_ROTATE:\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_TRANSLATE:\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEX:\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEY:\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_SCALE:\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEX:\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEY:\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEAR:\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARX:\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARY:\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixShearY = mixShearY2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true);\n let data = skeletonData.pathConstraints[index];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n switch (input.readByte()) {\n case PATH_POSITION:\n timelines.push(readTimeline1(\n input,\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\n data.positionMode == 0 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_SPACING:\n timelines.push(readTimeline1(\n input,\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_MIX:\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n }\n timelines.push(timeline);\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let skin = skeletonData.skins[input.readInt(true)];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let slotIndex = input.readInt(true);\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n let attachmentName = input.readStringRef();\n if (!attachmentName)\n throw new Error(\"attachmentName must not be null.\");\n let attachment = skin.getAttachment(slotIndex, attachmentName);\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case ATTACHMENT_DEFORM: {\n let vertexAttachment = attachment;\n let weighted = vertexAttachment.bones;\n let vertices = vertexAttachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let bezierCount = input.readInt(true);\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\n let time = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let end = input.readInt(true);\n if (end == 0)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat();\n } else {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (let v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frame, time, deform);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n }\n time = time2;\n }\n timelines.push(timeline);\n break;\n }\n case ATTACHMENT_SEQUENCE: {\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\n for (let frame = 0; frame < frameCount; frame++) {\n let time = input.readFloat();\n let modeAndIndex = input.readInt32();\n timeline.setFrame(\n frame,\n time,\n SequenceModeValues[modeAndIndex & 15],\n modeAndIndex >> 4,\n input.readFloat()\n );\n }\n timelines.push(timeline);\n break;\n }\n }\n }\n }\n }\n let drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n let timeline = new DrawOrderTimeline(drawOrderCount);\n let slotCount = skeletonData.slots.length;\n for (let i = 0; i < drawOrderCount; i++) {\n let time = input.readFloat();\n let offsetCount = input.readInt(true);\n let drawOrder = Utils.newArray(slotCount, 0);\n for (let ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsetCount; ii++) {\n let 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 (let 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 }\n let eventCount = input.readInt(true);\n if (eventCount > 0) {\n let timeline = new EventTimeline(eventCount);\n for (let i = 0; i < eventCount; i++) {\n let time = input.readFloat();\n let eventData = skeletonData.events[input.readInt(true)];\n let event = new Event(time, eventData);\n event.intValue = input.readInt(false);\n event.floatValue = input.readFloat();\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event.data.audioPath) {\n event.volume = input.readFloat();\n event.balance = input.readFloat();\n }\n timeline.setFrame(i, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n return new Animation(name, timelines, duration);\n }\n };\n var BinaryInput = class {\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n readByte() {\n return this.buffer.getInt8(this.index++);\n }\n readUnsignedByte() {\n return this.buffer.getUint8(this.index++);\n }\n readShort() {\n let value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n }\n readInt32() {\n let value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n }\n readInt(optimizePositive) {\n let b = this.readByte();\n let result = b & 127;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 7;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 14;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 21;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\n }\n readStringRef() {\n let index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n }\n readString() {\n let byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n let chars = \"\";\n let charCount = 0;\n for (let i = 0; i < byteCount; ) {\n let b = this.readUnsignedByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n }\n readFloat() {\n let value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n }\n readBoolean() {\n return this.readByte() != 0;\n }\n };\n var LinkedMesh = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n var Vertices = class {\n constructor(bones = null, vertices = null) {\n this.bones = bones;\n this.vertices = vertices;\n }\n };\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\n return AttachmentType2;\n })(AttachmentType || {});\n function readTimeline1(input, timeline, scale) {\n let time = input.readFloat(), value = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n }\n time = time2;\n value = value2;\n }\n return timeline;\n }\n function readTimeline2(input, timeline, scale) {\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n }\n return timeline;\n }\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\n }\n var BONE_ROTATE = 0;\n var BONE_TRANSLATE = 1;\n var BONE_TRANSLATEX = 2;\n var BONE_TRANSLATEY = 3;\n var BONE_SCALE = 4;\n var BONE_SCALEX = 5;\n var BONE_SCALEY = 6;\n var BONE_SHEAR = 7;\n var BONE_SHEARX = 8;\n var BONE_SHEARY = 9;\n var SLOT_ATTACHMENT = 0;\n var SLOT_RGBA = 1;\n var SLOT_RGB = 2;\n var SLOT_RGBA2 = 3;\n var SLOT_RGB2 = 4;\n var SLOT_ALPHA = 5;\n var ATTACHMENT_DEFORM = 0;\n var ATTACHMENT_SEQUENCE = 1;\n var PATH_POSITION = 0;\n var PATH_SPACING = 1;\n var PATH_MIX = 2;\n var CURVE_STEPPED = 1;\n var CURVE_BEZIER = 2;\n\n // spine-core/src/SkeletonBounds.ts\n var SkeletonBounds = class {\n constructor() {\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 Pool(() => {\n return Utils.newFloatArray(16);\n });\n }\n update(skeleton, updateAabb) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = 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 } 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 aabbCompute() {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let 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 aabbContainsPoint(x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n aabbIntersectsSegment(x1, y1, x2, y2) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let 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 let m = (y2 - y1) / (x2 - x1);\n let 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 let 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 aabbIntersectsSkeleton(bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n containsPoint(x, y) {\n let polygons = this.polygons;\n for (let 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 containsPointPolygon(polygon, x, y) {\n let vertices = polygon;\n let nn = polygon.length;\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\n let 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 intersectsSegment(x1, y1, x2, y2) {\n let polygons = this.polygons;\n for (let 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 intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\n let vertices = polygon;\n let nn = polygon.length;\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let 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 let 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 getPolygon(boundingBox) {\n if (!boundingBox)\n throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n getWidth() {\n return this.maxX - this.minX;\n }\n getHeight() {\n return this.maxY - this.minY;\n }\n };\n\n // spine-core/src/Triangulator.ts\n var Triangulator = class {\n constructor() {\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 Pool(() => {\n return new Array();\n });\n this.polygonIndicesPool = new Pool(() => {\n return new Array();\n });\n }\n triangulate(verticesArray) {\n let vertices = verticesArray;\n let vertexCount = verticesArray.length >> 1;\n let indices = this.indicesArray;\n indices.length = 0;\n for (let i = 0; i < vertexCount; i++)\n indices[i] = i;\n let isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (let i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n let triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n let previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer:\n if (!isConcave[i]) {\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n let v = indices[ii] << 1;\n let 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 let previousIndex = (vertexCount + i - 1) % vertexCount;\n let 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 decompose(verticesArray, triangles) {\n let vertices = verticesArray;\n let convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n let convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n let polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n let polygon = this.polygonPool.obtain();\n polygon.length = 0;\n let fanBaseIndex = -1, lastWinding = 0;\n for (let i = 0, n = triangles.length; i < n; i += 3) {\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\n let merged = false;\n if (fanBaseIndex == t1) {\n let o = polygon.length - 4;\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n let 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 } 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 (let i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n let firstIndex = polygonIndices[0];\n let lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n let o = polygon.length - 4;\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\n let firstX = polygon[0], firstY = polygon[1];\n let secondX = polygon[2], secondY = polygon[3];\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (let ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n let otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n let otherFirstIndex = otherIndices[0];\n let otherSecondIndex = otherIndices[1];\n let otherLastIndex = otherIndices[2];\n let otherPoly = convexPolygons[ii];\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n let 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 (let 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 static isConcave(index, vertexCount, vertices, indices) {\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n let current = indices[index] << 1;\n let next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(\n vertices[previous],\n vertices[previous + 1],\n vertices[current],\n vertices[current + 1],\n vertices[next],\n vertices[next + 1]\n );\n }\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n }\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\n let px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n }\n };\n\n // spine-core/src/SkeletonClipping.ts\n var SkeletonClipping = class {\n constructor() {\n this.triangulator = new 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 this.clipAttachment = null;\n this.clippingPolygons = null;\n }\n clipStart(slot, clip) {\n if (this.clipAttachment)\n return 0;\n this.clipAttachment = clip;\n let n = clip.worldVerticesLength;\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n let clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\n let polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n }\n clipEndWithSlot(slot) {\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n }\n clipEnd() {\n if (!this.clipAttachment)\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 isClipping() {\n return this.clipAttachment != null;\n }\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n let clippedTriangles = this.clippedTriangles;\n let polygons = this.clippingPolygons;\n let polygonsCount = polygons.length;\n let vertexSize = twoColor ? 12 : 8;\n let index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer:\n for (let i = 0; i < trianglesLength; i += 3) {\n let vertexOffset = triangles[i] << 1;\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (let p = 0; p < polygonsCount; p++) {\n let s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n let clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\n let clipOutputCount = clipOutputLength >> 1;\n let clipOutputItems = this.clipOutput;\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\n let 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 let c0 = x - x3, c1 = y - y3;\n let a = (d0 * c0 + d1 * c1) * d;\n let b = (d4 * c0 + d2 * c1) * d;\n let 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 let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (let 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 } else {\n let clippedVerticesItems = 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 } 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 let clippedTrianglesItems = 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 clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\n let originalOutput = output;\n let clipped = false;\n let input;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\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 let clippingVertices = clippingArea;\n let clippingVerticesLast = clippingArea.length - 4;\n for (let i = 0; ; i += 2) {\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n let inputVertices = input;\n let inputVerticesLength = input.length - 2, outputStart = output.length;\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n let 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 let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n } else {\n output.push(edgeX);\n output.push(edgeY);\n }\n } else if (side2) {\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\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 let temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (let i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n } else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n }\n static makeClockwise(polygon) {\n let vertices = polygon;\n let verticeslength = polygon.length;\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (let 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 (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n let x = vertices[i], y = vertices[i + 1];\n let 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 };\n\n // spine-core/src/SkeletonJson.ts\n var SkeletonJson = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(json) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\n let skeletonMap = root.skeleton;\n if (skeletonMap) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.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 (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n let parent = null;\n let parentName = getValue(boneMap, \"parent\", null);\n if (parentName)\n parent = skeletonData.findBone(parentName);\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = getValue(boneMap, \"length\", 0) * scale;\n data.x = getValue(boneMap, \"x\", 0) * scale;\n data.y = getValue(boneMap, \"y\", 0) * scale;\n data.rotation = getValue(boneMap, \"rotation\", 0);\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\n data.shearX = getValue(boneMap, \"shearX\", 0);\n data.shearY = getValue(boneMap, \"shearY\", 0);\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\n data.skinRequired = getValue(boneMap, \"skin\", false);\n let color = getValue(boneMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let boneData = skeletonData.findBone(slotMap.bone);\n if (!boneData)\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\n let color = getValue(slotMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n let dark = getValue(slotMap, \"dark\", null);\n if (dark)\n data.darkColor = Color.fromString(dark);\n data.attachmentName = getValue(slotMap, \"attachment\", null);\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\n if (!bone)\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let target = skeletonData.findBone(constraintMap.target);\n ;\n if (!target)\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\n data.target = target;\n data.mix = getValue(constraintMap, \"mix\", 1);\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = getValue(constraintMap, \"compress\", false);\n data.stretch = getValue(constraintMap, \"stretch\", false);\n data.uniform = getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findBone(targetName);\n if (!target)\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\n data.target = target;\n data.local = getValue(constraintMap, \"local\", false);\n data.relative = getValue(constraintMap, \"relative\", false);\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findSlot(targetName);\n if (!target)\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\n data.target = target;\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.position = getValue(constraintMap, \"position\", 0);\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i];\n let skin = new Skin(skinMap.name);\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let boneName = skinMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraintName = skinMap.ik[ii];\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraintName = skinMap.transform[ii];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraintName = skinMap.path[ii];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment)\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 (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = getValue(eventMap, \"int\", 0);\n data.floatValue = getValue(eventMap, \"float\", 0);\n data.stringValue = getValue(eventMap, \"string\", \"\");\n data.audioPath = getValue(eventMap, \"audio\", null);\n if (data.audioPath) {\n data.volume = getValue(eventMap, \"volume\", 1);\n data.balance = getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n }\n readAttachment(map, skin, slotIndex, name, skeletonData) {\n let scale = this.scale;\n name = getValue(map, \"name\", name);\n switch (getValue(map, \"type\", \"region\")) {\n case \"region\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\n return null;\n region.path = path;\n region.x = getValue(map, \"x\", 0) * scale;\n region.y = getValue(map, \"y\", 0) * scale;\n region.scaleX = getValue(map, \"scaleX\", 1);\n region.scaleY = getValue(map, \"scaleY\", 1);\n region.rotation = getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n region.sequence = sequence;\n let color = getValue(map, \"color\", null);\n if (color)\n region.color.setFromString(color);\n if (region.region != null)\n region.updateRegion();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n let color = getValue(map, \"color\", null);\n if (color)\n mesh.color.setFromString(color);\n mesh.width = getValue(map, \"width\", 0) * scale;\n mesh.height = getValue(map, \"height\", 0) * scale;\n mesh.sequence = sequence;\n let parent = getValue(map, \"parent\", null);\n if (parent) {\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\n return mesh;\n }\n let uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n if (mesh.region != null)\n mesh.updateRegion();\n mesh.edges = getValue(map, \"edges\", null);\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = getValue(map, \"closed\", false);\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n let color = getValue(map, \"color\", null);\n if (color)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = getValue(map, \"x\", 0) * scale;\n point.y = getValue(map, \"y\", 0) * scale;\n point.rotation = getValue(map, \"rotation\", 0);\n let color = getValue(map, \"color\", null);\n if (color)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\n return null;\n let end = getValue(map, \"end\", null);\n if (end)\n clip.endSlot = skeletonData.findSlot(end);\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n readSequence(map) {\n if (map == null)\n return null;\n let sequence = new Sequence(getValue(map, \"count\", 0));\n sequence.start = getValue(map, \"start\", 1);\n sequence.digits = getValue(map, \"digits\", 0);\n sequence.setupIndex = getValue(map, \"setup\", 0);\n return sequence;\n }\n readVertices(map, attachment, verticesLength) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n; ) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n }\n readAnimation(map, name, skeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotName);\n let slotIndex = slot.index;\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (!timelineMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(frames, slotIndex);\n for (let frame = 0; frame < frames; frame++) {\n let keyMap = timelineMap[frame];\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgba\") {\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb\") {\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"alpha\") {\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\n } else if (timelineName == \"rgba2\") {\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb2\") {\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(\"Bone not found: \" + boneName);\n let boneIndex = bone.index;\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n let frames = timelineMap.length;\n if (frames == 0)\n continue;\n if (timelineName === \"rotate\") {\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\n } else if (timelineName === \"translate\") {\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\n } else if (timelineName === \"translatex\") {\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"translatey\") {\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"scale\") {\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\n } else if (timelineName === \"scalex\") {\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"scaley\") {\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"shear\") {\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\n } else if (timelineName === \"shearx\") {\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n } else if (timelineName === \"sheary\") {\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n }\n }\n }\n }\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let keyMap = constraintMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(\"IK Constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mix = getValue(keyMap, \"mix\", 1);\n let softness = getValue(keyMap, \"softness\", 0) * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\n let nextMap = constraintMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mix2 = getValue(nextMap, \"mix\", 1);\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.transform) {\n for (let constraintName in map.transform) {\n let timelineMap = map.transform[constraintName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Transform constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixScaleX = mixScaleX2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Path constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName === \"position\") {\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"spacing\") {\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.attachments) {\n for (let attachmentsName in map.attachments) {\n let attachmentsMap = map.attachments[attachmentsName];\n let skin = skeletonData.findSkin(attachmentsName);\n if (!skin)\n throw new Error(\"Skin not found: \" + attachmentsName);\n for (let slotMapName in attachmentsMap) {\n let slotMap = attachmentsMap[slotMapName];\n let slot = skeletonData.findSlot(slotMapName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotMapName);\n let slotIndex = slot.index;\n for (let attachmentMapName in slotMap) {\n let attachmentMap = slotMap[attachmentMapName];\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\n for (let timelineMapName in attachmentMap) {\n let timelineMap = attachmentMap[timelineMapName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n if (timelineMapName == \"deform\") {\n let weighted = attachment.bones;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\n let time = getValue(keyMap, \"time\", 0);\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let verticesValue = getValue(keyMap, \"vertices\", null);\n if (!verticesValue)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = getValue(keyMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frame, time, deform);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let curve = keyMap.curve;\n if (curve)\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n time = time2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineMapName == \"sequence\") {\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\n let lastDelay = 0;\n for (let frame = 0; frame < timelineMap.length; frame++) {\n let delay = getValue(keyMap, \"delay\", lastDelay);\n let time = getValue(keyMap, \"time\", 0);\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\n let index = getValue(keyMap, \"index\", 0);\n timeline.setFrame(frame, time, mode, index, delay);\n lastDelay = delay;\n keyMap = timelineMap[frame + 1];\n }\n timelines.push(timeline);\n }\n }\n }\n }\n }\n }\n if (map.drawOrder) {\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\n let slotCount = skeletonData.slots.length;\n let frame = 0;\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\n let drawOrderMap = map.drawOrder[i];\n let drawOrder = null;\n let offsets = getValue(drawOrderMap, \"offsets\", null);\n if (offsets) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsets.length; ii++) {\n let offsetMap = offsets[ii];\n let slot = skeletonData.findSlot(offsetMap.slot);\n if (!slot)\n throw new Error(\"Slot not found: \" + slot);\n let slotIndex = slot.index;\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 (let ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n }\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frame = 0;\n for (let i = 0; i < map.events.length; i++, frame++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (!eventData)\n throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath) {\n event.volume = getValue(eventMap, \"volume\", 1);\n event.balance = getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frame, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n };\n var LinkedMesh2 = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n function readTimeline12(keys, timeline, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\n if (keyMap.curve)\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n time = time2;\n value = value2;\n keyMap = nextMap;\n }\n }\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n keyMap = nextMap;\n }\n }\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n if (curve == \"stepped\") {\n timeline.setStepped(frame);\n return bezier;\n }\n let i = value << 2;\n let cx1 = curve[i];\n let cy1 = curve[i + 1] * scale;\n let cx2 = curve[i + 2];\n let cy2 = curve[i + 3] * scale;\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n return bezier + 1;\n }\n function getValue(map, property, defaultValue) {\n return map[property] !== void 0 ? map[property] : defaultValue;\n }\n\n // spine-core/src/polyfills.ts\n (() => {\n if (typeof Math.fround === \"undefined\") {\n Math.fround = function(array) {\n return function(x) {\n return array[0] = x, array[0];\n };\n }(new Float32Array(1));\n }\n })();\n\n // spine-webgl/src/WebGL.ts\n var ManagedWebGLRenderingContext = class {\n constructor(canvasOrContext, contextConfig = { alpha: \"true\" }) {\n this.restorables = new Array();\n if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== \"undefined\" && canvasOrContext instanceof WebGL2RenderingContext)) {\n let canvas = canvasOrContext;\n this.gl = canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig);\n this.canvas = canvas;\n canvas.addEventListener(\"webglcontextlost\", (e) => {\n let event = e;\n if (e)\n e.preventDefault();\n });\n canvas.addEventListener(\"webglcontextrestored\", (e) => {\n for (let i = 0, n = this.restorables.length; i < n; i++)\n this.restorables[i].restore();\n });\n } else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n addRestorable(restorable) {\n this.restorables.push(restorable);\n }\n removeRestorable(restorable) {\n let index = this.restorables.indexOf(restorable);\n if (index > -1)\n this.restorables.splice(index, 1);\n }\n };\n var ONE = 1;\n var ONE_MINUS_SRC_COLOR = 769;\n var SRC_ALPHA = 770;\n var ONE_MINUS_SRC_ALPHA = 771;\n var DST_COLOR = 774;\n var WebGLBlendModeConverter = class {\n static getDestGLBlendMode(blendMode) {\n switch (blendMode) {\n case 0 /* Normal */:\n return ONE_MINUS_SRC_ALPHA;\n case 1 /* Additive */:\n return ONE;\n case 2 /* Multiply */:\n return ONE_MINUS_SRC_ALPHA;\n case 3 /* Screen */:\n return ONE_MINUS_SRC_ALPHA;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n static getSourceColorGLBlendMode(blendMode, premultipliedAlpha = false) {\n switch (blendMode) {\n case 0 /* Normal */:\n return premultipliedAlpha ? ONE : SRC_ALPHA;\n case 1 /* Additive */:\n return premultipliedAlpha ? ONE : SRC_ALPHA;\n case 2 /* Multiply */:\n return DST_COLOR;\n case 3 /* Screen */:\n return ONE;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n static getSourceAlphaGLBlendMode(blendMode) {\n switch (blendMode) {\n case 0 /* Normal */:\n return ONE;\n case 1 /* Additive */:\n return ONE;\n case 2 /* Multiply */:\n return ONE_MINUS_SRC_ALPHA;\n case 3 /* Screen */:\n return ONE_MINUS_SRC_COLOR;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n };\n\n // spine-webgl/src/GLTexture.ts\n var _GLTexture = class extends Texture {\n constructor(context, image, useMipMaps = false) {\n super(image);\n this.texture = null;\n this.boundUnit = 0;\n this.useMipMaps = false;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.useMipMaps = useMipMaps;\n this.restore();\n this.context.addRestorable(this);\n }\n setFilters(minFilter, magFilter) {\n let 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 this.useMipMaps = _GLTexture.usesMipMaps(minFilter);\n if (this.useMipMaps)\n gl.generateMipmap(gl.TEXTURE_2D);\n }\n static validateMagFilter(magFilter) {\n switch (magFilter) {\n case 9987 /* MipMap */:\n case 9987 /* MipMapLinearLinear */:\n case 9985 /* MipMapLinearNearest */:\n case 9986 /* MipMapNearestLinear */:\n case 9984 /* MipMapNearestNearest */:\n return 9729 /* Linear */;\n default:\n return magFilter;\n }\n }\n static usesMipMaps(filter) {\n switch (filter) {\n case 9987 /* MipMap */:\n case 9987 /* MipMapLinearLinear */:\n case 9985 /* MipMapLinearNearest */:\n case 9986 /* MipMapNearestLinear */:\n case 9984 /* MipMapNearestNearest */:\n return true;\n default:\n return false;\n }\n }\n setWraps(uWrap, vWrap) {\n let 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 update(useMipMaps) {\n let gl = this.context.gl;\n if (!this.texture)\n this.texture = this.context.gl.createTexture();\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 restore() {\n this.texture = null;\n this.update(this.useMipMaps);\n }\n bind(unit = 0) {\n let gl = this.context.gl;\n this.boundUnit = unit;\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n }\n unbind() {\n let gl = this.context.gl;\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n dispose() {\n this.context.removeRestorable(this);\n let gl = this.context.gl;\n gl.deleteTexture(this.texture);\n }\n };\n var GLTexture = _GLTexture;\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\n\n // spine-webgl/src/AssetManager.ts\n var AssetManager = class extends AssetManagerBase {\n constructor(context, pathPrefix = \"\", downloader = new Downloader()) {\n super((image) => {\n return new GLTexture(context, image);\n }, pathPrefix, downloader);\n }\n };\n\n // spine-webgl/src/Vector3.ts\n var Vector3 = class {\n constructor(x = 0, y = 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 setFrom(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n }\n set(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n }\n scale(s) {\n this.x *= s;\n this.y *= s;\n this.z *= s;\n return this;\n }\n normalize() {\n let 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 cross(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 multiply(matrix) {\n let l_mat = matrix.values;\n return this.set(\n this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03],\n this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13],\n this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]\n );\n }\n project(matrix) {\n let l_mat = matrix.values;\n let l_w = 1 / (this.x * l_mat[M30] + this.y * l_mat[M31] + this.z * l_mat[M32] + l_mat[M33]);\n return this.set(\n (this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03]) * l_w,\n (this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13]) * l_w,\n (this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]) * l_w\n );\n }\n dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n distance(v) {\n let a = v.x - this.x;\n let b = v.y - this.y;\n let c = v.z - this.z;\n return Math.sqrt(a * a + b * b + c * c);\n }\n };\n\n // spine-webgl/src/Matrix4.ts\n var M00 = 0;\n var M01 = 4;\n var M02 = 8;\n var M03 = 12;\n var M10 = 1;\n var M11 = 5;\n var M12 = 9;\n var M13 = 13;\n var M20 = 2;\n var M21 = 6;\n var M22 = 10;\n var M23 = 14;\n var M30 = 3;\n var M31 = 7;\n var M32 = 11;\n var M33 = 15;\n var _Matrix4 = class {\n constructor() {\n this.temp = new Float32Array(16);\n this.values = new Float32Array(16);\n let v = this.values;\n v[M00] = 1;\n v[M11] = 1;\n v[M22] = 1;\n v[M33] = 1;\n }\n set(values) {\n this.values.set(values);\n return this;\n }\n transpose() {\n let t = this.temp;\n let v = this.values;\n t[M00] = v[M00];\n t[M01] = v[M10];\n t[M02] = v[M20];\n t[M03] = v[M30];\n t[M10] = v[M01];\n t[M11] = v[M11];\n t[M12] = v[M21];\n t[M13] = v[M31];\n t[M20] = v[M02];\n t[M21] = v[M12];\n t[M22] = v[M22];\n t[M23] = v[M32];\n t[M30] = v[M03];\n t[M31] = v[M13];\n t[M32] = v[M23];\n t[M33] = v[M33];\n return this.set(t);\n }\n identity() {\n let v = this.values;\n v[M00] = 1;\n v[M01] = 0;\n v[M02] = 0;\n v[M03] = 0;\n v[M10] = 0;\n v[M11] = 1;\n v[M12] = 0;\n v[M13] = 0;\n v[M20] = 0;\n v[M21] = 0;\n v[M22] = 1;\n v[M23] = 0;\n v[M30] = 0;\n v[M31] = 0;\n v[M32] = 0;\n v[M33] = 1;\n return this;\n }\n invert() {\n let v = this.values;\n let t = this.temp;\n let l_det = v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\n if (l_det == 0)\n throw new Error(\"non-invertible matrix\");\n let inv_det = 1 / l_det;\n t[M00] = v[M12] * v[M23] * v[M31] - v[M13] * v[M22] * v[M31] + v[M13] * v[M21] * v[M32] - v[M11] * v[M23] * v[M32] - v[M12] * v[M21] * v[M33] + v[M11] * v[M22] * v[M33];\n t[M01] = v[M03] * v[M22] * v[M31] - v[M02] * v[M23] * v[M31] - v[M03] * v[M21] * v[M32] + v[M01] * v[M23] * v[M32] + v[M02] * v[M21] * v[M33] - v[M01] * v[M22] * v[M33];\n t[M02] = v[M02] * v[M13] * v[M31] - v[M03] * v[M12] * v[M31] + v[M03] * v[M11] * v[M32] - v[M01] * v[M13] * v[M32] - v[M02] * v[M11] * v[M33] + v[M01] * v[M12] * v[M33];\n t[M03] = v[M03] * v[M12] * v[M21] - v[M02] * v[M13] * v[M21] - v[M03] * v[M11] * v[M22] + v[M01] * v[M13] * v[M22] + v[M02] * v[M11] * v[M23] - v[M01] * v[M12] * v[M23];\n t[M10] = v[M13] * v[M22] * v[M30] - v[M12] * v[M23] * v[M30] - v[M13] * v[M20] * v[M32] + v[M10] * v[M23] * v[M32] + v[M12] * v[M20] * v[M33] - v[M10] * v[M22] * v[M33];\n t[M11] = v[M02] * v[M23] * v[M30] - v[M03] * v[M22] * v[M30] + v[M03] * v[M20] * v[M32] - v[M00] * v[M23] * v[M32] - v[M02] * v[M20] * v[M33] + v[M00] * v[M22] * v[M33];\n t[M12] = v[M03] * v[M12] * v[M30] - v[M02] * v[M13] * v[M30] - v[M03] * v[M10] * v[M32] + v[M00] * v[M13] * v[M32] + v[M02] * v[M10] * v[M33] - v[M00] * v[M12] * v[M33];\n t[M13] = v[M02] * v[M13] * v[M20] - v[M03] * v[M12] * v[M20] + v[M03] * v[M10] * v[M22] - v[M00] * v[M13] * v[M22] - v[M02] * v[M10] * v[M23] + v[M00] * v[M12] * v[M23];\n t[M20] = v[M11] * v[M23] * v[M30] - v[M13] * v[M21] * v[M30] + v[M13] * v[M20] * v[M31] - v[M10] * v[M23] * v[M31] - v[M11] * v[M20] * v[M33] + v[M10] * v[M21] * v[M33];\n t[M21] = v[M03] * v[M21] * v[M30] - v[M01] * v[M23] * v[M30] - v[M03] * v[M20] * v[M31] + v[M00] * v[M23] * v[M31] + v[M01] * v[M20] * v[M33] - v[M00] * v[M21] * v[M33];\n t[M22] = v[M01] * v[M13] * v[M30] - v[M03] * v[M11] * v[M30] + v[M03] * v[M10] * v[M31] - v[M00] * v[M13] * v[M31] - v[M01] * v[M10] * v[M33] + v[M00] * v[M11] * v[M33];\n t[M23] = v[M03] * v[M11] * v[M20] - v[M01] * v[M13] * v[M20] - v[M03] * v[M10] * v[M21] + v[M00] * v[M13] * v[M21] + v[M01] * v[M10] * v[M23] - v[M00] * v[M11] * v[M23];\n t[M30] = v[M12] * v[M21] * v[M30] - v[M11] * v[M22] * v[M30] - v[M12] * v[M20] * v[M31] + v[M10] * v[M22] * v[M31] + v[M11] * v[M20] * v[M32] - v[M10] * v[M21] * v[M32];\n t[M31] = v[M01] * v[M22] * v[M30] - v[M02] * v[M21] * v[M30] + v[M02] * v[M20] * v[M31] - v[M00] * v[M22] * v[M31] - v[M01] * v[M20] * v[M32] + v[M00] * v[M21] * v[M32];\n t[M32] = v[M02] * v[M11] * v[M30] - v[M01] * v[M12] * v[M30] - v[M02] * v[M10] * v[M31] + v[M00] * v[M12] * v[M31] + v[M01] * v[M10] * v[M32] - v[M00] * v[M11] * v[M32];\n t[M33] = v[M01] * v[M12] * v[M20] - v[M02] * v[M11] * v[M20] + v[M02] * v[M10] * v[M21] - v[M00] * v[M12] * v[M21] - v[M01] * v[M10] * v[M22] + v[M00] * v[M11] * v[M22];\n v[M00] = t[M00] * inv_det;\n v[M01] = t[M01] * inv_det;\n v[M02] = t[M02] * inv_det;\n v[M03] = t[M03] * inv_det;\n v[M10] = t[M10] * inv_det;\n v[M11] = t[M11] * inv_det;\n v[M12] = t[M12] * inv_det;\n v[M13] = t[M13] * inv_det;\n v[M20] = t[M20] * inv_det;\n v[M21] = t[M21] * inv_det;\n v[M22] = t[M22] * inv_det;\n v[M23] = t[M23] * inv_det;\n v[M30] = t[M30] * inv_det;\n v[M31] = t[M31] * inv_det;\n v[M32] = t[M32] * inv_det;\n v[M33] = t[M33] * inv_det;\n return this;\n }\n determinant() {\n let v = this.values;\n return v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\n }\n translate(x, y, z) {\n let v = this.values;\n v[M03] += x;\n v[M13] += y;\n v[M23] += z;\n return this;\n }\n copy() {\n return new _Matrix4().set(this.values);\n }\n projection(near, far, fovy, aspectRatio) {\n this.identity();\n let l_fd = 1 / Math.tan(fovy * (Math.PI / 180) / 2);\n let l_a1 = (far + near) / (near - far);\n let l_a2 = 2 * far * near / (near - far);\n let v = this.values;\n v[M00] = l_fd / aspectRatio;\n v[M10] = 0;\n v[M20] = 0;\n v[M30] = 0;\n v[M01] = 0;\n v[M11] = l_fd;\n v[M21] = 0;\n v[M31] = 0;\n v[M02] = 0;\n v[M12] = 0;\n v[M22] = l_a1;\n v[M32] = -1;\n v[M03] = 0;\n v[M13] = 0;\n v[M23] = l_a2;\n v[M33] = 0;\n return this;\n }\n ortho2d(x, y, width, height) {\n return this.ortho(x, x + width, y, y + height, 0, 1);\n }\n ortho(left, right, bottom, top, near, far) {\n this.identity();\n let x_orth = 2 / (right - left);\n let y_orth = 2 / (top - bottom);\n let z_orth = -2 / (far - near);\n let tx = -(right + left) / (right - left);\n let ty = -(top + bottom) / (top - bottom);\n let tz = -(far + near) / (far - near);\n let v = this.values;\n v[M00] = x_orth;\n v[M10] = 0;\n v[M20] = 0;\n v[M30] = 0;\n v[M01] = 0;\n v[M11] = y_orth;\n v[M21] = 0;\n v[M31] = 0;\n v[M02] = 0;\n v[M12] = 0;\n v[M22] = z_orth;\n v[M32] = 0;\n v[M03] = tx;\n v[M13] = ty;\n v[M23] = tz;\n v[M33] = 1;\n return this;\n }\n multiply(matrix) {\n let t = this.temp;\n let v = this.values;\n let m = matrix.values;\n t[M00] = v[M00] * m[M00] + v[M01] * m[M10] + v[M02] * m[M20] + v[M03] * m[M30];\n t[M01] = v[M00] * m[M01] + v[M01] * m[M11] + v[M02] * m[M21] + v[M03] * m[M31];\n t[M02] = v[M00] * m[M02] + v[M01] * m[M12] + v[M02] * m[M22] + v[M03] * m[M32];\n t[M03] = v[M00] * m[M03] + v[M01] * m[M13] + v[M02] * m[M23] + v[M03] * m[M33];\n t[M10] = v[M10] * m[M00] + v[M11] * m[M10] + v[M12] * m[M20] + v[M13] * m[M30];\n t[M11] = v[M10] * m[M01] + v[M11] * m[M11] + v[M12] * m[M21] + v[M13] * m[M31];\n t[M12] = v[M10] * m[M02] + v[M11] * m[M12] + v[M12] * m[M22] + v[M13] * m[M32];\n t[M13] = v[M10] * m[M03] + v[M11] * m[M13] + v[M12] * m[M23] + v[M13] * m[M33];\n t[M20] = v[M20] * m[M00] + v[M21] * m[M10] + v[M22] * m[M20] + v[M23] * m[M30];\n t[M21] = v[M20] * m[M01] + v[M21] * m[M11] + v[M22] * m[M21] + v[M23] * m[M31];\n t[M22] = v[M20] * m[M02] + v[M21] * m[M12] + v[M22] * m[M22] + v[M23] * m[M32];\n t[M23] = v[M20] * m[M03] + v[M21] * m[M13] + v[M22] * m[M23] + v[M23] * m[M33];\n t[M30] = v[M30] * m[M00] + v[M31] * m[M10] + v[M32] * m[M20] + v[M33] * m[M30];\n t[M31] = v[M30] * m[M01] + v[M31] * m[M11] + v[M32] * m[M21] + v[M33] * m[M31];\n t[M32] = v[M30] * m[M02] + v[M31] * m[M12] + v[M32] * m[M22] + v[M33] * m[M32];\n t[M33] = v[M30] * m[M03] + v[M31] * m[M13] + v[M32] * m[M23] + v[M33] * m[M33];\n return this.set(this.temp);\n }\n multiplyLeft(matrix) {\n let t = this.temp;\n let v = this.values;\n let m = matrix.values;\n t[M00] = m[M00] * v[M00] + m[M01] * v[M10] + m[M02] * v[M20] + m[M03] * v[M30];\n t[M01] = m[M00] * v[M01] + m[M01] * v[M11] + m[M02] * v[M21] + m[M03] * v[M31];\n t[M02] = m[M00] * v[M02] + m[M01] * v[M12] + m[M02] * v[M22] + m[M03] * v[M32];\n t[M03] = m[M00] * v[M03] + m[M01] * v[M13] + m[M02] * v[M23] + m[M03] * v[M33];\n t[M10] = m[M10] * v[M00] + m[M11] * v[M10] + m[M12] * v[M20] + m[M13] * v[M30];\n t[M11] = m[M10] * v[M01] + m[M11] * v[M11] + m[M12] * v[M21] + m[M13] * v[M31];\n t[M12] = m[M10] * v[M02] + m[M11] * v[M12] + m[M12] * v[M22] + m[M13] * v[M32];\n t[M13] = m[M10] * v[M03] + m[M11] * v[M13] + m[M12] * v[M23] + m[M13] * v[M33];\n t[M20] = m[M20] * v[M00] + m[M21] * v[M10] + m[M22] * v[M20] + m[M23] * v[M30];\n t[M21] = m[M20] * v[M01] + m[M21] * v[M11] + m[M22] * v[M21] + m[M23] * v[M31];\n t[M22] = m[M20] * v[M02] + m[M21] * v[M12] + m[M22] * v[M22] + m[M23] * v[M32];\n t[M23] = m[M20] * v[M03] + m[M21] * v[M13] + m[M22] * v[M23] + m[M23] * v[M33];\n t[M30] = m[M30] * v[M00] + m[M31] * v[M10] + m[M32] * v[M20] + m[M33] * v[M30];\n t[M31] = m[M30] * v[M01] + m[M31] * v[M11] + m[M32] * v[M21] + m[M33] * v[M31];\n t[M32] = m[M30] * v[M02] + m[M31] * v[M12] + m[M32] * v[M22] + m[M33] * v[M32];\n t[M33] = m[M30] * v[M03] + m[M31] * v[M13] + m[M32] * v[M23] + m[M33] * v[M33];\n return this.set(this.temp);\n }\n lookAt(position, direction, up) {\n let 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 let val = this.values;\n val[M00] = xAxis.x;\n val[M01] = xAxis.y;\n val[M02] = xAxis.z;\n val[M10] = yAxis.x;\n val[M11] = yAxis.y;\n val[M12] = yAxis.z;\n val[M20] = -zAxis.x;\n val[M21] = -zAxis.y;\n val[M22] = -zAxis.z;\n _Matrix4.tmpMatrix.identity();\n _Matrix4.tmpMatrix.values[M03] = -position.x;\n _Matrix4.tmpMatrix.values[M13] = -position.y;\n _Matrix4.tmpMatrix.values[M23] = -position.z;\n this.multiply(_Matrix4.tmpMatrix);\n return this;\n }\n };\n var Matrix42 = _Matrix4;\n Matrix42.xAxis = new Vector3();\n Matrix42.yAxis = new Vector3();\n Matrix42.zAxis = new Vector3();\n Matrix42.tmpMatrix = new _Matrix4();\n\n // spine-webgl/src/Camera.ts\n var OrthoCamera = class {\n constructor(viewportWidth, viewportHeight) {\n this.position = new Vector3(0, 0, 0);\n this.direction = new Vector3(0, 0, -1);\n this.up = new 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 Matrix42();\n this.inverseProjectionView = new Matrix42();\n this.projection = new Matrix42();\n this.view = new Matrix42();\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.update();\n }\n update() {\n let projection = this.projection;\n let view = this.view;\n let projectionView = this.projectionView;\n let inverseProjectionView = this.inverseProjectionView;\n let zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\n projection.ortho(\n zoom * (-viewportWidth / 2),\n zoom * (viewportWidth / 2),\n zoom * (-viewportHeight / 2),\n zoom * (viewportHeight / 2),\n this.near,\n this.far\n );\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 screenToWorld(screenCoords, screenWidth, screenHeight) {\n let x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\n screenCoords.x = 2 * x / screenWidth - 1;\n screenCoords.y = 2 * y / screenHeight - 1;\n screenCoords.z = 2 * screenCoords.z - 1;\n screenCoords.project(this.inverseProjectionView);\n return screenCoords;\n }\n worldToScreen(worldCoords, screenWidth, screenHeight) {\n worldCoords.project(this.projectionView);\n worldCoords.x = screenWidth * (worldCoords.x + 1) / 2;\n worldCoords.y = screenHeight * (worldCoords.y + 1) / 2;\n worldCoords.z = (worldCoords.z + 1) / 2;\n return worldCoords;\n }\n setViewport(viewportWidth, viewportHeight) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n }\n };\n\n // spine-webgl/src/Input.ts\n var Input = class {\n constructor(element) {\n this.mouseX = 0;\n this.mouseY = 0;\n this.buttonDown = false;\n this.touch0 = null;\n this.touch1 = null;\n this.initialPinchDistance = 0;\n this.listeners = new Array();\n this.eventListeners = [];\n this.element = element;\n this.setupCallbacks(element);\n }\n setupCallbacks(element) {\n let mouseDown = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.buttonDown = true;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(this.mouseX, this.mouseY);\n });\n document.addEventListener(\"mousemove\", mouseMove);\n document.addEventListener(\"mouseup\", mouseUp);\n }\n };\n let mouseMove = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.listeners.map((listener) => {\n if (this.buttonDown) {\n if (listener.dragged)\n listener.dragged(this.mouseX, this.mouseY);\n } else {\n if (listener.moved)\n listener.moved(this.mouseX, this.mouseY);\n }\n });\n }\n };\n let mouseUp = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.buttonDown = false;\n this.listeners.map((listener) => {\n if (listener.up)\n listener.up(this.mouseX, this.mouseY);\n });\n document.removeEventListener(\"mousemove\", mouseMove);\n document.removeEventListener(\"mouseup\", mouseUp);\n }\n };\n let mouseWheel = (e) => {\n e.preventDefault();\n let deltaY = e.deltaY;\n if (e.deltaMode == WheelEvent.DOM_DELTA_LINE)\n deltaY *= 8;\n if (e.deltaMode == WheelEvent.DOM_DELTA_PAGE)\n deltaY *= 24;\n this.listeners.map((listener) => {\n if (listener.wheel)\n listener.wheel(e.deltaY);\n });\n };\n element.addEventListener(\"mousedown\", mouseDown, true);\n element.addEventListener(\"mousemove\", mouseMove, true);\n element.addEventListener(\"mouseup\", mouseUp, true);\n element.addEventListener(\"wheel\", mouseWheel, true);\n element.addEventListener(\"touchstart\", (ev) => {\n if (!this.touch0 || !this.touch1) {\n var touches = ev.changedTouches;\n let nativeTouch = touches.item(0);\n if (!nativeTouch)\n return;\n let rect = element.getBoundingClientRect();\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n let touch = new Touch(nativeTouch.identifier, x, y);\n this.mouseX = x;\n this.mouseY = y;\n this.buttonDown = true;\n if (!this.touch0) {\n this.touch0 = touch;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(touch.x, touch.y);\n });\n } else if (!this.touch1) {\n this.touch1 = touch;\n let dx = this.touch1.x - this.touch0.x;\n let dy = this.touch1.x - this.touch0.x;\n this.initialPinchDistance = Math.sqrt(dx * dx + dy * dy);\n this.listeners.map((listener) => {\n if (listener.zoom)\n listener.zoom(this.initialPinchDistance, this.initialPinchDistance);\n });\n }\n }\n ev.preventDefault();\n }, false);\n element.addEventListener(\"touchmove\", (ev) => {\n if (this.touch0) {\n var touches = ev.changedTouches;\n let rect = element.getBoundingClientRect();\n for (var i = 0; i < touches.length; i++) {\n var nativeTouch = touches[i];\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n if (this.touch0.identifier === nativeTouch.identifier) {\n this.touch0.x = this.mouseX = x;\n this.touch0.y = this.mouseY = y;\n this.listeners.map((listener) => {\n if (listener.dragged)\n listener.dragged(x, y);\n });\n }\n if (this.touch1 && this.touch1.identifier === nativeTouch.identifier) {\n this.touch1.x = this.mouseX = x;\n this.touch1.y = this.mouseY = y;\n }\n }\n if (this.touch0 && this.touch1) {\n let dx = this.touch1.x - this.touch0.x;\n let dy = this.touch1.x - this.touch0.x;\n let distance = Math.sqrt(dx * dx + dy * dy);\n this.listeners.map((listener) => {\n if (listener.zoom)\n listener.zoom(this.initialPinchDistance, distance);\n });\n }\n }\n ev.preventDefault();\n }, false);\n let touchEnd = (ev) => {\n if (this.touch0) {\n var touches = ev.changedTouches;\n let rect = element.getBoundingClientRect();\n for (var i = 0; i < touches.length; i++) {\n var nativeTouch = touches[i];\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n if (this.touch0.identifier === nativeTouch.identifier) {\n this.touch0 = null;\n this.mouseX = x;\n this.mouseY = y;\n this.listeners.map((listener) => {\n if (listener.up)\n listener.up(x, y);\n });\n if (!this.touch1) {\n this.buttonDown = false;\n break;\n } else {\n this.touch0 = this.touch1;\n this.touch1 = null;\n this.mouseX = this.touch0.x;\n this.mouseX = this.touch0.x;\n this.buttonDown = true;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(this.touch0.x, this.touch0.y);\n });\n }\n }\n if (this.touch1 && this.touch1.identifier) {\n this.touch1 = null;\n }\n }\n }\n ev.preventDefault();\n };\n element.addEventListener(\"touchend\", touchEnd, false);\n element.addEventListener(\"touchcancel\", touchEnd);\n }\n addListener(listener) {\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let idx = this.listeners.indexOf(listener);\n if (idx > -1) {\n this.listeners.splice(idx, 1);\n }\n }\n };\n var Touch = class {\n constructor(identifier, x, y) {\n this.identifier = identifier;\n this.x = x;\n this.y = y;\n }\n };\n\n // spine-webgl/src/CameraController.ts\n var CameraController = class {\n constructor(canvas, camera) {\n this.canvas = canvas;\n this.camera = camera;\n let cameraX = 0, cameraY = 0, cameraZoom = 0;\n let mouseX = 0, mouseY = 0;\n let lastX = 0, lastY = 0;\n let initialZoom = 0;\n new Input(canvas).addListener({\n down: (x, y) => {\n cameraX = camera.position.x;\n cameraY = camera.position.y;\n mouseX = lastX = x;\n mouseY = lastY = y;\n initialZoom = camera.zoom;\n },\n dragged: (x, y) => {\n let deltaX = x - mouseX;\n let deltaY = y - mouseY;\n let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight);\n let deltaWorld = camera.screenToWorld(new Vector3(deltaX, deltaY), canvas.clientWidth, canvas.clientHeight).sub(originWorld);\n camera.position.set(cameraX - deltaWorld.x, cameraY - deltaWorld.y, 0);\n camera.update();\n lastX = x;\n lastY = y;\n },\n wheel: (delta) => {\n let zoomAmount = delta / 200 * camera.zoom;\n let newZoom = camera.zoom + zoomAmount;\n if (newZoom > 0) {\n let x = 0, y = 0;\n if (delta < 0) {\n x = lastX;\n y = lastY;\n } else {\n let viewCenter = new Vector3(canvas.clientWidth / 2 + 15, canvas.clientHeight / 2);\n let mouseToCenterX = lastX - viewCenter.x;\n let mouseToCenterY = canvas.clientHeight - 1 - lastY - viewCenter.y;\n x = viewCenter.x - mouseToCenterX;\n y = canvas.clientHeight - 1 - viewCenter.y + mouseToCenterY;\n }\n let oldDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\n camera.zoom = newZoom;\n camera.update();\n let newDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\n camera.position.add(oldDistance.sub(newDistance));\n camera.update();\n }\n },\n zoom: (initialDistance, distance) => {\n let newZoom = initialDistance / distance;\n camera.zoom = initialZoom * newZoom;\n },\n up: (x, y) => {\n lastX = x;\n lastY = y;\n },\n moved: (x, y) => {\n lastX = x;\n lastY = y;\n }\n });\n }\n };\n\n // spine-webgl/src/Shader.ts\n var _Shader = class {\n constructor(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 ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.context.addRestorable(this);\n this.compile();\n }\n getProgram() {\n return this.program;\n }\n getVertexShader() {\n return this.vertexShader;\n }\n getFragmentShader() {\n return this.fragmentShader;\n }\n getVertexShaderSource() {\n return this.vsSource;\n }\n getFragmentSource() {\n return this.fsSource;\n }\n compile() {\n let gl = this.context.gl;\n try {\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\n if (!this.vs)\n throw new Error(\"Couldn't compile vertex shader.\");\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\n if (!this.fs)\n throw new Error(\"Couldn#t compile fragment shader.\");\n this.program = this.compileProgram(this.vs, this.fs);\n } catch (e) {\n this.dispose();\n throw e;\n }\n }\n compileShader(type, source) {\n let gl = this.context.gl;\n let shader = gl.createShader(type);\n if (!shader)\n throw new Error(\"Couldn't create shader.\");\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n let 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 compileProgram(vs, fs) {\n let gl = this.context.gl;\n let program = gl.createProgram();\n if (!program)\n throw new Error(\"Couldn't compile program.\");\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n let 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 restore() {\n this.compile();\n }\n bind() {\n this.context.gl.useProgram(this.program);\n }\n unbind() {\n this.context.gl.useProgram(null);\n }\n setUniformi(uniform, value) {\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\n }\n setUniformf(uniform, value) {\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\n }\n setUniform2f(uniform, value, value2) {\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\n }\n setUniform3f(uniform, value, value2, value3) {\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\n }\n setUniform4f(uniform, value, value2, value3, value4) {\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\n }\n setUniform2x2f(uniform, value) {\n let gl = this.context.gl;\n this.tmp2x2.set(value);\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\n }\n setUniform3x3f(uniform, value) {\n let gl = this.context.gl;\n this.tmp3x3.set(value);\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\n }\n setUniform4x4f(uniform, value) {\n let gl = this.context.gl;\n this.tmp4x4.set(value);\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\n }\n getUniformLocation(uniform) {\n let gl = this.context.gl;\n if (!this.program)\n throw new Error(\"Shader not compiled.\");\n let 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 getAttributeLocation(attribute) {\n let gl = this.context.gl;\n if (!this.program)\n throw new Error(\"Shader not compiled.\");\n let 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 dispose() {\n this.context.removeRestorable(this);\n let 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 static newColoredTextured(context) {\n let 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 let 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 static newTwoColoredTextured(context) {\n let 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 let 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 static newColored(context) {\n let 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 let 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 };\n var Shader = _Shader;\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\n // spine-webgl/src/Mesh.ts\n var Mesh = class {\n constructor(context, attributes, maxVertices, maxIndices) {\n this.attributes = attributes;\n this.verticesBuffer = null;\n this.verticesLength = 0;\n this.dirtyVertices = false;\n this.indicesBuffer = null;\n this.indicesLength = 0;\n this.dirtyIndices = false;\n this.elementsPerVertex = 0;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.elementsPerVertex = 0;\n for (let 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 getAttributes() {\n return this.attributes;\n }\n maxVertices() {\n return this.vertices.length / this.elementsPerVertex;\n }\n numVertices() {\n return this.verticesLength / this.elementsPerVertex;\n }\n setVerticesLength(length) {\n this.dirtyVertices = true;\n this.verticesLength = length;\n }\n getVertices() {\n return this.vertices;\n }\n maxIndices() {\n return this.indices.length;\n }\n numIndices() {\n return this.indicesLength;\n }\n setIndicesLength(length) {\n this.dirtyIndices = true;\n this.indicesLength = length;\n }\n getIndices() {\n return this.indices;\n }\n getVertexSizeInFloats() {\n let size = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n let attribute = this.attributes[i];\n size += attribute.numElements;\n }\n return size;\n }\n setVertices(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 setIndices(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 draw(shader, primitiveType) {\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\n }\n drawWithOffset(shader, primitiveType, offset, count) {\n let 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 } else {\n gl.drawArrays(primitiveType, offset, count);\n }\n this.unbind(shader);\n }\n bind(shader) {\n let gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n let offset = 0;\n for (let i = 0; i < this.attributes.length; i++) {\n let attrib = this.attributes[i];\n let location = shader.getAttributeLocation(attrib.name);\n gl.enableVertexAttribArray(location);\n gl.vertexAttribPointer(location, 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 unbind(shader) {\n let gl = this.context.gl;\n for (let i = 0; i < this.attributes.length; i++) {\n let attrib = this.attributes[i];\n let location = shader.getAttributeLocation(attrib.name);\n gl.disableVertexAttribArray(location);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n }\n update() {\n let 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 restore() {\n this.verticesBuffer = null;\n this.indicesBuffer = null;\n this.update();\n }\n dispose() {\n this.context.removeRestorable(this);\n let gl = this.context.gl;\n gl.deleteBuffer(this.verticesBuffer);\n gl.deleteBuffer(this.indicesBuffer);\n }\n };\n var VertexAttribute = class {\n constructor(name, type, numElements) {\n this.name = name;\n this.type = type;\n this.numElements = numElements;\n }\n };\n var Position2Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.POSITION, VertexAttributeType.Float, 2);\n }\n };\n var Position3Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.POSITION, VertexAttributeType.Float, 3);\n }\n };\n var TexCoordAttribute = class extends VertexAttribute {\n constructor(unit = 0) {\n super(Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2);\n }\n };\n var ColorAttribute = class extends VertexAttribute {\n constructor() {\n super(Shader.COLOR, VertexAttributeType.Float, 4);\n }\n };\n var Color2Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.COLOR2, VertexAttributeType.Float, 4);\n }\n };\n var VertexAttributeType = /* @__PURE__ */ ((VertexAttributeType2) => {\n VertexAttributeType2[VertexAttributeType2[\"Float\"] = 0] = \"Float\";\n return VertexAttributeType2;\n })(VertexAttributeType || {});\n\n // spine-webgl/src/PolygonBatcher.ts\n var _PolygonBatcher = class {\n constructor(context, twoColorTint = true, maxVertices = 10920) {\n this.drawCalls = 0;\n this.isDrawing = false;\n this.shader = null;\n this.lastTexture = null;\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.cullWasEnabled = false;\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n let attributes = twoColorTint ? [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute(), new Color2Attribute()] : [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute()];\n this.mesh = new Mesh(context, attributes, maxVertices, maxVertices * 3);\n let gl = this.context.gl;\n this.srcColorBlend = gl.SRC_ALPHA;\n this.srcAlphaBlend = gl.ONE;\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\n }\n begin(shader) {\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 let gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\n this.cullWasEnabled = gl.isEnabled(gl.CULL_FACE);\n if (this.cullWasEnabled)\n gl.disable(gl.CULL_FACE);\n }\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\n if (this.srcColorBlend == srcColorBlend && this.srcAlphaBlend == srcAlphaBlend && this.dstBlend == dstBlend)\n return;\n this.srcColorBlend = srcColorBlend;\n this.srcAlphaBlend = srcAlphaBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n let gl = this.context.gl;\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\n }\n }\n draw(texture, vertices, indices) {\n if (texture != this.lastTexture) {\n this.flush();\n this.lastTexture = texture;\n } else if (this.verticesLength + vertices.length > this.mesh.getVertices().length || this.indicesLength + indices.length > this.mesh.getIndices().length) {\n this.flush();\n }\n let indexStart = this.mesh.numVertices();\n this.mesh.getVertices().set(vertices, this.verticesLength);\n this.verticesLength += vertices.length;\n this.mesh.setVerticesLength(this.verticesLength);\n let indicesArray = this.mesh.getIndices();\n for (let 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 flush() {\n if (this.verticesLength == 0)\n return;\n if (!this.lastTexture)\n throw new Error(\"No texture set.\");\n if (!this.shader)\n throw new Error(\"No shader set.\");\n this.lastTexture.bind();\n this.mesh.draw(this.shader, this.context.gl.TRIANGLES);\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.mesh.setVerticesLength(0);\n this.mesh.setIndicesLength(0);\n this.drawCalls++;\n _PolygonBatcher.globalDrawCalls++;\n }\n end() {\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 let gl = this.context.gl;\n gl.disable(gl.BLEND);\n if (this.cullWasEnabled)\n gl.enable(gl.CULL_FACE);\n }\n getDrawCalls() {\n return this.drawCalls;\n }\n static getAndResetGlobalDrawCalls() {\n let result = _PolygonBatcher.globalDrawCalls;\n _PolygonBatcher.globalDrawCalls = 0;\n return result;\n }\n dispose() {\n this.mesh.dispose();\n }\n };\n var PolygonBatcher = _PolygonBatcher;\n PolygonBatcher.globalDrawCalls = 0;\n\n // spine-webgl/src/ShapeRenderer.ts\n var ShapeRenderer = class {\n constructor(context, maxVertices = 10920) {\n this.isDrawing = false;\n this.shapeType = ShapeType.Filled;\n this.color = new Color(1, 1, 1, 1);\n this.shader = null;\n this.vertexIndex = 0;\n this.tmp = new Vector2();\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.mesh = new Mesh(context, [new Position2Attribute(), new ColorAttribute()], maxVertices, 0);\n let gl = this.context.gl;\n this.srcColorBlend = gl.SRC_ALPHA;\n this.srcAlphaBlend = gl.ONE;\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\n }\n begin(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 let gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\n }\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\n this.srcColorBlend = srcColorBlend;\n this.srcAlphaBlend = srcAlphaBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n let gl = this.context.gl;\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\n }\n }\n setColor(color) {\n this.color.setFromColor(color);\n }\n setColorWith(r, g, b, a) {\n this.color.set(r, g, b, a);\n }\n point(x, y, color) {\n this.check(ShapeType.Point, 1);\n if (!color)\n color = this.color;\n this.vertex(x, y, color);\n }\n line(x, y, x2, y2, color) {\n this.check(ShapeType.Line, 2);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n this.vertex(x, y, color);\n this.vertex(x2, y2, color);\n }\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n if (!color2)\n color2 = this.color;\n if (!color3)\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 } 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 quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n if (!color2)\n color2 = this.color;\n if (!color3)\n color3 = this.color;\n if (!color4)\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 } 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 rect(filled, x, y, width, height, color) {\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\n }\n rectLine(filled, x1, y1, x2, y2, width, color) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\n if (!color)\n color = this.color;\n let t = this.tmp.set(y2 - y1, x1 - x2);\n t.normalize();\n width *= 0.5;\n let tx = t.x * width;\n let 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 } 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 x(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 polygon(polygonVertices, offset, count, color) {\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)\n color = this.color;\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n offset <<= 1;\n count <<= 1;\n let firstX = polygonVertices[offset];\n let firstY = polygonVertices[offset + 1];\n let last = offset + count;\n for (let i = offset, n = offset + count - 2; i < n; i += 2) {\n let x1 = polygonVertices[i];\n let y1 = polygonVertices[i + 1];\n let x2 = 0;\n let y2 = 0;\n if (i + 2 >= last) {\n x2 = firstX;\n y2 = firstY;\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 circle(filled, x, y, radius, color, segments = 0) {\n if (segments == 0)\n segments = Math.max(1, 6 * MathUtils.cbrt(radius) | 0);\n if (segments <= 0)\n throw new Error(\"segments must be > 0.\");\n if (!color)\n color = this.color;\n let angle = 2 * MathUtils.PI / segments;\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n let cx = radius, cy = 0;\n if (!filled) {\n this.check(ShapeType.Line, segments * 2 + 2);\n for (let i = 0; i < segments; i++) {\n this.vertex(x + cx, y + cy, color);\n let temp2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp2 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x + cx, y + cy, color);\n } else {\n this.check(ShapeType.Filled, segments * 3 + 3);\n segments--;\n for (let i = 0; i < segments; i++) {\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n let temp2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp2 + 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 let temp = cx;\n cx = radius;\n cy = 0;\n this.vertex(x + cx, y + cy, color);\n }\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n this.check(ShapeType.Line, segments * 2 + 2);\n if (!color)\n color = this.color;\n let subdiv_step = 1 / segments;\n let subdiv_step2 = subdiv_step * subdiv_step;\n let subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\n let pre1 = 3 * subdiv_step;\n let pre2 = 3 * subdiv_step2;\n let pre4 = 6 * subdiv_step2;\n let pre5 = 6 * subdiv_step3;\n let tmp1x = x1 - cx1 * 2 + cx2;\n let tmp1y = y1 - cy1 * 2 + cy2;\n let tmp2x = (cx1 - cx2) * 3 - x1 + x2;\n let tmp2y = (cy1 - cy2) * 3 - y1 + y2;\n let fx = x1;\n let fy = y1;\n let dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\n let dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\n let ddfx = tmp1x * pre4 + tmp2x * pre5;\n let ddfy = tmp1y * pre4 + tmp2y * pre5;\n let dddfx = tmp2x * pre5;\n let 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 vertex(x, y, color) {\n let idx = this.vertexIndex;\n let 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 end() {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n this.flush();\n let gl = this.context.gl;\n gl.disable(gl.BLEND);\n this.isDrawing = false;\n }\n flush() {\n if (this.vertexIndex == 0)\n return;\n if (!this.shader)\n throw new Error(\"No shader set.\");\n this.mesh.setVerticesLength(this.vertexIndex);\n this.mesh.draw(this.shader, this.shapeType);\n this.vertexIndex = 0;\n }\n check(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 } else {\n this.flush();\n this.shapeType = shapeType;\n }\n }\n dispose() {\n this.mesh.dispose();\n }\n };\n var ShapeType = /* @__PURE__ */ ((ShapeType2) => {\n ShapeType2[ShapeType2[\"Point\"] = 0] = \"Point\";\n ShapeType2[ShapeType2[\"Line\"] = 1] = \"Line\";\n ShapeType2[ShapeType2[\"Filled\"] = 4] = \"Filled\";\n return ShapeType2;\n })(ShapeType || {});\n\n // spine-webgl/src/SkeletonDebugRenderer.ts\n var _SkeletonDebugRenderer = class {\n constructor(context) {\n this.boneLineColor = new Color(1, 0, 0, 1);\n this.boneOriginColor = new Color(0, 1, 0, 1);\n this.attachmentLineColor = new Color(0, 0, 1, 0.5);\n this.triangleLineColor = new Color(1, 0.64, 0, 0.5);\n this.pathColor = new Color().setFromString(\"FF7F00\");\n this.clipColor = new Color(0.8, 0, 0, 2);\n this.aabbColor = new 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 SkeletonBounds();\n this.temp = new Array();\n this.vertices = Utils.newFloatArray(2 * 1024);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n }\n draw(shapes, skeleton, ignoredBones) {\n let skeletonX = skeleton.x;\n let skeletonY = skeleton.y;\n let gl = this.context.gl;\n let srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\n shapes.setBlendMode(srcFunc, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n let bones = skeleton.bones;\n if (this.drawBones) {\n shapes.setColor(this.boneLineColor);\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n if (!bone.parent)\n continue;\n let x = bone.data.length * bone.a + bone.worldX;\n let y = bone.data.length * bone.c + bone.worldY;\n shapes.rectLine(true, bone.worldX, 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 let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n let regionAttachment = attachment;\n let vertices = this.vertices;\n regionAttachment.computeWorldVertices(slot, 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 let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof MeshAttachment))\n continue;\n let mesh = attachment;\n let vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\n let triangles = mesh.triangles;\n let hullLength = mesh.hullLength;\n if (this.drawMeshTriangles) {\n shapes.setColor(this.triangleLineColor);\n for (let ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n let v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\n shapes.triangle(\n false,\n vertices[v1],\n vertices[v1 + 1],\n vertices[v2],\n vertices[v2 + 1],\n vertices[v3],\n vertices[v3 + 1]\n );\n }\n }\n if (this.drawMeshHull && hullLength > 0) {\n shapes.setColor(this.attachmentLineColor);\n hullLength = (hullLength >> 1) * 2;\n let lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\n for (let ii = 0, nn = hullLength; ii < nn; ii += 2) {\n let 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 let 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 let polygons = bounds.polygons;\n let boxes = bounds.boundingBoxes;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n shapes.setColor(boxes[i].color);\n shapes.polygon(polygon, 0, polygon.length);\n }\n }\n if (this.drawPaths) {\n let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof PathAttachment))\n continue;\n let path = attachment;\n let nn = path.worldVerticesLength;\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\n let color = this.pathColor;\n let x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\n if (path.closed) {\n shapes.setColor(color);\n let 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 (let ii = 4; ii < nn; ii += 6) {\n let 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 (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n shapes.circle(true, bone.worldX, bone.worldY, 3 * this.scale, this.boneOriginColor, 8);\n }\n }\n if (this.drawClipping) {\n let slots = skeleton.slots;\n shapes.setColor(this.clipColor);\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof ClippingAttachment))\n continue;\n let clip = attachment;\n let nn = clip.worldVerticesLength;\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\n for (let i2 = 0, n2 = world.length; i2 < n2; i2 += 2) {\n let x = world[i2];\n let y = world[i2 + 1];\n let x2 = world[(i2 + 2) % world.length];\n let y2 = world[(i2 + 3) % world.length];\n shapes.line(x, y, x2, y2);\n }\n }\n }\n }\n dispose() {\n }\n };\n var SkeletonDebugRenderer = _SkeletonDebugRenderer;\n SkeletonDebugRenderer.LIGHT_GRAY = new Color(192 / 255, 192 / 255, 192 / 255, 1);\n SkeletonDebugRenderer.GREEN = new Color(0, 1, 0, 1);\n\n // spine-webgl/src/SkeletonRenderer.ts\n var Renderable = class {\n constructor(vertices, numVertices, numFloats) {\n this.vertices = vertices;\n this.numVertices = numVertices;\n this.numFloats = numFloats;\n }\n };\n var _SkeletonRenderer = class {\n constructor(context, twoColorTint = true) {\n this.premultipliedAlpha = false;\n this.tempColor = new Color();\n this.tempColor2 = new Color();\n this.vertexSize = 2 + 2 + 4;\n this.twoColorTint = false;\n this.renderable = new Renderable([], 0, 0);\n this.clipper = new SkeletonClipping();\n this.temp = new Vector2();\n this.temp2 = new Vector2();\n this.temp3 = new Color();\n this.temp4 = new Color();\n this.twoColorTint = twoColorTint;\n if (twoColorTint)\n this.vertexSize += 4;\n this.vertices = Utils.newFloatArray(this.vertexSize * 1024);\n }\n draw(batcher, skeleton, slotRangeStart = -1, slotRangeEnd = -1, transformer = null) {\n let clipper = this.clipper;\n let premultipliedAlpha = this.premultipliedAlpha;\n let twoColorTint = this.twoColorTint;\n let blendMode = null;\n let tempPos = this.temp;\n let tempUv = this.temp2;\n let tempLight = this.temp3;\n let tempDark = this.temp4;\n let renderable = this.renderable;\n let uvs;\n let triangles;\n let drawOrder = skeleton.drawOrder;\n let attachmentColor;\n let skeletonColor = skeleton.color;\n let vertexSize = twoColorTint ? 12 : 8;\n let inRange = false;\n if (slotRangeStart == -1)\n inRange = true;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\n let 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 let attachment = slot.getAttachment();\n let texture;\n if (attachment instanceof RegionAttachment) {\n let region = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = 4;\n renderable.numFloats = clippedVertexSize << 2;\n region.computeWorldVertices(slot, renderable.vertices, 0, clippedVertexSize);\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\n uvs = region.uvs;\n texture = region.region.renderObject.page.texture;\n attachmentColor = region.color;\n } else if (attachment instanceof MeshAttachment) {\n let 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 = 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.page.texture;\n uvs = mesh.uvs;\n attachmentColor = mesh.color;\n } else if (attachment instanceof ClippingAttachment) {\n let clip = attachment;\n clipper.clipStart(slot, clip);\n continue;\n } else {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (texture) {\n let slotColor = slot.color;\n let 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 let darkColor = this.tempColor2;\n if (!slot.darkColor)\n darkColor.set(0, 0, 0, 1);\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 } else {\n darkColor.setFromColor(slot.darkColor);\n }\n darkColor.a = premultipliedAlpha ? 1 : 0;\n }\n let slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n batcher.setBlendMode(\n WebGLBlendModeConverter.getSourceColorGLBlendMode(blendMode, premultipliedAlpha),\n WebGLBlendModeConverter.getSourceAlphaGLBlendMode(blendMode),\n WebGLBlendModeConverter.getDestGLBlendMode(blendMode)\n );\n }\n if (clipper.isClipping()) {\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\n let clippedVertices = new Float32Array(clipper.clippedVertices);\n let clippedTriangles = clipper.clippedTriangles;\n if (transformer)\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\n batcher.draw(texture, clippedVertices, clippedTriangles);\n } else {\n let verts = renderable.vertices;\n if (!twoColorTint) {\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; 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 } else {\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; 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 let view = renderable.vertices.subarray(0, renderable.numFloats);\n if (transformer)\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\n batcher.draw(texture, view, triangles);\n }\n }\n clipper.clipEndWithSlot(slot);\n }\n clipper.clipEnd();\n }\n };\n var SkeletonRenderer = _SkeletonRenderer;\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n\n // spine-webgl/src/SceneRenderer.ts\n var quad = [\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0\n ];\n var QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n var WHITE = new Color(1, 1, 1, 1);\n var SceneRenderer = class {\n constructor(canvas, context, twoColorTint = true) {\n this.twoColorTint = false;\n this.activeRenderer = null;\n this.canvas = canvas;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.twoColorTint = twoColorTint;\n this.camera = new OrthoCamera(canvas.width, canvas.height);\n this.batcherShader = twoColorTint ? Shader.newTwoColoredTextured(this.context) : Shader.newColoredTextured(this.context);\n this.batcher = new PolygonBatcher(this.context, twoColorTint);\n this.shapesShader = Shader.newColored(this.context);\n this.shapes = new ShapeRenderer(this.context);\n this.skeletonRenderer = new SkeletonRenderer(this.context, twoColorTint);\n this.skeletonDebugRenderer = new SkeletonDebugRenderer(this.context);\n }\n dispose() {\n this.batcher.dispose();\n this.batcherShader.dispose();\n this.shapes.dispose();\n this.shapesShader.dispose();\n this.skeletonDebugRenderer.dispose();\n }\n begin() {\n this.camera.update();\n this.enableRenderer(this.batcher);\n }\n drawSkeleton(skeleton, premultipliedAlpha = false, slotRangeStart = -1, slotRangeEnd = -1, transform = null) {\n this.enableRenderer(this.batcher);\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd, transform);\n }\n drawSkeletonDebug(skeleton, premultipliedAlpha = false, ignoredBones) {\n this.enableRenderer(this.shapes);\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\n }\n drawTexture(texture, x, y, width, height, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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, QUAD_TRIANGLES);\n }\n drawTextureUV(texture, x, y, width, height, u, v, u2, v2, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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, QUAD_TRIANGLES);\n }\n drawTextureRotated(texture, x, y, width, height, pivotX, pivotY, angle, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\n let worldOriginX = x + pivotX;\n let worldOriginY = y + pivotY;\n let fx = -pivotX;\n let fy = -pivotY;\n let fx2 = width - pivotX;\n let fy2 = height - pivotY;\n let p1x = fx;\n let p1y = fy;\n let p2x = fx;\n let p2y = fy2;\n let p3x = fx2;\n let p3y = fy2;\n let p4x = fx2;\n let p4y = fy;\n let x1 = 0;\n let y1 = 0;\n let x2 = 0;\n let y2 = 0;\n let x3 = 0;\n let y3 = 0;\n let x4 = 0;\n let y4 = 0;\n if (angle != 0) {\n let cos = MathUtils.cosDeg(angle);\n let sin = 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 } 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, QUAD_TRIANGLES);\n }\n drawRegion(region, x, y, width, height, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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.page.texture, quad, QUAD_TRIANGLES);\n }\n line(x, y, x2, y2, color, color2) {\n this.enableRenderer(this.shapes);\n this.shapes.line(x, y, x2, y2, color);\n }\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n this.enableRenderer(this.shapes);\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\n }\n quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n this.enableRenderer(this.shapes);\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\n }\n rect(filled, x, y, width, height, color) {\n this.enableRenderer(this.shapes);\n this.shapes.rect(filled, x, y, width, height, color);\n }\n rectLine(filled, x1, y1, x2, y2, width, color) {\n this.enableRenderer(this.shapes);\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\n }\n polygon(polygonVertices, offset, count, color) {\n this.enableRenderer(this.shapes);\n this.shapes.polygon(polygonVertices, offset, count, color);\n }\n circle(filled, x, y, radius, color, segments = 0) {\n this.enableRenderer(this.shapes);\n this.shapes.circle(filled, x, y, radius, color, segments);\n }\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n this.enableRenderer(this.shapes);\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\n }\n end() {\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 resize(resizeMode) {\n let canvas = this.canvas;\n var dpr = window.devicePixelRatio || 1;\n var w = Math.round(canvas.clientWidth * dpr);\n var h = Math.round(canvas.clientHeight * dpr);\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.Expand)\n this.camera.setViewport(w, h);\n else if (resizeMode === ResizeMode.Fit) {\n let sourceWidth = canvas.width, sourceHeight = canvas.height;\n let targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\n let targetRatio = targetHeight / targetWidth;\n let sourceRatio = sourceHeight / sourceWidth;\n let scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\n this.camera.setViewport(sourceWidth * scale, sourceHeight * scale);\n }\n this.camera.update();\n }\n enableRenderer(renderer) {\n if (this.activeRenderer === renderer)\n return;\n this.end();\n if (renderer instanceof PolygonBatcher) {\n this.batcherShader.bind();\n this.batcherShader.setUniform4x4f(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 } else if (renderer instanceof ShapeRenderer) {\n this.shapesShader.bind();\n this.shapesShader.setUniform4x4f(Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.shapes.begin(this.shapesShader);\n this.activeRenderer = this.shapes;\n } else\n this.activeRenderer = this.skeletonDebugRenderer;\n }\n };\n var ResizeMode = /* @__PURE__ */ ((ResizeMode2) => {\n ResizeMode2[ResizeMode2[\"Stretch\"] = 0] = \"Stretch\";\n ResizeMode2[ResizeMode2[\"Expand\"] = 1] = \"Expand\";\n ResizeMode2[ResizeMode2[\"Fit\"] = 2] = \"Fit\";\n return ResizeMode2;\n })(ResizeMode || {});\n\n // spine-webgl/src/LoadingScreen.ts\n var spinnerImage;\n var logoImage;\n var loaded = 0;\n var FADE_IN = 1;\n var FADE_OUT = 1;\n var logoWidth = 165;\n var logoHeight = 108;\n var spinnerSize = 163;\n var LoadingScreen = class {\n constructor(renderer) {\n this.logo = null;\n this.spinner = null;\n this.angle = 0;\n this.fadeOut = 0;\n this.fadeIn = 0;\n this.timeKeeper = new TimeKeeper();\n this.backgroundColor = new Color(0.135, 0.135, 0.135, 1);\n this.tempColor = new Color();\n this.renderer = renderer;\n this.timeKeeper.maxDelta = 9;\n if (!logoImage) {\n let isSafari = navigator.userAgent.indexOf(\"Safari\") > -1;\n let onload = () => loaded++;\n logoImage = new Image();\n logoImage.src = SPINE_LOGO_DATA;\n if (!isSafari)\n logoImage.crossOrigin = \"anonymous\";\n logoImage.onload = onload;\n spinnerImage = new Image();\n spinnerImage.src = SPINNER_DATA;\n if (!isSafari)\n spinnerImage.crossOrigin = \"anonymous\";\n spinnerImage.onload = onload;\n }\n }\n dispose() {\n var _a, _b;\n (_a = this.logo) == null ? void 0 : _a.dispose();\n (_b = this.spinner) == null ? void 0 : _b.dispose();\n }\n draw(complete = false) {\n if (loaded < 2 || complete && this.fadeOut > FADE_OUT)\n return;\n this.timeKeeper.update();\n let a = Math.abs(Math.sin(this.timeKeeper.totalTime + 0.25));\n this.angle -= this.timeKeeper.delta * 200 * (1 + 1.5 * Math.pow(a, 5));\n let tempColor = this.tempColor;\n let renderer = this.renderer;\n let canvas = renderer.canvas;\n let gl = renderer.context.gl;\n renderer.resize(1 /* Expand */);\n renderer.camera.position.set(canvas.width / 2, canvas.height / 2, 0);\n renderer.batcher.setBlendMode(gl.ONE, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n if (complete) {\n this.fadeOut += this.timeKeeper.delta * (this.timeKeeper.totalTime < 1 ? 2 : 1);\n if (this.fadeOut > FADE_OUT)\n return;\n tempColor.setFromColor(this.backgroundColor);\n a = 1 - this.fadeOut / FADE_OUT;\n a = 1 - (a - 1) * (a - 1);\n tempColor.a *= a;\n if (tempColor.a > 0) {\n renderer.camera.zoom = 1;\n renderer.begin();\n renderer.quad(\n true,\n 0,\n 0,\n canvas.width,\n 0,\n canvas.width,\n canvas.height,\n 0,\n canvas.height,\n tempColor,\n tempColor,\n tempColor,\n tempColor\n );\n renderer.end();\n }\n } else {\n this.fadeIn += this.timeKeeper.delta;\n if (this.backgroundColor.a > 0) {\n gl.clearColor(this.backgroundColor.r, this.backgroundColor.g, this.backgroundColor.b, this.backgroundColor.a);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n a = 1;\n }\n a *= Math.min(this.fadeIn / FADE_IN, 1);\n tempColor.set(a, a, a, a);\n if (!this.logo) {\n this.logo = new GLTexture(renderer.context, logoImage);\n this.spinner = new GLTexture(renderer.context, spinnerImage);\n }\n renderer.camera.zoom = Math.max(1, spinnerSize / canvas.height);\n renderer.begin();\n renderer.drawTexture(this.logo, (canvas.width - logoWidth) / 2, (canvas.height - logoHeight) / 2, logoWidth, logoHeight, tempColor);\n if (this.spinner)\n renderer.drawTextureRotated(this.spinner, (canvas.width - spinnerSize) / 2, (canvas.height - spinnerSize) / 2, spinnerSize, spinnerSize, spinnerSize / 2, spinnerSize / 2, this.angle, tempColor);\n renderer.end();\n }\n };\n var SPINNER_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC\";\n var SPINE_LOGO_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=\";\n\n // spine-webgl/src/SpineCanvas.ts\n var SpineCanvas = class {\n constructor(canvas, config) {\n this.time = new TimeKeeper();\n if (!config.pathPrefix)\n config.pathPrefix = \"\";\n if (!config.app)\n config.app = {\n loadAssets: () => {\n },\n initialize: () => {\n },\n update: () => {\n },\n render: () => {\n },\n error: () => {\n }\n };\n if (config.webglConfig)\n config.webglConfig = { alpha: true };\n this.htmlCanvas = canvas;\n this.context = new ManagedWebGLRenderingContext(canvas, config.webglConfig);\n this.renderer = new SceneRenderer(canvas, this.context);\n this.gl = this.context.gl;\n this.assetManager = new AssetManager(this.context, config.pathPrefix);\n this.input = new Input(canvas);\n if (config.app.loadAssets)\n config.app.loadAssets(this);\n let loop = () => {\n requestAnimationFrame(loop);\n this.time.update();\n if (config.app.update)\n config.app.update(this, this.time.delta);\n if (config.app.render)\n config.app.render(this);\n };\n let waitForAssets = () => {\n if (this.assetManager.isLoadingComplete()) {\n if (this.assetManager.hasErrors()) {\n if (config.app.error)\n config.app.error(this, this.assetManager.getErrors());\n } else {\n if (config.app.initialize)\n config.app.initialize(this);\n loop();\n }\n return;\n }\n requestAnimationFrame(waitForAssets);\n };\n requestAnimationFrame(waitForAssets);\n }\n clear(r, g, b, a) {\n this.gl.clearColor(r, g, b, a);\n this.gl.clear(this.gl.COLOR_BUFFER_BIT);\n }\n };\n return __toCommonJS(src_exports);\n})();\n//# sourceMappingURL=spine-webgl.js.map\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine4.1/dist/SpineWebGLPlugin.js b/plugins/spine4.1/dist/SpineWebGLPlugin.js index 30a3e645c..7c32472a3 100644 --- a/plugins/spine4.1/dist/SpineWebGLPlugin.js +++ b/plugins/spine4.1/dist/SpineWebGLPlugin.js @@ -27178,35 +27178,33 @@ var SpinePlugin = new Class({ return null; } - var gl = this.gl; - var i; - var atlasPage; - var realTextureKey; - - if (this.isWebGL) + if (!this.spineTextures.has(atlasKey)) { - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - } + var gl = this.gl; + var i; + var atlasPage; + var realTextureKey; - for (i = 0; i < atlas.pages.length; i ++) - { - atlasPage = atlas.pages[i]; - realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; if (this.isWebGL) { - atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); } - else + + for (i = 0; i < atlas.pages.length; i ++) { - atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + atlasPage = atlas.pages[i]; + realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; + if (this.isWebGL) + { + atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + } + else + { + atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + } } - } - - var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey; - - if (!this.spineTextures.has(spineTextureKey)) - { - this.spineTextures.add(spineTextureKey, atlas); + + this.spineTextures.add(atlasKey, atlas); } var preMultipliedAlpha = atlasData.preMultipliedAlpha; diff --git a/plugins/spine4.1/dist/SpineWebGLPlugin.min.js b/plugins/spine4.1/dist/SpineWebGLPlugin.min.js index 2d2e84eb4..1dfcc3a0d 100644 --- a/plugins/spine4.1/dist/SpineWebGLPlugin.min.js +++ b/plugins/spine4.1/dist/SpineWebGLPlugin.min.js @@ -226,7 +226,7 @@ var s=i(0),n=i(1),r=i(19),a=new s({initialize:function(t,e,i,s,n,r,a){this.textu * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var s=i(71),n=i(0),r=i(8),a=i(185),o=i(186),h={canvas:i(47),webgl:i(47)},l=i(210),c=i(226),u=i(258),d=i(2),f=new n({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);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),this.renderer||(this.renderer={width:n.scale.width,height:n.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,s,n,r){var a=this.scene.sys[i],o=new c(this.scene,a,t,e,s,n,r);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var n=r(t,"key",null),a=r(t,"animationName",null),o=r(t,"loop",!1),h=this.scene.sys[i],l=new c(this.scene,h,0,0,n,a,o);void 0!==e&&(t.add=e),s(this.scene,l,t);var u=r(t,"skinName",!1);u&&l.setSkinByName(u);var d=r(t,"slotName",!1),f=r(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,s){var n=this.scene.sys[i],r=new u(this.scene,n,t,e,s);return this.displayList.add(r),r}),(function(t,e){void 0===t&&(t={});var n=r(t,"x",0),a=r(t,"y",0),o=r(t,"children",null),h=this.scene.sys[i],l=new u(this.scene,h,n,a,o);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},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),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.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 i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var n=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var n=this.textures,r=this.sceneRenderer.context.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(r,n.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,s,n,r,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h * @copyright 2013-2023 Photon Storm Ltd. diff --git a/plugins/spine4.1/dist/SpineWebGLPluginDebug.js b/plugins/spine4.1/dist/SpineWebGLPluginDebug.js index 253978906..131b90e46 100644 --- a/plugins/spine4.1/dist/SpineWebGLPluginDebug.js +++ b/plugins/spine4.1/dist/SpineWebGLPluginDebug.js @@ -37328,35 +37328,33 @@ var SpinePlugin = new Class({ return null; } - var gl = this.gl; - var i; - var atlasPage; - var realTextureKey; - - if (this.isWebGL) + if (!this.spineTextures.has(atlasKey)) { - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - } + var gl = this.gl; + var i; + var atlasPage; + var realTextureKey; - for (i = 0; i < atlas.pages.length; i ++) - { - atlasPage = atlas.pages[i]; - realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; if (this.isWebGL) { - atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); } - else + + for (i = 0; i < atlas.pages.length; i ++) { - atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + atlasPage = atlas.pages[i]; + realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; + if (this.isWebGL) + { + atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + } + else + { + atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + } } - } - - var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey; - - if (!this.spineTextures.has(spineTextureKey)) - { - this.spineTextures.add(spineTextureKey, atlas); + + this.spineTextures.add(atlasKey, atlas); } var preMultipliedAlpha = atlasData.preMultipliedAlpha; diff --git a/plugins/spine4.1/dist/SpineWebGLPluginDebug.js.map b/plugins/spine4.1/dist/SpineWebGLPluginDebug.js.map index 8fd33503f..7eb224a07 100644 --- a/plugins/spine4.1/dist/SpineWebGLPluginDebug.js.map +++ b/plugins/spine4.1/dist/SpineWebGLPluginDebug.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GetCalcMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.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/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-webgl.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,4FAA8B;;AAE5D;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChEA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,kBAAkB,mBAAO,CAAC,8CAAa;AACvC,iBAAiB,mBAAO,CAAC,6CAAY;AACrC;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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;AACA;AACA;AACA;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;ACjuCA;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;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;;;;;;;;;;;;AC/FA;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,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvHA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1IA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA,sDAAsD,iBAAiB,cAAc;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC7E;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;AACjD;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA,GAAG,oBAAoB;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,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,OAAO;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,6BAA6B,iBAAiB;AAC9C;AACA,aAAa;AACb;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA,WAAW;AACX,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;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,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,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;AACpB;AACA;AACA;AACA;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;AACA;AACA;AACA;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;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;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;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wDAAwD,KAAK,WAAW,OAAO,IAAI,aAAa;AAChG,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA,SAAS;AACT,iDAAiD,yDAAyD;AAC1G,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,yEAAyE,KAAK,eAAe,UAAU;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,KAAK,IAAI,UAAU;AACrF;AACA,OAAO;AACP,+DAA+D,KAAK,WAAW,OAAO,IAAI,aAAa;AACvG,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,8CAA8C,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;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,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc,EAAE;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,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,EAAE;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;;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;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;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,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,qBAAqB,eAAe;AACpC;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;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,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;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;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;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;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;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;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,qBAAqB,2BAA2B;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;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,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,kDAAkD,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO;AACP,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;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;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,EAAE;AACzF;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,kDAAkD,SAAS;AAC3D;AACA,sDAAsD,WAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,qBAAqB;AACrB,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;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,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,6CAA6C,SAAS;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,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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,OAAO;AAClD;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;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;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;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,QAAQ;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;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,8BAA8B,sBAAsB;AACpD;AACA;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,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;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,8CAA8C,OAAO;AACrD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,OAAO;AACjF;AACA;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;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,kDAAkD,aAAa,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA,oDAAoD,wBAAwB,qBAAqB,mBAAmB;AACpH;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB,qBAAqB,mBAAmB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,4BAA4B,mBAAmB;AAC5G;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,4BAA4B,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,uBAAuB,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,uBAAuB,mBAAmB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,sDAAsD,SAAS,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA,+DAA+D,eAAe,YAAY,aAAa;AACvG;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,sEAAsE,eAAe,YAAY,aAAa;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,iEAAiE,eAAe,YAAY,aAAa;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,YAAY,aAAa;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,OAAO;AAChF;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sDAAsD,OAAO;AAC7D;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;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;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;AACA;;AAEA;AACA,iBAAiB;AACjB,qBAAqB;AACrB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB,gBAAgB;AAChB,qBAAqB;AACrB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;;AAEA;AACA,iBAAiB;AACjB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,2BAA2B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oBAAoB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,uBAAuB,cAAc;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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,SAAS;AACT;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;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,+DAA+D,QAAQ;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,+DAA+D,QAAQ;AACvE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,wCAAwC;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;;AAEA,CAAC","file":"SpineWebGLPluginDebug.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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TransformMatrix = require('./components/TransformMatrix');\n\nvar tempMatrix1 = new TransformMatrix();\nvar tempMatrix2 = new TransformMatrix();\nvar tempMatrix3 = new TransformMatrix();\n\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\n\n/**\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\n * the parent matrix if provided.\n *\n * Note that the object this results contains _references_ to the Transform Matrices,\n * not new instances of them. Therefore, you should use their values immediately, or\n * copy them to your own matrix, as they will be replaced as soon as another Game\n * Object is rendered.\n *\n * @function Phaser.GameObjects.GetCalcMatrix\n * @memberof Phaser.GameObjects\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\n *\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\n */\nvar GetCalcMatrix = function (src, camera, parentMatrix)\n{\n var camMatrix = tempMatrix1;\n var spriteMatrix = tempMatrix2;\n var calcMatrix = tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, 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 else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n }\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n return result;\n};\n\nmodule.exports = GetCalcMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\n\n var children = container.list;\n var childCount = children.length;\n\n if (childCount === 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 renderer.pipelines.preBatch(container);\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 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) ? (children[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, camera, transformMatrix, container);\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 renderer.pipelines.postBatch(container);\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = [ content[0] ];\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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 SpineCanvas = require('SpineCanvas');\nvar SpineWebgl = require('SpineWebgl');\nvar Spine = {\n canvas: SpineCanvas,\n webgl: SpineWebgl\n};\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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 this.runtime.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 this.runtime.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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n \n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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 this.runtime.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new this.runtime.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new this.runtime.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 this.runtime.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 var gl = this.gl;\n var i;\n var atlasPage;\n var realTextureKey;\n\n if (this.isWebGL)\n {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n }\n\n for (i = 0; i < atlas.pages.length; i ++)\n {\n atlasPage = atlas.pages[i];\n realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;\n if (this.isWebGL)\n {\n atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));\n }\n else\n {\n atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));\n }\n }\n\n var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey;\n\n if (!this.spineTextures.has(spineTextureKey))\n {\n this.spineTextures.add(spineTextureKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new this.runtime.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new this.runtime.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 this.runtime.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 this.runtime.AnimationStateData(skeleton.data);\n\n var state = new this.runtime.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 this.runtime.Vector2();\n var size = new this.runtime.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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 2022 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 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 {SpineContainer} container - The Game Object being rendered in this call.\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, 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.pipelines.rebind();\n }\n\n return;\n }\n\n camera.addToRenderList(container);\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 if (renderer.newType)\n {\n // flush + clear if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var rendererNextType = renderer.nextTypeMatch;\n\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\n renderer.nextTypeMatch = true;\n renderer.newType = false;\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (child.willRender(camera, container))\n {\n var mask = child.mask;\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.preRenderWebGL(renderer, child, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.postRenderWebGL(renderer, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n }\n }\n\n renderer.nextTypeMatch = rendererNextType;\n\n if (!rendererNextType)\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Directly 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#renderDirect\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 {SpineGameObject} src - The Game Object being rendered in this call.\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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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 // 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.pipelines.rebind();\n};\n\nmodule.exports = SpineGameObjectWebGLDirect;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (renderer.newType)\n {\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\n\"use strict\";\nvar spine = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // spine-webgl/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n AlphaTimeline: () => AlphaTimeline,\n Animation: () => Animation,\n AnimationState: () => AnimationState,\n AnimationStateAdapter: () => AnimationStateAdapter,\n AnimationStateData: () => AnimationStateData,\n AssetManager: () => AssetManager,\n AssetManagerBase: () => AssetManagerBase,\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\n Attachment: () => Attachment,\n AttachmentTimeline: () => AttachmentTimeline,\n BinaryInput: () => BinaryInput,\n BlendMode: () => BlendMode,\n Bone: () => Bone,\n BoneData: () => BoneData,\n BoundingBoxAttachment: () => BoundingBoxAttachment,\n CURRENT: () => CURRENT,\n CameraController: () => CameraController,\n ClippingAttachment: () => ClippingAttachment,\n Color: () => Color,\n Color2Attribute: () => Color2Attribute,\n ColorAttribute: () => ColorAttribute,\n ConstraintData: () => ConstraintData,\n CurveTimeline: () => CurveTimeline,\n CurveTimeline1: () => CurveTimeline1,\n CurveTimeline2: () => CurveTimeline2,\n DebugUtils: () => DebugUtils,\n DeformTimeline: () => DeformTimeline,\n Downloader: () => Downloader,\n DrawOrderTimeline: () => DrawOrderTimeline,\n Event: () => Event,\n EventData: () => EventData,\n EventQueue: () => EventQueue,\n EventTimeline: () => EventTimeline,\n EventType: () => EventType,\n FIRST: () => FIRST,\n FakeTexture: () => FakeTexture,\n GLTexture: () => GLTexture,\n HOLD_FIRST: () => HOLD_FIRST,\n HOLD_MIX: () => HOLD_MIX,\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\n IkConstraint: () => IkConstraint,\n IkConstraintData: () => IkConstraintData,\n IkConstraintTimeline: () => IkConstraintTimeline,\n Input: () => Input,\n IntSet: () => IntSet,\n Interpolation: () => Interpolation,\n LoadingScreen: () => LoadingScreen,\n M00: () => M00,\n M01: () => M01,\n M02: () => M02,\n M03: () => M03,\n M10: () => M10,\n M11: () => M11,\n M12: () => M12,\n M13: () => M13,\n M20: () => M20,\n M21: () => M21,\n M22: () => M22,\n M23: () => M23,\n M30: () => M30,\n M31: () => M31,\n M32: () => M32,\n M33: () => M33,\n ManagedWebGLRenderingContext: () => ManagedWebGLRenderingContext,\n MathUtils: () => MathUtils,\n Matrix4: () => Matrix42,\n Mesh: () => Mesh,\n MeshAttachment: () => MeshAttachment,\n MixBlend: () => MixBlend,\n MixDirection: () => MixDirection,\n OrthoCamera: () => OrthoCamera,\n PathAttachment: () => PathAttachment,\n PathConstraint: () => PathConstraint,\n PathConstraintData: () => PathConstraintData,\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\n PointAttachment: () => PointAttachment,\n PolygonBatcher: () => PolygonBatcher,\n Pool: () => Pool,\n Position2Attribute: () => Position2Attribute,\n Position3Attribute: () => Position3Attribute,\n PositionMode: () => PositionMode,\n Pow: () => Pow,\n PowOut: () => PowOut,\n RGB2Timeline: () => RGB2Timeline,\n RGBA2Timeline: () => RGBA2Timeline,\n RGBATimeline: () => RGBATimeline,\n RGBTimeline: () => RGBTimeline,\n RegionAttachment: () => RegionAttachment,\n ResizeMode: () => ResizeMode,\n RotateMode: () => RotateMode,\n RotateTimeline: () => RotateTimeline,\n SETUP: () => SETUP,\n SUBSEQUENT: () => SUBSEQUENT,\n ScaleTimeline: () => ScaleTimeline,\n ScaleXTimeline: () => ScaleXTimeline,\n ScaleYTimeline: () => ScaleYTimeline,\n SceneRenderer: () => SceneRenderer,\n SequenceTimeline: () => SequenceTimeline,\n Shader: () => Shader,\n ShapeRenderer: () => ShapeRenderer,\n ShapeType: () => ShapeType,\n ShearTimeline: () => ShearTimeline,\n ShearXTimeline: () => ShearXTimeline,\n ShearYTimeline: () => ShearYTimeline,\n Skeleton: () => Skeleton,\n SkeletonBinary: () => SkeletonBinary,\n SkeletonBounds: () => SkeletonBounds,\n SkeletonClipping: () => SkeletonClipping,\n SkeletonData: () => SkeletonData,\n SkeletonDebugRenderer: () => SkeletonDebugRenderer,\n SkeletonJson: () => SkeletonJson,\n SkeletonRenderer: () => SkeletonRenderer,\n Skin: () => Skin,\n SkinEntry: () => SkinEntry,\n Slot: () => Slot,\n SlotData: () => SlotData,\n SpacingMode: () => SpacingMode,\n SpineCanvas: () => SpineCanvas,\n StringSet: () => StringSet,\n TexCoordAttribute: () => TexCoordAttribute,\n Texture: () => Texture,\n TextureAtlas: () => TextureAtlas,\n TextureAtlasPage: () => TextureAtlasPage,\n TextureAtlasRegion: () => TextureAtlasRegion,\n TextureFilter: () => TextureFilter,\n TextureRegion: () => TextureRegion,\n TextureWrap: () => TextureWrap,\n TimeKeeper: () => TimeKeeper,\n Timeline: () => Timeline,\n Touch: () => Touch,\n TrackEntry: () => TrackEntry,\n TransformConstraint: () => TransformConstraint,\n TransformConstraintData: () => TransformConstraintData,\n TransformConstraintTimeline: () => TransformConstraintTimeline,\n TransformMode: () => TransformMode,\n TranslateTimeline: () => TranslateTimeline,\n TranslateXTimeline: () => TranslateXTimeline,\n TranslateYTimeline: () => TranslateYTimeline,\n Triangulator: () => Triangulator,\n Utils: () => Utils,\n Vector2: () => Vector2,\n Vector3: () => Vector3,\n VertexAttachment: () => VertexAttachment,\n VertexAttribute: () => VertexAttribute,\n VertexAttributeType: () => VertexAttributeType,\n WebGLBlendModeConverter: () => WebGLBlendModeConverter,\n WindowedMean: () => WindowedMean\n });\n\n // spine-core/src/Utils.ts\n var IntSet = class {\n constructor() {\n this.array = new Array();\n }\n add(value) {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n contains(value) {\n return this.array[value | 0] != void 0;\n }\n remove(value) {\n this.array[value | 0] = void 0;\n }\n clear() {\n this.array.length = 0;\n }\n };\n var StringSet = class {\n constructor() {\n this.entries = {};\n this.size = 0;\n }\n add(value) {\n let contains = this.entries[value];\n this.entries[value] = true;\n if (!contains) {\n this.size++;\n return true;\n }\n return false;\n }\n addAll(values) {\n let oldSize = this.size;\n for (var i = 0, n = values.length; i < n; i++)\n this.add(values[i]);\n return oldSize != this.size;\n }\n contains(value) {\n return this.entries[value];\n }\n clear() {\n this.entries = {};\n this.size = 0;\n }\n };\n var _Color = class {\n constructor(r = 0, g = 0, b = 0, a = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n set(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this.clamp();\n }\n setFromColor(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 setFromString(hex) {\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n return this;\n }\n add(r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n return this.clamp();\n }\n clamp() {\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 static rgba8888ToColor(color, value) {\n color.r = ((value & 4278190080) >>> 24) / 255;\n color.g = ((value & 16711680) >>> 16) / 255;\n color.b = ((value & 65280) >>> 8) / 255;\n color.a = (value & 255) / 255;\n }\n static rgb888ToColor(color, value) {\n color.r = ((value & 16711680) >>> 16) / 255;\n color.g = ((value & 65280) >>> 8) / 255;\n color.b = (value & 255) / 255;\n }\n static fromString(hex) {\n return new _Color().setFromString(hex);\n }\n };\n var Color = _Color;\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 var _MathUtils = class {\n static clamp(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n }\n static cosDeg(degrees) {\n return Math.cos(degrees * _MathUtils.degRad);\n }\n static sinDeg(degrees) {\n return Math.sin(degrees * _MathUtils.degRad);\n }\n static signum(value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n static toInt(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n static cbrt(x) {\n let y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n }\n static randomTriangular(min, max) {\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n static randomTriangularWith(min, max, mode) {\n let u = Math.random();\n let 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 static isPowerOfTwo(value) {\n return value && (value & value - 1) === 0;\n }\n };\n var MathUtils = _MathUtils;\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 var Interpolation = class {\n apply(start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n }\n };\n var Pow = class extends Interpolation {\n constructor(power) {\n super();\n this.power = 2;\n this.power = power;\n }\n applyInternal(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 };\n var PowOut = class extends Pow {\n constructor(power) {\n super(power);\n }\n applyInternal(a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n };\n var _Utils = class {\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n static arrayFill(array, fromIndex, toIndex, value) {\n for (let i = fromIndex; i < toIndex; i++)\n array[i] = value;\n }\n static setArraySize(array, size, value = 0) {\n let oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n }\n static ensureArrayCapacity(array, size, value = 0) {\n if (array.length >= size)\n return array;\n return _Utils.setArraySize(array, size, value);\n }\n static newArray(size, defaultValue) {\n let array = new Array(size);\n for (let i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n }\n static newFloatArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Float32Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static newShortArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Int16Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static toFloatArray(array) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n static toSinglePrecision(value) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n static webkit602BugfixHelper(alpha, blend) {\n }\n static contains(array, element, identity = true) {\n for (var i = 0; i < array.length; i++)\n if (array[i] == element)\n return true;\n return false;\n }\n static enumValue(type, name) {\n return type[name[0].toUpperCase() + name.slice(1)];\n }\n };\n var Utils = _Utils;\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\n var DebugUtils = class {\n static logBones(skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let 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 };\n var Pool = class {\n constructor(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n obtain() {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n free(item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n }\n freeAll(items) {\n for (let i = 0; i < items.length; i++)\n this.free(items[i]);\n }\n clear() {\n this.items.length = 0;\n }\n };\n var Vector2 = class {\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n length() {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n normalize() {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n };\n var TimeKeeper = class {\n constructor() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1e3;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n update() {\n let now = Date.now() / 1e3;\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 };\n var WindowedMean = class {\n constructor(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 hasEnoughData() {\n return this.addedValues >= this.values.length;\n }\n addValue(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 getMean() {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++)\n mean += this.values[i];\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n return 0;\n }\n };\n\n // spine-core/src/attachments/Attachment.ts\n var Attachment = class {\n constructor(name) {\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n };\n var _VertexAttachment = class extends Attachment {\n constructor(name) {\n super(name);\n this.id = _VertexAttachment.nextID++;\n this.bones = null;\n this.vertices = [];\n this.worldVerticesLength = 0;\n this.timelineAttachment = this;\n }\n computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (!bones) {\n if (deformArray.length > 0)\n vertices = deformArray;\n let bone = slot.bone;\n let x = bone.worldX;\n let y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\n let vx = vertices[v2], vy = vertices[v2 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let 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 } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let 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 copyTo(attachment) {\n if (this.bones) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n if (this.vertices) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.timelineAttachment = this.timelineAttachment;\n }\n };\n var VertexAttachment = _VertexAttachment;\n VertexAttachment.nextID = 0;\n\n // spine-core/src/attachments/Sequence.ts\n var _Sequence = class {\n constructor(count) {\n this.id = _Sequence.nextID();\n this.start = 0;\n this.digits = 0;\n this.setupIndex = 0;\n this.regions = new Array(count);\n }\n copy() {\n let copy = new _Sequence(this.regions.length);\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\n copy.start = this.start;\n copy.digits = this.digits;\n copy.setupIndex = this.setupIndex;\n return copy;\n }\n apply(slot, attachment) {\n let index = slot.sequenceIndex;\n if (index == -1)\n index = this.setupIndex;\n if (index >= this.regions.length)\n index = this.regions.length - 1;\n let region = this.regions[index];\n if (attachment.region != region) {\n attachment.region = region;\n attachment.updateRegion();\n }\n }\n getPath(basePath, index) {\n let result = basePath;\n let frame = (this.start + index).toString();\n for (let i = this.digits - frame.length; i > 0; i--)\n result += \"0\";\n result += frame;\n return result;\n }\n static nextID() {\n return _Sequence._nextID++;\n }\n };\n var Sequence = _Sequence;\n Sequence._nextID = 0;\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\n return SequenceMode2;\n })(SequenceMode || {});\n var SequenceModeValues = [\n 0 /* hold */,\n 1 /* once */,\n 2 /* loop */,\n 3 /* pingpong */,\n 4 /* onceReverse */,\n 5 /* loopReverse */,\n 6 /* pingpongReverse */\n ];\n\n // spine-core/src/Animation.ts\n var Animation = class {\n constructor(name, timelines, duration) {\n this.timelines = [];\n this.timelineIds = new StringSet();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n this.setTimelines(timelines);\n this.duration = duration;\n }\n setTimelines(timelines) {\n if (!timelines)\n throw new Error(\"timelines cannot be null.\");\n this.timelines = timelines;\n this.timelineIds.clear();\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds.addAll(timelines[i].getPropertyIds());\n }\n hasTimeline(ids) {\n for (let i = 0; i < ids.length; i++)\n if (this.timelineIds.contains(ids[i]))\n return true;\n return false;\n }\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (!skeleton)\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 let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n };\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\n return MixBlend2;\n })(MixBlend || {});\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\n return MixDirection2;\n })(MixDirection || {});\n var Property = {\n rotate: 0,\n x: 1,\n y: 2,\n scaleX: 3,\n scaleY: 4,\n shearX: 5,\n shearY: 6,\n rgb: 7,\n alpha: 8,\n rgb2: 9,\n attachment: 10,\n deform: 11,\n event: 12,\n drawOrder: 13,\n ikConstraint: 14,\n transformConstraint: 15,\n pathConstraintPosition: 16,\n pathConstraintSpacing: 17,\n pathConstraintMix: 18,\n sequence: 19\n };\n var Timeline = class {\n constructor(frameCount, propertyIds) {\n this.propertyIds = propertyIds;\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\n }\n getPropertyIds() {\n return this.propertyIds;\n }\n getFrameEntries() {\n return 1;\n }\n getFrameCount() {\n return this.frames.length / this.getFrameEntries();\n }\n getDuration() {\n return this.frames[this.frames.length - this.getFrameEntries()];\n }\n static search1(frames, time) {\n let n = frames.length;\n for (let i = 1; i < n; i++)\n if (frames[i] > time)\n return i - 1;\n return n - 1;\n }\n static search(frames, time, step) {\n let n = frames.length;\n for (let i = step; i < n; i += step)\n if (frames[i] > time)\n return i - step;\n return n - step;\n }\n };\n var CurveTimeline = class extends Timeline {\n constructor(frameCount, bezierCount, propertyIds) {\n super(frameCount, propertyIds);\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\n this.curves[frameCount - 1] = 1;\n }\n setLinear(frame) {\n this.curves[frame] = 0;\n }\n setStepped(frame) {\n this.curves[frame] = 1;\n }\n shrink(bezierCount) {\n let size = this.getFrameCount() + bezierCount * 18;\n if (this.curves.length > size) {\n let newCurves = Utils.newFloatArray(size);\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\n this.curves = newCurves;\n }\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = value1 + dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getBezierValue(time, frameIndex, valueOffset, i) {\n let curves = this.curves;\n if (curves[i] > time) {\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n frameIndex += this.getFrameEntries();\n let x = curves[n - 2], y = curves[n - 1];\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\n }\n };\n var CurveTimeline1 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId) {\n super(frameCount, bezierCount, [propertyId]);\n }\n getFrameEntries() {\n return 2;\n }\n setFrame(frame, time, value) {\n frame <<= 1;\n this.frames[frame] = time;\n this.frames[frame + 1] = value;\n }\n getCurveValue(time) {\n let frames = this.frames;\n let i = frames.length - 2;\n for (let ii = 2; ii <= i; ii += 2) {\n if (frames[ii] > time) {\n i = ii - 2;\n break;\n }\n }\n let curveType = this.curves[i >> 1];\n switch (curveType) {\n case 0:\n let before = frames[i], value = frames[i + 1];\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\n case 1:\n return frames[i + 1];\n }\n return this.getBezierValue(time, i, 1, curveType - 2);\n }\n };\n var CurveTimeline2 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\n }\n getFrameEntries() {\n return 3;\n }\n setFrame(frame, time, value1, value2) {\n frame *= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = value1;\n this.frames[frame + 2] = value2;\n }\n };\n var RotateTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n return;\n case 1 /* first */:\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\n }\n return;\n }\n let r = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n r += bone.data.rotation - bone.rotation;\n case 3 /* add */:\n bone.rotation += r * alpha;\n }\n }\n };\n var TranslateTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.x + \"|\" + boneIndex,\n Property.y + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n };\n var TranslateXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n break;\n case 3 /* add */:\n bone.x += x * alpha;\n }\n }\n };\n var TranslateYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case 3 /* add */:\n bone.y += y * alpha;\n }\n }\n };\n var ScaleTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.scaleX + \"|\" + boneIndex,\n Property.scaleY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let x, y;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n x *= bone.data.scaleX;\n y *= bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ScaleXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time) * bone.data.scaleX;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleX += x - bone.data.scaleX;\n else\n bone.scaleX = x;\n } else {\n let bx = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n }\n }\n }\n };\n var ScaleYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time) * bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleY += y - bone.data.scaleY;\n else\n bone.scaleY = y;\n } else {\n let by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n by = bone.data.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = bone.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ShearTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.shearX + \"|\" + boneIndex,\n Property.shearY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n };\n var ShearXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n break;\n case 3 /* add */:\n bone.shearX += x * alpha;\n }\n }\n };\n var ShearYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case 3 /* add */:\n bone.shearY += y * alpha;\n }\n }\n };\n var RGBATimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 5;\n }\n setFrame(frame, time, r, g, b, a) {\n frame *= 5;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.setFromColor(setup);\n return;\n case 1 /* first */:\n color.add(\n (setup.r - color.r) * alpha,\n (setup.g - color.g) * alpha,\n (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha\n );\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0;\n let i = Timeline.search(frames, time, 5);\n let curveType = this.curves[i / 5];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n let t = (time - before) / (frames[i + 5] - before);\n r += (frames[i + 5 + 1] - r) * t;\n g += (frames[i + 5 + 2] - g) * t;\n b += (frames[i + 5 + 3] - b) * t;\n a += (frames[i + 5 + 4] - a) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n }\n if (alpha == 1)\n color.set(r, g, b, a);\n else {\n if (blend == 0 /* 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 };\n var RGBTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, r, g, b) {\n frame <<= 2;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n return;\n case 1 /* first */:\n color.r += (setup.r - color.r) * alpha;\n color.g += (setup.g - color.g) * alpha;\n color.b += (setup.b - color.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n r += (frames[i + 4 + 1] - r) * t;\n g += (frames[i + 4 + 2] - g) * t;\n b += (frames[i + 4 + 3] - b) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (alpha == 1) {\n color.r = r;\n color.g = g;\n color.b = b;\n } else {\n if (blend == 0 /* setup */) {\n let setup = slot.data.color;\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n }\n color.r += (r - color.r) * alpha;\n color.g += (g - color.g) * alpha;\n color.b += (b - color.b) * alpha;\n }\n }\n };\n var AlphaTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let color = slot.color;\n if (time < this.frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.a = setup.a;\n return;\n case 1 /* first */:\n color.a += (setup.a - color.a) * alpha;\n }\n return;\n }\n let a = this.getCurveValue(time);\n if (alpha == 1)\n color.a = a;\n else {\n if (blend == 0 /* setup */)\n color.a = slot.data.color.a;\n color.a += (a - color.a) * alpha;\n }\n }\n };\n var RGBA2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 8;\n }\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\n frame <<= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n this.frames[frame + 5] = r2;\n this.frames[frame + 6] = g2;\n this.frames[frame + 7] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.setFromColor(setupLight);\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.add(\n (setupLight.r - light.r) * alpha,\n (setupLight.g - light.g) * alpha,\n (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha\n );\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 8);\n let curveType = this.curves[i >> 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n let t = (time - before) / (frames[i + 8] - before);\n r += (frames[i + 8 + 1] - r) * t;\n g += (frames[i + 8 + 2] - g) * t;\n b += (frames[i + 8 + 3] - b) * t;\n a += (frames[i + 8 + 4] - a) * t;\n r2 += (frames[i + 8 + 5] - r2) * t;\n g2 += (frames[i + 8 + 6] - g2) * t;\n b2 += (frames[i + 8 + 7] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\n }\n if (alpha == 1) {\n light.set(r, g, b, a);\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n light.setFromColor(slot.data.color);\n let setupDark = slot.data.darkColor;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var RGB2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, r, g, b, r2, g2, b2) {\n frame *= 7;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = r2;\n this.frames[frame + 5] = g2;\n this.frames[frame + 6] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.r += (setupLight.r - light.r) * alpha;\n light.g += (setupLight.g - light.g) * alpha;\n light.b += (setupLight.b - light.b) * alpha;\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n r += (frames[i + 7 + 1] - r) * t;\n g += (frames[i + 7 + 2] - g) * t;\n b += (frames[i + 7 + 3] - b) * t;\n r2 += (frames[i + 7 + 4] - r2) * t;\n g2 += (frames[i + 7 + 5] - g2) * t;\n b2 += (frames[i + 7 + 6] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (alpha == 1) {\n light.r = r;\n light.g = g;\n light.b = b;\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.r += (r - light.r) * alpha;\n light.g += (g - light.g) * alpha;\n light.b += (b - light.b) * alpha;\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var AttachmentTimeline = class extends Timeline {\n constructor(frameCount, slotIndex) {\n super(frameCount, [\n Property.attachment + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachmentNames = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, attachmentName) {\n this.frames[frame] = time;\n this.attachmentNames[frame] = attachmentName;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\n }\n setAttachment(skeleton, slot, attachmentName) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n };\n var DeformTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex, attachment) {\n super(frameCount, bezierCount, [\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n this.vertices = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, vertices) {\n this.frames[frame] = time;\n this.vertices[frame] = vertices;\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getCurvePercent(time, frame) {\n let curves = this.curves;\n let i = curves[frame];\n switch (i) {\n case 0:\n let x2 = this.frames[frame];\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\n case 1:\n return 0;\n }\n i -= 2;\n if (curves[i] > time) {\n let x2 = this.frames[frame];\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n let x = curves[n - 2], y = curves[n - 1];\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.getAttachment();\n if (!slotAttachment)\n return;\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\n return;\n let deform = slot.deform;\n if (deform.length == 0)\n blend = 0 /* setup */;\n let vertices = this.vertices;\n let vertexCount = vertices[0].length;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n deform.length = 0;\n return;\n case 1 /* first */:\n if (alpha == 1) {\n deform.length = 0;\n return;\n }\n deform.length = vertexCount;\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n deform.length = vertexCount;\n if (time >= frames[frames.length - 1]) {\n let lastVertices = vertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] - setupVertices[i2];\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2];\n }\n } else\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let setup = setupVertices[i2];\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] = lastVertices[i2] * alpha;\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] * alpha;\n }\n }\n }\n return;\n }\n let frame = Timeline.search1(frames, time);\n let percent = this.getCurvePercent(time, frame);\n let prevVertices = vertices[frame];\n let nextVertices = vertices[frame + 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2], setup = setupVertices[i2];\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\n }\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n };\n var _EventTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _EventTimeline.propertyIds);\n this.events = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, event) {\n this.frames[frame] = event.time;\n this.events[frame] = event;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (!firedEvents)\n return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n let i = 0;\n if (lastTime < frames[0])\n i = 0;\n else {\n i = Timeline.search1(frames, lastTime) + 1;\n let frameTime = frames[i];\n while (i > 0) {\n if (frames[i - 1] != frameTime)\n break;\n i--;\n }\n }\n for (; i < frameCount && time >= frames[i]; i++)\n firedEvents.push(this.events[i]);\n }\n };\n var EventTimeline = _EventTimeline;\n EventTimeline.propertyIds = [\"\" + Property.event];\n var _DrawOrderTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _DrawOrderTimeline.propertyIds);\n this.drawOrders = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, drawOrder) {\n this.frames[frame] = time;\n this.drawOrders[frame] = drawOrder;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n let idx = Timeline.search1(this.frames, time);\n let drawOrderToSetupIndex = this.drawOrders[idx];\n if (!drawOrderToSetupIndex)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n else {\n let drawOrder = skeleton.drawOrder;\n let slots = skeleton.slots;\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n };\n var DrawOrderTimeline = _DrawOrderTimeline;\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\n var IkConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, ikConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.ikConstraint + \"|\" + ikConstraintIndex\n ]);\n this.ikConstraintIndex = 0;\n this.ikConstraintIndex = ikConstraintIndex;\n }\n getFrameEntries() {\n return 6;\n }\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\n frame *= 6;\n this.frames[frame] = time;\n this.frames[frame + 1] = mix;\n this.frames[frame + 2] = softness;\n this.frames[frame + 3] = bendDirection;\n this.frames[frame + 4] = compress ? 1 : 0;\n this.frames[frame + 5] = stretch ? 1 : 0;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* 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 1 /* 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 let mix = 0, softness = 0;\n let i = Timeline.search(frames, time, 6);\n let curveType = this.curves[i / 6];\n switch (curveType) {\n case 0:\n let before = frames[i];\n mix = frames[i + 1];\n softness = frames[i + 2];\n let t = (time - before) / (frames[i + 6] - before);\n mix += (frames[i + 6 + 1] - mix) * t;\n softness += (frames[i + 6 + 2] - softness) * t;\n break;\n case 1:\n mix = frames[i + 1];\n softness = frames[i + 2];\n break;\n default:\n mix = this.getBezierValue(time, i, 1, curveType - 2);\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n if (blend == 0 /* setup */) {\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\n if (direction == 1 /* mixOut */) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n } else {\n constraint.mix += (mix - constraint.mix) * alpha;\n constraint.softness += (softness - constraint.softness) * alpha;\n if (direction == 0 /* mixIn */) {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n }\n }\n };\n var TransformConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, transformConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.transformConstraint + \"|\" + transformConstraintIndex\n ]);\n this.transformConstraintIndex = 0;\n this.transformConstraintIndex = transformConstraintIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\n let frames = this.frames;\n frame *= 7;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n frames[frame + 4] = mixScaleX;\n frames[frame + 5] = mixScaleY;\n frames[frame + 6] = mixShearY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\n }\n return;\n }\n let rotate, x, y, scaleX, scaleY, shearY;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n rotate += (frames[i + 7 + 1] - rotate) * t;\n x += (frames[i + 7 + 2] - x) * t;\n y += (frames[i + 7 + 3] - y) * t;\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\n shearY += (frames[i + 7 + 6] - shearY) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\n }\n }\n };\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.position = constraint.data.position;\n return;\n case 1 /* first */:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n let position = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n };\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.spacing = constraint.data.spacing;\n return;\n case 1 /* first */:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n let spacing = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n };\n var PathConstraintMixTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\n ]);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, mixRotate, mixX, mixY) {\n let frames = this.frames;\n frame <<= 2;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = constraint.data.mixRotate;\n constraint.mixX = constraint.data.mixX;\n constraint.mixY = constraint.data.mixY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\n }\n return;\n }\n let rotate, x, y;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n rotate += (frames[i + 4 + 1] - rotate) * t;\n x += (frames[i + 4 + 2] - x) * t;\n y += (frames[i + 4 + 3] - y) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n }\n }\n };\n var _SequenceTimeline = class extends Timeline {\n constructor(frameCount, slotIndex, attachment) {\n super(frameCount, [\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\n ]);\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n }\n getFrameEntries() {\n return _SequenceTimeline.ENTRIES;\n }\n getSlotIndex() {\n return this.slotIndex;\n }\n getAttachment() {\n return this.attachment;\n }\n setFrame(frame, time, mode, index, delay) {\n let frames = this.frames;\n frame *= _SequenceTimeline.ENTRIES;\n frames[frame] = time;\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\n frames[frame + _SequenceTimeline.DELAY] = delay;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.attachment;\n let attachment = this.attachment;\n if (slotAttachment != attachment) {\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\n return;\n }\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n slot.sequenceIndex = -1;\n return;\n }\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\n let before = frames[i];\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\n let delay = frames[i + _SequenceTimeline.DELAY];\n if (!this.attachment.sequence)\n return;\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\n let mode = SequenceModeValues[modeAndIndex & 15];\n if (mode != 0 /* hold */) {\n index += (time - before) / delay + 1e-5 | 0;\n switch (mode) {\n case 1 /* once */:\n index = Math.min(count - 1, index);\n break;\n case 2 /* loop */:\n index %= count;\n break;\n case 3 /* pingpong */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : index % n;\n if (index >= count)\n index = n - index;\n break;\n }\n case 4 /* onceReverse */:\n index = Math.max(count - 1 - index, 0);\n break;\n case 5 /* loopReverse */:\n index = count - 1 - index % count;\n break;\n case 6 /* pingpongReverse */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : (index + count - 1) % n;\n if (index >= count)\n index = n - index;\n }\n }\n }\n slot.sequenceIndex = index;\n }\n };\n var SequenceTimeline = _SequenceTimeline;\n SequenceTimeline.ENTRIES = 3;\n SequenceTimeline.MODE = 1;\n SequenceTimeline.DELAY = 2;\n\n // spine-core/src/AnimationState.ts\n var _AnimationState = class {\n constructor(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 StringSet();\n this.animationsChanged = false;\n this.trackEntryPool = new Pool(() => new TrackEntry());\n this.data = data;\n }\n static emptyAnimation() {\n return _AnimationState._emptyAnimation;\n }\n update(delta) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (!current)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n let 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 let next = current.next;\n if (next) {\n let 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) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\n tracks[i] = null;\n this.queue.end(current);\n this.clearNext(current);\n continue;\n }\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from)\n from.mixingTo = null;\n while (from) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n }\n updateMixingFrom(to, delta) {\n let from = to.mixingFrom;\n if (!from)\n return true;\n let 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)\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 apply(skeleton) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\n let current = tracks[i2];\n if (!current || current.delay > 0)\n continue;\n applied = true;\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\n let mix = current.alpha;\n if (current.mixingFrom)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && !current.next)\n mix = 0;\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\n let applyEvents = events;\n if (current.reverse) {\n applyTime = current.animation.duration - applyTime;\n applyEvents = null;\n }\n let timelines = current.animation.timelines;\n let timelineCount = timelines.length;\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\n for (let ii = 0; ii < timelineCount; ii++) {\n Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\n }\n } else {\n let timelineMode = current.timelineMode;\n let shortestRotation = current.shortestRotation;\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n current.timelinesRotation.length = timelineCount << 1;\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline2 = timelines[ii];\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\n } else if (timeline2 instanceof AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\n } else {\n Utils.webkit602BugfixHelper(mix, blend);\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* 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 + 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.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n }\n applyMixingFrom(to, skeleton, blend) {\n let from = to.mixingFrom;\n if (from.mixingFrom)\n this.applyMixingFrom(from, skeleton, blend);\n let mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == 1 /* first */)\n blend = 0 /* setup */;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != 1 /* first */)\n blend = from.mixBlend;\n }\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let timelines = from.animation.timelines;\n let timelineCount = timelines.length;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\n let events = null;\n if (from.reverse)\n applyTime = from.animation.duration - applyTime;\n else if (mix < from.eventThreshold)\n events = this.events;\n if (blend == 3 /* add */) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n let shortestRotation = from.shortestRotation;\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n from.timelinesRotation.length = timelineCount << 1;\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = 1 /* mixOut */;\n let timelineBlend;\n let alpha = 0;\n switch (timelineMode[i]) {\n case SUBSEQUENT:\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaMix;\n break;\n case HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case HOLD_FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = 0 /* setup */;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (!shortestRotation && timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\n else {\n Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\n direction = 0 /* mixIn */;\n timeline.apply(skeleton, animationLast, applyTime, 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 applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n if (time < timeline.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n } else\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + SETUP;\n }\n setAttachment(skeleton, slot, attachmentName, attachments) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n if (attachments)\n slot.attachmentState = this.unkeyedState + CURRENT;\n }\n applyRotateTimeline(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, 0 /* mixIn */);\n return;\n }\n let bone = skeleton.bones[timeline.boneIndex];\n if (!bone.active)\n return;\n let frames = timeline.frames;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case 1 /* first */:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\n r2 = bone.data.rotation + timeline.getCurveValue(time);\n }\n let total = 0, diff = r2 - r1;\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n let current = diff > 0, dir = lastTotal >= 0;\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n bone.rotation = r1 + total * alpha;\n }\n queueEvents(entry, animationTime) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped)\n break;\n if (event.time > animationEnd)\n continue;\n this.queue.event(entry, event);\n }\n let 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 let event = events[i];\n if (event.time < animationStart)\n continue;\n this.queue.event(entry, event);\n }\n }\n clearTracks() {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let 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 clearTrack(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n let current = this.tracks[trackIndex];\n if (!current)\n return;\n this.queue.end(current);\n this.clearNext(current);\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (!from)\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 setCurrent(index, current, interrupt) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n current.previous = null;\n if (from) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom && 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 setAnimation(trackIndex, animationName, loop = false) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n setAnimationWith(trackIndex, animation, loop = false) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.clearNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.clearNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let last = this.expandToIndex(trackIndex);\n if (last) {\n while (last.next)\n last = last.next;\n }\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n if (!last) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n entry.previous = last;\n if (delay <= 0)\n delay += last.getTrackComplete() - entry.mixDuration;\n }\n entry.delay = delay;\n return entry;\n }\n setEmptyAnimation(trackIndex, mixDuration = 0) {\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\n if (delay <= 0)\n entry.delay += entry.mixDuration - mixDuration;\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n setEmptyAnimations(mixDuration = 0) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n expandToIndex(index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n trackEntry(trackIndex, animation, loop, last) {\n let entry = this.trackEntryPool.obtain();\n entry.reset();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.reverse = false;\n entry.shortestRotation = 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.mixTime = 0;\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\n entry.interruptAlpha = 1;\n entry.totalAlpha = 0;\n entry.mixBlend = 2 /* replace */;\n return entry;\n }\n clearNext(entry) {\n let next = entry.next;\n while (next) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n _animationsChanged() {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let entry = tracks[i];\n if (!entry)\n continue;\n while (entry.mixingFrom)\n entry = entry.mixingFrom;\n do {\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry);\n }\n }\n computeHold(entry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n timelineMode.length = timelinesCount;\n let timelineHoldMix = entry.timelineHoldMix;\n timelineHoldMix.length = 0;\n let propertyIDs = this.propertyIDs;\n if (to && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++)\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\n return;\n }\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let ids = timeline.getPropertyIds();\n if (!propertyIDs.addAll(ids))\n timelineMode[i] = SUBSEQUENT;\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\n timelineMode[i] = FIRST;\n } else {\n for (let next = to.mixingTo; next; next = next.mixingTo) {\n if (next.animation.hasTimeline(ids))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = HOLD_MIX;\n timelineHoldMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = HOLD_FIRST;\n }\n }\n }\n getCurrent(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n }\n addListener(listener) {\n if (!listener)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n }\n clearListeners() {\n this.listeners.length = 0;\n }\n clearListenerNotifications() {\n this.queue.clear();\n }\n };\n var AnimationState = _AnimationState;\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\n var TrackEntry = class {\n constructor() {\n this.animation = null;\n this.previous = null;\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.listener = null;\n this.trackIndex = 0;\n this.loop = false;\n this.holdPrevious = false;\n this.reverse = false;\n this.shortestRotation = false;\n this.eventThreshold = 0;\n this.attachmentThreshold = 0;\n this.drawOrderThreshold = 0;\n this.animationStart = 0;\n this.animationEnd = 0;\n this.animationLast = 0;\n this.nextAnimationLast = 0;\n this.delay = 0;\n this.trackTime = 0;\n this.trackLast = 0;\n this.nextTrackLast = 0;\n this.trackEnd = 0;\n this.timeScale = 0;\n this.alpha = 0;\n this.mixTime = 0;\n this.mixDuration = 0;\n this.interruptAlpha = 0;\n this.totalAlpha = 0;\n this.mixBlend = 2 /* replace */;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n reset() {\n this.next = null;\n this.previous = 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 getAnimationTime() {\n if (this.loop) {\n let 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 setAnimationLast(animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n isComplete() {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n resetRotationDirections() {\n this.timelinesRotation.length = 0;\n }\n getTrackComplete() {\n let duration = this.animationEnd - this.animationStart;\n if (duration != 0) {\n if (this.loop)\n return duration * (1 + (this.trackTime / duration | 0));\n if (this.trackTime < duration)\n return duration;\n }\n return this.trackTime;\n }\n };\n var EventQueue = class {\n constructor(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n start(entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n interrupt(entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n end(entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n dispose(entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n complete(entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n event(entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n drain() {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n let objects = this.objects;\n let listeners = this.animState.listeners;\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i];\n let entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener && entry.listener.start)\n entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.start)\n listener.start(entry);\n }\n break;\n case EventType.interrupt:\n if (entry.listener && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.interrupt)\n listener.interrupt(entry);\n }\n break;\n case EventType.end:\n if (entry.listener && entry.listener.end)\n entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.end)\n listener.end(entry);\n }\n case EventType.dispose:\n if (entry.listener && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.dispose)\n listener.dispose(entry);\n }\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener && entry.listener.complete)\n entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.complete)\n listener.complete(entry);\n }\n break;\n case EventType.event:\n let event = objects[i++ + 2];\n if (entry.listener && entry.listener.event)\n entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.event)\n listener.event(entry, event);\n }\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n }\n clear() {\n this.objects.length = 0;\n }\n };\n var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"start\"] = 0] = \"start\";\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\n EventType2[EventType2[\"end\"] = 2] = \"end\";\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\n EventType2[EventType2[\"event\"] = 5] = \"event\";\n return EventType2;\n })(EventType || {});\n var AnimationStateAdapter = class {\n start(entry) {\n }\n interrupt(entry) {\n }\n end(entry) {\n }\n dispose(entry) {\n }\n complete(entry) {\n }\n event(entry, event) {\n }\n };\n var SUBSEQUENT = 0;\n var FIRST = 1;\n var HOLD_SUBSEQUENT = 2;\n var HOLD_FIRST = 3;\n var HOLD_MIX = 4;\n var SETUP = 1;\n var CURRENT = 2;\n\n // spine-core/src/AnimationStateData.ts\n var AnimationStateData = class {\n constructor(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (!skeletonData)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n setMix(fromName, toName, duration) {\n let from = this.skeletonData.findAnimation(fromName);\n if (!from)\n throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (!to)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n setMixWith(from, to, duration) {\n if (!from)\n throw new Error(\"from cannot be null.\");\n if (!to)\n throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n getMix(from, to) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === void 0 ? this.defaultMix : value;\n }\n };\n\n // spine-core/src/attachments/BoundingBoxAttachment.ts\n var BoundingBoxAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/attachments/ClippingAttachment.ts\n var ClippingAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.endSlot = null;\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\n }\n copy() {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/Texture.ts\n var Texture = class {\n constructor(image) {\n this._image = image;\n }\n getImage() {\n return this._image;\n }\n };\n var TextureFilter = /* @__PURE__ */ ((TextureFilter2) => {\n TextureFilter2[TextureFilter2[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter2[TextureFilter2[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter2[TextureFilter2[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter2[TextureFilter2[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter2[TextureFilter2[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter2[TextureFilter2[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter2[TextureFilter2[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n return TextureFilter2;\n })(TextureFilter || {});\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\n return TextureWrap3;\n })(TextureWrap || {});\n var TextureRegion = class {\n constructor() {\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.degrees = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n };\n var FakeTexture = class extends Texture {\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-core/src/TextureAtlas.ts\n var TextureAtlas = class {\n constructor(atlasText) {\n this.pages = new Array();\n this.regions = new Array();\n let reader = new TextureAtlasReader(atlasText);\n let entry = new Array(4);\n let pageFields = {};\n pageFields[\"size\"] = (page2) => {\n page2.width = parseInt(entry[1]);\n page2.height = parseInt(entry[2]);\n };\n pageFields[\"format\"] = () => {\n };\n pageFields[\"filter\"] = (page2) => {\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\n };\n pageFields[\"repeat\"] = (page2) => {\n if (entry[1].indexOf(\"x\") != -1)\n page2.uWrap = 10497 /* Repeat */;\n if (entry[1].indexOf(\"y\") != -1)\n page2.vWrap = 10497 /* Repeat */;\n };\n pageFields[\"pma\"] = (page2) => {\n page2.pma = entry[1] == \"true\";\n };\n var regionFields = {};\n regionFields[\"xy\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n };\n regionFields[\"size\"] = (region) => {\n region.width = parseInt(entry[1]);\n region.height = parseInt(entry[2]);\n };\n regionFields[\"bounds\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n region.width = parseInt(entry[3]);\n region.height = parseInt(entry[4]);\n };\n regionFields[\"offset\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n };\n regionFields[\"orig\"] = (region) => {\n region.originalWidth = parseInt(entry[1]);\n region.originalHeight = parseInt(entry[2]);\n };\n regionFields[\"offsets\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n region.originalWidth = parseInt(entry[3]);\n region.originalHeight = parseInt(entry[4]);\n };\n regionFields[\"rotate\"] = (region) => {\n let value = entry[1];\n if (value == \"true\")\n region.degrees = 90;\n else if (value != \"false\")\n region.degrees = parseInt(value);\n };\n regionFields[\"index\"] = (region) => {\n region.index = parseInt(entry[1]);\n };\n let line = reader.readLine();\n while (line && line.trim().length == 0)\n line = reader.readLine();\n while (true) {\n if (!line || line.trim().length == 0)\n break;\n if (reader.readEntry(entry, line) == 0)\n break;\n line = reader.readLine();\n }\n let page = null;\n let names = null;\n let values = null;\n while (true) {\n if (line === null)\n break;\n if (line.trim().length == 0) {\n page = null;\n line = reader.readLine();\n } else if (!page) {\n page = new TextureAtlasPage(line.trim());\n while (true) {\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\n break;\n let field = pageFields[entry[0]];\n if (field)\n field(page);\n }\n this.pages.push(page);\n } else {\n let region = new TextureAtlasRegion(page, line);\n while (true) {\n let count = reader.readEntry(entry, line = reader.readLine());\n if (count == 0)\n break;\n let field = regionFields[entry[0]];\n if (field)\n field(region);\n else {\n if (!names)\n names = [];\n if (!values)\n values = [];\n names.push(entry[0]);\n let entryValues = [];\n for (let i = 0; i < count; i++)\n entryValues.push(parseInt(entry[i + 1]));\n values.push(entryValues);\n }\n }\n if (region.originalWidth == 0 && region.originalHeight == 0) {\n region.originalWidth = region.width;\n region.originalHeight = region.height;\n }\n if (names && names.length > 0 && values && values.length > 0) {\n region.names = names;\n region.values = values;\n names = null;\n values = null;\n }\n region.u = region.x / page.width;\n region.v = region.y / page.height;\n if (region.degrees == 90) {\n region.u2 = (region.x + region.height) / page.width;\n region.v2 = (region.y + region.width) / page.height;\n } else {\n region.u2 = (region.x + region.width) / page.width;\n region.v2 = (region.y + region.height) / page.height;\n }\n this.regions.push(region);\n }\n }\n }\n findRegion(name) {\n for (let 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 setTextures(assetManager, pathPrefix = \"\") {\n for (let page of this.pages)\n page.setTexture(assetManager.get(pathPrefix + page.name));\n }\n dispose() {\n var _a;\n for (let i = 0; i < this.pages.length; i++) {\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\n }\n }\n };\n var TextureAtlasReader = class {\n constructor(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n readLine() {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n readEntry(entry, line) {\n if (!line)\n return 0;\n line = line.trim();\n if (line.length == 0)\n return 0;\n let colon = line.indexOf(\":\");\n if (colon == -1)\n return 0;\n entry[0] = line.substr(0, colon).trim();\n for (let i = 1, lastMatch = colon + 1; ; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) {\n entry[i] = line.substr(lastMatch).trim();\n return i;\n }\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n if (i == 4)\n return 4;\n }\n }\n };\n var TextureAtlasPage = class {\n constructor(name) {\n this.minFilter = 9728 /* Nearest */;\n this.magFilter = 9728 /* Nearest */;\n this.uWrap = 33071 /* ClampToEdge */;\n this.vWrap = 33071 /* ClampToEdge */;\n this.texture = null;\n this.width = 0;\n this.height = 0;\n this.pma = false;\n this.name = name;\n }\n setTexture(texture) {\n this.texture = texture;\n texture.setFilters(this.minFilter, this.magFilter);\n texture.setWraps(this.uWrap, this.vWrap);\n }\n };\n var TextureAtlasRegion = class extends TextureRegion {\n constructor(page, name) {\n super();\n this.x = 0;\n this.y = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n this.index = 0;\n this.degrees = 0;\n this.names = null;\n this.values = null;\n this.page = page;\n this.name = name;\n }\n };\n\n // spine-core/src/attachments/MeshAttachment.ts\n var MeshAttachment = class extends VertexAttachment {\n constructor(name, path) {\n super(name);\n this.region = null;\n this.regionUVs = [];\n this.uvs = [];\n this.triangles = [];\n this.color = new Color(1, 1, 1, 1);\n this.width = 0;\n this.height = 0;\n this.hullLength = 0;\n this.edges = [];\n this.parentMesh = null;\n this.sequence = null;\n this.tempColor = new Color(0, 0, 0, 0);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let regionUVs = this.regionUVs;\n if (!this.uvs || this.uvs.length != regionUVs.length)\n this.uvs = Utils.newFloatArray(regionUVs.length);\n let uvs = this.uvs;\n let n = this.uvs.length;\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof TextureAtlasRegion) {\n let region = this.region, image = region.page.texture.getImage();\n let textureWidth = image.width, textureHeight = image.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 (let 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 (let 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 (let 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 } else if (!this.region) {\n u = v = 0;\n width = height = 1;\n } else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (let 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 getParentMesh() {\n return this.parentMesh;\n }\n setParentMesh(parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh) {\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 copy() {\n if (this.parentMesh)\n return this.newLinkedMesh();\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n if (this.edges) {\n copy.edges = new Array(this.edges.length);\n 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 computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n super.computeWorldVertices(slot, start, count, worldVertices, offset, stride);\n }\n newLinkedMesh() {\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n copy.timelineAttachment = this.timelineAttachment;\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\n if (copy.region != null)\n copy.updateRegion();\n return copy;\n }\n };\n\n // spine-core/src/attachments/PathAttachment.ts\n var PathAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.lengths = [];\n this.closed = false;\n this.constantSpeed = false;\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n 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 };\n\n // spine-core/src/attachments/PointAttachment.ts\n var PointAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.color = new Color(0.38, 0.94, 0, 1);\n }\n computeWorldPosition(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 computeWorldRotation(bone) {\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * bone.a + sin * bone.b;\n let y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n copy() {\n let copy = new PointAttachment(this.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 };\n\n // spine-core/src/attachments/RegionAttachment.ts\n var _RegionAttachment = class extends Attachment {\n constructor(name, path) {\n super(name);\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 Color(1, 1, 1, 1);\n this.rendererObject = null;\n this.region = null;\n this.sequence = null;\n this.offset = Utils.newFloatArray(8);\n this.uvs = Utils.newFloatArray(8);\n this.tempColor = new Color(1, 1, 1, 1);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let region = this.region;\n let uvs = this.uvs;\n if (region == null) {\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n uvs[4] = 1;\n uvs[5] = 1;\n uvs[6] = 1;\n uvs[7] = 0;\n return;\n }\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let x = this.x, y = this.y;\n let localXCos = localX * cos + x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[0] = localXCos - localYSin;\n offset[1] = localYCos + localXSin;\n offset[2] = localXCos - localY2Sin;\n offset[3] = localY2Cos + localXSin;\n offset[4] = localX2Cos - localY2Sin;\n offset[5] = localY2Cos + localX2Sin;\n offset[6] = localX2Cos - localYSin;\n offset[7] = localYCos + localX2Sin;\n if (region.degrees == 90) {\n uvs[0] = region.u2;\n uvs[1] = region.v2;\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 } 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 computeWorldVertices(slot, worldVertices, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n let bone = slot.bone;\n let vertexOffset = this.offset;\n let x = bone.worldX, y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[0];\n offsetY = vertexOffset[1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[2];\n offsetY = vertexOffset[3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[4];\n offsetY = vertexOffset[5];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[6];\n offsetY = vertexOffset[7];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n }\n copy() {\n let copy = new _RegionAttachment(this.name, this.path);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\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 Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n return copy;\n }\n };\n var RegionAttachment = _RegionAttachment;\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\n // spine-core/src/AtlasAttachmentLoader.ts\n var AtlasAttachmentLoader = class {\n constructor(atlas) {\n this.atlas = atlas;\n }\n loadSequence(name, basePath, sequence) {\n let regions = sequence.regions;\n for (let i = 0, n = regions.length; i < n; i++) {\n let path = sequence.getPath(basePath, i);\n let region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\n regions[i] = region;\n regions[i].renderObject = regions[i];\n }\n }\n newRegionAttachment(skin, name, path, sequence) {\n let attachment = new RegionAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newMeshAttachment(skin, name, path, sequence) {\n let attachment = new MeshAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newBoundingBoxAttachment(skin, name) {\n return new BoundingBoxAttachment(name);\n }\n newPathAttachment(skin, name) {\n return new PathAttachment(name);\n }\n newPointAttachment(skin, name) {\n return new PointAttachment(name);\n }\n newClippingAttachment(skin, name) {\n return new ClippingAttachment(name);\n }\n };\n\n // spine-core/src/BoneData.ts\n var BoneData = class {\n constructor(index, name, parent) {\n this.index = 0;\n this.parent = null;\n this.length = 0;\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 Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n };\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n return TransformMode2;\n })(TransformMode || {});\n\n // spine-core/src/Bone.ts\n var Bone = class {\n constructor(data, skeleton, parent) {\n this.parent = null;\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.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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 isActive() {\n return this.active;\n }\n update() {\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\n }\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n updateWorldTransformWith(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 let parent = this.parent;\n if (!parent) {\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n let sx = skeleton.scaleX;\n let sy = skeleton.scaleY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n let 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 0 /* Normal */: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = 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 1 /* OnlyTranslation */: {\n let rotationY = rotation + 90 + shearY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case 2 /* NoRotationOrReflection */: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 1e-4) {\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) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = 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 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 1e-5)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = 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 setToSetupPose() {\n let 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 getWorldRotationX() {\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\n }\n getWorldRotationY() {\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\n }\n getWorldScaleX() {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n }\n getWorldScaleY() {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n }\n updateAppliedTransform() {\n let parent = this.parent;\n if (!parent) {\n this.ax = this.worldX - this.skeleton.x;\n this.ay = this.worldY - this.skeleton.y;\n this.arotation = Math.atan2(this.c, this.a) * 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) * MathUtils.radDeg;\n return;\n }\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n let pid = 1 / (pa * pd - pb * pc);\n let 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 let ia = pid * pd;\n let id = pid * pa;\n let ib = pid * pb;\n let ic = pid * pc;\n let ra = ia * this.a - ib * this.c;\n let rb = ia * this.b - ib * this.d;\n let rc = id * this.c - ic * this.a;\n let rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 1e-4) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\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) * MathUtils.radDeg;\n }\n }\n worldToLocal(world) {\n let invDet = 1 / (this.a * this.d - this.b * this.c);\n let x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = x * this.d * invDet - y * this.b * invDet;\n world.y = y * this.a * invDet - x * this.c * invDet;\n return world;\n }\n localToWorld(local) {\n let 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 worldToLocalRotation(worldRotation) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\n }\n localToWorldRotation(localRotation) {\n localRotation -= this.rotation - this.shearX;\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\n }\n rotateWorld(degrees) {\n let a = this.a, b = this.b, c = this.c, d = this.d;\n let cos = MathUtils.cosDeg(degrees), sin = 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 }\n };\n\n // spine-core/src/ConstraintData.ts\n var ConstraintData = class {\n constructor(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n };\n\n // spine-core/src/AssetManagerBase.ts\n var AssetManagerBase = class {\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\n this.pathPrefix = \"\";\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n this.downloader = downloader;\n }\n start(path) {\n this.toLoad++;\n return this.pathPrefix + path;\n }\n success(callback, path, asset) {\n this.toLoad--;\n this.loaded++;\n this.assets[path] = asset;\n if (callback)\n callback(path, asset);\n }\n error(callback, path, message) {\n this.toLoad--;\n this.loaded++;\n this.errors[path] = message;\n if (callback)\n callback(path, message);\n }\n loadAll() {\n let promise = new Promise((resolve, reject) => {\n let check = () => {\n if (this.isLoadingComplete()) {\n if (this.hasErrors())\n reject(this.errors);\n else\n resolve(this);\n return;\n }\n requestAnimationFrame(check);\n };\n requestAnimationFrame(check);\n });\n return promise;\n }\n setRawDataURI(path, data) {\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\n }\n loadBinary(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadBinary(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\n });\n }\n loadText(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadText(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\n });\n }\n loadJson(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadJson(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\n });\n }\n loadTexture(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\n let isWebWorker = !isBrowser;\n if (isWebWorker) {\n fetch(path, { mode: \"cors\" }).then((response) => {\n if (response.ok)\n return response.blob();\n this.error(error, path, `Couldn't load image: ${path}`);\n return null;\n }).then((blob) => {\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\n }).then((bitmap) => {\n if (bitmap)\n this.success(success, path, this.textureLoader(bitmap));\n });\n } else {\n let image = new Image();\n image.crossOrigin = \"anonymous\";\n image.onload = () => {\n this.success(success, path, this.textureLoader(image));\n };\n image.onerror = () => {\n this.error(error, path, `Couldn't load image: ${path}`);\n };\n if (this.downloader.rawDataUris[path])\n path = this.downloader.rawDataUris[path];\n image.src = path;\n }\n }\n loadTextureAtlas(path, success = () => {\n }, error = () => {\n }, fileAlias) {\n let index = path.lastIndexOf(\"/\");\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\n path = this.start(path);\n this.downloader.downloadText(path, (atlasText) => {\n try {\n let atlas = new TextureAtlas(atlasText);\n let toLoad = atlas.pages.length, abort = false;\n for (let page of atlas.pages) {\n this.loadTexture(\n !fileAlias ? parent + page.name : fileAlias[page.name],\n (imagePath, texture) => {\n if (!abort) {\n page.setTexture(texture);\n if (--toLoad == 0)\n this.success(success, path, atlas);\n }\n },\n (imagePath, message) => {\n if (!abort)\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\n abort = true;\n }\n );\n }\n } catch (e) {\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\n }\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\n });\n }\n get(path) {\n return this.assets[this.pathPrefix + path];\n }\n require(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset)\n return asset;\n let error = this.errors[path];\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\n }\n remove(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n delete this.assets[path];\n return asset;\n }\n removeAll() {\n for (let key in this.assets) {\n let asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n }\n isLoadingComplete() {\n return this.toLoad == 0;\n }\n getToLoad() {\n return this.toLoad;\n }\n getLoaded() {\n return this.loaded;\n }\n dispose() {\n this.removeAll();\n }\n hasErrors() {\n return Object.keys(this.errors).length > 0;\n }\n getErrors() {\n return this.errors;\n }\n };\n var Downloader = class {\n constructor() {\n this.callbacks = {};\n this.rawDataUris = {};\n }\n dataUriToString(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx != -1) {\n base64Idx += \"base64,\".length;\n return atob(dataUri.substr(base64Idx));\n } else {\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\n }\n }\n base64ToUint8Array(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n }\n dataUriToUint8Array(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx == -1)\n throw new Error(\"Not a binary data URI.\");\n base64Idx += \"base64,\".length;\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\n }\n downloadText(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToString(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.open(\"GET\", url, true);\n let done = () => {\n this.finish(url, request.status, request.responseText);\n };\n request.onload = done;\n request.onerror = done;\n request.send();\n }\n downloadJson(url, success, error) {\n this.downloadText(url, (data) => {\n success(JSON.parse(data));\n }, error);\n }\n downloadBinary(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n let onerror = () => {\n this.finish(url, request.status, request.response);\n };\n request.onload = () => {\n if (request.status == 200 || request.status == 0)\n this.finish(url, 200, new Uint8Array(request.response));\n else\n onerror();\n };\n request.onerror = onerror;\n request.send();\n }\n start(url, success, error) {\n let callbacks = this.callbacks[url];\n try {\n if (callbacks)\n return true;\n this.callbacks[url] = callbacks = [];\n } finally {\n callbacks.push(success, error);\n }\n }\n finish(url, status, data) {\n let callbacks = this.callbacks[url];\n delete this.callbacks[url];\n let args = status == 200 || status == 0 ? [data] : [status, data];\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\n callbacks[i].apply(null, args);\n }\n };\n\n // spine-core/src/Event.ts\n var Event = class {\n constructor(time, data) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.time = 0;\n this.volume = 0;\n this.balance = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n };\n\n // spine-core/src/EventData.ts\n var EventData = class {\n constructor(name) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.audioPath = null;\n this.volume = 0;\n this.balance = 0;\n this.name = name;\n }\n };\n\n // spine-core/src/IkConstraint.ts\n var IkConstraint = class {\n constructor(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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find bone ${data.target.name}`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mix == 0)\n return;\n let target = this.target;\n let 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.data.uniform, this.softness, this.mix);\n break;\n }\n }\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\n let p = bone.parent;\n if (!p)\n throw new Error(\"IK bone must have parent.\");\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case 1 /* OnlyTranslation */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case 2 /* NoRotationOrReflection */:\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n let sa = pa / bone.skeleton.scaleX;\n let 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) * MathUtils.radDeg;\n default:\n let x = targetX - p.worldX, y = targetY - p.worldY;\n let 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) * 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 let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(\n bone.ax,\n bone.ay,\n bone.arotation + rotationIK * alpha,\n sx,\n sy,\n bone.ashearX,\n bone.ashearY\n );\n }\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\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 } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n let u = Math.abs(psx - psy) <= 1e-4;\n if (!u || stretch) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n let pp = parent.parent;\n if (!pp)\n throw new Error(\"IK parent must itself have a parent.\");\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 1e-4) {\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 let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) * 0.5;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let 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:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1) {\n cos = -1;\n a2 = Math.PI * bendDir;\n } else if (cos > 1) {\n cos = 1;\n a2 = 0;\n if (stretch) {\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n sx *= a;\n if (uniform)\n sy *= a;\n }\n } else\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 } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) * 0.5;\n let r0 = q / c2, r1 = c / q;\n let 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 let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let 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) * 0.5) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * 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, sy, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * 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 };\n\n // spine-core/src/IkConstraintData.ts\n var IkConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/PathConstraintData.ts\n var PathConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.positionMode = PositionMode.Fixed;\n this.spacingMode = SpacingMode.Fixed;\n this.rotateMode = RotateMode.Chain;\n this.offsetRotation = 0;\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n }\n set target(slotData) {\n this._target = slotData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"SlotData not set.\");\n else\n return this._target;\n }\n };\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\n return PositionMode2;\n })(PositionMode || {});\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\n return SpacingMode2;\n })(SpacingMode || {});\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\n return RotateMode2;\n })(RotateMode || {});\n\n // spine-core/src/PathConstraint.ts\n var _PathConstraint = class {\n constructor(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findSlot(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}`);\n this.target = target;\n this.position = data.position;\n this.spacing = data.spacing;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n }\n isActive() {\n return this.active;\n }\n update() {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment))\n return;\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\n return;\n let data = this.data;\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\n let bones = this.bones;\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\n let spacing = this.spacing;\n switch (data.spacingMode) {\n case 2 /* Percent */:\n if (scale) {\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon)\n lengths[i] = 0;\n else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n lengths[i] = Math.sqrt(x * x + y * y);\n }\n }\n }\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\n break;\n case 3 /* Proportional */:\n let sum = 0;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = length;\n sum += length;\n }\n }\n if (sum > 0) {\n sum = spacesCount / sum * spacing;\n for (let i = 1; i < spacesCount; i++)\n spaces[i] *= sum;\n }\n break;\n default:\n let lengthSpacing = data.spacingMode == 0 /* Length */;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n }\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = data.rotateMode == 1 /* Chain */;\n else {\n tip = false;\n let p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * mixX;\n bone.worldY += (boneY - bone.worldY) * mixY;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (mixRotate > 0) {\n let 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 let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\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.updateAppliedTransform();\n }\n }\n computeWorldPositions(path, spacesCount, tangents) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\n let closed2 = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed2 ? 1 : 2;\n let pathLength2 = lengths[curveCount];\n if (this.data.positionMode == 1 /* Percent */)\n position *= pathLength2;\n let multiplier2;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier2 = pathLength2;\n break;\n case 3 /* Proportional */:\n multiplier2 = pathLength2 / spacesCount;\n break;\n default:\n multiplier2 = 1;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier2;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength2;\n if (p < 0)\n p += pathLength2;\n curve = 0;\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 } else if (p > pathLength2) {\n if (prevCurve != _PathConstraint.AFTER) {\n prevCurve = _PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = lengths[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed2 && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(\n p,\n world[0],\n world[1],\n world[2],\n world[3],\n world[4],\n world[5],\n world[6],\n world[7],\n out,\n o,\n tangents || i > 0 && space == 0\n );\n }\n return out;\n }\n if (closed2) {\n verticesLength += 2;\n world = 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 } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let 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 (this.data.positionMode == 1 /* Percent */)\n position *= pathLength;\n let multiplier;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier = pathLength;\n break;\n case 3 /* Proportional */:\n multiplier = pathLength / spacesCount;\n break;\n default:\n multiplier = 1;\n }\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = curves[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n let 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) * 6e-3;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\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 let length = segments[segment];\n if (p > length)\n continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - 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 addBeforePosition(p, temp, i, out, o) {\n let 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 addAfterPosition(p, temp, i, out, o) {\n let 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 addCurvePosition(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 let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let 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 < 1e-3)\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 };\n var PathConstraint = _PathConstraint;\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 1e-5;\n\n // spine-core/src/Slot.ts\n var Slot = class {\n constructor(data, bone) {\n this.darkColor = null;\n this.attachment = null;\n this.attachmentState = 0;\n this.sequenceIndex = -1;\n this.deform = new Array();\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!bone)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = !data.darkColor ? null : new Color();\n this.setToSetupPose();\n }\n getSkeleton() {\n return this.bone.skeleton;\n }\n getAttachment() {\n return this.attachment;\n }\n setAttachment(attachment) {\n if (this.attachment == attachment)\n return;\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\n this.deform.length = 0;\n }\n this.attachment = attachment;\n this.sequenceIndex = -1;\n }\n setToSetupPose() {\n this.color.setFromColor(this.data.color);\n if (this.darkColor)\n this.darkColor.setFromColor(this.data.darkColor);\n if (!this.data.attachmentName)\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 };\n\n // spine-core/src/TransformConstraint.ts\n var TransformConstraint = class {\n constructor(data, skeleton) {\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 0;\n this.temp = new Vector2();\n this.active = false;\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n this.mixScaleX = data.mixScaleX;\n this.mixScaleY = data.mixScaleY;\n this.mixShearY = data.mixShearY;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\n return;\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n applyAbsoluteWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * mixX;\n bone.worldY += (temp.y - bone.worldY) * mixY;\n }\n if (mixScaleX != 0) {\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n if (s != 0)\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n if (s != 0)\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let b = bone.b, d = bone.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyRelativeWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * mixX;\n bone.worldY += temp.y * mixY;\n }\n if (mixScaleX != 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n let b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyAbsoluteLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation;\n if (mixRotate != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n rotation += r * mixRotate;\n }\n let x = bone.ax, y = bone.ay;\n x += (target.ax - x + this.data.offsetX) * mixX;\n y += (target.ay - y + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (mixScaleX != 0 && scaleX != 0)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\n if (mixScaleY != 0 && scaleY != 0)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\n let shearY = bone.ashearY;\n if (mixShearY != 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n shearY += r * mixShearY;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n applyRelativeLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n };\n\n // spine-core/src/Skeleton.ts\n var _Skeleton = class {\n constructor(data) {\n this._updateCache = new Array();\n this.skin = null;\n this.scaleX = 1;\n this._scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone;\n if (!boneData.parent)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n get scaleY() {\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\n }\n set scaleY(scaleY) {\n this._scaleY = scaleY;\n }\n updateCache() {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone);\n }\n }\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n sortIkConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let target = constraint.target;\n this.sortBone(target);\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length == 1) {\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n } else {\n let child = constrained[constrained.length - 1];\n this.sortBone(child);\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n child.sorted = true;\n }\n }\n sortPathConstraint(constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortTransformConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n this.sortBone(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n sortPathConstraintAttachmentWith(attachment, slotBone) {\n if (!(attachment instanceof PathAttachment))\n return;\n let pathBones = attachment.bones;\n if (!pathBones)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n for (let i = 0, n = pathBones.length; i < n; ) {\n let nn = pathBones[i++];\n nn += i;\n while (i < nn)\n this.sortBone(bones[pathBones[i++]]);\n }\n }\n }\n sortBone(bone) {\n if (!bone)\n return;\n if (bone.sorted)\n return;\n let parent = bone.parent;\n if (parent)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n sortReset(bones) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let 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 updateWorldTransform() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[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 }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n updateWorldTransformWith(parent) {\n let rootBone = this.getRootBone();\n if (!rootBone)\n throw new Error(\"Root bone must not be null.\");\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++) {\n let updatable = updateCache[i];\n if (updatable != rootBone)\n updatable.update();\n }\n }\n setToSetupPose() {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n setBonesToSetupPose() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let 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 let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n }\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n }\n }\n setSlotsToSetupPose() {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n getRootBone() {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n }\n setSkinByName(skinName) {\n let skin = this.data.findSkin(skinName);\n if (!skin)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n setSkin(newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin) {\n if (this.skin)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name) {\n let attachment = newSkin.getAttachment(i, name);\n if (attachment)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n getAttachmentByName(slotName, attachmentName) {\n let slot = this.data.findSlot(slotName);\n if (!slot)\n throw new Error(`Can't find slot with name ${slotName}`);\n return this.getAttachment(slot.index, attachmentName);\n }\n getAttachment(slotIndex, attachmentName) {\n if (!attachmentName)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin) {\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment)\n return attachment;\n }\n if (this.data.defaultSkin)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n setAttachment(slotName, attachmentName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment = null;\n if (attachmentName) {\n attachment = this.getAttachment(i, attachmentName);\n if (!attachment)\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 findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n getBoundsRect() {\n let offset = new Vector2();\n let size = new Vector2();\n this.getBounds(offset, size);\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\n }\n getBounds(offset, size, temp = new Array(2)) {\n if (!offset)\n throw new Error(\"offset cannot be null.\");\n if (!size)\n throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n let verticesLength = 0;\n let vertices = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let 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 };\n var Skeleton = _Skeleton;\n Skeleton.yDown = false;\n\n // spine-core/src/SkeletonData.ts\n var SkeletonData = class {\n constructor() {\n this.name = null;\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.defaultSkin = null;\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.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n this.version = null;\n this.hash = null;\n this.fps = 0;\n this.imagesPath = null;\n this.audioPath = null;\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n }\n findSkin(skinName) {\n if (!skinName)\n throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n }\n findEvent(eventDataName) {\n if (!eventDataName)\n throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName)\n return event;\n }\n return null;\n }\n findAnimation(animationName) {\n if (!animationName)\n throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n }\n findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n };\n\n // spine-core/src/Skin.ts\n var SkinEntry = class {\n constructor(slotIndex = 0, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n };\n var Skin = class {\n constructor(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n setAttachment(slotIndex, name, attachment) {\n if (!attachment)\n throw new Error(\"attachment cannot be null.\");\n let 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 addSkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n copySkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (!attachment.attachment)\n continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n getAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n removeAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary)\n delete dictionary[name];\n }\n getAttachments() {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n getAttachmentsForSlot(slotIndex, attachments) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n clear() {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n attachAll(skeleton, oldSkin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n };\n\n // spine-core/src/SlotData.ts\n var SlotData = class {\n constructor(index, name, boneData) {\n this.index = 0;\n this.color = new Color(1, 1, 1, 1);\n this.darkColor = null;\n this.attachmentName = null;\n this.blendMode = BlendMode.Normal;\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n if (!boneData)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n };\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\n return BlendMode3;\n })(BlendMode || {});\n\n // spine-core/src/TransformConstraintData.ts\n var TransformConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/SkeletonBinary.ts\n var SkeletonBinary = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(binary) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n skeletonData.name = \"\";\n let input = new BinaryInput(binary);\n let lowHash = input.readInt32();\n let highHash = input.readInt32();\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n let nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n let n = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let str = input.readString();\n if (!str)\n throw new Error(\"String in string table must not be null.\");\n input.strings.push(str);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Bone name must not be null.\");\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n let data = new BoneData(i, name, parent);\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 = input.readInt(true);\n data.skinRequired = input.readBoolean();\n if (nonessential)\n Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let slotName = input.readString();\n if (!slotName)\n throw new Error(\"Slot name must not be null.\");\n let boneData = skeletonData.bones[input.readInt(true)];\n let data = new SlotData(i, slotName, boneData);\n Color.rgba8888ToColor(data.color, input.readInt32());\n let darkColor = input.readInt32();\n if (darkColor != -1)\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = input.readInt(true);\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"IK constraint data name must not be null.\");\n let data = new IkConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Transform constraint data name must not be null.\");\n let data = new TransformConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n data.mixScaleX = input.readFloat();\n data.mixScaleY = input.readFloat();\n data.mixShearY = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Path constraint data name must not be null.\");\n let data = new PathConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 = input.readInt(true);\n data.spacingMode = input.readInt(true);\n data.rotateMode = input.readInt(true);\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n let i = skeletonData.skins.length;\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++) {\n let skin = this.readSkin(input, skeletonData, false, nonessential);\n if (!skin)\n throw new Error(\"readSkin() should not have returned null.\");\n skeletonData.skins[i] = skin;\n }\n }\n n = this.linkedMeshes.length;\n for (let i = 0; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(\"Not skin found for linked mesh.\");\n if (!linkedMesh.parent)\n throw new Error(\"Linked mesh parent must not be null\");\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let eventName = input.readStringRef();\n if (!eventName)\n throw new Error();\n let data = new EventData(eventName);\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) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let animationName = input.readString();\n if (!animationName)\n throw new Error(\"Animatio name must not be null.\");\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\n }\n return skeletonData;\n }\n readSkin(input, skeletonData, defaultSkin, nonessential) {\n let skin = null;\n let slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new Skin(\"default\");\n } else {\n let skinName = input.readStringRef();\n if (!skinName)\n throw new Error(\"Skin name must not be null.\");\n skin = new Skin(skinName);\n skin.bones.length = input.readInt(true);\n for (let i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (let 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 (let i = 0; i < slotCount; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let name = input.readStringRef();\n if (!name)\n throw new Error(\"Attachment name must not be null\");\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n if (attachment)\n skin.setAttachment(slotIndex, name, attachment);\n }\n }\n return skin;\n }\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n let scale = this.scale;\n let name = input.readStringRef();\n if (!name)\n name = attachmentName;\n switch (input.readByte()) {\n case AttachmentType.Region: {\n let path = input.readStringRef();\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let scaleX = input.readFloat();\n let scaleY = input.readFloat();\n let width = input.readFloat();\n let height = input.readFloat();\n let color = input.readInt32();\n let sequence = this.readSequence(input);\n if (!path)\n path = name;\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\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 Color.rgba8888ToColor(region.color, color);\n region.sequence = sequence;\n if (sequence == null)\n region.updateRegion();\n return region;\n }\n case AttachmentType.BoundingBox: {\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case AttachmentType.Mesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let vertexCount = input.readInt(true);\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\n let triangles = this.readShortArray(input);\n let vertices = this.readVertices(input, vertexCount);\n let hullLength = input.readInt(true);\n let sequence = this.readSequence(input);\n let edges = [];\n let width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n 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 if (sequence == null)\n mesh.updateRegion();\n mesh.hullLength = hullLength << 1;\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case AttachmentType.LinkedMesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let skinName = input.readStringRef();\n let parent = input.readStringRef();\n let inheritTimelines = input.readBoolean();\n let sequence = this.readSequence(input);\n let width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n Color.rgba8888ToColor(mesh.color, color);\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\n return mesh;\n }\n case AttachmentType.Path: {\n let closed2 = input.readBoolean();\n let constantSpeed = input.readBoolean();\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n let color = nonessential ? input.readInt32() : 0;\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = closed2;\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 Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case AttachmentType.Point: {\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let color = nonessential ? input.readInt32() : 0;\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case AttachmentType.Clipping: {\n let endSlotIndex = input.readInt(true);\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\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 Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n }\n readSequence(input) {\n if (!input.readBoolean())\n return null;\n let sequence = new Sequence(input.readInt(true));\n sequence.start = input.readInt(true);\n sequence.digits = input.readInt(true);\n sequence.setupIndex = input.readInt(true);\n return sequence;\n }\n readVertices(input, vertexCount) {\n let scale = this.scale;\n let verticesLength = vertexCount << 1;\n let vertices = new Vertices();\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n let weights = new Array();\n let bonesArray = new Array();\n for (let i = 0; i < vertexCount; i++) {\n let boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n }\n readFloatArray(input, n, scale) {\n let array = new Array(n);\n if (scale == 1) {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat();\n } else {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n }\n readShortArray(input) {\n let n = input.readInt(true);\n let array = new Array(n);\n for (let i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n }\n readAnimation(input, name, skeletonData) {\n input.readInt(true);\n let timelines = new Array();\n let scale = this.scale;\n let tempColor1 = new Color();\n let tempColor2 = new Color();\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case SLOT_ATTACHMENT: {\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\n for (let frame = 0; frame < frameCount; frame++)\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n a = a2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let na = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n a = na;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_ALPHA: {\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n }\n time = time2;\n a = a2;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let boneIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\n switch (type) {\n case BONE_ROTATE:\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_TRANSLATE:\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEX:\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEY:\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_SCALE:\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEX:\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEY:\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEAR:\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARX:\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARY:\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixShearY = mixShearY2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true);\n let data = skeletonData.pathConstraints[index];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n switch (input.readByte()) {\n case PATH_POSITION:\n timelines.push(readTimeline1(\n input,\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\n data.positionMode == 0 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_SPACING:\n timelines.push(readTimeline1(\n input,\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_MIX:\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n }\n timelines.push(timeline);\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let skin = skeletonData.skins[input.readInt(true)];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let slotIndex = input.readInt(true);\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n let attachmentName = input.readStringRef();\n if (!attachmentName)\n throw new Error(\"attachmentName must not be null.\");\n let attachment = skin.getAttachment(slotIndex, attachmentName);\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case ATTACHMENT_DEFORM: {\n let vertexAttachment = attachment;\n let weighted = vertexAttachment.bones;\n let vertices = vertexAttachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let bezierCount = input.readInt(true);\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\n let time = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let end = input.readInt(true);\n if (end == 0)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat();\n } else {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (let v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frame, time, deform);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n }\n time = time2;\n }\n timelines.push(timeline);\n break;\n }\n case ATTACHMENT_SEQUENCE: {\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\n for (let frame = 0; frame < frameCount; frame++) {\n let time = input.readFloat();\n let modeAndIndex = input.readInt32();\n timeline.setFrame(\n frame,\n time,\n SequenceModeValues[modeAndIndex & 15],\n modeAndIndex >> 4,\n input.readFloat()\n );\n }\n timelines.push(timeline);\n break;\n }\n }\n }\n }\n }\n let drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n let timeline = new DrawOrderTimeline(drawOrderCount);\n let slotCount = skeletonData.slots.length;\n for (let i = 0; i < drawOrderCount; i++) {\n let time = input.readFloat();\n let offsetCount = input.readInt(true);\n let drawOrder = Utils.newArray(slotCount, 0);\n for (let ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsetCount; ii++) {\n let 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 (let 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 }\n let eventCount = input.readInt(true);\n if (eventCount > 0) {\n let timeline = new EventTimeline(eventCount);\n for (let i = 0; i < eventCount; i++) {\n let time = input.readFloat();\n let eventData = skeletonData.events[input.readInt(true)];\n let event = new Event(time, eventData);\n event.intValue = input.readInt(false);\n event.floatValue = input.readFloat();\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event.data.audioPath) {\n event.volume = input.readFloat();\n event.balance = input.readFloat();\n }\n timeline.setFrame(i, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n return new Animation(name, timelines, duration);\n }\n };\n var BinaryInput = class {\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n readByte() {\n return this.buffer.getInt8(this.index++);\n }\n readUnsignedByte() {\n return this.buffer.getUint8(this.index++);\n }\n readShort() {\n let value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n }\n readInt32() {\n let value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n }\n readInt(optimizePositive) {\n let b = this.readByte();\n let result = b & 127;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 7;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 14;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 21;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\n }\n readStringRef() {\n let index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n }\n readString() {\n let byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n let chars = \"\";\n let charCount = 0;\n for (let i = 0; i < byteCount; ) {\n let b = this.readUnsignedByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n }\n readFloat() {\n let value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n }\n readBoolean() {\n return this.readByte() != 0;\n }\n };\n var LinkedMesh = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n var Vertices = class {\n constructor(bones = null, vertices = null) {\n this.bones = bones;\n this.vertices = vertices;\n }\n };\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\n return AttachmentType2;\n })(AttachmentType || {});\n function readTimeline1(input, timeline, scale) {\n let time = input.readFloat(), value = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n }\n time = time2;\n value = value2;\n }\n return timeline;\n }\n function readTimeline2(input, timeline, scale) {\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n }\n return timeline;\n }\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\n }\n var BONE_ROTATE = 0;\n var BONE_TRANSLATE = 1;\n var BONE_TRANSLATEX = 2;\n var BONE_TRANSLATEY = 3;\n var BONE_SCALE = 4;\n var BONE_SCALEX = 5;\n var BONE_SCALEY = 6;\n var BONE_SHEAR = 7;\n var BONE_SHEARX = 8;\n var BONE_SHEARY = 9;\n var SLOT_ATTACHMENT = 0;\n var SLOT_RGBA = 1;\n var SLOT_RGB = 2;\n var SLOT_RGBA2 = 3;\n var SLOT_RGB2 = 4;\n var SLOT_ALPHA = 5;\n var ATTACHMENT_DEFORM = 0;\n var ATTACHMENT_SEQUENCE = 1;\n var PATH_POSITION = 0;\n var PATH_SPACING = 1;\n var PATH_MIX = 2;\n var CURVE_STEPPED = 1;\n var CURVE_BEZIER = 2;\n\n // spine-core/src/SkeletonBounds.ts\n var SkeletonBounds = class {\n constructor() {\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 Pool(() => {\n return Utils.newFloatArray(16);\n });\n }\n update(skeleton, updateAabb) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = 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 } 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 aabbCompute() {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let 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 aabbContainsPoint(x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n aabbIntersectsSegment(x1, y1, x2, y2) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let 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 let m = (y2 - y1) / (x2 - x1);\n let 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 let 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 aabbIntersectsSkeleton(bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n containsPoint(x, y) {\n let polygons = this.polygons;\n for (let 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 containsPointPolygon(polygon, x, y) {\n let vertices = polygon;\n let nn = polygon.length;\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\n let 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 intersectsSegment(x1, y1, x2, y2) {\n let polygons = this.polygons;\n for (let 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 intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\n let vertices = polygon;\n let nn = polygon.length;\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let 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 let 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 getPolygon(boundingBox) {\n if (!boundingBox)\n throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n getWidth() {\n return this.maxX - this.minX;\n }\n getHeight() {\n return this.maxY - this.minY;\n }\n };\n\n // spine-core/src/Triangulator.ts\n var Triangulator = class {\n constructor() {\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 Pool(() => {\n return new Array();\n });\n this.polygonIndicesPool = new Pool(() => {\n return new Array();\n });\n }\n triangulate(verticesArray) {\n let vertices = verticesArray;\n let vertexCount = verticesArray.length >> 1;\n let indices = this.indicesArray;\n indices.length = 0;\n for (let i = 0; i < vertexCount; i++)\n indices[i] = i;\n let isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (let i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n let triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n let previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer:\n if (!isConcave[i]) {\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n let v = indices[ii] << 1;\n let 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 let previousIndex = (vertexCount + i - 1) % vertexCount;\n let 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 decompose(verticesArray, triangles) {\n let vertices = verticesArray;\n let convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n let convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n let polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n let polygon = this.polygonPool.obtain();\n polygon.length = 0;\n let fanBaseIndex = -1, lastWinding = 0;\n for (let i = 0, n = triangles.length; i < n; i += 3) {\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\n let merged = false;\n if (fanBaseIndex == t1) {\n let o = polygon.length - 4;\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n let 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 } 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 (let i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n let firstIndex = polygonIndices[0];\n let lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n let o = polygon.length - 4;\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\n let firstX = polygon[0], firstY = polygon[1];\n let secondX = polygon[2], secondY = polygon[3];\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (let ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n let otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n let otherFirstIndex = otherIndices[0];\n let otherSecondIndex = otherIndices[1];\n let otherLastIndex = otherIndices[2];\n let otherPoly = convexPolygons[ii];\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n let 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 (let 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 static isConcave(index, vertexCount, vertices, indices) {\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n let current = indices[index] << 1;\n let next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(\n vertices[previous],\n vertices[previous + 1],\n vertices[current],\n vertices[current + 1],\n vertices[next],\n vertices[next + 1]\n );\n }\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n }\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\n let px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n }\n };\n\n // spine-core/src/SkeletonClipping.ts\n var SkeletonClipping = class {\n constructor() {\n this.triangulator = new 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 this.clipAttachment = null;\n this.clippingPolygons = null;\n }\n clipStart(slot, clip) {\n if (this.clipAttachment)\n return 0;\n this.clipAttachment = clip;\n let n = clip.worldVerticesLength;\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n let clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\n let polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n }\n clipEndWithSlot(slot) {\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n }\n clipEnd() {\n if (!this.clipAttachment)\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 isClipping() {\n return this.clipAttachment != null;\n }\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n let clippedTriangles = this.clippedTriangles;\n let polygons = this.clippingPolygons;\n let polygonsCount = polygons.length;\n let vertexSize = twoColor ? 12 : 8;\n let index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer:\n for (let i = 0; i < trianglesLength; i += 3) {\n let vertexOffset = triangles[i] << 1;\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (let p = 0; p < polygonsCount; p++) {\n let s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n let clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\n let clipOutputCount = clipOutputLength >> 1;\n let clipOutputItems = this.clipOutput;\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\n let 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 let c0 = x - x3, c1 = y - y3;\n let a = (d0 * c0 + d1 * c1) * d;\n let b = (d4 * c0 + d2 * c1) * d;\n let 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 let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (let 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 } else {\n let clippedVerticesItems = 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 } 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 let clippedTrianglesItems = 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 clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\n let originalOutput = output;\n let clipped = false;\n let input;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\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 let clippingVertices = clippingArea;\n let clippingVerticesLast = clippingArea.length - 4;\n for (let i = 0; ; i += 2) {\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n let inputVertices = input;\n let inputVerticesLength = input.length - 2, outputStart = output.length;\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n let 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 let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n } else {\n output.push(edgeX);\n output.push(edgeY);\n }\n } else if (side2) {\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\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 let temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (let i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n } else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n }\n static makeClockwise(polygon) {\n let vertices = polygon;\n let verticeslength = polygon.length;\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (let 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 (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n let x = vertices[i], y = vertices[i + 1];\n let 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 };\n\n // spine-core/src/SkeletonJson.ts\n var SkeletonJson = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(json) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\n let skeletonMap = root.skeleton;\n if (skeletonMap) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.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 (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n let parent = null;\n let parentName = getValue(boneMap, \"parent\", null);\n if (parentName)\n parent = skeletonData.findBone(parentName);\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = getValue(boneMap, \"length\", 0) * scale;\n data.x = getValue(boneMap, \"x\", 0) * scale;\n data.y = getValue(boneMap, \"y\", 0) * scale;\n data.rotation = getValue(boneMap, \"rotation\", 0);\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\n data.shearX = getValue(boneMap, \"shearX\", 0);\n data.shearY = getValue(boneMap, \"shearY\", 0);\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\n data.skinRequired = getValue(boneMap, \"skin\", false);\n let color = getValue(boneMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let boneData = skeletonData.findBone(slotMap.bone);\n if (!boneData)\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\n let color = getValue(slotMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n let dark = getValue(slotMap, \"dark\", null);\n if (dark)\n data.darkColor = Color.fromString(dark);\n data.attachmentName = getValue(slotMap, \"attachment\", null);\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\n if (!bone)\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let target = skeletonData.findBone(constraintMap.target);\n ;\n if (!target)\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\n data.target = target;\n data.mix = getValue(constraintMap, \"mix\", 1);\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = getValue(constraintMap, \"compress\", false);\n data.stretch = getValue(constraintMap, \"stretch\", false);\n data.uniform = getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findBone(targetName);\n if (!target)\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\n data.target = target;\n data.local = getValue(constraintMap, \"local\", false);\n data.relative = getValue(constraintMap, \"relative\", false);\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findSlot(targetName);\n if (!target)\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\n data.target = target;\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.position = getValue(constraintMap, \"position\", 0);\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i];\n let skin = new Skin(skinMap.name);\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let boneName = skinMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraintName = skinMap.ik[ii];\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraintName = skinMap.transform[ii];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraintName = skinMap.path[ii];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment)\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 (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = getValue(eventMap, \"int\", 0);\n data.floatValue = getValue(eventMap, \"float\", 0);\n data.stringValue = getValue(eventMap, \"string\", \"\");\n data.audioPath = getValue(eventMap, \"audio\", null);\n if (data.audioPath) {\n data.volume = getValue(eventMap, \"volume\", 1);\n data.balance = getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n }\n readAttachment(map, skin, slotIndex, name, skeletonData) {\n let scale = this.scale;\n name = getValue(map, \"name\", name);\n switch (getValue(map, \"type\", \"region\")) {\n case \"region\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\n return null;\n region.path = path;\n region.x = getValue(map, \"x\", 0) * scale;\n region.y = getValue(map, \"y\", 0) * scale;\n region.scaleX = getValue(map, \"scaleX\", 1);\n region.scaleY = getValue(map, \"scaleY\", 1);\n region.rotation = getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n region.sequence = sequence;\n let color = getValue(map, \"color\", null);\n if (color)\n region.color.setFromString(color);\n if (region.region != null)\n region.updateRegion();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n let color = getValue(map, \"color\", null);\n if (color)\n mesh.color.setFromString(color);\n mesh.width = getValue(map, \"width\", 0) * scale;\n mesh.height = getValue(map, \"height\", 0) * scale;\n mesh.sequence = sequence;\n let parent = getValue(map, \"parent\", null);\n if (parent) {\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\n return mesh;\n }\n let uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n if (mesh.region != null)\n mesh.updateRegion();\n mesh.edges = getValue(map, \"edges\", null);\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = getValue(map, \"closed\", false);\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n let color = getValue(map, \"color\", null);\n if (color)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = getValue(map, \"x\", 0) * scale;\n point.y = getValue(map, \"y\", 0) * scale;\n point.rotation = getValue(map, \"rotation\", 0);\n let color = getValue(map, \"color\", null);\n if (color)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\n return null;\n let end = getValue(map, \"end\", null);\n if (end)\n clip.endSlot = skeletonData.findSlot(end);\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n readSequence(map) {\n if (map == null)\n return null;\n let sequence = new Sequence(getValue(map, \"count\", 0));\n sequence.start = getValue(map, \"start\", 1);\n sequence.digits = getValue(map, \"digits\", 0);\n sequence.setupIndex = getValue(map, \"setup\", 0);\n return sequence;\n }\n readVertices(map, attachment, verticesLength) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n; ) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n }\n readAnimation(map, name, skeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotName);\n let slotIndex = slot.index;\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (!timelineMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(frames, slotIndex);\n for (let frame = 0; frame < frames; frame++) {\n let keyMap = timelineMap[frame];\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgba\") {\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb\") {\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"alpha\") {\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\n } else if (timelineName == \"rgba2\") {\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb2\") {\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(\"Bone not found: \" + boneName);\n let boneIndex = bone.index;\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n let frames = timelineMap.length;\n if (frames == 0)\n continue;\n if (timelineName === \"rotate\") {\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\n } else if (timelineName === \"translate\") {\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\n } else if (timelineName === \"translatex\") {\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"translatey\") {\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"scale\") {\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\n } else if (timelineName === \"scalex\") {\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"scaley\") {\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"shear\") {\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\n } else if (timelineName === \"shearx\") {\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n } else if (timelineName === \"sheary\") {\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n }\n }\n }\n }\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let keyMap = constraintMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(\"IK Constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mix = getValue(keyMap, \"mix\", 1);\n let softness = getValue(keyMap, \"softness\", 0) * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\n let nextMap = constraintMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mix2 = getValue(nextMap, \"mix\", 1);\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.transform) {\n for (let constraintName in map.transform) {\n let timelineMap = map.transform[constraintName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Transform constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixScaleX = mixScaleX2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Path constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName === \"position\") {\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"spacing\") {\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.attachments) {\n for (let attachmentsName in map.attachments) {\n let attachmentsMap = map.attachments[attachmentsName];\n let skin = skeletonData.findSkin(attachmentsName);\n if (!skin)\n throw new Error(\"Skin not found: \" + attachmentsName);\n for (let slotMapName in attachmentsMap) {\n let slotMap = attachmentsMap[slotMapName];\n let slot = skeletonData.findSlot(slotMapName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotMapName);\n let slotIndex = slot.index;\n for (let attachmentMapName in slotMap) {\n let attachmentMap = slotMap[attachmentMapName];\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\n for (let timelineMapName in attachmentMap) {\n let timelineMap = attachmentMap[timelineMapName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n if (timelineMapName == \"deform\") {\n let weighted = attachment.bones;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\n let time = getValue(keyMap, \"time\", 0);\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let verticesValue = getValue(keyMap, \"vertices\", null);\n if (!verticesValue)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = getValue(keyMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frame, time, deform);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let curve = keyMap.curve;\n if (curve)\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n time = time2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineMapName == \"sequence\") {\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\n let lastDelay = 0;\n for (let frame = 0; frame < timelineMap.length; frame++) {\n let delay = getValue(keyMap, \"delay\", lastDelay);\n let time = getValue(keyMap, \"time\", 0);\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\n let index = getValue(keyMap, \"index\", 0);\n timeline.setFrame(frame, time, mode, index, delay);\n lastDelay = delay;\n keyMap = timelineMap[frame + 1];\n }\n timelines.push(timeline);\n }\n }\n }\n }\n }\n }\n if (map.drawOrder) {\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\n let slotCount = skeletonData.slots.length;\n let frame = 0;\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\n let drawOrderMap = map.drawOrder[i];\n let drawOrder = null;\n let offsets = getValue(drawOrderMap, \"offsets\", null);\n if (offsets) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsets.length; ii++) {\n let offsetMap = offsets[ii];\n let slot = skeletonData.findSlot(offsetMap.slot);\n if (!slot)\n throw new Error(\"Slot not found: \" + slot);\n let slotIndex = slot.index;\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 (let ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n }\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frame = 0;\n for (let i = 0; i < map.events.length; i++, frame++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (!eventData)\n throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath) {\n event.volume = getValue(eventMap, \"volume\", 1);\n event.balance = getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frame, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n };\n var LinkedMesh2 = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n function readTimeline12(keys, timeline, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\n if (keyMap.curve)\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n time = time2;\n value = value2;\n keyMap = nextMap;\n }\n }\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n keyMap = nextMap;\n }\n }\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n if (curve == \"stepped\") {\n timeline.setStepped(frame);\n return bezier;\n }\n let i = value << 2;\n let cx1 = curve[i];\n let cy1 = curve[i + 1] * scale;\n let cx2 = curve[i + 2];\n let cy2 = curve[i + 3] * scale;\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n return bezier + 1;\n }\n function getValue(map, property, defaultValue) {\n return map[property] !== void 0 ? map[property] : defaultValue;\n }\n\n // spine-core/src/polyfills.ts\n (() => {\n if (typeof Math.fround === \"undefined\") {\n Math.fround = function(array) {\n return function(x) {\n return array[0] = x, array[0];\n };\n }(new Float32Array(1));\n }\n })();\n\n // spine-webgl/src/WebGL.ts\n var ManagedWebGLRenderingContext = class {\n constructor(canvasOrContext, contextConfig = { alpha: \"true\" }) {\n this.restorables = new Array();\n if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== \"undefined\" && canvasOrContext instanceof WebGL2RenderingContext)) {\n let canvas = canvasOrContext;\n this.gl = canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig);\n this.canvas = canvas;\n canvas.addEventListener(\"webglcontextlost\", (e) => {\n let event = e;\n if (e)\n e.preventDefault();\n });\n canvas.addEventListener(\"webglcontextrestored\", (e) => {\n for (let i = 0, n = this.restorables.length; i < n; i++)\n this.restorables[i].restore();\n });\n } else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n addRestorable(restorable) {\n this.restorables.push(restorable);\n }\n removeRestorable(restorable) {\n let index = this.restorables.indexOf(restorable);\n if (index > -1)\n this.restorables.splice(index, 1);\n }\n };\n var ONE = 1;\n var ONE_MINUS_SRC_COLOR = 769;\n var SRC_ALPHA = 770;\n var ONE_MINUS_SRC_ALPHA = 771;\n var DST_COLOR = 774;\n var WebGLBlendModeConverter = class {\n static getDestGLBlendMode(blendMode) {\n switch (blendMode) {\n case 0 /* Normal */:\n return ONE_MINUS_SRC_ALPHA;\n case 1 /* Additive */:\n return ONE;\n case 2 /* Multiply */:\n return ONE_MINUS_SRC_ALPHA;\n case 3 /* Screen */:\n return ONE_MINUS_SRC_ALPHA;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n static getSourceColorGLBlendMode(blendMode, premultipliedAlpha = false) {\n switch (blendMode) {\n case 0 /* Normal */:\n return premultipliedAlpha ? ONE : SRC_ALPHA;\n case 1 /* Additive */:\n return premultipliedAlpha ? ONE : SRC_ALPHA;\n case 2 /* Multiply */:\n return DST_COLOR;\n case 3 /* Screen */:\n return ONE;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n static getSourceAlphaGLBlendMode(blendMode) {\n switch (blendMode) {\n case 0 /* Normal */:\n return ONE;\n case 1 /* Additive */:\n return ONE;\n case 2 /* Multiply */:\n return ONE_MINUS_SRC_ALPHA;\n case 3 /* Screen */:\n return ONE_MINUS_SRC_COLOR;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n };\n\n // spine-webgl/src/GLTexture.ts\n var _GLTexture = class extends Texture {\n constructor(context, image, useMipMaps = false) {\n super(image);\n this.texture = null;\n this.boundUnit = 0;\n this.useMipMaps = false;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.useMipMaps = useMipMaps;\n this.restore();\n this.context.addRestorable(this);\n }\n setFilters(minFilter, magFilter) {\n let 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 this.useMipMaps = _GLTexture.usesMipMaps(minFilter);\n if (this.useMipMaps)\n gl.generateMipmap(gl.TEXTURE_2D);\n }\n static validateMagFilter(magFilter) {\n switch (magFilter) {\n case 9987 /* MipMap */:\n case 9987 /* MipMapLinearLinear */:\n case 9985 /* MipMapLinearNearest */:\n case 9986 /* MipMapNearestLinear */:\n case 9984 /* MipMapNearestNearest */:\n return 9729 /* Linear */;\n default:\n return magFilter;\n }\n }\n static usesMipMaps(filter) {\n switch (filter) {\n case 9987 /* MipMap */:\n case 9987 /* MipMapLinearLinear */:\n case 9985 /* MipMapLinearNearest */:\n case 9986 /* MipMapNearestLinear */:\n case 9984 /* MipMapNearestNearest */:\n return true;\n default:\n return false;\n }\n }\n setWraps(uWrap, vWrap) {\n let 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 update(useMipMaps) {\n let gl = this.context.gl;\n if (!this.texture)\n this.texture = this.context.gl.createTexture();\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 restore() {\n this.texture = null;\n this.update(this.useMipMaps);\n }\n bind(unit = 0) {\n let gl = this.context.gl;\n this.boundUnit = unit;\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n }\n unbind() {\n let gl = this.context.gl;\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n dispose() {\n this.context.removeRestorable(this);\n let gl = this.context.gl;\n gl.deleteTexture(this.texture);\n }\n };\n var GLTexture = _GLTexture;\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\n\n // spine-webgl/src/AssetManager.ts\n var AssetManager = class extends AssetManagerBase {\n constructor(context, pathPrefix = \"\", downloader = new Downloader()) {\n super((image) => {\n return new GLTexture(context, image);\n }, pathPrefix, downloader);\n }\n };\n\n // spine-webgl/src/Vector3.ts\n var Vector3 = class {\n constructor(x = 0, y = 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 setFrom(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n }\n set(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n }\n scale(s) {\n this.x *= s;\n this.y *= s;\n this.z *= s;\n return this;\n }\n normalize() {\n let 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 cross(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 multiply(matrix) {\n let l_mat = matrix.values;\n return this.set(\n this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03],\n this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13],\n this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]\n );\n }\n project(matrix) {\n let l_mat = matrix.values;\n let l_w = 1 / (this.x * l_mat[M30] + this.y * l_mat[M31] + this.z * l_mat[M32] + l_mat[M33]);\n return this.set(\n (this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03]) * l_w,\n (this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13]) * l_w,\n (this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]) * l_w\n );\n }\n dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n distance(v) {\n let a = v.x - this.x;\n let b = v.y - this.y;\n let c = v.z - this.z;\n return Math.sqrt(a * a + b * b + c * c);\n }\n };\n\n // spine-webgl/src/Matrix4.ts\n var M00 = 0;\n var M01 = 4;\n var M02 = 8;\n var M03 = 12;\n var M10 = 1;\n var M11 = 5;\n var M12 = 9;\n var M13 = 13;\n var M20 = 2;\n var M21 = 6;\n var M22 = 10;\n var M23 = 14;\n var M30 = 3;\n var M31 = 7;\n var M32 = 11;\n var M33 = 15;\n var _Matrix4 = class {\n constructor() {\n this.temp = new Float32Array(16);\n this.values = new Float32Array(16);\n let v = this.values;\n v[M00] = 1;\n v[M11] = 1;\n v[M22] = 1;\n v[M33] = 1;\n }\n set(values) {\n this.values.set(values);\n return this;\n }\n transpose() {\n let t = this.temp;\n let v = this.values;\n t[M00] = v[M00];\n t[M01] = v[M10];\n t[M02] = v[M20];\n t[M03] = v[M30];\n t[M10] = v[M01];\n t[M11] = v[M11];\n t[M12] = v[M21];\n t[M13] = v[M31];\n t[M20] = v[M02];\n t[M21] = v[M12];\n t[M22] = v[M22];\n t[M23] = v[M32];\n t[M30] = v[M03];\n t[M31] = v[M13];\n t[M32] = v[M23];\n t[M33] = v[M33];\n return this.set(t);\n }\n identity() {\n let v = this.values;\n v[M00] = 1;\n v[M01] = 0;\n v[M02] = 0;\n v[M03] = 0;\n v[M10] = 0;\n v[M11] = 1;\n v[M12] = 0;\n v[M13] = 0;\n v[M20] = 0;\n v[M21] = 0;\n v[M22] = 1;\n v[M23] = 0;\n v[M30] = 0;\n v[M31] = 0;\n v[M32] = 0;\n v[M33] = 1;\n return this;\n }\n invert() {\n let v = this.values;\n let t = this.temp;\n let l_det = v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\n if (l_det == 0)\n throw new Error(\"non-invertible matrix\");\n let inv_det = 1 / l_det;\n t[M00] = v[M12] * v[M23] * v[M31] - v[M13] * v[M22] * v[M31] + v[M13] * v[M21] * v[M32] - v[M11] * v[M23] * v[M32] - v[M12] * v[M21] * v[M33] + v[M11] * v[M22] * v[M33];\n t[M01] = v[M03] * v[M22] * v[M31] - v[M02] * v[M23] * v[M31] - v[M03] * v[M21] * v[M32] + v[M01] * v[M23] * v[M32] + v[M02] * v[M21] * v[M33] - v[M01] * v[M22] * v[M33];\n t[M02] = v[M02] * v[M13] * v[M31] - v[M03] * v[M12] * v[M31] + v[M03] * v[M11] * v[M32] - v[M01] * v[M13] * v[M32] - v[M02] * v[M11] * v[M33] + v[M01] * v[M12] * v[M33];\n t[M03] = v[M03] * v[M12] * v[M21] - v[M02] * v[M13] * v[M21] - v[M03] * v[M11] * v[M22] + v[M01] * v[M13] * v[M22] + v[M02] * v[M11] * v[M23] - v[M01] * v[M12] * v[M23];\n t[M10] = v[M13] * v[M22] * v[M30] - v[M12] * v[M23] * v[M30] - v[M13] * v[M20] * v[M32] + v[M10] * v[M23] * v[M32] + v[M12] * v[M20] * v[M33] - v[M10] * v[M22] * v[M33];\n t[M11] = v[M02] * v[M23] * v[M30] - v[M03] * v[M22] * v[M30] + v[M03] * v[M20] * v[M32] - v[M00] * v[M23] * v[M32] - v[M02] * v[M20] * v[M33] + v[M00] * v[M22] * v[M33];\n t[M12] = v[M03] * v[M12] * v[M30] - v[M02] * v[M13] * v[M30] - v[M03] * v[M10] * v[M32] + v[M00] * v[M13] * v[M32] + v[M02] * v[M10] * v[M33] - v[M00] * v[M12] * v[M33];\n t[M13] = v[M02] * v[M13] * v[M20] - v[M03] * v[M12] * v[M20] + v[M03] * v[M10] * v[M22] - v[M00] * v[M13] * v[M22] - v[M02] * v[M10] * v[M23] + v[M00] * v[M12] * v[M23];\n t[M20] = v[M11] * v[M23] * v[M30] - v[M13] * v[M21] * v[M30] + v[M13] * v[M20] * v[M31] - v[M10] * v[M23] * v[M31] - v[M11] * v[M20] * v[M33] + v[M10] * v[M21] * v[M33];\n t[M21] = v[M03] * v[M21] * v[M30] - v[M01] * v[M23] * v[M30] - v[M03] * v[M20] * v[M31] + v[M00] * v[M23] * v[M31] + v[M01] * v[M20] * v[M33] - v[M00] * v[M21] * v[M33];\n t[M22] = v[M01] * v[M13] * v[M30] - v[M03] * v[M11] * v[M30] + v[M03] * v[M10] * v[M31] - v[M00] * v[M13] * v[M31] - v[M01] * v[M10] * v[M33] + v[M00] * v[M11] * v[M33];\n t[M23] = v[M03] * v[M11] * v[M20] - v[M01] * v[M13] * v[M20] - v[M03] * v[M10] * v[M21] + v[M00] * v[M13] * v[M21] + v[M01] * v[M10] * v[M23] - v[M00] * v[M11] * v[M23];\n t[M30] = v[M12] * v[M21] * v[M30] - v[M11] * v[M22] * v[M30] - v[M12] * v[M20] * v[M31] + v[M10] * v[M22] * v[M31] + v[M11] * v[M20] * v[M32] - v[M10] * v[M21] * v[M32];\n t[M31] = v[M01] * v[M22] * v[M30] - v[M02] * v[M21] * v[M30] + v[M02] * v[M20] * v[M31] - v[M00] * v[M22] * v[M31] - v[M01] * v[M20] * v[M32] + v[M00] * v[M21] * v[M32];\n t[M32] = v[M02] * v[M11] * v[M30] - v[M01] * v[M12] * v[M30] - v[M02] * v[M10] * v[M31] + v[M00] * v[M12] * v[M31] + v[M01] * v[M10] * v[M32] - v[M00] * v[M11] * v[M32];\n t[M33] = v[M01] * v[M12] * v[M20] - v[M02] * v[M11] * v[M20] + v[M02] * v[M10] * v[M21] - v[M00] * v[M12] * v[M21] - v[M01] * v[M10] * v[M22] + v[M00] * v[M11] * v[M22];\n v[M00] = t[M00] * inv_det;\n v[M01] = t[M01] * inv_det;\n v[M02] = t[M02] * inv_det;\n v[M03] = t[M03] * inv_det;\n v[M10] = t[M10] * inv_det;\n v[M11] = t[M11] * inv_det;\n v[M12] = t[M12] * inv_det;\n v[M13] = t[M13] * inv_det;\n v[M20] = t[M20] * inv_det;\n v[M21] = t[M21] * inv_det;\n v[M22] = t[M22] * inv_det;\n v[M23] = t[M23] * inv_det;\n v[M30] = t[M30] * inv_det;\n v[M31] = t[M31] * inv_det;\n v[M32] = t[M32] * inv_det;\n v[M33] = t[M33] * inv_det;\n return this;\n }\n determinant() {\n let v = this.values;\n return v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\n }\n translate(x, y, z) {\n let v = this.values;\n v[M03] += x;\n v[M13] += y;\n v[M23] += z;\n return this;\n }\n copy() {\n return new _Matrix4().set(this.values);\n }\n projection(near, far, fovy, aspectRatio) {\n this.identity();\n let l_fd = 1 / Math.tan(fovy * (Math.PI / 180) / 2);\n let l_a1 = (far + near) / (near - far);\n let l_a2 = 2 * far * near / (near - far);\n let v = this.values;\n v[M00] = l_fd / aspectRatio;\n v[M10] = 0;\n v[M20] = 0;\n v[M30] = 0;\n v[M01] = 0;\n v[M11] = l_fd;\n v[M21] = 0;\n v[M31] = 0;\n v[M02] = 0;\n v[M12] = 0;\n v[M22] = l_a1;\n v[M32] = -1;\n v[M03] = 0;\n v[M13] = 0;\n v[M23] = l_a2;\n v[M33] = 0;\n return this;\n }\n ortho2d(x, y, width, height) {\n return this.ortho(x, x + width, y, y + height, 0, 1);\n }\n ortho(left, right, bottom, top, near, far) {\n this.identity();\n let x_orth = 2 / (right - left);\n let y_orth = 2 / (top - bottom);\n let z_orth = -2 / (far - near);\n let tx = -(right + left) / (right - left);\n let ty = -(top + bottom) / (top - bottom);\n let tz = -(far + near) / (far - near);\n let v = this.values;\n v[M00] = x_orth;\n v[M10] = 0;\n v[M20] = 0;\n v[M30] = 0;\n v[M01] = 0;\n v[M11] = y_orth;\n v[M21] = 0;\n v[M31] = 0;\n v[M02] = 0;\n v[M12] = 0;\n v[M22] = z_orth;\n v[M32] = 0;\n v[M03] = tx;\n v[M13] = ty;\n v[M23] = tz;\n v[M33] = 1;\n return this;\n }\n multiply(matrix) {\n let t = this.temp;\n let v = this.values;\n let m = matrix.values;\n t[M00] = v[M00] * m[M00] + v[M01] * m[M10] + v[M02] * m[M20] + v[M03] * m[M30];\n t[M01] = v[M00] * m[M01] + v[M01] * m[M11] + v[M02] * m[M21] + v[M03] * m[M31];\n t[M02] = v[M00] * m[M02] + v[M01] * m[M12] + v[M02] * m[M22] + v[M03] * m[M32];\n t[M03] = v[M00] * m[M03] + v[M01] * m[M13] + v[M02] * m[M23] + v[M03] * m[M33];\n t[M10] = v[M10] * m[M00] + v[M11] * m[M10] + v[M12] * m[M20] + v[M13] * m[M30];\n t[M11] = v[M10] * m[M01] + v[M11] * m[M11] + v[M12] * m[M21] + v[M13] * m[M31];\n t[M12] = v[M10] * m[M02] + v[M11] * m[M12] + v[M12] * m[M22] + v[M13] * m[M32];\n t[M13] = v[M10] * m[M03] + v[M11] * m[M13] + v[M12] * m[M23] + v[M13] * m[M33];\n t[M20] = v[M20] * m[M00] + v[M21] * m[M10] + v[M22] * m[M20] + v[M23] * m[M30];\n t[M21] = v[M20] * m[M01] + v[M21] * m[M11] + v[M22] * m[M21] + v[M23] * m[M31];\n t[M22] = v[M20] * m[M02] + v[M21] * m[M12] + v[M22] * m[M22] + v[M23] * m[M32];\n t[M23] = v[M20] * m[M03] + v[M21] * m[M13] + v[M22] * m[M23] + v[M23] * m[M33];\n t[M30] = v[M30] * m[M00] + v[M31] * m[M10] + v[M32] * m[M20] + v[M33] * m[M30];\n t[M31] = v[M30] * m[M01] + v[M31] * m[M11] + v[M32] * m[M21] + v[M33] * m[M31];\n t[M32] = v[M30] * m[M02] + v[M31] * m[M12] + v[M32] * m[M22] + v[M33] * m[M32];\n t[M33] = v[M30] * m[M03] + v[M31] * m[M13] + v[M32] * m[M23] + v[M33] * m[M33];\n return this.set(this.temp);\n }\n multiplyLeft(matrix) {\n let t = this.temp;\n let v = this.values;\n let m = matrix.values;\n t[M00] = m[M00] * v[M00] + m[M01] * v[M10] + m[M02] * v[M20] + m[M03] * v[M30];\n t[M01] = m[M00] * v[M01] + m[M01] * v[M11] + m[M02] * v[M21] + m[M03] * v[M31];\n t[M02] = m[M00] * v[M02] + m[M01] * v[M12] + m[M02] * v[M22] + m[M03] * v[M32];\n t[M03] = m[M00] * v[M03] + m[M01] * v[M13] + m[M02] * v[M23] + m[M03] * v[M33];\n t[M10] = m[M10] * v[M00] + m[M11] * v[M10] + m[M12] * v[M20] + m[M13] * v[M30];\n t[M11] = m[M10] * v[M01] + m[M11] * v[M11] + m[M12] * v[M21] + m[M13] * v[M31];\n t[M12] = m[M10] * v[M02] + m[M11] * v[M12] + m[M12] * v[M22] + m[M13] * v[M32];\n t[M13] = m[M10] * v[M03] + m[M11] * v[M13] + m[M12] * v[M23] + m[M13] * v[M33];\n t[M20] = m[M20] * v[M00] + m[M21] * v[M10] + m[M22] * v[M20] + m[M23] * v[M30];\n t[M21] = m[M20] * v[M01] + m[M21] * v[M11] + m[M22] * v[M21] + m[M23] * v[M31];\n t[M22] = m[M20] * v[M02] + m[M21] * v[M12] + m[M22] * v[M22] + m[M23] * v[M32];\n t[M23] = m[M20] * v[M03] + m[M21] * v[M13] + m[M22] * v[M23] + m[M23] * v[M33];\n t[M30] = m[M30] * v[M00] + m[M31] * v[M10] + m[M32] * v[M20] + m[M33] * v[M30];\n t[M31] = m[M30] * v[M01] + m[M31] * v[M11] + m[M32] * v[M21] + m[M33] * v[M31];\n t[M32] = m[M30] * v[M02] + m[M31] * v[M12] + m[M32] * v[M22] + m[M33] * v[M32];\n t[M33] = m[M30] * v[M03] + m[M31] * v[M13] + m[M32] * v[M23] + m[M33] * v[M33];\n return this.set(this.temp);\n }\n lookAt(position, direction, up) {\n let 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 let val = this.values;\n val[M00] = xAxis.x;\n val[M01] = xAxis.y;\n val[M02] = xAxis.z;\n val[M10] = yAxis.x;\n val[M11] = yAxis.y;\n val[M12] = yAxis.z;\n val[M20] = -zAxis.x;\n val[M21] = -zAxis.y;\n val[M22] = -zAxis.z;\n _Matrix4.tmpMatrix.identity();\n _Matrix4.tmpMatrix.values[M03] = -position.x;\n _Matrix4.tmpMatrix.values[M13] = -position.y;\n _Matrix4.tmpMatrix.values[M23] = -position.z;\n this.multiply(_Matrix4.tmpMatrix);\n return this;\n }\n };\n var Matrix42 = _Matrix4;\n Matrix42.xAxis = new Vector3();\n Matrix42.yAxis = new Vector3();\n Matrix42.zAxis = new Vector3();\n Matrix42.tmpMatrix = new _Matrix4();\n\n // spine-webgl/src/Camera.ts\n var OrthoCamera = class {\n constructor(viewportWidth, viewportHeight) {\n this.position = new Vector3(0, 0, 0);\n this.direction = new Vector3(0, 0, -1);\n this.up = new 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 Matrix42();\n this.inverseProjectionView = new Matrix42();\n this.projection = new Matrix42();\n this.view = new Matrix42();\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.update();\n }\n update() {\n let projection = this.projection;\n let view = this.view;\n let projectionView = this.projectionView;\n let inverseProjectionView = this.inverseProjectionView;\n let zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\n projection.ortho(\n zoom * (-viewportWidth / 2),\n zoom * (viewportWidth / 2),\n zoom * (-viewportHeight / 2),\n zoom * (viewportHeight / 2),\n this.near,\n this.far\n );\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 screenToWorld(screenCoords, screenWidth, screenHeight) {\n let x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\n screenCoords.x = 2 * x / screenWidth - 1;\n screenCoords.y = 2 * y / screenHeight - 1;\n screenCoords.z = 2 * screenCoords.z - 1;\n screenCoords.project(this.inverseProjectionView);\n return screenCoords;\n }\n worldToScreen(worldCoords, screenWidth, screenHeight) {\n worldCoords.project(this.projectionView);\n worldCoords.x = screenWidth * (worldCoords.x + 1) / 2;\n worldCoords.y = screenHeight * (worldCoords.y + 1) / 2;\n worldCoords.z = (worldCoords.z + 1) / 2;\n return worldCoords;\n }\n setViewport(viewportWidth, viewportHeight) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n }\n };\n\n // spine-webgl/src/Input.ts\n var Input = class {\n constructor(element) {\n this.mouseX = 0;\n this.mouseY = 0;\n this.buttonDown = false;\n this.touch0 = null;\n this.touch1 = null;\n this.initialPinchDistance = 0;\n this.listeners = new Array();\n this.eventListeners = [];\n this.element = element;\n this.setupCallbacks(element);\n }\n setupCallbacks(element) {\n let mouseDown = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.buttonDown = true;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(this.mouseX, this.mouseY);\n });\n document.addEventListener(\"mousemove\", mouseMove);\n document.addEventListener(\"mouseup\", mouseUp);\n }\n };\n let mouseMove = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.listeners.map((listener) => {\n if (this.buttonDown) {\n if (listener.dragged)\n listener.dragged(this.mouseX, this.mouseY);\n } else {\n if (listener.moved)\n listener.moved(this.mouseX, this.mouseY);\n }\n });\n }\n };\n let mouseUp = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.buttonDown = false;\n this.listeners.map((listener) => {\n if (listener.up)\n listener.up(this.mouseX, this.mouseY);\n });\n document.removeEventListener(\"mousemove\", mouseMove);\n document.removeEventListener(\"mouseup\", mouseUp);\n }\n };\n let mouseWheel = (e) => {\n e.preventDefault();\n let deltaY = e.deltaY;\n if (e.deltaMode == WheelEvent.DOM_DELTA_LINE)\n deltaY *= 8;\n if (e.deltaMode == WheelEvent.DOM_DELTA_PAGE)\n deltaY *= 24;\n this.listeners.map((listener) => {\n if (listener.wheel)\n listener.wheel(e.deltaY);\n });\n };\n element.addEventListener(\"mousedown\", mouseDown, true);\n element.addEventListener(\"mousemove\", mouseMove, true);\n element.addEventListener(\"mouseup\", mouseUp, true);\n element.addEventListener(\"wheel\", mouseWheel, true);\n element.addEventListener(\"touchstart\", (ev) => {\n if (!this.touch0 || !this.touch1) {\n var touches = ev.changedTouches;\n let nativeTouch = touches.item(0);\n if (!nativeTouch)\n return;\n let rect = element.getBoundingClientRect();\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n let touch = new Touch(nativeTouch.identifier, x, y);\n this.mouseX = x;\n this.mouseY = y;\n this.buttonDown = true;\n if (!this.touch0) {\n this.touch0 = touch;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(touch.x, touch.y);\n });\n } else if (!this.touch1) {\n this.touch1 = touch;\n let dx = this.touch1.x - this.touch0.x;\n let dy = this.touch1.x - this.touch0.x;\n this.initialPinchDistance = Math.sqrt(dx * dx + dy * dy);\n this.listeners.map((listener) => {\n if (listener.zoom)\n listener.zoom(this.initialPinchDistance, this.initialPinchDistance);\n });\n }\n }\n ev.preventDefault();\n }, false);\n element.addEventListener(\"touchmove\", (ev) => {\n if (this.touch0) {\n var touches = ev.changedTouches;\n let rect = element.getBoundingClientRect();\n for (var i = 0; i < touches.length; i++) {\n var nativeTouch = touches[i];\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n if (this.touch0.identifier === nativeTouch.identifier) {\n this.touch0.x = this.mouseX = x;\n this.touch0.y = this.mouseY = y;\n this.listeners.map((listener) => {\n if (listener.dragged)\n listener.dragged(x, y);\n });\n }\n if (this.touch1 && this.touch1.identifier === nativeTouch.identifier) {\n this.touch1.x = this.mouseX = x;\n this.touch1.y = this.mouseY = y;\n }\n }\n if (this.touch0 && this.touch1) {\n let dx = this.touch1.x - this.touch0.x;\n let dy = this.touch1.x - this.touch0.x;\n let distance = Math.sqrt(dx * dx + dy * dy);\n this.listeners.map((listener) => {\n if (listener.zoom)\n listener.zoom(this.initialPinchDistance, distance);\n });\n }\n }\n ev.preventDefault();\n }, false);\n let touchEnd = (ev) => {\n if (this.touch0) {\n var touches = ev.changedTouches;\n let rect = element.getBoundingClientRect();\n for (var i = 0; i < touches.length; i++) {\n var nativeTouch = touches[i];\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n if (this.touch0.identifier === nativeTouch.identifier) {\n this.touch0 = null;\n this.mouseX = x;\n this.mouseY = y;\n this.listeners.map((listener) => {\n if (listener.up)\n listener.up(x, y);\n });\n if (!this.touch1) {\n this.buttonDown = false;\n break;\n } else {\n this.touch0 = this.touch1;\n this.touch1 = null;\n this.mouseX = this.touch0.x;\n this.mouseX = this.touch0.x;\n this.buttonDown = true;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(this.touch0.x, this.touch0.y);\n });\n }\n }\n if (this.touch1 && this.touch1.identifier) {\n this.touch1 = null;\n }\n }\n }\n ev.preventDefault();\n };\n element.addEventListener(\"touchend\", touchEnd, false);\n element.addEventListener(\"touchcancel\", touchEnd);\n }\n addListener(listener) {\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let idx = this.listeners.indexOf(listener);\n if (idx > -1) {\n this.listeners.splice(idx, 1);\n }\n }\n };\n var Touch = class {\n constructor(identifier, x, y) {\n this.identifier = identifier;\n this.x = x;\n this.y = y;\n }\n };\n\n // spine-webgl/src/CameraController.ts\n var CameraController = class {\n constructor(canvas, camera) {\n this.canvas = canvas;\n this.camera = camera;\n let cameraX = 0, cameraY = 0, cameraZoom = 0;\n let mouseX = 0, mouseY = 0;\n let lastX = 0, lastY = 0;\n let initialZoom = 0;\n new Input(canvas).addListener({\n down: (x, y) => {\n cameraX = camera.position.x;\n cameraY = camera.position.y;\n mouseX = lastX = x;\n mouseY = lastY = y;\n initialZoom = camera.zoom;\n },\n dragged: (x, y) => {\n let deltaX = x - mouseX;\n let deltaY = y - mouseY;\n let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight);\n let deltaWorld = camera.screenToWorld(new Vector3(deltaX, deltaY), canvas.clientWidth, canvas.clientHeight).sub(originWorld);\n camera.position.set(cameraX - deltaWorld.x, cameraY - deltaWorld.y, 0);\n camera.update();\n lastX = x;\n lastY = y;\n },\n wheel: (delta) => {\n let zoomAmount = delta / 200 * camera.zoom;\n let newZoom = camera.zoom + zoomAmount;\n if (newZoom > 0) {\n let x = 0, y = 0;\n if (delta < 0) {\n x = lastX;\n y = lastY;\n } else {\n let viewCenter = new Vector3(canvas.clientWidth / 2 + 15, canvas.clientHeight / 2);\n let mouseToCenterX = lastX - viewCenter.x;\n let mouseToCenterY = canvas.clientHeight - 1 - lastY - viewCenter.y;\n x = viewCenter.x - mouseToCenterX;\n y = canvas.clientHeight - 1 - viewCenter.y + mouseToCenterY;\n }\n let oldDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\n camera.zoom = newZoom;\n camera.update();\n let newDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\n camera.position.add(oldDistance.sub(newDistance));\n camera.update();\n }\n },\n zoom: (initialDistance, distance) => {\n let newZoom = initialDistance / distance;\n camera.zoom = initialZoom * newZoom;\n },\n up: (x, y) => {\n lastX = x;\n lastY = y;\n },\n moved: (x, y) => {\n lastX = x;\n lastY = y;\n }\n });\n }\n };\n\n // spine-webgl/src/Shader.ts\n var _Shader = class {\n constructor(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 ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.context.addRestorable(this);\n this.compile();\n }\n getProgram() {\n return this.program;\n }\n getVertexShader() {\n return this.vertexShader;\n }\n getFragmentShader() {\n return this.fragmentShader;\n }\n getVertexShaderSource() {\n return this.vsSource;\n }\n getFragmentSource() {\n return this.fsSource;\n }\n compile() {\n let gl = this.context.gl;\n try {\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\n if (!this.vs)\n throw new Error(\"Couldn't compile vertex shader.\");\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\n if (!this.fs)\n throw new Error(\"Couldn#t compile fragment shader.\");\n this.program = this.compileProgram(this.vs, this.fs);\n } catch (e) {\n this.dispose();\n throw e;\n }\n }\n compileShader(type, source) {\n let gl = this.context.gl;\n let shader = gl.createShader(type);\n if (!shader)\n throw new Error(\"Couldn't create shader.\");\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n let 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 compileProgram(vs, fs) {\n let gl = this.context.gl;\n let program = gl.createProgram();\n if (!program)\n throw new Error(\"Couldn't compile program.\");\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n let 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 restore() {\n this.compile();\n }\n bind() {\n this.context.gl.useProgram(this.program);\n }\n unbind() {\n this.context.gl.useProgram(null);\n }\n setUniformi(uniform, value) {\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\n }\n setUniformf(uniform, value) {\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\n }\n setUniform2f(uniform, value, value2) {\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\n }\n setUniform3f(uniform, value, value2, value3) {\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\n }\n setUniform4f(uniform, value, value2, value3, value4) {\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\n }\n setUniform2x2f(uniform, value) {\n let gl = this.context.gl;\n this.tmp2x2.set(value);\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\n }\n setUniform3x3f(uniform, value) {\n let gl = this.context.gl;\n this.tmp3x3.set(value);\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\n }\n setUniform4x4f(uniform, value) {\n let gl = this.context.gl;\n this.tmp4x4.set(value);\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\n }\n getUniformLocation(uniform) {\n let gl = this.context.gl;\n if (!this.program)\n throw new Error(\"Shader not compiled.\");\n let 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 getAttributeLocation(attribute) {\n let gl = this.context.gl;\n if (!this.program)\n throw new Error(\"Shader not compiled.\");\n let 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 dispose() {\n this.context.removeRestorable(this);\n let 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 static newColoredTextured(context) {\n let 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 let 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 static newTwoColoredTextured(context) {\n let 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 let 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 static newColored(context) {\n let 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 let 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 };\n var Shader = _Shader;\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\n // spine-webgl/src/Mesh.ts\n var Mesh = class {\n constructor(context, attributes, maxVertices, maxIndices) {\n this.attributes = attributes;\n this.verticesBuffer = null;\n this.verticesLength = 0;\n this.dirtyVertices = false;\n this.indicesBuffer = null;\n this.indicesLength = 0;\n this.dirtyIndices = false;\n this.elementsPerVertex = 0;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.elementsPerVertex = 0;\n for (let 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 getAttributes() {\n return this.attributes;\n }\n maxVertices() {\n return this.vertices.length / this.elementsPerVertex;\n }\n numVertices() {\n return this.verticesLength / this.elementsPerVertex;\n }\n setVerticesLength(length) {\n this.dirtyVertices = true;\n this.verticesLength = length;\n }\n getVertices() {\n return this.vertices;\n }\n maxIndices() {\n return this.indices.length;\n }\n numIndices() {\n return this.indicesLength;\n }\n setIndicesLength(length) {\n this.dirtyIndices = true;\n this.indicesLength = length;\n }\n getIndices() {\n return this.indices;\n }\n getVertexSizeInFloats() {\n let size = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n let attribute = this.attributes[i];\n size += attribute.numElements;\n }\n return size;\n }\n setVertices(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 setIndices(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 draw(shader, primitiveType) {\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\n }\n drawWithOffset(shader, primitiveType, offset, count) {\n let 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 } else {\n gl.drawArrays(primitiveType, offset, count);\n }\n this.unbind(shader);\n }\n bind(shader) {\n let gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n let offset = 0;\n for (let i = 0; i < this.attributes.length; i++) {\n let attrib = this.attributes[i];\n let location = shader.getAttributeLocation(attrib.name);\n gl.enableVertexAttribArray(location);\n gl.vertexAttribPointer(location, 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 unbind(shader) {\n let gl = this.context.gl;\n for (let i = 0; i < this.attributes.length; i++) {\n let attrib = this.attributes[i];\n let location = shader.getAttributeLocation(attrib.name);\n gl.disableVertexAttribArray(location);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n }\n update() {\n let 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 restore() {\n this.verticesBuffer = null;\n this.indicesBuffer = null;\n this.update();\n }\n dispose() {\n this.context.removeRestorable(this);\n let gl = this.context.gl;\n gl.deleteBuffer(this.verticesBuffer);\n gl.deleteBuffer(this.indicesBuffer);\n }\n };\n var VertexAttribute = class {\n constructor(name, type, numElements) {\n this.name = name;\n this.type = type;\n this.numElements = numElements;\n }\n };\n var Position2Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.POSITION, VertexAttributeType.Float, 2);\n }\n };\n var Position3Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.POSITION, VertexAttributeType.Float, 3);\n }\n };\n var TexCoordAttribute = class extends VertexAttribute {\n constructor(unit = 0) {\n super(Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2);\n }\n };\n var ColorAttribute = class extends VertexAttribute {\n constructor() {\n super(Shader.COLOR, VertexAttributeType.Float, 4);\n }\n };\n var Color2Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.COLOR2, VertexAttributeType.Float, 4);\n }\n };\n var VertexAttributeType = /* @__PURE__ */ ((VertexAttributeType2) => {\n VertexAttributeType2[VertexAttributeType2[\"Float\"] = 0] = \"Float\";\n return VertexAttributeType2;\n })(VertexAttributeType || {});\n\n // spine-webgl/src/PolygonBatcher.ts\n var _PolygonBatcher = class {\n constructor(context, twoColorTint = true, maxVertices = 10920) {\n this.drawCalls = 0;\n this.isDrawing = false;\n this.shader = null;\n this.lastTexture = null;\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.cullWasEnabled = false;\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n let attributes = twoColorTint ? [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute(), new Color2Attribute()] : [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute()];\n this.mesh = new Mesh(context, attributes, maxVertices, maxVertices * 3);\n let gl = this.context.gl;\n this.srcColorBlend = gl.SRC_ALPHA;\n this.srcAlphaBlend = gl.ONE;\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\n }\n begin(shader) {\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 let gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\n this.cullWasEnabled = gl.isEnabled(gl.CULL_FACE);\n if (this.cullWasEnabled)\n gl.disable(gl.CULL_FACE);\n }\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\n if (this.srcColorBlend == srcColorBlend && this.srcAlphaBlend == srcAlphaBlend && this.dstBlend == dstBlend)\n return;\n this.srcColorBlend = srcColorBlend;\n this.srcAlphaBlend = srcAlphaBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n let gl = this.context.gl;\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\n }\n }\n draw(texture, vertices, indices) {\n if (texture != this.lastTexture) {\n this.flush();\n this.lastTexture = texture;\n } else if (this.verticesLength + vertices.length > this.mesh.getVertices().length || this.indicesLength + indices.length > this.mesh.getIndices().length) {\n this.flush();\n }\n let indexStart = this.mesh.numVertices();\n this.mesh.getVertices().set(vertices, this.verticesLength);\n this.verticesLength += vertices.length;\n this.mesh.setVerticesLength(this.verticesLength);\n let indicesArray = this.mesh.getIndices();\n for (let 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 flush() {\n if (this.verticesLength == 0)\n return;\n if (!this.lastTexture)\n throw new Error(\"No texture set.\");\n if (!this.shader)\n throw new Error(\"No shader set.\");\n this.lastTexture.bind();\n this.mesh.draw(this.shader, this.context.gl.TRIANGLES);\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.mesh.setVerticesLength(0);\n this.mesh.setIndicesLength(0);\n this.drawCalls++;\n _PolygonBatcher.globalDrawCalls++;\n }\n end() {\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 let gl = this.context.gl;\n gl.disable(gl.BLEND);\n if (this.cullWasEnabled)\n gl.enable(gl.CULL_FACE);\n }\n getDrawCalls() {\n return this.drawCalls;\n }\n static getAndResetGlobalDrawCalls() {\n let result = _PolygonBatcher.globalDrawCalls;\n _PolygonBatcher.globalDrawCalls = 0;\n return result;\n }\n dispose() {\n this.mesh.dispose();\n }\n };\n var PolygonBatcher = _PolygonBatcher;\n PolygonBatcher.globalDrawCalls = 0;\n\n // spine-webgl/src/ShapeRenderer.ts\n var ShapeRenderer = class {\n constructor(context, maxVertices = 10920) {\n this.isDrawing = false;\n this.shapeType = ShapeType.Filled;\n this.color = new Color(1, 1, 1, 1);\n this.shader = null;\n this.vertexIndex = 0;\n this.tmp = new Vector2();\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.mesh = new Mesh(context, [new Position2Attribute(), new ColorAttribute()], maxVertices, 0);\n let gl = this.context.gl;\n this.srcColorBlend = gl.SRC_ALPHA;\n this.srcAlphaBlend = gl.ONE;\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\n }\n begin(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 let gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\n }\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\n this.srcColorBlend = srcColorBlend;\n this.srcAlphaBlend = srcAlphaBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n let gl = this.context.gl;\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\n }\n }\n setColor(color) {\n this.color.setFromColor(color);\n }\n setColorWith(r, g, b, a) {\n this.color.set(r, g, b, a);\n }\n point(x, y, color) {\n this.check(ShapeType.Point, 1);\n if (!color)\n color = this.color;\n this.vertex(x, y, color);\n }\n line(x, y, x2, y2, color) {\n this.check(ShapeType.Line, 2);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n this.vertex(x, y, color);\n this.vertex(x2, y2, color);\n }\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n if (!color2)\n color2 = this.color;\n if (!color3)\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 } 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 quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n if (!color2)\n color2 = this.color;\n if (!color3)\n color3 = this.color;\n if (!color4)\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 } 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 rect(filled, x, y, width, height, color) {\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\n }\n rectLine(filled, x1, y1, x2, y2, width, color) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\n if (!color)\n color = this.color;\n let t = this.tmp.set(y2 - y1, x1 - x2);\n t.normalize();\n width *= 0.5;\n let tx = t.x * width;\n let 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 } 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 x(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 polygon(polygonVertices, offset, count, color) {\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)\n color = this.color;\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n offset <<= 1;\n count <<= 1;\n let firstX = polygonVertices[offset];\n let firstY = polygonVertices[offset + 1];\n let last = offset + count;\n for (let i = offset, n = offset + count - 2; i < n; i += 2) {\n let x1 = polygonVertices[i];\n let y1 = polygonVertices[i + 1];\n let x2 = 0;\n let y2 = 0;\n if (i + 2 >= last) {\n x2 = firstX;\n y2 = firstY;\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 circle(filled, x, y, radius, color, segments = 0) {\n if (segments == 0)\n segments = Math.max(1, 6 * MathUtils.cbrt(radius) | 0);\n if (segments <= 0)\n throw new Error(\"segments must be > 0.\");\n if (!color)\n color = this.color;\n let angle = 2 * MathUtils.PI / segments;\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n let cx = radius, cy = 0;\n if (!filled) {\n this.check(ShapeType.Line, segments * 2 + 2);\n for (let i = 0; i < segments; i++) {\n this.vertex(x + cx, y + cy, color);\n let temp2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp2 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x + cx, y + cy, color);\n } else {\n this.check(ShapeType.Filled, segments * 3 + 3);\n segments--;\n for (let i = 0; i < segments; i++) {\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n let temp2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp2 + 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 let temp = cx;\n cx = radius;\n cy = 0;\n this.vertex(x + cx, y + cy, color);\n }\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n this.check(ShapeType.Line, segments * 2 + 2);\n if (!color)\n color = this.color;\n let subdiv_step = 1 / segments;\n let subdiv_step2 = subdiv_step * subdiv_step;\n let subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\n let pre1 = 3 * subdiv_step;\n let pre2 = 3 * subdiv_step2;\n let pre4 = 6 * subdiv_step2;\n let pre5 = 6 * subdiv_step3;\n let tmp1x = x1 - cx1 * 2 + cx2;\n let tmp1y = y1 - cy1 * 2 + cy2;\n let tmp2x = (cx1 - cx2) * 3 - x1 + x2;\n let tmp2y = (cy1 - cy2) * 3 - y1 + y2;\n let fx = x1;\n let fy = y1;\n let dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\n let dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\n let ddfx = tmp1x * pre4 + tmp2x * pre5;\n let ddfy = tmp1y * pre4 + tmp2y * pre5;\n let dddfx = tmp2x * pre5;\n let 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 vertex(x, y, color) {\n let idx = this.vertexIndex;\n let 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 end() {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n this.flush();\n let gl = this.context.gl;\n gl.disable(gl.BLEND);\n this.isDrawing = false;\n }\n flush() {\n if (this.vertexIndex == 0)\n return;\n if (!this.shader)\n throw new Error(\"No shader set.\");\n this.mesh.setVerticesLength(this.vertexIndex);\n this.mesh.draw(this.shader, this.shapeType);\n this.vertexIndex = 0;\n }\n check(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 } else {\n this.flush();\n this.shapeType = shapeType;\n }\n }\n dispose() {\n this.mesh.dispose();\n }\n };\n var ShapeType = /* @__PURE__ */ ((ShapeType2) => {\n ShapeType2[ShapeType2[\"Point\"] = 0] = \"Point\";\n ShapeType2[ShapeType2[\"Line\"] = 1] = \"Line\";\n ShapeType2[ShapeType2[\"Filled\"] = 4] = \"Filled\";\n return ShapeType2;\n })(ShapeType || {});\n\n // spine-webgl/src/SkeletonDebugRenderer.ts\n var _SkeletonDebugRenderer = class {\n constructor(context) {\n this.boneLineColor = new Color(1, 0, 0, 1);\n this.boneOriginColor = new Color(0, 1, 0, 1);\n this.attachmentLineColor = new Color(0, 0, 1, 0.5);\n this.triangleLineColor = new Color(1, 0.64, 0, 0.5);\n this.pathColor = new Color().setFromString(\"FF7F00\");\n this.clipColor = new Color(0.8, 0, 0, 2);\n this.aabbColor = new 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 SkeletonBounds();\n this.temp = new Array();\n this.vertices = Utils.newFloatArray(2 * 1024);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n }\n draw(shapes, skeleton, ignoredBones) {\n let skeletonX = skeleton.x;\n let skeletonY = skeleton.y;\n let gl = this.context.gl;\n let srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\n shapes.setBlendMode(srcFunc, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n let bones = skeleton.bones;\n if (this.drawBones) {\n shapes.setColor(this.boneLineColor);\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n if (!bone.parent)\n continue;\n let x = bone.data.length * bone.a + bone.worldX;\n let y = bone.data.length * bone.c + bone.worldY;\n shapes.rectLine(true, bone.worldX, 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 let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n let regionAttachment = attachment;\n let vertices = this.vertices;\n regionAttachment.computeWorldVertices(slot, 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 let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof MeshAttachment))\n continue;\n let mesh = attachment;\n let vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\n let triangles = mesh.triangles;\n let hullLength = mesh.hullLength;\n if (this.drawMeshTriangles) {\n shapes.setColor(this.triangleLineColor);\n for (let ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n let v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\n shapes.triangle(\n false,\n vertices[v1],\n vertices[v1 + 1],\n vertices[v2],\n vertices[v2 + 1],\n vertices[v3],\n vertices[v3 + 1]\n );\n }\n }\n if (this.drawMeshHull && hullLength > 0) {\n shapes.setColor(this.attachmentLineColor);\n hullLength = (hullLength >> 1) * 2;\n let lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\n for (let ii = 0, nn = hullLength; ii < nn; ii += 2) {\n let 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 let 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 let polygons = bounds.polygons;\n let boxes = bounds.boundingBoxes;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n shapes.setColor(boxes[i].color);\n shapes.polygon(polygon, 0, polygon.length);\n }\n }\n if (this.drawPaths) {\n let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof PathAttachment))\n continue;\n let path = attachment;\n let nn = path.worldVerticesLength;\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\n let color = this.pathColor;\n let x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\n if (path.closed) {\n shapes.setColor(color);\n let 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 (let ii = 4; ii < nn; ii += 6) {\n let 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 (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n shapes.circle(true, bone.worldX, bone.worldY, 3 * this.scale, this.boneOriginColor, 8);\n }\n }\n if (this.drawClipping) {\n let slots = skeleton.slots;\n shapes.setColor(this.clipColor);\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof ClippingAttachment))\n continue;\n let clip = attachment;\n let nn = clip.worldVerticesLength;\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\n for (let i2 = 0, n2 = world.length; i2 < n2; i2 += 2) {\n let x = world[i2];\n let y = world[i2 + 1];\n let x2 = world[(i2 + 2) % world.length];\n let y2 = world[(i2 + 3) % world.length];\n shapes.line(x, y, x2, y2);\n }\n }\n }\n }\n dispose() {\n }\n };\n var SkeletonDebugRenderer = _SkeletonDebugRenderer;\n SkeletonDebugRenderer.LIGHT_GRAY = new Color(192 / 255, 192 / 255, 192 / 255, 1);\n SkeletonDebugRenderer.GREEN = new Color(0, 1, 0, 1);\n\n // spine-webgl/src/SkeletonRenderer.ts\n var Renderable = class {\n constructor(vertices, numVertices, numFloats) {\n this.vertices = vertices;\n this.numVertices = numVertices;\n this.numFloats = numFloats;\n }\n };\n var _SkeletonRenderer = class {\n constructor(context, twoColorTint = true) {\n this.premultipliedAlpha = false;\n this.tempColor = new Color();\n this.tempColor2 = new Color();\n this.vertexSize = 2 + 2 + 4;\n this.twoColorTint = false;\n this.renderable = new Renderable([], 0, 0);\n this.clipper = new SkeletonClipping();\n this.temp = new Vector2();\n this.temp2 = new Vector2();\n this.temp3 = new Color();\n this.temp4 = new Color();\n this.twoColorTint = twoColorTint;\n if (twoColorTint)\n this.vertexSize += 4;\n this.vertices = Utils.newFloatArray(this.vertexSize * 1024);\n }\n draw(batcher, skeleton, slotRangeStart = -1, slotRangeEnd = -1, transformer = null) {\n let clipper = this.clipper;\n let premultipliedAlpha = this.premultipliedAlpha;\n let twoColorTint = this.twoColorTint;\n let blendMode = null;\n let tempPos = this.temp;\n let tempUv = this.temp2;\n let tempLight = this.temp3;\n let tempDark = this.temp4;\n let renderable = this.renderable;\n let uvs;\n let triangles;\n let drawOrder = skeleton.drawOrder;\n let attachmentColor;\n let skeletonColor = skeleton.color;\n let vertexSize = twoColorTint ? 12 : 8;\n let inRange = false;\n if (slotRangeStart == -1)\n inRange = true;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\n let 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 let attachment = slot.getAttachment();\n let texture;\n if (attachment instanceof RegionAttachment) {\n let region = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = 4;\n renderable.numFloats = clippedVertexSize << 2;\n region.computeWorldVertices(slot, renderable.vertices, 0, clippedVertexSize);\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\n uvs = region.uvs;\n texture = region.region.renderObject.page.texture;\n attachmentColor = region.color;\n } else if (attachment instanceof MeshAttachment) {\n let 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 = 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.page.texture;\n uvs = mesh.uvs;\n attachmentColor = mesh.color;\n } else if (attachment instanceof ClippingAttachment) {\n let clip = attachment;\n clipper.clipStart(slot, clip);\n continue;\n } else {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (texture) {\n let slotColor = slot.color;\n let 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 let darkColor = this.tempColor2;\n if (!slot.darkColor)\n darkColor.set(0, 0, 0, 1);\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 } else {\n darkColor.setFromColor(slot.darkColor);\n }\n darkColor.a = premultipliedAlpha ? 1 : 0;\n }\n let slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n batcher.setBlendMode(\n WebGLBlendModeConverter.getSourceColorGLBlendMode(blendMode, premultipliedAlpha),\n WebGLBlendModeConverter.getSourceAlphaGLBlendMode(blendMode),\n WebGLBlendModeConverter.getDestGLBlendMode(blendMode)\n );\n }\n if (clipper.isClipping()) {\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\n let clippedVertices = new Float32Array(clipper.clippedVertices);\n let clippedTriangles = clipper.clippedTriangles;\n if (transformer)\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\n batcher.draw(texture, clippedVertices, clippedTriangles);\n } else {\n let verts = renderable.vertices;\n if (!twoColorTint) {\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; 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 } else {\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; 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 let view = renderable.vertices.subarray(0, renderable.numFloats);\n if (transformer)\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\n batcher.draw(texture, view, triangles);\n }\n }\n clipper.clipEndWithSlot(slot);\n }\n clipper.clipEnd();\n }\n };\n var SkeletonRenderer = _SkeletonRenderer;\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n\n // spine-webgl/src/SceneRenderer.ts\n var quad = [\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0\n ];\n var QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n var WHITE = new Color(1, 1, 1, 1);\n var SceneRenderer = class {\n constructor(canvas, context, twoColorTint = true) {\n this.twoColorTint = false;\n this.activeRenderer = null;\n this.canvas = canvas;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.twoColorTint = twoColorTint;\n this.camera = new OrthoCamera(canvas.width, canvas.height);\n this.batcherShader = twoColorTint ? Shader.newTwoColoredTextured(this.context) : Shader.newColoredTextured(this.context);\n this.batcher = new PolygonBatcher(this.context, twoColorTint);\n this.shapesShader = Shader.newColored(this.context);\n this.shapes = new ShapeRenderer(this.context);\n this.skeletonRenderer = new SkeletonRenderer(this.context, twoColorTint);\n this.skeletonDebugRenderer = new SkeletonDebugRenderer(this.context);\n }\n dispose() {\n this.batcher.dispose();\n this.batcherShader.dispose();\n this.shapes.dispose();\n this.shapesShader.dispose();\n this.skeletonDebugRenderer.dispose();\n }\n begin() {\n this.camera.update();\n this.enableRenderer(this.batcher);\n }\n drawSkeleton(skeleton, premultipliedAlpha = false, slotRangeStart = -1, slotRangeEnd = -1, transform = null) {\n this.enableRenderer(this.batcher);\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd, transform);\n }\n drawSkeletonDebug(skeleton, premultipliedAlpha = false, ignoredBones) {\n this.enableRenderer(this.shapes);\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\n }\n drawTexture(texture, x, y, width, height, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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, QUAD_TRIANGLES);\n }\n drawTextureUV(texture, x, y, width, height, u, v, u2, v2, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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, QUAD_TRIANGLES);\n }\n drawTextureRotated(texture, x, y, width, height, pivotX, pivotY, angle, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\n let worldOriginX = x + pivotX;\n let worldOriginY = y + pivotY;\n let fx = -pivotX;\n let fy = -pivotY;\n let fx2 = width - pivotX;\n let fy2 = height - pivotY;\n let p1x = fx;\n let p1y = fy;\n let p2x = fx;\n let p2y = fy2;\n let p3x = fx2;\n let p3y = fy2;\n let p4x = fx2;\n let p4y = fy;\n let x1 = 0;\n let y1 = 0;\n let x2 = 0;\n let y2 = 0;\n let x3 = 0;\n let y3 = 0;\n let x4 = 0;\n let y4 = 0;\n if (angle != 0) {\n let cos = MathUtils.cosDeg(angle);\n let sin = 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 } 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, QUAD_TRIANGLES);\n }\n drawRegion(region, x, y, width, height, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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.page.texture, quad, QUAD_TRIANGLES);\n }\n line(x, y, x2, y2, color, color2) {\n this.enableRenderer(this.shapes);\n this.shapes.line(x, y, x2, y2, color);\n }\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n this.enableRenderer(this.shapes);\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\n }\n quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n this.enableRenderer(this.shapes);\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\n }\n rect(filled, x, y, width, height, color) {\n this.enableRenderer(this.shapes);\n this.shapes.rect(filled, x, y, width, height, color);\n }\n rectLine(filled, x1, y1, x2, y2, width, color) {\n this.enableRenderer(this.shapes);\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\n }\n polygon(polygonVertices, offset, count, color) {\n this.enableRenderer(this.shapes);\n this.shapes.polygon(polygonVertices, offset, count, color);\n }\n circle(filled, x, y, radius, color, segments = 0) {\n this.enableRenderer(this.shapes);\n this.shapes.circle(filled, x, y, radius, color, segments);\n }\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n this.enableRenderer(this.shapes);\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\n }\n end() {\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 resize(resizeMode) {\n let canvas = this.canvas;\n var dpr = window.devicePixelRatio || 1;\n var w = Math.round(canvas.clientWidth * dpr);\n var h = Math.round(canvas.clientHeight * dpr);\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.Expand)\n this.camera.setViewport(w, h);\n else if (resizeMode === ResizeMode.Fit) {\n let sourceWidth = canvas.width, sourceHeight = canvas.height;\n let targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\n let targetRatio = targetHeight / targetWidth;\n let sourceRatio = sourceHeight / sourceWidth;\n let scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\n this.camera.setViewport(sourceWidth * scale, sourceHeight * scale);\n }\n this.camera.update();\n }\n enableRenderer(renderer) {\n if (this.activeRenderer === renderer)\n return;\n this.end();\n if (renderer instanceof PolygonBatcher) {\n this.batcherShader.bind();\n this.batcherShader.setUniform4x4f(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 } else if (renderer instanceof ShapeRenderer) {\n this.shapesShader.bind();\n this.shapesShader.setUniform4x4f(Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.shapes.begin(this.shapesShader);\n this.activeRenderer = this.shapes;\n } else\n this.activeRenderer = this.skeletonDebugRenderer;\n }\n };\n var ResizeMode = /* @__PURE__ */ ((ResizeMode2) => {\n ResizeMode2[ResizeMode2[\"Stretch\"] = 0] = \"Stretch\";\n ResizeMode2[ResizeMode2[\"Expand\"] = 1] = \"Expand\";\n ResizeMode2[ResizeMode2[\"Fit\"] = 2] = \"Fit\";\n return ResizeMode2;\n })(ResizeMode || {});\n\n // spine-webgl/src/LoadingScreen.ts\n var spinnerImage;\n var logoImage;\n var loaded = 0;\n var FADE_IN = 1;\n var FADE_OUT = 1;\n var logoWidth = 165;\n var logoHeight = 108;\n var spinnerSize = 163;\n var LoadingScreen = class {\n constructor(renderer) {\n this.logo = null;\n this.spinner = null;\n this.angle = 0;\n this.fadeOut = 0;\n this.fadeIn = 0;\n this.timeKeeper = new TimeKeeper();\n this.backgroundColor = new Color(0.135, 0.135, 0.135, 1);\n this.tempColor = new Color();\n this.renderer = renderer;\n this.timeKeeper.maxDelta = 9;\n if (!logoImage) {\n let isSafari = navigator.userAgent.indexOf(\"Safari\") > -1;\n let onload = () => loaded++;\n logoImage = new Image();\n logoImage.src = SPINE_LOGO_DATA;\n if (!isSafari)\n logoImage.crossOrigin = \"anonymous\";\n logoImage.onload = onload;\n spinnerImage = new Image();\n spinnerImage.src = SPINNER_DATA;\n if (!isSafari)\n spinnerImage.crossOrigin = \"anonymous\";\n spinnerImage.onload = onload;\n }\n }\n dispose() {\n var _a, _b;\n (_a = this.logo) == null ? void 0 : _a.dispose();\n (_b = this.spinner) == null ? void 0 : _b.dispose();\n }\n draw(complete = false) {\n if (loaded < 2 || complete && this.fadeOut > FADE_OUT)\n return;\n this.timeKeeper.update();\n let a = Math.abs(Math.sin(this.timeKeeper.totalTime + 0.25));\n this.angle -= this.timeKeeper.delta * 200 * (1 + 1.5 * Math.pow(a, 5));\n let tempColor = this.tempColor;\n let renderer = this.renderer;\n let canvas = renderer.canvas;\n let gl = renderer.context.gl;\n renderer.resize(1 /* Expand */);\n renderer.camera.position.set(canvas.width / 2, canvas.height / 2, 0);\n renderer.batcher.setBlendMode(gl.ONE, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n if (complete) {\n this.fadeOut += this.timeKeeper.delta * (this.timeKeeper.totalTime < 1 ? 2 : 1);\n if (this.fadeOut > FADE_OUT)\n return;\n tempColor.setFromColor(this.backgroundColor);\n a = 1 - this.fadeOut / FADE_OUT;\n a = 1 - (a - 1) * (a - 1);\n tempColor.a *= a;\n if (tempColor.a > 0) {\n renderer.camera.zoom = 1;\n renderer.begin();\n renderer.quad(\n true,\n 0,\n 0,\n canvas.width,\n 0,\n canvas.width,\n canvas.height,\n 0,\n canvas.height,\n tempColor,\n tempColor,\n tempColor,\n tempColor\n );\n renderer.end();\n }\n } else {\n this.fadeIn += this.timeKeeper.delta;\n if (this.backgroundColor.a > 0) {\n gl.clearColor(this.backgroundColor.r, this.backgroundColor.g, this.backgroundColor.b, this.backgroundColor.a);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n a = 1;\n }\n a *= Math.min(this.fadeIn / FADE_IN, 1);\n tempColor.set(a, a, a, a);\n if (!this.logo) {\n this.logo = new GLTexture(renderer.context, logoImage);\n this.spinner = new GLTexture(renderer.context, spinnerImage);\n }\n renderer.camera.zoom = Math.max(1, spinnerSize / canvas.height);\n renderer.begin();\n renderer.drawTexture(this.logo, (canvas.width - logoWidth) / 2, (canvas.height - logoHeight) / 2, logoWidth, logoHeight, tempColor);\n if (this.spinner)\n renderer.drawTextureRotated(this.spinner, (canvas.width - spinnerSize) / 2, (canvas.height - spinnerSize) / 2, spinnerSize, spinnerSize, spinnerSize / 2, spinnerSize / 2, this.angle, tempColor);\n renderer.end();\n }\n };\n var SPINNER_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC\";\n var SPINE_LOGO_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=\";\n\n // spine-webgl/src/SpineCanvas.ts\n var SpineCanvas = class {\n constructor(canvas, config) {\n this.time = new TimeKeeper();\n if (!config.pathPrefix)\n config.pathPrefix = \"\";\n if (!config.app)\n config.app = {\n loadAssets: () => {\n },\n initialize: () => {\n },\n update: () => {\n },\n render: () => {\n },\n error: () => {\n }\n };\n if (config.webglConfig)\n config.webglConfig = { alpha: true };\n this.htmlCanvas = canvas;\n this.context = new ManagedWebGLRenderingContext(canvas, config.webglConfig);\n this.renderer = new SceneRenderer(canvas, this.context);\n this.gl = this.context.gl;\n this.assetManager = new AssetManager(this.context, config.pathPrefix);\n this.input = new Input(canvas);\n if (config.app.loadAssets)\n config.app.loadAssets(this);\n let loop = () => {\n requestAnimationFrame(loop);\n this.time.update();\n if (config.app.update)\n config.app.update(this, this.time.delta);\n if (config.app.render)\n config.app.render(this);\n };\n let waitForAssets = () => {\n if (this.assetManager.isLoadingComplete()) {\n if (this.assetManager.hasErrors()) {\n if (config.app.error)\n config.app.error(this, this.assetManager.getErrors());\n } else {\n if (config.app.initialize)\n config.app.initialize(this);\n loop();\n }\n return;\n }\n requestAnimationFrame(waitForAssets);\n };\n requestAnimationFrame(waitForAssets);\n }\n clear(r, g, b, a) {\n this.gl.clearColor(r, g, b, a);\n this.gl.clear(this.gl.COLOR_BUFFER_BIT);\n }\n };\n return __toCommonJS(src_exports);\n})();\n//# sourceMappingURL=spine-webgl.js.map\n\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/justintien/workspace/github/justintien/phaser/node_modules/eventemitter3/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/node_modules/process/browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/DataManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/data/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Audio.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Browser.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/CanvasFeatures.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Features.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Fullscreen.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Input.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/OS.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/Video.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/device/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/CanvasPool.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/canvas/Smoothing.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/BitmapMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/display/mask/GeometryMask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GameObjectFactory.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/GetCalcMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Crop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Depth.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/FX.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Flip.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Mask.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Origin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Size.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Texture.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Tint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Transform.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/Visible.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/components/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/Container.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/gameobjects/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Length.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Line.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/line/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/point/Point.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Contains.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/geom/rectangle/Union.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/File.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/FileTypesManager.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/GetURL.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/MultiFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRLoader.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/XHRSettings.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Average.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Bernstein.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CatmullRom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/CeilTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Clamp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/DegToRad.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Difference.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Euler.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Factorial.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloatBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FloorTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/FromPercent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/GetSpeed.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEven.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/IsEvenStrict.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/LinearXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Matrix4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MaxAdd.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Median.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/MinSub.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Percent.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Quaternion.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RadToDeg.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZ.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RandomXYZW.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Rotate.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAround.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateAroundDistance.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RotateVec3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/RoundTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmoothStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/SmootherStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/ToXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/TransformXY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector2.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector3.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Vector4.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Within.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Between.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/BetweenY.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Normalize.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Random.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Reverse.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/RotateTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/Wrap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/angle/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistancePower.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/distance/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/back/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/bounce/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/circular/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/cubic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/elastic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/expo/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/Linear.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/linear/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quadratic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quartic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/quintic/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/In.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/InOut.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/Out.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/sine/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/easing/stepped/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Equal.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/Floor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/fuzzy/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/interpolation/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/pow2/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapCeil.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapFloor.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/SnapTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/math/snap/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/BasePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/PluginCache.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/plugins/ScenePlugin.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/BlendModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/renderer/ScaleModes.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/scene/events/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/textures/Frame.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/tweens/tween/const.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/Class.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/NOOP.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Add.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/AddAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/BringToTop.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Each.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/EachInRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Flatten.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetFirst.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/GetRandom.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveAbove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveBelow.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveDown.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveTo.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/MoveUp.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArray.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/QuickSelect.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Range.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Remove.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveAt.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Replace.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SafeRange.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SendToBack.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SetAll.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Shuffle.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SortByDigits.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/SpliceOne.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/StableSort.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/Swap.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TranslateMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/array/matrix/index.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/DeepCopy.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/Extend.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetFastValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/GetValue.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/justintien/workspace/github/justintien/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.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/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-webgl.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;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C,gBAAgB,mBAAO,CAAC,kEAAuB;;AAE/C;AACA;AACA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzIA;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;;;;;;;;;;;ACrsBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO,sGAAsG;AAC3H;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,2BAA2B;;AAE9E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,2BAA2B;;AAEtE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uDAAuD,2BAA2B;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,mBAAmB,4IAA4I,EAAE,EAAE;;AAEpN;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,iDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,GAAG,uBAAuB,OAAO;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,qDAAqD;AACrD;AACA;AACA;;AAEA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AACvC,cAAc,6BAA6B;AAC3C;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;;AAE9C;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;AAC/C,uCAAuC,2BAA2B;AAClE,uCAAuC,oBAAoB;;AAE3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,uCAAuC,2BAA2B;;AAElE;AACA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,qDAAqD;AACpG;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,eAAe,+DAA+D;AAC9E;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,eAAe,8BAA8B;AAC7C,eAAe,mCAAmC;AAClD;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;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,WAAW,+DAA+D;AAC1E,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3OA;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;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;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACzTA;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;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;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;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;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,gBAAgB;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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,iBAAiB,IAAI;AACrB,oBAAoB,WAAW;AAC/B;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;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA,eAAe,0DAA0D;AACzE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,0CAA0C;;AAElF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;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,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACp4BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;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,kBAAkB;AAClB;AACA;AACA;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kFAAkF;AACnG;AACA,eAAe,kFAAkF;AACjG;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,4FAA8B;;AAE5D;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChEA;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,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;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;AACA,eAAe,kCAAkC;AACjD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrHA;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;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAiD;AAChE;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/FA;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;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,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,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,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;AACA;AACA,iBAAiB,8BAA8B;AAC/C,iBAAiB,+BAA+B;AAChD,oBAAoB,WAAW;AAC/B;AACA,eAAe,+DAA+D;AAC9E,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iCAAiC;AAChD,eAAe,sCAAsC;AACrD;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,iBAAiB,4BAA4B;AAC7C,iBAAiB,yBAAyB;AAC1C,oBAAoB,MAAM;AAC1B;AACA,eAAe,qDAAqD;AACpE;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;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;;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;;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,gBAAgB,mBAAO,CAAC,0EAA6B;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,sIAAsI;AACrJ,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iEAAiE;AAChF;AACA,gBAAgB,kGAAkG;AAClH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E,sCAAsC,mBAAmB;;AAEzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,0CAA0C,QAAQ;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;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;;AAEA;AACA;AACA;AACA;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;;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4DAAsB;;AAE1C;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,gBAAgB;AAC/B;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,sCAAsC;AACrD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;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;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;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;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;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,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACtOA;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;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,eAAe,4FAA4F;AAC3G;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;AACxD,qCAAqC,mBAAmB;;AAExD;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;;;;;;;;;;;;ACvmBA;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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;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,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;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;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;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;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtjCA;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,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;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,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;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;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;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;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;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;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;AACA,eAAe,8DAA8D;AAC7E,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,IAAI;AACxB;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,QAAQ;AAC5B;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,OAAO;AACtB,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,OAAO;AACtB,eAAe,OAAO;AACtB,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,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,iBAAiB,8BAA8B;AAC/C,oBAAoB,EAAE;AACtB;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,OAAO;AACtB,eAAe,OAAO;AACtB;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;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACp7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;;AAEA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;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;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACpBA;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,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;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,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,OAAO;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,OAAO;AACtB,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,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;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;;;;;;;;;;;;AC5CA;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,OAAO;AACtB,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;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,SAAS;;AAET;;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;AACA;;AAEA;;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;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;;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;;;;;;;;;;;;ACjjBA;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;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;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;;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,uBAAuB;AAC9C;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;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3SA;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,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;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;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;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;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACrBA;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;AAC9D,aAAa,mBAAO,CAAC,gDAAW;;AAEhC;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;;AAEA;;AAEA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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;;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;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;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;;;;;;;;;;;;AC9VA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;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;;;;;;;;;;;;ACxOA;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;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;;;;;;;;;;;;AC5KA;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,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,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,OAAO;AAClB;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,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;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;;AAElC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,4BAA4B;;AAE9D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,qBAAqB;AACvD,mCAAmC,gBAAgB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;;;;;;;;;;;;ACpRA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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;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,0BAA0B,OAAO;;AAEjC;AACA;;AAEA;;;;;;;;;;;;AC3BA;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,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;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,KAAK;AACrB;AACA;AACA;AACA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;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,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;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;;AAEA;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,gBAAgB,KAAK;AACrB;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,eAAe,oBAAoB;AACnC;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;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;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;AACA;AACA;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;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,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;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,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;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,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;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,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1vDA;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,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,cAAc,EAAE;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;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,WAAW,mBAAO,CAAC,iDAAe;AAClC,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;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,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;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,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,mCAAmC,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;;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;AACA;AACA;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;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,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;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;AACA;AACA;;AAEA;AACA;AACA;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;;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;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,kBAAkB;AACjC,eAAe,QAAQ;AACvB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,8BAA8B;AAC7C;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;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;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,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;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,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;;;;;;;;;;;AClxBA;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,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;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;;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;;AAEA;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,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;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,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;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;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;;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,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;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,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;;;;;;;;;;;;AC/gCA;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;;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;;AAEA;;;;;;;;;;;;ACthBA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACxCA;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;;;;;;;;;;;;ACrBA;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;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;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;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;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,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;;;;;;;;;;;;ACrFA;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,OAAO;AACnB;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,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA,+BAA+B,gBAAgB;;AAE/C,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,2CAA2C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1MA;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,WAAW,OAAO;AAClB;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;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;;;;;;;;;;;;ACvIA;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;;AAEA;;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,uCAAuC,6CAA6C;AACpF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACnBA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC9BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC/BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClCA;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,UAAU;AACV;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,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;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,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;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;;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;;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;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,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;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;;AAErC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;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,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;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,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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;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,cAAc;AACd;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,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,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC1NA;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;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;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;;;;;;;;;;;;ACzPA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;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,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,+BAA+B,aAAa;;AAE5C,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB;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,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;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,OAAO;AAClB;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,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,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;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB,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,OAAO;AAClB,WAAW,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;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,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;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;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAc;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtLA;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,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AClDA;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,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;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;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,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;;;;;;;;;;;;ACxFA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;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,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;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,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;;AAE1C;AACA;AACA;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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,0BAA0B,OAAO;AACjC,0BAA0B,OAAO;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClFA;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,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;;;;;;;;;;;;ACvDA;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,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACvBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1CA;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;AACA;AACA;AACA;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,EAAE;AACb,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;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,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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;;AAEA;;;;;;;;;;;;AC/GA;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,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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;AACA;AACA;;AAEA;AACA;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;;;;;;;;;;;;AC7PA;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,kBAAkB,mBAAO,CAAC,8CAAa;AACvC,iBAAiB,mBAAO,CAAC,6CAAY;AACrC;AACA;AACA;AACA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB;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;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;AACA;;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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,eAAe,OAAO,yDAAyD;AAC/E,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;;AAEA;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,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;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,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;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;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;;;;;;;;;;;;AC/tCA;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;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;;;;;;;;;;;;AC/FA;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,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvHA;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;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,eAAe,8BAA8B;AAC7C,eAAe,eAAe;AAC9B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,QAAQ;AACvB,eAAe,OAAO;AACtB;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,iCAAiC,cAAc;AAC/C,kCAAkC,WAAW;;AAE7C;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;;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,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,8BAA8B;AACzC,WAAW,8CAA8C;AACzD,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1IA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA,sDAAsD,iBAAiB,cAAc;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;AAC7E;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;AACjD;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA,GAAG,oBAAoB;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,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,OAAO;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,6BAA6B,iBAAiB;AAC9C;AACA,aAAa;AACb;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA,eAAe;AACf,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA,WAAW;AACX,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,aAAa;AACb,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;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,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,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;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,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;AACpB;AACA;AACA;AACA;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;AACA;AACA;AACA;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;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;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;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,EAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,qBAAqB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,wDAAwD,KAAK,WAAW,OAAO,IAAI,aAAa;AAChG,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,sDAAsD,KAAK,WAAW,OAAO,IAAI,aAAa;AAC9F,OAAO;AACP;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA,SAAS;AACT,iDAAiD,yDAAyD;AAC1G,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,yEAAyE,KAAK,eAAe,UAAU;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,KAAK,IAAI,UAAU;AACrF;AACA,OAAO;AACP,+DAA+D,KAAK,WAAW,OAAO,IAAI,aAAa;AACvG,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,8CAA8C,iBAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oBAAoB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,mBAAmB;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;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,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,iBAAiB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc,EAAE;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,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,EAAE;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;;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;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;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,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,qBAAqB,eAAe;AACpC;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,qBAAqB,eAAe;AACpC;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;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,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;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,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;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;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;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;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;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;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,qBAAqB,2BAA2B;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;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,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA,kDAAkD,SAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO;AACP,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;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,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA,kDAAkD,SAAS;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA,uCAAuC,EAAE;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;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,EAAE;AACzF;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,kDAAkD,SAAS;AAC3D;AACA,sDAAsD,WAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,qBAAqB;AACrB,yCAAyC,SAAS;AAClD;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;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,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,6CAA6C,SAAS;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,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;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,OAAO;AAClD;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;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;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;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,QAAQ;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;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,8BAA8B,sBAAsB;AACpD;AACA;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,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,wBAAwB,0BAA0B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;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,8CAA8C,OAAO;AACrD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,OAAO;AACjF;AACA;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;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,kDAAkD,aAAa,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA,oDAAoD,wBAAwB,qBAAqB,mBAAmB;AACpH;AACA;AACA;AACA;AACA;AACA,yDAAyD,qBAAqB,qBAAqB,mBAAmB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,4BAA4B,mBAAmB;AAC5G;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,4BAA4B,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA;AACA;AACA,oDAAoD,SAAS,uBAAuB,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA,yDAAyD,WAAW,uBAAuB,mBAAmB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,4BAA4B,2BAA2B;AACvD;AACA;AACA;AACA,sDAAsD,SAAS,YAAY,aAAa;AACxF;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB;AACpD;AACA;AACA;AACA,+DAA+D,eAAe,YAAY,aAAa;AACvG;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA,sEAAsE,eAAe,YAAY,aAAa;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA;AACA,iEAAiE,eAAe,YAAY,aAAa;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,YAAY,aAAa;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB;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,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,EAAE;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;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,OAAO;AAChF;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sDAAsD,OAAO;AAC7D;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;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;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;AACA;;AAEA;AACA,iBAAiB;AACjB,qBAAqB;AACrB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB,gBAAgB;AAChB,qBAAqB;AACrB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,mBAAmB;AACnB;;AAEA;AACA,iBAAiB;AACjB,qBAAqB,mBAAmB,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,2BAA2B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oBAAoB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,uBAAuB,cAAc;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,iBAAiB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;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,SAAS;AACT;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;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,+DAA+D,QAAQ;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,+DAA+D,QAAQ;AACvE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,kBAAkB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,wCAAwC;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;;AAEA,CAAC","file":"SpineWebGLPluginDebug.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","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Global constants.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Phaser Release Version\n *\n * @name Phaser.VERSION\n * @const\n * @type {string}\n * @since 3.0.0\n */\n VERSION: '3.60.0-beta.18',\n\n BlendModes: require('./renderer/BlendModes'),\n\n ScaleModes: require('./renderer/ScaleModes'),\n\n /**\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\n *\n * @name Phaser.AUTO\n * @const\n * @type {number}\n * @since 3.0.0\n */\n AUTO: 0,\n\n /**\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\n * WebGL or not.\n *\n * @name Phaser.CANVAS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n CANVAS: 1,\n\n /**\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\n * message to the user.\n *\n * @name Phaser.WEBGL\n * @const\n * @type {number}\n * @since 3.0.0\n */\n WEBGL: 2,\n\n /**\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\n * not for running Phaser on the server, which is something you really shouldn't do.\n *\n * @name Phaser.HEADLESS\n * @const\n * @type {number}\n * @since 3.0.0\n */\n HEADLESS: 3,\n\n /**\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\n * to help you remember what the value is doing in your code.\n *\n * @name Phaser.FOREVER\n * @const\n * @type {number}\n * @since 3.0.0\n */\n FOREVER: -1,\n\n /**\n * Direction constant.\n *\n * @name Phaser.NONE\n * @const\n * @type {number}\n * @since 3.0.0\n */\n NONE: 4,\n\n /**\n * Direction constant.\n *\n * @name Phaser.UP\n * @const\n * @type {number}\n * @since 3.0.0\n */\n UP: 5,\n\n /**\n * Direction constant.\n *\n * @name Phaser.DOWN\n * @const\n * @type {number}\n * @since 3.0.0\n */\n DOWN: 6,\n\n /**\n * Direction constant.\n *\n * @name Phaser.LEFT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n LEFT: 7,\n\n /**\n * Direction constant.\n *\n * @name Phaser.RIGHT\n * @const\n * @type {number}\n * @since 3.0.0\n */\n RIGHT: 8\n\n};\n\nmodule.exports = CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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(Events.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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 {number}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @type {string}\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Data Manager Destroy Event.\n *\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\n *\n * @event Phaser.Data.Events#DESTROY\n * @type {string}\n * @since 3.50.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @type {string}\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 2013-2023 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.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @type {string}\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 2013-2023 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 DESTROY: require('./DESTROY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.audio` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Audio\n * @since 3.0.0\n *\n * @property {boolean} audioData - Can this device play HTML Audio tags?\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\n * @property {boolean} m4a - Can this device can play m4a files.\n * @property {boolean} aac - Can this device can play aac files.\n * @property {boolean} flac - Can this device can play flac files.\n * @property {boolean} mp3 - Can this device play mp3 files?\n * @property {boolean} ogg - Can this device play ogg files?\n * @property {boolean} opus - Can this device play opus files?\n * @property {boolean} wav - Can this device play wav files?\n * @property {boolean} webAudio - Does this device have the Web Audio API?\n * @property {boolean} webm - Can this device play webm files?\n */\nvar Audio = {\n\n flac: false,\n aac: false,\n audioData: false,\n dolby: false,\n m4a: false,\n mp3: false,\n ogg: false,\n opus: false,\n wav: false,\n webAudio: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Audio;\n }\n\n Audio.audioData = !!(window['Audio']);\n\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\n\n var audioElement = document.createElement('audio');\n var result = !!audioElement.canPlayType;\n\n try\n {\n if (result)\n {\n var CanPlay = function (type1, type2)\n {\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\n\n if (type2)\n {\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\n }\n else\n {\n return Boolean(canPlayType1);\n }\n };\n\n // wav Mimetypes accepted:\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\n\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\n Audio.mp3 = CanPlay('mpeg');\n Audio.wav = CanPlay('wav');\n Audio.m4a = CanPlay('x-m4a');\n Audio.aac = CanPlay('aac');\n Audio.flac = CanPlay('flac', 'x-flac');\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\n\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\n {\n if (Browser.edge)\n {\n Audio.dolby = true;\n }\n else if (Browser.safari && Browser.safariVersion >= 9)\n {\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\n {\n var major = parseInt(RegExp.$1, 10);\n var minor = parseInt(RegExp.$2, 10);\n\n if ((major === 10 && minor >= 11) || major > 10)\n {\n Audio.dolby = true;\n }\n }\n }\n }\n }\n }\n catch (e)\n {\n // Nothing to do here\n }\n\n return Audio;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\n\n/**\n * Determines the browser type and version running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.browser` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Browser\n * @since 3.0.0\n *\n * @property {boolean} chrome - Set to true if running in Chrome.\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\n * @property {boolean} firefox - Set to true if running in Firefox.\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\n * @property {boolean} opera - Set to true if running in Opera.\n * @property {boolean} safari - Set to true if running in Safari.\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\n */\nvar Browser = {\n\n chrome: false,\n chromeVersion: 0,\n edge: false,\n firefox: false,\n firefoxVersion: 0,\n ie: false,\n ieVersion: 0,\n mobileSafari: false,\n opera: false,\n safari: false,\n safariVersion: 0,\n silk: false,\n trident: false,\n tridentVersion: 0,\n es2019: false\n\n};\n\nfunction init ()\n{\n var ua = navigator.userAgent;\n\n if ((/Edg\\/\\d+/).test(ua))\n {\n Browser.edge = true;\n Browser.es2019 = true;\n }\n else if ((/OPR/).test(ua)) {\n Browser.opera = true;\n Browser.es2019 = true;\n }\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\n {\n Browser.chrome = true;\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.chromeVersion > 69);\n }\n else if ((/Firefox\\D+(\\d+)/).test(ua))\n {\n Browser.firefox = true;\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.firefoxVersion > 10);\n }\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\n {\n Browser.mobileSafari = true;\n }\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\n {\n Browser.ie = true;\n Browser.ieVersion = parseInt(RegExp.$1, 10);\n }\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\n {\n Browser.safari = true;\n Browser.safariVersion = parseInt(RegExp.$1, 10);\n Browser.es2019 = (Browser.safariVersion > 10);\n }\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\n {\n Browser.ie = true;\n Browser.trident = true;\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\n Browser.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if ((/Silk/).test(ua))\n {\n Browser.silk = true;\n }\n\n return Browser;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the canvas features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\n *\n * @typedef {object} Phaser.Device.CanvasFeatures\n * @since 3.0.0\n *\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\n */\nvar CanvasFeatures = {\n\n supportInverseAlpha: false,\n supportNewBlendModes: false\n\n};\n\nfunction checkBlendMode ()\n{\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n\n var magenta = new Image();\n\n magenta.onload = function ()\n {\n var yellow = new Image();\n\n yellow.onload = function ()\n {\n var canvas = CanvasPool.create2D(yellow, 6);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.globalCompositeOperation = 'multiply';\n\n context.drawImage(magenta, 0, 0);\n context.drawImage(yellow, 2, 0);\n\n if (!context.getImageData(2, 0, 1, 1))\n {\n return false;\n }\n\n var data = context.getImageData(2, 0, 1, 1).data;\n\n CanvasPool.remove(yellow);\n\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\n };\n\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\n };\n\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\n\n return false;\n}\n\nfunction checkInverseAlpha ()\n{\n var canvas = CanvasPool.create2D(this, 2);\n var context = canvas.getContext('2d', { willReadFrequently: true });\n\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\n\n // Draw a single pixel\n context.fillRect(0, 0, 1, 1);\n\n // Get the color values\n var s1 = context.getImageData(0, 0, 1, 1);\n\n if (s1 === null)\n {\n return false;\n }\n\n // Plot them to x2\n context.putImageData(s1, 1, 0);\n\n // Get those values\n var s2 = context.getImageData(1, 0, 1, 1);\n\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\n\n CanvasPool.remove(this);\n\n // Compare and return\n return result;\n}\n\nfunction init ()\n{\n if (typeof importScripts !== 'function' && document !== undefined)\n {\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\n }\n\n return CanvasFeatures;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar OS = require('./OS');\nvar Browser = require('./Browser');\nvar CanvasPool = require('../display/canvas/CanvasPool');\n\n/**\n * Determines the features of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.features` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Features\n * @since 3.0.0\n *\n * @property {boolean} canvas - Is canvas available?\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\n * @property {boolean} file - Is file available?\n * @property {boolean} fileSystem - Is fileSystem available?\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\n * @property {boolean} localStorage - Is localStorage available?\n * @property {boolean} pointerLock - Is Pointer Lock available?\n * @property {boolean} stableSort - Is Array.sort stable?\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\n * @property {boolean} vibration - Does the device support the Vibration API?\n * @property {boolean} webGL - Is webGL available?\n * @property {boolean} worker - Is worker available?\n */\nvar Features = {\n\n canvas: false,\n canvasBitBltShift: null,\n file: false,\n fileSystem: false,\n getUserMedia: true,\n littleEndian: false,\n localStorage: false,\n pointerLock: false,\n stableSort: false,\n support32bit: false,\n vibration: false,\n webGL: false,\n worker: false\n\n};\n\n// Check Little or Big Endian system.\n// @author Matt DesLauriers (@mattdesl)\nfunction checkIsLittleEndian ()\n{\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n\n b[0] = 0xa1;\n b[1] = 0xb2;\n b[2] = 0xc3;\n b[3] = 0xd4;\n\n if (c[0] === 0xd4c3b2a1)\n {\n return true;\n }\n\n if (c[0] === 0xa1b2c3d4)\n {\n return false;\n }\n else\n {\n // Could not determine endianness\n return null;\n }\n}\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Features;\n }\n\n Features.canvas = !!window['CanvasRenderingContext2D'];\n\n try\n {\n Features.localStorage = !!localStorage.getItem;\n }\n catch (error)\n {\n Features.localStorage = false;\n }\n\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\n Features.fileSystem = !!window['requestFileSystem'];\n\n var isUint8 = false;\n\n var testWebGL = function ()\n {\n if (window['WebGLRenderingContext'])\n {\n try\n {\n var canvas = CanvasPool.createWebGL(this);\n\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n\n var canvas2D = CanvasPool.create2D(this);\n\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\n\n // Can't be done on a webgl context\n var image = ctx2D.createImageData(1, 1);\n\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\n // @author Matt DesLauriers (@mattdesl)\n isUint8 = image.data instanceof Uint8ClampedArray;\n\n CanvasPool.remove(canvas);\n CanvasPool.remove(canvas2D);\n\n return !!ctx;\n }\n catch (e)\n {\n return false;\n }\n }\n\n return false;\n };\n\n Features.webGL = testWebGL();\n\n Features.worker = !!window['Worker'];\n\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\n\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\n\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\n if (Browser.firefox && Browser.firefoxVersion < 21)\n {\n Features.getUserMedia = false;\n }\n\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\n // is safer to not try and use the fast copy-over method.\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\n {\n Features.canvasBitBltShift = true;\n }\n\n // Known not to work\n if (Browser.safari || Browser.mobileSafari)\n {\n Features.canvasBitBltShift = false;\n }\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate)\n {\n Features.vibration = true;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\n {\n Features.littleEndian = checkIsLittleEndian();\n }\n\n Features.support32bit = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8ClampedArray !== 'undefined' &&\n typeof Int32Array !== 'undefined' &&\n Features.littleEndian !== null &&\n isUint8\n );\n\n return Features;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the full screen support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.fullscreen` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Fullscreen\n * @since 3.0.0\n *\n * @property {boolean} available - Does the browser support the Full Screen API?\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\n */\nvar Fullscreen = {\n\n available: false,\n cancel: '',\n keyboard: false,\n request: ''\n\n};\n\n/**\n* Checks for support of the Full Screen API.\n*\n* @ignore\n*/\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Fullscreen;\n }\n\n var i;\n\n var suffix1 = 'Fullscreen';\n var suffix2 = 'FullScreen';\n\n var fs = [\n 'request' + suffix1,\n 'request' + suffix2,\n 'webkitRequest' + suffix1,\n 'webkitRequest' + suffix2,\n 'msRequest' + suffix1,\n 'msRequest' + suffix2,\n 'mozRequest' + suffix2,\n 'mozRequest' + suffix1\n ];\n\n for (i = 0; i < fs.length; i++)\n {\n if (document.documentElement[fs[i]])\n {\n Fullscreen.available = true;\n Fullscreen.request = fs[i];\n break;\n }\n }\n\n var cfs = [\n 'cancel' + suffix2,\n 'exit' + suffix1,\n 'webkitCancel' + suffix2,\n 'webkitExit' + suffix1,\n 'msCancel' + suffix2,\n 'msExit' + suffix1,\n 'mozCancel' + suffix2,\n 'mozExit' + suffix1\n ];\n\n if (Fullscreen.available)\n {\n for (i = 0; i < cfs.length; i++)\n {\n if (document[cfs[i]])\n {\n Fullscreen.cancel = cfs[i];\n break;\n }\n }\n }\n\n // Keyboard Input?\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\n {\n Fullscreen.keyboard = true;\n }\n\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\n\n return Fullscreen;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Browser = require('./Browser');\n\n/**\n * Determines the input support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.input` from within any Scene.\n *\n * @typedef {object} Phaser.Device.Input\n * @since 3.0.0\n *\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\n * @property {boolean} gamepads - Is navigator.getGamepads available?\n * @property {boolean} mspointer - Is mspointer available?\n * @property {boolean} touch - Is touch available?\n */\nvar Input = {\n\n gamepads: false,\n mspointer: false,\n touch: false,\n wheelEvent: null\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Input;\n }\n\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\n {\n Input.touch = true;\n }\n\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\n {\n Input.mspointer = true;\n }\n\n if (navigator.getGamepads)\n {\n Input.gamepads = true;\n }\n\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\n {\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\n Input.wheelEvent = 'wheel';\n }\n else if ('onmousewheel' in window)\n {\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\n Input.wheelEvent = 'mousewheel';\n }\n else if (Browser.firefox && 'MouseScrollEvent' in window)\n {\n // FF prior to 17. This should probably be scrubbed.\n Input.wheelEvent = 'DOMMouseScroll';\n }\n\n return Input;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the operating system of the device running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.os` from within any Scene.\n *\n * @typedef {object} Phaser.Device.OS\n * @since 3.0.0\n *\n * @property {boolean} android - Is running on android?\n * @property {boolean} chromeOS - Is running on chromeOS?\n * @property {boolean} cordova - Is the game running under Apache Cordova?\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\n * @property {boolean} desktop - Is running on a desktop?\n * @property {boolean} ejecta - Is the game running under Ejecta?\n * @property {boolean} electron - Is the game running under GitHub Electron?\n * @property {boolean} iOS - Is running on iOS?\n * @property {boolean} iPad - Is running on iPad?\n * @property {boolean} iPhone - Is running on iPhone?\n * @property {boolean} kindle - Is running on an Amazon Kindle?\n * @property {boolean} linux - Is running on linux?\n * @property {boolean} macOS - Is running on macOS?\n * @property {boolean} node - Is the game running under Node.js?\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\n * @property {boolean} windows - Is running on windows?\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\n * @property {number} pixelRatio - PixelRatio of the host device?\n */\nvar OS = {\n\n android: false,\n chromeOS: false,\n cordova: false,\n crosswalk: false,\n desktop: false,\n ejecta: false,\n electron: false,\n iOS: false,\n iOSVersion: 0,\n iPad: false,\n iPhone: false,\n kindle: false,\n linux: false,\n macOS: false,\n node: false,\n nodeWebkit: false,\n pixelRatio: 1,\n webApp: false,\n windows: false,\n windowsPhone: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return OS;\n }\n\n var ua = navigator.userAgent;\n\n if ((/Windows/).test(ua))\n {\n OS.windows = true;\n }\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\n {\n // Because iOS 13 identifies as Mac OS:\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\n {\n OS.iOS = true;\n OS.iPad = true;\n\n (navigator.appVersion).match(/Version\\/(\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n }\n else\n {\n OS.macOS = true;\n }\n }\n else if ((/Android/).test(ua))\n {\n OS.android = true;\n }\n else if ((/Linux/).test(ua))\n {\n OS.linux = true;\n }\n else if ((/iP[ao]d|iPhone/i).test(ua))\n {\n OS.iOS = true;\n\n (navigator.appVersion).match(/OS (\\d+)/);\n\n OS.iOSVersion = parseInt(RegExp.$1, 10);\n\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\n }\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\n {\n OS.kindle = true;\n\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n }\n else if ((/CrOS/).test(ua))\n {\n OS.chromeOS = true;\n }\n\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\n {\n OS.android = false;\n OS.iOS = false;\n OS.macOS = false;\n OS.windows = true;\n OS.windowsPhone = true;\n }\n\n var silk = (/Silk/).test(ua);\n\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\n {\n OS.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\n {\n OS.desktop = false;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone)\n {\n OS.webApp = true;\n }\n\n if (typeof importScripts !== 'function')\n {\n if (window.cordova !== undefined)\n {\n OS.cordova = true;\n }\n\n if (window.ejecta !== undefined)\n {\n OS.ejecta = true;\n }\n }\n\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\n {\n OS.node = true;\n }\n\n if (OS.node && typeof process.versions === 'object')\n {\n OS.nodeWebkit = !!process.versions['node-webkit'];\n\n OS.electron = !!process.versions.electron;\n }\n\n if ((/Crosswalk/).test(ua))\n {\n OS.crosswalk = true;\n }\n\n OS.pixelRatio = window['devicePixelRatio'] || 1;\n\n return OS;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Determines the video support of the browser running this Phaser Game instance.\n * These values are read-only and populated during the boot sequence of the game.\n * They are then referenced by internal game systems and are available for you to access\n * via `this.sys.game.device.video` from within any Scene.\n *\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\n *\n * @typedef {object} Phaser.Device.Video\n * @since 3.0.0\n *\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\n * @property {boolean} hls - Can this device play hls video files?\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\n * @property {boolean} ogg - Can this device play ogg video files?\n * @property {boolean} vp9 - Can this device play vp9 video files?\n * @property {boolean} webm - Can this device play webm video files?\n */\nvar Video = {\n\n h264: false,\n hls: false,\n mp4: false,\n m4v: false,\n ogg: false,\n vp9: false,\n webm: false\n\n};\n\nfunction init ()\n{\n if (typeof importScripts === 'function')\n {\n return Video;\n }\n\n var videoElement = document.createElement('video');\n var result = !!videoElement.canPlayType;\n var no = /^no$/;\n\n try\n {\n if (result)\n {\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\n {\n Video.ogg = true;\n }\n\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\n Video.h264 = true;\n Video.mp4 = true;\n }\n\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\n {\n Video.m4v = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\n {\n Video.webm = true;\n }\n\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\n {\n Video.vp9 = true;\n }\n\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\n {\n Video.hls = true;\n }\n }\n }\n catch (e)\n {\n // Nothing to do\n }\n\n return Video;\n}\n\nmodule.exports = init();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// This singleton is instantiated as soon as Phaser loads,\n// before a Phaser.Game instance has even been created.\n// Which means all instances of Phaser Games can share it,\n// without having to re-poll the device all over again\n\n/**\n * @namespace Phaser.Device\n * @since 3.0.0\n */\n\n/**\n * @typedef {object} Phaser.DeviceConf\n *\n * @property {Phaser.Device.OS} os - The OS Device functions.\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\n * @property {Phaser.Device.Features} features - The Features Device functions.\n * @property {Phaser.Device.Input} input - The Input Device functions.\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\n * @property {Phaser.Device.Video} video - The Video Device functions.\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\n */\n\nmodule.exports = {\n\n os: require('./OS'),\n browser: require('./Browser'),\n features: require('./Features'),\n input: require('./Input'),\n audio: require('./Audio'),\n video: require('./Video'),\n fullscreen: require('./Fullscreen'),\n canvasFeatures: require('./CanvasFeatures')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../../const');\nvar Smoothing = require('./Smoothing');\n\n// The pool into which the canvas elements are placed.\nvar pool = [];\n\n// Automatically apply smoothing(false) to created Canvas elements\nvar _disableContextSmoothing = false;\n\n/**\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\n * which is useless for some of the Phaser pipelines / renderer.\n *\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\n * Which means all instances of Phaser Games on the same page can share the one single pool.\n *\n * @namespace Phaser.Display.Canvas.CanvasPool\n * @since 3.0.0\n */\nvar CanvasPool = function ()\n{\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\n *\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\n */\n var create = function (parent, width, height, canvasType, selfParent)\n {\n if (width === undefined) { width = 1; }\n if (height === undefined) { height = 1; }\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n if (selfParent === undefined) { selfParent = false; }\n\n var canvas;\n var container = first(canvasType);\n\n if (container === null)\n {\n container = {\n parent: parent,\n canvas: document.createElement('canvas'),\n type: canvasType\n };\n\n if (canvasType === CONST.CANVAS)\n {\n pool.push(container);\n }\n\n canvas = container.canvas;\n }\n else\n {\n container.parent = parent;\n\n canvas = container.canvas;\n }\n\n if (selfParent)\n {\n container.parent = canvas;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\n {\n Smoothing.disable(canvas.getContext('2d'));\n }\n\n return canvas;\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.create2D\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created canvas.\n */\n var create2D = function (parent, width, height)\n {\n return create(parent, width, height, CONST.CANVAS);\n };\n\n /**\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\n *\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\n * @since 3.0.0\n *\n * @param {*} parent - The parent of the Canvas object.\n * @param {number} [width=1] - The width of the Canvas.\n * @param {number} [height=1] - The height of the Canvas.\n *\n * @return {HTMLCanvasElement} The created WebGL canvas.\n */\n var createWebGL = function (parent, width, height)\n {\n return create(parent, width, height, CONST.WEBGL);\n };\n\n /**\n * Gets the first free canvas index from the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.first\n * @since 3.0.0\n *\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\n *\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\n */\n var first = function (canvasType)\n {\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\n\n if (canvasType === CONST.WEBGL)\n {\n return null;\n }\n\n for (var i = 0; i < pool.length; i++)\n {\n var container = pool[i];\n\n if (!container.parent && container.type === canvasType)\n {\n return container;\n }\n }\n\n return null;\n };\n\n /**\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\n * The canvas has its width and height set to 1, and its parent attribute nulled.\n *\n * @function Phaser.Display.Canvas.CanvasPool.remove\n * @since 3.0.0\n *\n * @param {*} parent - The canvas or the parent of the canvas to free.\n */\n var remove = function (parent)\n {\n // Check to see if the parent is a canvas object\n var isCanvas = parent instanceof HTMLCanvasElement;\n\n pool.forEach(function (container)\n {\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\n {\n container.parent = null;\n container.canvas.width = 1;\n container.canvas.height = 1;\n }\n });\n };\n\n /**\n * Gets the total number of used canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.total\n * @since 3.0.0\n *\n * @return {number} The number of used canvases.\n */\n var total = function ()\n {\n var c = 0;\n\n pool.forEach(function (container)\n {\n if (container.parent)\n {\n c++;\n }\n });\n\n return c;\n };\n\n /**\n * Gets the total number of free canvas elements in the pool.\n *\n * @function Phaser.Display.Canvas.CanvasPool.free\n * @since 3.0.0\n *\n * @return {number} The number of free canvases.\n */\n var free = function ()\n {\n return pool.length - total();\n };\n\n /**\n * Disable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\n * @since 3.0.0\n */\n var disableSmoothing = function ()\n {\n _disableContextSmoothing = true;\n };\n\n /**\n * Enable context smoothing on any new Canvas element created.\n *\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\n * @since 3.0.0\n */\n var enableSmoothing = function ()\n {\n _disableContextSmoothing = false;\n };\n\n return {\n create2D: create2D,\n create: create,\n createWebGL: createWebGL,\n disableSmoothing: disableSmoothing,\n enableSmoothing: enableSmoothing,\n first: first,\n free: free,\n pool: pool,\n remove: remove,\n total: total\n };\n};\n\n// If we export the called function here, it'll only be invoked once (not every time it's required).\nmodule.exports = CanvasPool();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Browser specific prefix, so not going to change between contexts, only between browsers\nvar prefix = '';\n\n/**\n * @namespace Phaser.Display.Canvas.Smoothing\n * @since 3.0.0\n */\nvar Smoothing = function ()\n{\n /**\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\n *\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\n *\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\n */\n var getPrefix = function (context)\n {\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\n\n for (var i = 0; i < vendors.length; i++)\n {\n var s = vendors[i] + 'mageSmoothingEnabled';\n\n if (s in context)\n {\n return s;\n }\n }\n\n return null;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.enable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var enable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = true;\n }\n\n return context;\n };\n\n /**\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\n * drawn to the context will be affected. This sets the property across all current browsers but support is\n * patchy on earlier browsers, especially on mobile.\n *\n * @function Phaser.Display.Canvas.Smoothing.disable\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\n *\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\n */\n var disable = function (context)\n {\n if (prefix === '')\n {\n prefix = getPrefix(context);\n }\n\n if (prefix)\n {\n context[prefix] = false;\n }\n\n return context;\n };\n\n /**\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\n * Returns null if no smoothing prefix is available.\n *\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\n * @since 3.0.0\n *\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\n *\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\n */\n var isEnabled = function (context)\n {\n return (prefix !== null) ? context[prefix] : null;\n };\n\n return {\n disable: disable,\n enable: enable,\n getPrefix: getPrefix,\n isEnabled: isEnabled\n };\n\n};\n\nmodule.exports = Smoothing();\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\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 or Dynamic Texture 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 to which this mask is being added.\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, maskObject, x, y, texture, frame)\n {\n if (!maskObject)\n {\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\n }\n\n /**\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\n * @since 3.0.0\n */\n this.bitmapMask = maskObject;\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.\n *\n * 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? This is false by default and should not be changed.\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\n /**\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\n *\n * If a Game Object it must have a texture, such as a Sprite.\n *\n * You can update the source of the mask as often as you like.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\n */\n setBitmap: function (maskObject)\n {\n this.bitmapMask = maskObject;\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.BITMAPMASK_PIPELINE.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 * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\n */\n postRenderWebGL: function (renderer, camera, renderTarget)\n {\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\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\n});\n\n/**\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, or Dynamic Texture, 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 * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\n * combine Geometry Masks and Blend Modes together.\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 * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\n * @since 3.60.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\n */\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\n{\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * This is a WebGL only feature.\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 *\n * Inverting the alpha essentially flips the way the mask works.\n *\n * This is a WebGL only feature.\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, 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 // Force flush before disabling stencil test\n renderer.flush();\n\n var current = renderer.currentMask;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n current.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\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 current.mask = prev.mask;\n current.camera = prev.camera;\n }\n else\n {\n current.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, 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 2013-2023 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 2013-2023 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');\nvar SceneEvents = require('../scene/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 * A reference to the Scene to which this Game Object belongs.\n *\n * Game Objects can only belong to one Scene.\n *\n * You should consider this property as being read-only. You cannot move a\n * Game Object to another Scene by simply changing it.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * Holds a reference to the Display List that contains this Game Object.\n *\n * This is set automatically when this Game Object is added to a Scene or Layer.\n *\n * You should treat this property as being read-only.\n *\n * @name Phaser.GameObjects.GameObject#displayList\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\n * @default null\n * @since 3.50.0\n */\n this.displayList = null;\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 {(number|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 {number}\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 {number}\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 this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\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 {(number|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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 * @generic {any} T\n * @genericUse {(string|T)} - [key]\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 this.scene.sys.input.disable(this);\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 var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\n\n return !(!listWillRender || 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 {number[]} 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));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n if (this.displayList)\n {\n indexes.unshift(this.displayList.getIndex(child));\n }\n else\n {\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n }\n\n return indexes;\n },\n\n /**\n * Adds this Game Object to the given Display List.\n *\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\n * this Game Object belongs.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\n *\n * If this Game Object is already on another Display List when this method is called, it will first\n * be removed from it, before being added to the new list.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#addToDisplayList\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.53.0\n *\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\n *\n * @return {this} This Game Object.\n */\n addToDisplayList: function (displayList)\n {\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\n\n if (this.displayList && this.displayList !== displayList)\n {\n this.removeFromDisplayList();\n }\n\n // Don't repeat if it's already on this list\n if (!displayList.exists(this))\n {\n this.displayList = displayList;\n\n displayList.add(this, true);\n\n displayList.queueDepthSort();\n\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Adds this Game Object to the Update List belonging to the Scene.\n *\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\n * every game frame. This method is passed two parameters: `delta` and `time`.\n *\n * If you wish to run your own logic within `preUpdate` then you should always call\n * `preUpdate.super(delta, time)` within it, or it may fail to process required operations,\n * such as Sprite animations.\n *\n * @method Phaser.GameObjects.GameObject#addToUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n addToUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.add(this);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Display List it is currently on.\n *\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\n * and added back at a later stage.\n *\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\n *\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\n * disable it from rendering, consider using the `setVisible` method, instead.\n *\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromDisplayList: function ()\n {\n var displayList = this.displayList || this.scene.sys.displayList;\n\n if (displayList && displayList.exists(this))\n {\n displayList.remove(this, true);\n\n displayList.queueDepthSort();\n\n this.displayList = null;\n\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\n\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\n }\n\n return this;\n },\n\n /**\n * Removes this Game Object from the Scene's Update List.\n *\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\n * every game frame. Calling this method will remove it from the list, preventing this.\n *\n * Removing a Game Object from the Update List will stop most internal functions working.\n * For example, removing a Sprite from the Update List will prevent it from being able to\n * run animations.\n *\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\n * @since 3.53.0\n *\n * @return {this} This Game Object.\n */\n removeFromUpdateList: function ()\n {\n if (this.scene && this.preUpdate)\n {\n this.scene.sys.updateList.remove(this);\n }\n\n return this;\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] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\n destroy: function (fromScene)\n {\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (fromScene === undefined) { fromScene = false; }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this, fromScene);\n\n this.removeAllListeners();\n\n if (this.postPipelines)\n {\n this.resetPostPipeline(true);\n }\n\n this.removeFromDisplayList();\n this.removeFromUpdateList();\n\n if (this.input)\n {\n this.scene.sys.input.clear(this);\n\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\n this.body = undefined;\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n this.parentContainer = undefined;\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 {number} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar PluginCache = require('../plugins/PluginCache');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\n * types of Game Objects and have them automatically registered with the Scene.\n *\n * Game Objects directly register themselves with the Factory and inject their own creation\n * methods into the class.\n *\n * @class GameObjectFactory\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\n */\nvar GameObjectFactory = new Class({\n\n initialize:\n\n function GameObjectFactory (scene)\n {\n /**\n * The Scene to which this Game Object Factory belongs.\n *\n * @name Phaser.GameObjects.GameObjectFactory#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene.Systems.\n *\n * @name Phaser.GameObjects.GameObjectFactory#systems\n * @type {Phaser.Scenes.Systems}\n * @protected\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A reference to the Scene Event Emitter.\n *\n * @name Phaser.GameObjects.GameObjectFactory#events\n * @type {Phaser.Events.EventEmitter}\n * @protected\n * @since 3.50.0\n */\n this.events = scene.sys.events;\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @protected\n * @since 3.0.0\n */\n this.displayList;\n\n /**\n * A reference to the Scene Update List.\n *\n * @name Phaser.GameObjects.GameObjectFactory#updateList\n * @type {Phaser.GameObjects.UpdateList}\n * @protected\n * @since 3.0.0\n */\n this.updateList;\n\n this.events.once(SceneEvents.BOOT, this.boot, this);\n this.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.displayList = this.systems.displayList;\n this.updateList = this.systems.updateList;\n\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.GameObjects.GameObjectFactory#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Adds an existing Game Object to this Scene.\n *\n * If the Game Object renders, it will be added to the Display List.\n * If it has a `preUpdate` method, it will be added to the Update List.\n *\n * @method Phaser.GameObjects.GameObjectFactory#existing\n * @since 3.0.0\n *\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\n */\n existing: function (child)\n {\n if (child.renderCanvas || child.renderWebGL)\n {\n this.displayList.add(child);\n }\n\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\n if (child.preUpdate)\n {\n this.updateList.add(child);\n }\n\n return child;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\n * @private\n * @since 3.0.0\n */\n shutdown: function ()\n {\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.GameObjects.GameObjectFactory#destroy\n * @private\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n this.events = null;\n\n this.displayList = null;\n this.updateList = null;\n }\n\n});\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\n *\n * @method Phaser.GameObjects.GameObjectFactory.register\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\n */\nGameObjectFactory.register = function (factoryType, factoryFunction)\n{\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n GameObjectFactory.prototype[factoryType] = factoryFunction;\n }\n};\n\n/**\n * Static method called directly by the Game Object factory functions.\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\n * providing a its `factoryType`.\n *\n * @method Phaser.GameObjects.GameObjectFactory.remove\n * @static\n * @since 3.0.0\n *\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\n */\nGameObjectFactory.remove = function (factoryType)\n{\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\n {\n delete GameObjectFactory.prototype[factoryType];\n }\n};\n\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\n\nmodule.exports = GameObjectFactory;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TransformMatrix = require('./components/TransformMatrix');\n\nvar tempMatrix1 = new TransformMatrix();\nvar tempMatrix2 = new TransformMatrix();\nvar tempMatrix3 = new TransformMatrix();\n\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\n\n/**\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\n * the parent matrix if provided.\n *\n * Note that the object this results contains _references_ to the Transform Matrices,\n * not new instances of them. Therefore, you should use their values immediately, or\n * copy them to your own matrix, as they will be replaced as soon as another Game\n * Object is rendered.\n *\n * @function Phaser.GameObjects.GetCalcMatrix\n * @memberof Phaser.GameObjects\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\n *\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\n */\nvar GetCalcMatrix = function (src, camera, parentMatrix)\n{\n var camMatrix = tempMatrix1;\n var spriteMatrix = tempMatrix2;\n var calcMatrix = tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, 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 else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n }\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n return result;\n};\n\nmodule.exports = GetCalcMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 * * NORMAL\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|number)}\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 * * NORMAL\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|number)} value - The BlendMode value. Either a string, a CONST or a number.\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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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. Ensure this value is only ever set to a number data-type.\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 if (this.displayList)\n {\n this.displayList.queueDepthSort();\n }\n\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 {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the FX values of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.FX\n * @webglOnly\n * @since 3.60.0\n */\n\nvar FX = {\n\n /**\n * The amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @name Phaser.GameObjects.Components.FX#fxPadding\n * @type {number}\n * @default 0\n * @since 3.60.0\n */\n fxPadding: 0,\n\n /**\n * Sets the amount of extra padding to be applied to this Game Object\n * when it is being rendered by a SpriteFX Pipeline.\n *\n * Lots of FX require additional spacing added to the texture the\n * Game Object uses, for example a glow or shadow effect, and this\n * method allows you to control how much extra padding is included\n * in addition to the texture size.\n *\n * @method Phaser.GameObjects.Components.FX#setFXPadding\n * @webglOnly\n * @since 3.60.0\n *\n * @param {number} [padding=0] - The amount of padding to add to the texture.\n *\n * @return {this} This Game Object instance.\n */\n setFXPadding: function (padding)\n {\n if (padding === undefined) { padding = 0; }\n\n this.fxPadding = padding;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `copySprite` method.\n *\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFXCopy\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFXCopy: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline.\n *\n * This happens when the pipeline uses its `drawSprite` method.\n *\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\n *\n * @method Phaser.GameObjects.Components.FX#onFX\n * @webglOnly\n * @since 3.60.0\n *\n * @param {Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline} pipeline - The SpriteFX Pipeline that invoked this callback.\n */\n onFX: function ()\n {\n }\n\n};\n\nmodule.exports = FX;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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, or a Dynamic Texture.\n *\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\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 texture-based Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n *\n * @generic {Phaser.GameObjects.GameObject} G\n * @generic {Phaser.Textures.DynamicTexture} T\n * @genericUse {(G|T|null)} [maskObject]\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (maskObject, x, y, texture, frame)\n {\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\n {\n // eslint-disable-next-line consistent-this\n maskObject = this;\n }\n\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\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 * @generic {Phaser.GameObjects.Graphics} G\n * @generic {Phaser.GameObjects.Shape} S\n * @genericUse {(G|S)} [graphics]\n *\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape 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' || this.geom))\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 2013-2023 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 2013-2023 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 {number}\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.setTargetValue();\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 config.persist = true;\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(tweenData.end, 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DeepCopy = require('../../utils/object/DeepCopy');\nvar SpliceOne = require('../../utils/array/SpliceOne');\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 * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\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 * Does this Game Object have any Post Pipelines set?\n *\n * @name Phaser.GameObjects.Components.Pipeline#hasPostPipeline\n * @type {boolean}\n * @webglOnly\n * @since 3.50.0\n */\n hasPostPipeline: false,\n\n /**\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\n *\n * The pipelines are processed in the order in which they appear in this array.\n *\n * If you modify this array directly, be sure to set the\n * `hasPostPipeline` property accordingly.\n *\n * @name Phaser.GameObjects.Components.Pipeline#postPipelines\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\n * @webglOnly\n * @since 3.50.0\n */\n postPipelines: null,\n\n /**\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\n * @type {object}\n * @webglOnly\n * @since 3.50.0\n */\n pipelineData: 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. After that, use `setPipeline`.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipeline)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return false;\n }\n\n var pipelines = renderer.pipelines;\n\n this.postPipelines = [];\n this.pipelineData = {};\n\n if (pipelines)\n {\n if (pipeline === undefined)\n {\n pipeline = pipelines.default;\n }\n\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.defaultPipeline = instance;\n this.pipeline = instance;\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the main WebGL Pipeline of this Game Object.\n *\n * Also sets the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the same pipeline data object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipeline, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelines = renderer.pipelines;\n\n if (pipelines)\n {\n var instance = pipelines.get(pipeline);\n\n if (instance)\n {\n this.pipeline = instance;\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n return this;\n },\n\n /**\n * Sets one, or more, Post Pipelines on this Game Object.\n *\n * Post Pipelines are invoked after this Game Object has rendered to its target and\n * are commonly used for post-fx.\n *\n * The post pipelines are appended to the `postPipelines` array belonging to this\n * Game Object. When the renderer processes this Game Object, it iterates through the post\n * pipelines in the order in which they appear in the array. If you are stacking together\n * multiple effects, be aware that the order is important.\n *\n * If you call this method multiple times, the new pipelines will be appended to any existing\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\n *\n * You can optionally also set the `pipelineData` property, if the parameter is given.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\n * @param {object} [pipelineData] - Optional pipeline data object that is _deep copied_ into the `pipelineData` property of this Game Object.\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\n *\n * @return {this} This Game Object instance.\n */\n setPostPipeline: function (pipelines, pipelineData, copyData)\n {\n var renderer = this.scene.sys.renderer;\n\n if (!renderer)\n {\n return this;\n }\n\n var pipelineManager = renderer.pipelines;\n\n if (pipelineManager)\n {\n if (!Array.isArray(pipelines))\n {\n pipelines = [ pipelines ];\n }\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelineManager.getPostPipeline(pipelines[i], this);\n\n if (instance)\n {\n this.postPipelines.push(instance);\n }\n }\n\n if (pipelineData)\n {\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\n },\n\n /**\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\n *\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\n *\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\n *\n * Both the pipeline and post pipelines share the pipeline data object together.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string} key - The key of the pipeline data to set, update, or delete.\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\n *\n * @return {this} This Game Object instance.\n */\n setPipelineData: function (key, value)\n {\n var data = this.pipelineData;\n\n if (value === undefined)\n {\n delete data[key];\n }\n else\n {\n data[key] = value;\n }\n\n return this;\n },\n\n /**\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} The Post Pipeline/s matching the name, or undefined if no match. If more than one match they are returned in an array.\n */\n getPostPipeline: function (pipeline)\n {\n var isString = (typeof pipeline === 'string');\n\n var pipelines = this.postPipelines;\n\n var results = [];\n\n for (var i = 0; i < pipelines.length; i++)\n {\n var instance = pipelines[i];\n\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\n {\n results.push(instance);\n }\n }\n\n return (results.length === 1) ? results[0] : results;\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 * @param {boolean} [resetPostPipelines=false] - Reset all of the post pipelines?\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n *\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\n */\n resetPipeline: function (resetPostPipelines, resetData)\n {\n if (resetPostPipelines === undefined) { resetPostPipelines = false; }\n if (resetData === undefined) { resetData = false; }\n\n this.pipeline = this.defaultPipeline;\n\n if (resetPostPipelines)\n {\n this.postPipelines = [];\n this.hasPostPipeline = false;\n }\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n\n return (this.pipeline !== null);\n },\n\n /**\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\n * the `destroy` method on each post pipeline and then clearing the local array.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\n */\n resetPostPipeline: function (resetData)\n {\n if (resetData === undefined) { resetData = false; }\n\n var pipelines = this.postPipelines;\n\n for (var i = 0; i < pipelines.length; i++)\n {\n pipelines[i].destroy();\n }\n\n this.postPipelines = [];\n this.hasPostPipeline = false;\n\n if (resetData)\n {\n this.pipelineData = {};\n }\n },\n\n /**\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\n *\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\n *\n * @method Phaser.GameObjects.Components.Pipeline#removePostPipeline\n * @webglOnly\n * @since 3.50.0\n *\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\n *\n * @return {this} This Game Object.\n */\n removePostPipeline: function (pipeline)\n {\n var pipelines = this.postPipelines;\n\n for (var i = pipelines.length - 1; i >= 0; i--)\n {\n var instance = pipelines[i];\n\n if (\n (typeof pipeline === 'string' && instance.name === pipeline) ||\n (typeof pipeline !== 'string' && instance instanceof pipeline))\n {\n instance.destroy();\n\n SpliceOne(pipelines, i);\n }\n }\n\n this.hasPostPipeline = (this.postPipelines.length > 0);\n\n return this;\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 2013-2023 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 2013-2023 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 var input = this.input;\n \n if (input && !input.customHitArea)\n {\n input.hitArea.width = this.width;\n input.hitArea.height = this.height;\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Frame = require('../../textures/Frame');\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|number)} [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 * If you pass a string or index then the Frame has to belong to the current Texture being used\n * by this Game Object.\n *\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n *\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|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\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 if (frame instanceof Frame)\n {\n this.texture = this.scene.sys.textures.get(frame.texture.key);\n\n this.frame = frame;\n }\n else\n {\n this.frame = this.texture.get(frame);\n }\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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\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 * The tint value being applied to the top-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopLeft: 0xffffff,\n\n /**\n * The tint value being applied to the top-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintTopRight: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-left vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomLeft: 0xffffff,\n\n /**\n * The tint value being applied to the bottom-right vertice of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {number}\n * @default 0xffffff\n * @since 3.0.0\n */\n tintBottomRight: 0xffffff,\n\n /**\n * The tint fill mode.\n *\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\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 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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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.tintTopLeft = topLeft;\n this.tintTopRight = topRight;\n this.tintBottomLeft = bottomLeft;\n this.tintBottomRight = bottomRight;\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 {number} [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 {number} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {number} [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 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 {number}\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?\n *\n * It checks to see if the 4 tint properties are set to the value 0xffffff\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\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 var white = 0xffffff;\n\n return (\n this.tintFill ||\n this.tintTopLeft !== white ||\n this.tintTopRight !== white ||\n this.tintBottomLeft !== white ||\n this.tintBottomRight !== white\n );\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\n * @type {boolean}\n * @readonly\n * @default true\n * @since 3.60.0\n */\n hasTransformComponent: true,\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 {number}\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 * Copies an object's coordinates to this Game Object's position.\n *\n * @method Phaser.GameObjects.Components.Transform#copyPosition\n * @since 3.50.0\n *\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\n *\n * @return {this} This Game Object instance.\n */\n copyPosition: function (source)\n {\n if (source.x !== undefined) { this.x = source.x; }\n if (source.y !== undefined) { this.y = source.y; }\n if (source.z !== undefined) { this.z = source.z; }\n if (source.w !== undefined) { this.w = source.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 2013-2023 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 * The temporary quad value cache.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\n * @type {Float32Array}\n * @since 3.60.0\n */\n this.quad = new Float32Array(8);\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) ? matrix : out.matrix;\n\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix[5] = (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 in to the local space of 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.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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 * Performs the 8 calculations required to create the vertices of\n * a quad based on this matrix and the given x/y/xw/yh values.\n *\n * The result is stored in `TransformMatrix.quad`, which is returned\n * from this method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\n * @since 3.60.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} xw - The xw value.\n * @param {number} yh - The yh value.\n * @param {boolean} roundPixels - Pass the results via Math.round?\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\n *\n * @return {Float32Array} The quad Float32Array.\n */\n setQuad: function (x, y, xw, yh, roundPixels, quad)\n {\n if (quad === undefined) { quad = this.quad; }\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 e = matrix[4];\n var f = matrix[5];\n\n quad[0] = x * a + y * c + e;\n quad[1] = x * b + y * d + f;\n\n quad[2] = x * a + yh * c + e;\n quad[3] = x * b + yh * d + f;\n\n quad[4] = xw * a + yh * c + e;\n quad[5] = xw * b + yh * d + f;\n\n quad[6] = xw * a + y * c + e;\n quad[7] = xw * b + y * d + f;\n\n if (roundPixels)\n {\n quad.forEach(function (value, index)\n {\n quad[index] = Math.round(value);\n });\n }\n\n return quad;\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.quad = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n FX: require('./FX'),\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 2013-2023 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 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 transform point 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 * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\n * or the input area will become misaligned.\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.Pipeline\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.Pipeline,\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 {number}\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 {number}\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 * 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.4.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.4.0\n */\n this.scrollFactorY = 1;\n\n this.initPipeline();\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 * @override\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 * @override\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 * @override\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 * @override\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 if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n\n gameObject.removeFromDisplayList();\n\n gameObject.addedToScene();\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, this);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n\n gameObject.removedFromScene();\n\n gameObject.addToDisplayList();\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 {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {Phaser.Types.Math.Vector2Like} 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.x = source.x;\n output.y = 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {number} 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(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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\n *\n * @param {number} [startIndex=0] - An optional start index.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T[]} - [$return]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {number} 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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {number} 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 * Moves a Game Object above another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveAbove\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveAbove: function (child1, child2)\n {\n ArrayUtils.MoveAbove(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object below another one within this Container.\n *\n * These 2 Game Objects must already be children of this Container.\n *\n * @method Phaser.GameObjects.Container#moveBelow\n * @since 3.55.0\n *\n * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child1,child2]\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\n *\n * @return {this} This Container instance.\n */\n moveBelow: function (child1, child2)\n {\n ArrayUtils.MoveBelow(this.list, child1, child2);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {(T|T[])} - [child]\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 {number} 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 list = this.list;\n\n if (destroyChild)\n {\n for (var i = 0; i < list.length; i++)\n {\n if (list[i] && list[i].scene)\n {\n list[i].off(Events.DESTROY, this.remove, this);\n\n list[i].destroy();\n }\n }\n\n this.list = [];\n }\n else\n {\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [oldChild,newChild]\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 * @generic {Phaser.GameObjects.GameObject} T\n * @genericUse {T} - [child]\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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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.4.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 {number}\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 }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar NOOP = require('../../utils/NOOP');\nvar renderWebGL = NOOP;\nvar renderCanvas = 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 2013-2023 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 {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, camera, parentMatrix)\n{\n camera.addToRenderList(container);\n\n var children = container.list;\n var childCount = children.length;\n\n if (childCount === 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 renderer.pipelines.preBatch(container);\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 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) ? (children[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, camera, transformMatrix, container);\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 renderer.pipelines.postBatch(container);\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.20.0\n *\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {number} width - The width of the video.\n * @param {number} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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[])} [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 2013-2023 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 2013-2023 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 {number}\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 2013-2023 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 2013-2023 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 2013-2023 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/**\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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 {number}\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 {number} 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 2013-2023 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 2013-2023 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 if (!this.type)\n {\n throw new Error('Invalid File type: ' + this.type);\n }\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.key)\n {\n throw new Error('Invalid File key: ' + this.key);\n }\n\n var url = GetFastValue(fileConfig, 'url');\n\n if (url === undefined)\n {\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n url = loader.path + url;\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 = url;\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 {number}\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 isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\n {\n return xhr.responseURL.indexOf(scheme) === 0;\n });\n\n var localFileOk = (isLocalFile && 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 // eslint-disable-next-line no-console\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\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 && this.data)\n {\n this.cache.add(this.key, this.data);\n }\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 (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\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 this.state = CONST.FILE_PENDING_DESTROY;\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 2013-2023 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 2013-2023 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:|capacitor:\\/\\/|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 2013-2023 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 2013-2023 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');\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 var finalFiles = [];\n\n // Clean out any potential 'null' or 'undefined' file entries\n files.forEach(function (file)\n {\n if (file)\n {\n finalFiles.push(file);\n }\n });\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 {number}\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 = finalFiles;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.MultiFile#state\n * @type {number}\n * @since 3.60.0\n */\n this.state = CONST.FILE_PENDING;\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 {number}\n * @since 3.7.0\n */\n\n this.pending = finalFiles.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {number}\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 < finalFiles.length; i++)\n {\n finalFiles[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 // eslint-disable-next-line no-console\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\n }\n },\n\n /**\n * Called once all children of this multi file have been added to their caches and is now\n * ready for deletion from the Loader.\n *\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.MultiFile#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.60.0\n */\n pendingDestroy: function ()\n {\n if (this.state === CONST.FILE_PENDING_DESTROY)\n {\n return;\n }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\n\n this.loader.flagForRemoval(this);\n\n for (var i = 0; i < this.files.length; i++)\n {\n this.files[i].pendingDestroy();\n }\n\n this.state = CONST.FILE_PENDING_DESTROY;\n },\n\n /**\n * Destroy this Multi File and any references it holds.\n *\n * @method Phaser.Loader.MultiFile#destroy\n * @since 3.60.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.files = null;\n this.config = null;\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @since 3.0.0\n */\n FILE_POPULATED: 19,\n\n /**\n * File is pending being destroyed.\n *\n * @name Phaser.Loader.FILE_PENDING_DESTROY\n * @type {number}\n * @since 3.60.0\n */\n FILE_PENDING_DESTROY: 20\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {number} totalComplete - The total number of files that successfully loaded.\n * @param {number} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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-atlasjson-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 * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\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 * @type {string}\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. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 * @type {string}\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 2013-2023 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 2013-2023 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');\nvar GetURL = require('../GetURL');\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 this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\n\n if (this.useImageElementLoad)\n {\n this.load = this.loadImage;\n this.onProcess = this.onProcessImage;\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 * Handles image load processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\n * @private\n * @since 3.60.0\n */\n onProcessImage: function ()\n {\n var result = this.state;\n\n this.state = CONST.FILE_PROCESSING;\n\n if (result === CONST.FILE_LOADED)\n {\n this.onProcessComplete();\n }\n else\n {\n this.onProcessError();\n }\n },\n\n /**\n * Loads the image using either XHR or an Image tag.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\n * @private\n * @since 3.60.0\n */\n loadImage: function ()\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 this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n _this.state = CONST.FILE_LOADED;\n\n _this.loader.nextFile(_this, true);\n };\n\n this.data.onerror = function ()\n {\n _this.loader.nextFile(_this, false);\n };\n\n this.data.src = this.src;\n }\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 // Check if we have a linked normal map\n var linkFile = this.linkFile;\n\n if (linkFile)\n {\n // We do, but has it loaded?\n if (linkFile.state >= CONST.FILE_COMPLETE)\n {\n // Both files have loaded\n if (this.type === 'normalMap')\n {\n // linkFile.data = Image\n // this.data = Normal Map\n this.cache.addImage(this.key, linkFile.data, this.data);\n }\n else\n {\n // linkFile.data = Normal Map\n // this.data = Image\n this.cache.addImage(this.key, this.data, linkFile.data);\n }\n }\n\n // Nothing to do here, we'll use the linkFile `addToCache` call\n // to process this pair\n }\n else\n {\n this.cache.addImage(this.key, this.data);\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 * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\n * via the Image tag instead.\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 2013-2023 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 // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\n if (IsPlainObject(url))\n {\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 try\n {\n var json = JSON.parse(this.xhrLoader.responseText);\n }\n catch (e)\n {\n this.onProcessError();\n\n throw e;\n }\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 2013-2023 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 type = 'text';\n var extension = 'txt';\n var cache = loader.cacheManager.text;\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 type = GetFastValue(config, 'type', type);\n cache = GetFastValue(config, 'cache', cache);\n }\n\n var fileConfig = {\n type: type,\n cache: cache,\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 2013-2023 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 2013-2023 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 2013-2023 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 {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\nvar Class = require('../utils/Class');\nvar Matrix4 = require('./Matrix4');\nvar NOOP = require('../utils/NOOP');\n\nvar tempMatrix = new Matrix4();\n\n/**\n * @classdesc\n *\n * @class Euler\n * @memberof Phaser.Math\n * @constructor\n * @since 3.50.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 Euler = new Class({\n\n initialize:\n\n function Euler (x, y, z, order)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (z === undefined) { z = 0; }\n if (order === undefined) { order = Euler.DefaultOrder; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback = NOOP;\n },\n\n x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\n },\n\n y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\n },\n\n z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\n },\n\n order: {\n get: function ()\n {\n return this._order;\n },\n\n set: function (value)\n {\n this._order = value;\n\n this.onChangeCallback(this);\n }\n },\n\n set: function (x, y, z, order)\n {\n if (order === undefined) { order = this._order; }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n this.onChangeCallback(this);\n\n return this;\n },\n\n copy: function (euler)\n {\n return this.set(euler.x, euler.y, euler.z, euler.order);\n },\n\n setFromQuaternion: function (quaternion, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n tempMatrix.fromQuat(quaternion);\n\n return this.setFromRotationMatrix(tempMatrix, order, update);\n },\n\n setFromRotationMatrix: function (matrix, order, update)\n {\n if (order === undefined) { order = this._order; }\n if (update === undefined) { update = false; }\n\n var elements = matrix.val;\n\n // Upper 3x3 of matrix is un-scaled rotation matrix\n var m11 = elements[0];\n var m12 = elements[4];\n var m13 = elements[8];\n var m21 = elements[1];\n var m22 = elements[5];\n var m23 = elements[9];\n var m31 = elements[2];\n var m32 = elements[6];\n var m33 = elements[10];\n\n var x = 0;\n var y = 0;\n var z = 0;\n var epsilon = 0.99999;\n\n switch (order)\n {\n case 'XYZ':\n {\n y = Math.asin(Clamp(m13, -1, 1));\n\n if (Math.abs(m13) < epsilon)\n {\n x = Math.atan2(-m23, m33);\n z = Math.atan2(-m12, m11);\n }\n else\n {\n x = Math.atan2(m32, m22);\n }\n\n break;\n }\n\n case 'YXZ':\n {\n x = Math.asin(-Clamp(m23, -1, 1));\n\n if (Math.abs(m23) < epsilon)\n {\n y = Math.atan2(m13, m33);\n z = Math.atan2(m21, m22);\n }\n else\n {\n y = Math.atan2(-m31, m11);\n }\n\n break;\n }\n\n case 'ZXY':\n {\n x = Math.asin(Clamp(m32, -1, 1));\n\n if (Math.abs(m32) < epsilon)\n {\n y = Math.atan2(-m31, m33);\n z = Math.atan2(-m12, m22);\n }\n else\n {\n z = Math.atan2(m21, m11);\n }\n\n break;\n }\n\n case 'ZYX':\n {\n y = Math.asin(-Clamp(m31, -1, 1));\n\n if (Math.abs(m31) < epsilon)\n {\n x = Math.atan2(m32, m33);\n z = Math.atan2(m21, m11);\n }\n else\n {\n z = Math.atan2(-m12, m22);\n }\n\n break;\n }\n\n case 'YZX':\n {\n z = Math.asin(Clamp(m21, -1, 1));\n\n if (Math.abs(m21) < epsilon)\n {\n x = Math.atan2(-m23, m22);\n y = Math.atan2(-m31, m11);\n }\n else\n {\n y = Math.atan2(m13, m33);\n }\n\n break;\n }\n\n case 'XZY':\n {\n z = Math.asin(-Clamp(m12, -1, 1));\n\n if (Math.abs(m12) < epsilon)\n {\n x = Math.atan2(m32, m22);\n y = Math.atan2(m13, m11);\n }\n else\n {\n x = Math.atan2(-m23, m33);\n }\n\n break;\n }\n }\n\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n\n if (update)\n {\n this.onChangeCallback(this);\n }\n\n return this;\n }\n\n});\n\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\n\nEuler.DefaultOrder = 'XYZ';\n\nmodule.exports = Euler;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to.\n * @param {number} [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 2013-2023 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 + min;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 Greg McLean \n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Interpolates two given Vectors and returns a new Vector between them.\n *\n * Does not modify either of the passed Vectors.\n *\n * @function Phaser.Math.LinearXY\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\n */\nvar LinearXY = function (vector1, vector2, t)\n{\n if (t === undefined) { t = 0; }\n\n return vector1.clone().lerp(vector2, t);\n};\n\nmodule.exports = LinearXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\n\n/**\n * @ignore\n */\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\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 *\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 /**\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 {this} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Sets all values of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#setValues\n * @since 3.50.0\n *\n * @param {number} m00 - The m00 value.\n * @param {number} m01 - The m01 value.\n * @param {number} m02 - The m02 value.\n * @param {number} m03 - The m03 value.\n * @param {number} m10 - The m10 value.\n * @param {number} m11 - The m11 value.\n * @param {number} m12 - The m12 value.\n * @param {number} m13 - The m13 value.\n * @param {number} m20 - The m20 value.\n * @param {number} m21 - The m21 value.\n * @param {number} m22 - The m22 value.\n * @param {number} m23 - The m23 value.\n * @param {number} m30 - The m30 value.\n * @param {number} m31 - The m31 value.\n * @param {number} m32 - The m32 value.\n * @param {number} m33 - The m33 value.\n *\n * @return {this} This Matrix4 instance.\n */\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\n {\n var out = this.val;\n\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n\n return this;\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 {this} This Matrix4.\n */\n copy: function (src)\n {\n var a = src.val;\n\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 {number[]} a - The array to copy the values from. Must have at least 16 elements.\n *\n * @return {this} This Matrix4.\n */\n fromArray: function (a)\n {\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\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 return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n },\n\n /**\n * Generates a transform matrix based on the given position, scale and rotation.\n *\n * @method Phaser.Math.Matrix4#transform\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {Phaser.Math.Vector3} scale - The scale vector.\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\n *\n * @return {this} This Matrix4.\n */\n transform: function (position, scale, rotation)\n {\n var rotMatrix = _tempMat1.fromQuat(rotation);\n\n var rm = rotMatrix.val;\n\n var sx = scale.x;\n var sy = scale.y;\n var sz = scale.z;\n\n return this.setValues(\n rm[0] * sx,\n rm[1] * sx,\n rm[2] * sx,\n 0,\n\n rm[4] * sy,\n rm[5] * sy,\n rm[6] * sy,\n 0,\n\n rm[8] * sz,\n rm[9] * sz,\n rm[10] * sz,\n 0,\n\n position.x,\n position.y,\n position.z,\n 1\n );\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 {this} 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 {this} 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 {this} This Matrix4.\n */\n identity: function ()\n {\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {this} 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 * Copies the given Matrix4 into this Matrix and then inverses it.\n *\n * @method Phaser.Math.Matrix4#getInverse\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\n *\n * @return {this} This Matrix4.\n */\n getInverse: function (m)\n {\n this.copy(m);\n\n return this.invert();\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {this} 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 this;\n }\n\n det = 1 / det;\n\n return this.setValues(\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\n (a20 * b03 - a21 * b01 + a22 * b00) * det\n );\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 {this} 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 return this.setValues(\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\n );\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 {this} 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 {this} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = this.val;\n var b = src.val;\n\n return this.setValues(\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\n\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\n\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\n\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\n );\n },\n\n /**\n * Multiplies the given Matrix4 object with this Matrix.\n *\n * This is the same as calling `multiplyMatrices(m, this)`.\n *\n * @method Phaser.Math.Matrix4#premultiply\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\n *\n * @return {this} This Matrix4.\n */\n premultiply: function (m)\n {\n return this.multiplyMatrices(m, this);\n },\n\n /**\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\n *\n * @method Phaser.Math.Matrix4#multiplyMatrices\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\n *\n * @return {this} This Matrix4.\n */\n multiplyMatrices: function (a, b)\n {\n var am = a.val;\n var bm = b.val;\n\n var a11 = am[0];\n var a12 = am[4];\n var a13 = am[8];\n var a14 = am[12];\n var a21 = am[1];\n var a22 = am[5];\n var a23 = am[9];\n var a24 = am[13];\n var a31 = am[2];\n var a32 = am[6];\n var a33 = am[10];\n var a34 = am[14];\n var a41 = am[3];\n var a42 = am[7];\n var a43 = am[11];\n var a44 = am[15];\n\n var b11 = bm[0];\n var b12 = bm[4];\n var b13 = bm[8];\n var b14 = bm[12];\n var b21 = bm[1];\n var b22 = bm[5];\n var b23 = bm[9];\n var b24 = bm[13];\n var b31 = bm[2];\n var b32 = bm[6];\n var b33 = bm[10];\n var b34 = bm[14];\n var b41 = bm[3];\n var b42 = bm[7];\n var b43 = bm[11];\n var b44 = bm[15];\n\n return this.setValues(\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\n );\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 {this} This Matrix4.\n */\n translate: function (v)\n {\n return this.translateXYZ(v.x, v.y, v.z);\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 {this} 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 {this} This Matrix4.\n */\n scale: function (v)\n {\n return this.scaleXYZ(v.x, v.y, v.z);\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 {this} 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 {this} 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 return this.setValues(\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\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 {this} 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 this;\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 var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\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 return this.setValues(\n a00 * b00 + a10 * b01 + a20 * b02,\n a01 * b00 + a11 * b01 + a21 * b02,\n a02 * b00 + a12 * b01 + a22 * b02,\n a03 * b00 + a13 * b01 + a23 * b02,\n a00 * b10 + a10 * b11 + a20 * b12,\n a01 * b10 + a11 * b11 + a21 * b12,\n a02 * b10 + a12 * b11 + a22 * b12,\n a03 * b10 + a13 * b11 + a23 * b12,\n a00 * b20 + a10 * b21 + a20 * b22,\n a01 * b20 + a11 * b21 + a21 * b22,\n a02 * b20 + a12 * b21 + a22 * b22,\n a03 * b20 + a13 * b21 + a23 * b22,\n a30, a31, a32, a33\n );\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 {this} 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 {this} 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 {this} 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 {this} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n v.x,\n v.y,\n v.z,\n 1\n );\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 {this} This Matrix4.\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 return this.setValues(\n 1 - (yy + zz),\n xy + wz,\n xz - wy,\n 0,\n\n xy - wz,\n 1 - (xx + zz),\n yz + wx,\n 0,\n\n xz + wy,\n yz - wx,\n 1 - (xx + yy),\n 0,\n\n 0,\n 0,\n 0,\n 1\n );\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 {this} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n return this.setValues(\n (near * 2) * rl,\n 0,\n 0,\n 0,\n\n 0,\n (near * 2) * tb,\n 0,\n 0,\n\n (right + left) * rl,\n (top + bottom) * tb,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (far * near * 2) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n return this.setValues(\n f / aspect,\n 0,\n 0,\n 0,\n\n 0,\n f,\n 0,\n 0,\n\n 0,\n 0,\n (far + near) * nf,\n -1,\n\n 0,\n 0,\n (2 * far * near) * nf,\n 0\n );\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 {this} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n return this.setValues(\n (2 * near) / width,\n 0,\n 0,\n 0,\n\n 0,\n (2 * near) / height,\n 0,\n 0,\n\n 0,\n 0,\n -far / (near - far),\n 1,\n\n 0,\n 0,\n (near * far) / (near - far),\n 0\n );\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 {this} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\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 return this.setValues(\n -2 * lr,\n 0,\n 0,\n 0,\n\n 0,\n -2 * bt,\n 0,\n 0,\n\n 0,\n 0,\n 2 * nf,\n 0,\n\n (left + right) * lr,\n (top + bottom) * bt,\n (far + near) * nf,\n 1\n );\n },\n\n /**\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAtRH\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {this} This Matrix4.\n */\n lookAtRH: function (eye, target, up)\n {\n var m = this.val;\n\n _z.subVectors(eye, target);\n\n if (_z.getLengthSquared() === 0)\n {\n // eye and target are in the same position\n _z.z = 1;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n\n if (_x.getLengthSquared() === 0)\n {\n // up and z are parallel\n\n if (Math.abs(up.z) === 1)\n {\n _z.x += 0.0001;\n }\n else\n {\n _z.z += 0.0001;\n }\n\n _z.normalize();\n _x.crossVectors(up, _z);\n }\n\n _x.normalize();\n _y.crossVectors(_z, _x);\n\n m[0] = _x.x;\n m[1] = _x.y;\n m[2] = _x.z;\n m[4] = _y.x;\n m[5] = _y.y;\n m[6] = _y.z;\n m[8] = _z.x;\n m[9] = _z.y;\n m[10] = _z.z;\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 {this} This Matrix4.\n */\n lookAt: function (eye, center, up)\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 return this.setValues(\n x0,\n y0,\n z0,\n 0,\n\n x1,\n y1,\n z1,\n 0,\n\n x2,\n y2,\n z2,\n 0,\n\n -(x0 * eyex + x1 * eyey + x2 * eyez),\n -(y0 * eyex + y1 * eyey + y2 * eyez),\n -(z0 * eyex + z1 * eyey + z2 * eyez),\n 1\n );\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 {this} 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 {this} 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)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n },\n\n /**\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\n *\n * @method Phaser.Math.Matrix4#multiplyToMat4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\n *\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\n */\n multiplyToMat4: function (src, out)\n {\n var a = this.val;\n var b = src.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b03 = b[3];\n var b10 = b[4];\n var b11 = b[5];\n var b12 = b[6];\n var b13 = b[7];\n var b20 = b[8];\n var b21 = b[9];\n var b22 = b[10];\n var b23 = b[11];\n var b30 = b[12];\n var b31 = b[13];\n var b32 = b[14];\n var b33 = b[15];\n\n return out.setValues(\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\n\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\n\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\n\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\n );\n },\n\n /**\n * Takes the rotation and position vectors and builds this Matrix4 from them.\n *\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\n * @param {Phaser.Math.Vector3} position - The position vector.\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\n *\n * @return {this} This Matrix4.\n */\n fromRotationXYTranslation: function (rotation, position, translateFirst)\n {\n var x = position.x;\n var y = position.y;\n var z = position.z;\n\n var sx = Math.sin(rotation.x);\n var cx = Math.cos(rotation.x);\n\n var sy = Math.sin(rotation.y);\n var cy = Math.cos(rotation.y);\n\n var a30 = x;\n var a31 = y;\n var a32 = z;\n\n // Rotate X\n\n var b21 = -sx;\n\n // Rotate Y\n\n var c01 = 0 - b21 * sy;\n\n var c02 = 0 - cx * sy;\n\n var c21 = b21 * cy;\n\n var c22 = cx * cy;\n\n // Translate\n if (!translateFirst)\n {\n // a30 = cy * x + 0 * y + sy * z;\n a30 = cy * x + sy * z;\n a31 = c01 * x + cx * y + c21 * z;\n a32 = c02 * x + sx * y + c22 * z;\n }\n\n return this.setValues(\n cy,\n c01,\n c02,\n 0,\n 0,\n cx,\n sx,\n 0,\n sy,\n c21,\n c22,\n 0,\n a30,\n a31,\n a32,\n 1\n );\n },\n\n /**\n * Returns the maximum axis scale from this Matrix4.\n *\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\n * @since 3.50.0\n *\n * @return {number} The maximum axis scale.\n */\n getMaxScaleOnAxis: function ()\n {\n var m = this.val;\n\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n\n});\n\n/**\n * @ignore\n */\nvar _tempMat1 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _tempMat2 = new Matrix4();\n\n/**\n * @ignore\n */\nvar _x = new Vector3();\n\n/**\n * @ignore\n */\nvar _y = new Vector3();\n\n/**\n * @ignore\n */\nvar _z = new Vector3();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 Vladislav Forsh \n * @copyright 2021 RoboWhale\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\n * In case of an even number of values, the average of the two middle values is returned.\n *\n * @function Phaser.Math.Median\n * @since 3.54.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The median value.\n */\nvar Median = function (values)\n{\n var valuesNum = values.length;\n if (valuesNum === 0)\n {\n return 0;\n }\n\n values.sort(function (a, b) { return a - b; });\n\n var halfIndex = Math.floor(valuesNum / 2);\n\n return valuesNum % 2 === 0\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\n : values[halfIndex];\n};\n\nmodule.exports = Median;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 Matrix3 = require('./Matrix3');\nvar NOOP = require('../utils/NOOP');\nvar Vector3 = require('./Vector3');\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=0] - The x component.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=1] - 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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.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 * @private\n * @since 3.50.0\n */\n\n /**\n * This callback is invoked, if set, each time a value in this quaternion is changed.\n * The callback is passed one argument, a reference to this quaternion.\n *\n * @name Phaser.Math.Quaternion#onChangeCallback\n * @type {function}\n * @since 3.50.0\n */\n this.onChangeCallback = NOOP;\n\n this.set(x, y, z, w);\n },\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 x: {\n get: function ()\n {\n return this._x;\n },\n\n set: function (value)\n {\n this._x = value;\n\n this.onChangeCallback(this);\n }\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 y: {\n get: function ()\n {\n return this._y;\n },\n\n set: function (value)\n {\n this._y = value;\n\n this.onChangeCallback(this);\n }\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 z: {\n get: function ()\n {\n return this._z;\n },\n\n set: function (value)\n {\n this._z = value;\n\n this.onChangeCallback(this);\n }\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 w: {\n get: function ()\n {\n return this._w;\n },\n\n set: function (value)\n {\n this._w = value;\n\n this.onChangeCallback(this);\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 return this.set(src);\n },\n\n /**\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\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 * @param {boolean} [update=true] - Call the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w, update)\n {\n if (update === undefined) { update = true; }\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 if (update)\n {\n this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 this.onChangeCallback(this);\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 return this.set(\n ax + t * (v.x - ax),\n ay + t * (v.y - ay),\n az + t * (v.z - az),\n aw + t * (v.w - aw)\n );\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 return this.set(0, 0, 0, 1);\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 return this.set(0, 0, 0, 1);\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 return this.set(\n s * axis.x,\n s * axis.y,\n s * axis.z,\n Math.cos(rad)\n );\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 return this.set(\n ax * bw + aw * bx + ay * bz - az * by,\n ay * bw + aw * by + az * bx - ax * bz,\n az * bw + aw * bz + ax * by - ay * bx,\n aw * bw - ax * bx - ay * by - az * bz\n );\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 return this.set(\n scale0 * ax + scale1 * bx,\n scale0 * ay + scale1 * by,\n scale0 * az + scale1 * bz,\n scale0 * aw + scale1 * bw\n );\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 return this.set(\n -a0 * invDot,\n -a1 * invDot,\n -a2 * invDot,\n a3 * invDot\n );\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 this.onChangeCallback(this);\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 return this.set(\n ax * bw + aw * bx,\n ay * bw + az * bx,\n az * bw - ay * bx,\n aw * bw - ax * bx\n );\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 return this.set(\n ax * bw - az * by,\n ay * bw + aw * by,\n az * bw + ax * by,\n aw * bw - ay * by\n );\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 return this.set(\n ax * bw + ay * bz,\n ay * bw - ax * bz,\n az * bw + aw * bz,\n aw * bw - az * bz\n );\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 * Set this Quaternion from the given Euler, based on Euler order.\n *\n * @method Phaser.Math.Quaternion#setFromEuler\n * @since 3.50.0\n *\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromEuler: function (euler, update)\n {\n var x = euler.x / 2;\n var y = euler.y / 2;\n var z = euler.z / 2;\n\n var c1 = Math.cos(x);\n var c2 = Math.cos(y);\n var c3 = Math.cos(z);\n\n var s1 = Math.sin(x);\n var s2 = Math.sin(y);\n var s3 = Math.sin(z);\n\n switch (euler.order)\n {\n case 'XYZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YXZ':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZXY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'ZYX':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'YZX':\n {\n this.set(\n s1 * c2 * c3 + c1 * s2 * s3,\n c1 * s2 * c3 + s1 * c2 * s3,\n c1 * c2 * s3 - s1 * s2 * c3,\n c1 * c2 * c3 - s1 * s2 * s3,\n update\n );\n\n break;\n }\n\n case 'XZY':\n {\n this.set(\n s1 * c2 * c3 - c1 * s2 * s3,\n c1 * s2 * c3 - s1 * c2 * s3,\n c1 * c2 * s3 + s1 * s2 * c3,\n c1 * c2 * c3 + s1 * s2 * s3,\n update\n );\n\n break;\n }\n }\n\n return this;\n },\n\n /**\n * Sets the rotation of this Quaternion from the given Matrix4.\n *\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setFromRotationMatrix: function (mat4)\n {\n var m = mat4.val;\n\n var m11 = m[0];\n var m12 = m[4];\n var m13 = m[8];\n var m21 = m[1];\n var m22 = m[5];\n var m23 = m[9];\n var m31 = m[2];\n var m32 = m[6];\n var m33 = m[10];\n\n var trace = m11 + m22 + m33;\n var s;\n\n if (trace > 0)\n {\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.set(\n (m32 - m23) * s,\n (m13 - m31) * s,\n (m21 - m12) * s,\n 0.25 / s\n );\n }\n else if (m11 > m22 && m11 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.set(\n 0.25 * s,\n (m12 + m21) / s,\n (m13 + m31) / s,\n (m32 - m23) / s\n );\n }\n else if (m22 > m33)\n {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.set(\n (m12 + m21) / s,\n 0.25 * s,\n (m23 + m32) / s,\n (m13 - m31) / s\n );\n }\n else\n {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.set(\n (m13 + m31) / s,\n (m23 + m32) / s,\n 0.25 * s,\n (m21 - m12) / s\n );\n }\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 this.onChangeCallback(this);\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {number} [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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} index - The position within the grid to get the x/y value for.\n * @param {number} width - The width of the grid.\n * @param {number} 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\n return out.set(x, y);\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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=0] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y=x] - 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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.Types.Math.Vector2Like} 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 * Project this Vector onto another.\n *\n * @method Phaser.Math.Vector2#project\n * @since 3.60.0\n *\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n project: function (src)\n {\n var scalar = this.dot(src) / src.dot(src);\n\n return this.copy(src).scale(scalar);\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 2013-2023 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 * Sets the components of this Vector to be the `Math.min` result from the given vector.\n *\n * @method Phaser.Math.Vector3#min\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n min: function (v)\n {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n\n return this;\n },\n\n /**\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\n *\n * @method Phaser.Math.Vector3#max\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n max: function (v)\n {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\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 * Adds the two given Vector3s and sets the results into this Vector3.\n *\n * @method Phaser.Math.Vector3#addVectors\n * @since 3.50.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addVectors: function (a, b)\n {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\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 * Sets the components of this Vector3 from the position of the given Matrix4.\n *\n * @method Phaser.Math.Vector3#setFromMatrixPosition\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixPosition: function (m)\n {\n return this.fromArray(m.val, 12);\n },\n\n /**\n * Sets the components of this Vector3 from the Matrix4 column specified.\n *\n * @method Phaser.Math.Vector3#setFromMatrixColumn\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\n * @param {number} index - The column index.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n setFromMatrixColumn: function (mat4, index)\n {\n return this.fromArray(mat4.val, index * 4);\n },\n\n /**\n * Sets the components of this Vector3 from the given array, based on the offset.\n *\n * Vector3.x = array[offset]\n * Vector3.y = array[offset + 1]\n * Vector3.z = array[offset + 2]\n *\n * @method Phaser.Math.Vector3#fromArray\n * @since 3.50.0\n *\n * @param {number[]} array - The array of values to get this Vector from.\n * @param {number} [offset=0] - The offset index into the array.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n fromArray: function (array, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\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 * Add the given value to each component of this Vector.\n *\n * @method Phaser.Math.Vector3#addScalar\n * @since 3.50.0\n *\n * @param {number} s - The amount to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScalar: function (s)\n {\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n\n /**\n * Add and scale a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#addScale\n * @since 3.50.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n * @param {number} scale - The amount to scale `v` by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n addScale: function (v, scale)\n {\n this.x += v.x * scale;\n this.y += v.y * scale;\n this.z += v.z * scale || 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 * Takes a Matrix3 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix3\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix3: function (mat3)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat3.val;\n\n this.x = m[0] * x + m[3] * y + m[6] * z;\n this.y = m[1] * x + m[4] * y + m[7] * z;\n this.z = m[2] * x + m[5] * y + m[8] * z;\n\n return this;\n },\n\n /**\n * Takes a Matrix4 and applies it to this Vector3.\n *\n * @method Phaser.Math.Vector3#applyMatrix4\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n applyMatrix4: function (mat4)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat4.val;\n\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\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\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 Matrix4.\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 * Multiplies this Vector3 by the given view and projection matrices.\n *\n * @method Phaser.Math.Vector3#projectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n projectViewMatrix: function (viewMatrix, projectionMatrix)\n {\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\n },\n\n /**\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\n *\n * @method Phaser.Math.Vector3#unprojectViewMatrix\n * @since 3.50.0\n *\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\n {\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\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 2013-2023 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 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\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 * @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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 Euler: require('./Euler'),\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 LinearXY: require('./LinearXY'),\n MaxAdd: require('./MaxAdd'),\n Median: require('./Median'),\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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Contains the plugins that Phaser uses globally and locally.\n// These are the source objects, not instantiated.\nvar corePlugins = {};\n\n// Contains the plugins that the dev has loaded into their game\n// These are the source objects, not instantiated.\nvar customPlugins = {};\n\nvar PluginCache = {};\n\n/**\n * @namespace Phaser.Plugins.PluginCache\n */\n\n/**\n * Static method called directly by the Core internal Plugins.\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\n * Plugin is the object to instantiate to create the plugin\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\n *\n * @method Phaser.Plugins.PluginCache.register\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\n */\nPluginCache.register = function (key, plugin, mapping, custom)\n{\n if (custom === undefined) { custom = false; }\n\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\n};\n\n/**\n * Stores a custom plugin in the global plugin cache.\n * The key must be unique, within the scope of the cache.\n *\n * @method Phaser.Plugins.PluginCache.registerCustom\n * @since 3.8.0\n *\n * @param {string} key - A reference used to get this plugin from the plugin cache.\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\n * @param {?any} data - A value to be passed to the plugin's `init` method.\n */\nPluginCache.registerCustom = function (key, plugin, mapping, data)\n{\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\n};\n\n/**\n * Checks if the given key is already being used in the core plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCore\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\n */\nPluginCache.hasCore = function (key)\n{\n return corePlugins.hasOwnProperty(key);\n};\n\n/**\n * Checks if the given key is already being used in the custom plugin cache.\n *\n * @method Phaser.Plugins.PluginCache.hasCustom\n * @since 3.8.0\n *\n * @param {string} key - The key to check for.\n *\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\n */\nPluginCache.hasCustom = function (key)\n{\n return customPlugins.hasOwnProperty(key);\n};\n\n/**\n * Returns the core plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCore\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to get.\n *\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\n */\nPluginCache.getCore = function (key)\n{\n return corePlugins[key];\n};\n\n/**\n * Returns the custom plugin object from the cache based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.getCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\n */\nPluginCache.getCustom = function (key)\n{\n return customPlugins[key];\n};\n\n/**\n * Returns an object from the custom cache based on the given key that can be instantiated.\n *\n * @method Phaser.Plugins.PluginCache.getCustomClass\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to get.\n *\n * @return {function} The custom plugin object.\n */\nPluginCache.getCustomClass = function (key)\n{\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\n};\n\n/**\n * Removes a core plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.remove\n * @since 3.8.0\n *\n * @param {string} key - The key of the core plugin to remove.\n */\nPluginCache.remove = function (key)\n{\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n};\n\n/**\n * Removes a custom plugin based on the given key.\n *\n * @method Phaser.Plugins.PluginCache.removeCustom\n * @since 3.8.0\n *\n * @param {string} key - The key of the custom plugin to remove.\n */\nPluginCache.removeCustom = function (key)\n{\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n};\n\n/**\n * Removes all Core Plugins.\n *\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\n * So be sure you only call this if you do not wish to run Phaser again.\n *\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\n * @since 3.12.0\n */\nPluginCache.destroyCorePlugins = function ()\n{\n for (var key in corePlugins)\n {\n if (corePlugins.hasOwnProperty(key))\n {\n delete corePlugins[key];\n }\n }\n};\n\n/**\n * Removes all Custom Plugins.\n *\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\n * @since 3.12.0\n */\nPluginCache.destroyCustomPlugins = function ()\n{\n for (var key in customPlugins)\n {\n if (customPlugins.hasOwnProperty(key))\n {\n delete customPlugins[key];\n }\n }\n};\n\nmodule.exports = PluginCache;\n","/**\n* @author Richard Davey \n* @copyright 2013-2023 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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager, pluginKey)\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 /**\n * The key under which this plugin was installed into the Scene Systems.\n *\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#pluginKey\n * @type {string}\n * @readonly\n * @since 3.54.0\n */\n this.pluginKey = pluginKey;\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 2013-2023 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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\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 {number}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Scale Modes.\n *\n * @namespace Phaser.ScaleModes\n * @since 3.0.0\n */\n\nvar ScaleModes = {\n\n /**\n * Default Scale Mode (Linear).\n *\n * @name Phaser.ScaleModes.DEFAULT\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n DEFAULT: 0,\n\n /**\n * Linear Scale Mode.\n *\n * @name Phaser.ScaleModes.LINEAR\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n LINEAR: 0,\n\n /**\n * Nearest Scale Mode.\n *\n * @name Phaser.ScaleModes.NEAREST\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n NEAREST: 1\n\n};\n\nmodule.exports = ScaleModes;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @type {string}\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.\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} 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 2013-2023 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.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @type {string}\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 2013-2023 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.events.on('boot', listener)`.\n *\n * @event Phaser.Scenes.Events#BOOT\n * @type {string}\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 2013-2023 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.events.on('create', listener)`.\n *\n * @event Phaser.Scenes.Events#CREATE\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('pause', listener)`.\n *\n * @event Phaser.Scenes.Events#PAUSE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 samme\n * @copyright 2021 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre-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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\n *\n * @event Phaser.Scenes.Events#PRE_RENDER\n * @type {string}\n * @since 3.53.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('ready', listener)`.\n *\n * @event Phaser.Scenes.Events#READY\n * @type {string}\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 2013-2023 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.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @type {string}\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 2013-2023 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. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.events.on('render', listener)`.\n *\n * A Scene will only render if it is visible.\n *\n * By the time this event is dispatched, the Scene will have already been rendered.\n *\n * @event Phaser.Scenes.Events#RENDER\n * @type {string}\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 2013-2023 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.events.on('resume', listener)`.\n *\n * @event Phaser.Scenes.Events#RESUME\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.events.on('sleep', listener)`.\n *\n * @event Phaser.Scenes.Events#SLEEP\n * @type {string}\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 2013-2023 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.events.on('start', listener)`.\n *\n * @event Phaser.Scenes.Events#START\n * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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.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 * @type {string}\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 2013-2023 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 and the Scene is in a Running state, otherwise this is skipped.\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n *\n * Listen to it from a Scene using `this.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 * @type {string}\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 2013-2023 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.events.on('wake', listener)`.\n *\n * @event Phaser.Scenes.Events#WAKE\n * @type {string}\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 2013-2023 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_RENDER: require('./PRE_RENDER_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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Clamp = require('../math/Clamp');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @classdesc\n * A Frame is a section of a Texture.\n *\n * @class Frame\n * @memberof Phaser.Textures\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\n * @param {number} x - The x coordinate of the top-left of this Frame.\n * @param {number} y - The y coordinate of the top-left of this Frame.\n * @param {number} width - The width of this Frame.\n * @param {number} height - The height of this Frame.\n */\nvar Frame = new Class({\n\n initialize:\n\n function Frame (texture, name, sourceIndex, x, y, width, height)\n {\n /**\n * The Texture this Frame is a part of.\n *\n * @name Phaser.Textures.Frame#texture\n * @type {Phaser.Textures.Texture}\n * @since 3.0.0\n */\n this.texture = texture;\n\n /**\n * The name of this Frame.\n * The name is unique within the Texture.\n *\n * @name Phaser.Textures.Frame#name\n * @type {string}\n * @since 3.0.0\n */\n this.name = name;\n\n /**\n * The TextureSource this Frame is part of.\n *\n * @name Phaser.Textures.Frame#source\n * @type {Phaser.Textures.TextureSource}\n * @since 3.0.0\n */\n this.source = texture.source[sourceIndex];\n\n /**\n * The index of the TextureSource in the Texture sources array.\n *\n * @name Phaser.Textures.Frame#sourceIndex\n * @type {number}\n * @since 3.0.0\n */\n this.sourceIndex = sourceIndex;\n\n /**\n * A reference to the Texture Source WebGL Texture that this Frame is using.\n *\n * @name Phaser.Textures.Frame#glTexture\n * @type {?WebGLTexture}\n * @default null\n * @since 3.11.0\n */\n this.glTexture = this.source.glTexture;\n\n /**\n * X position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutX\n * @type {number}\n * @since 3.0.0\n */\n this.cutX;\n\n /**\n * Y position within the source image to cut from.\n *\n * @name Phaser.Textures.Frame#cutY\n * @type {number}\n * @since 3.0.0\n */\n this.cutY;\n\n /**\n * The width of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutWidth\n * @type {number}\n * @since 3.0.0\n */\n this.cutWidth;\n\n /**\n * The height of the area in the source image to cut.\n *\n * @name Phaser.Textures.Frame#cutHeight\n * @type {number}\n * @since 3.0.0\n */\n this.cutHeight;\n\n /**\n * The X rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The Y rendering offset of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The rendering width of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#width\n * @type {number}\n * @since 3.0.0\n */\n this.width;\n\n /**\n * The rendering height of this Frame, taking trim into account.\n *\n * @name Phaser.Textures.Frame#height\n * @type {number}\n * @since 3.0.0\n */\n this.height;\n\n /**\n * Half the width, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfWidth\n * @type {number}\n * @since 3.0.0\n */\n this.halfWidth;\n\n /**\n * Half the height, floored.\n * Precalculated for the renderer.\n *\n * @name Phaser.Textures.Frame#halfHeight\n * @type {number}\n * @since 3.0.0\n */\n this.halfHeight;\n\n /**\n * The x center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerX\n * @type {number}\n * @since 3.0.0\n */\n this.centerX;\n\n /**\n * The y center of this frame, floored.\n *\n * @name Phaser.Textures.Frame#centerY\n * @type {number}\n * @since 3.0.0\n */\n this.centerY;\n\n /**\n * The horizontal pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotX\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotX = 0;\n\n /**\n * The vertical pivot point of this Frame.\n *\n * @name Phaser.Textures.Frame#pivotY\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.pivotY = 0;\n\n /**\n * Does this Frame have a custom pivot point?\n *\n * @name Phaser.Textures.Frame#customPivot\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.customPivot = false;\n\n /**\n * **CURRENTLY UNSUPPORTED**\n *\n * Is this frame is rotated or not in the Texture?\n * Rotation allows you to use rotated frames in texture atlas packing.\n * It has nothing to do with Sprite rotation.\n *\n * @name Phaser.Textures.Frame#rotated\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.rotated = false;\n\n /**\n * Over-rides the Renderer setting.\n * -1 = use Renderer Setting\n * 0 = No rounding\n * 1 = Round\n *\n * @name Phaser.Textures.Frame#autoRound\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.autoRound = -1;\n\n /**\n * Any Frame specific custom data can be stored here.\n *\n * @name Phaser.Textures.Frame#customData\n * @type {object}\n * @since 3.0.0\n */\n this.customData = {};\n\n /**\n * WebGL UV u0 value.\n *\n * @name Phaser.Textures.Frame#u0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u0 = 0;\n\n /**\n * WebGL UV v0 value.\n *\n * @name Phaser.Textures.Frame#v0\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v0 = 0;\n\n /**\n * WebGL UV u1 value.\n *\n * @name Phaser.Textures.Frame#u1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.u1 = 0;\n\n /**\n * WebGL UV v1 value.\n *\n * @name Phaser.Textures.Frame#v1\n * @type {number}\n * @default 0\n * @since 3.11.0\n */\n this.v1 = 0;\n\n /**\n * The un-modified source frame, trim and UV data.\n *\n * @name Phaser.Textures.Frame#data\n * @type {object}\n * @private\n * @since 3.0.0\n */\n this.data = {\n cut: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n trim: false,\n sourceSize: {\n w: 0,\n h: 0\n },\n spriteSourceSize: {\n x: 0,\n y: 0,\n w: 0,\n h: 0,\n r: 0,\n b: 0\n },\n radius: 0,\n drawImage: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }\n };\n\n this.setSize(width, height, x, y);\n },\n\n /**\n * Sets the width, height, x and y of this Frame.\n *\n * This is called automatically by the constructor\n * and should rarely be changed on-the-fly.\n *\n * @method Phaser.Textures.Frame#setSize\n * @since 3.7.0\n *\n * @param {number} width - The width of the frame before being trimmed.\n * @param {number} height - The height of the frame before being trimmed.\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\n *\n * @return {this} This Frame object.\n */\n setSize: function (width, height, x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n this.cutX = x;\n this.cutY = y;\n this.cutWidth = width;\n this.cutHeight = height;\n\n this.width = width;\n this.height = height;\n\n this.halfWidth = Math.floor(width * 0.5);\n this.halfHeight = Math.floor(height * 0.5);\n\n this.centerX = Math.floor(width / 2);\n this.centerY = Math.floor(height / 2);\n\n var data = this.data;\n var cut = data.cut;\n\n cut.x = x;\n cut.y = y;\n cut.w = width;\n cut.h = height;\n cut.r = x + width;\n cut.b = y + height;\n\n data.sourceSize.w = width;\n data.sourceSize.h = height;\n\n data.spriteSourceSize.w = width;\n data.spriteSourceSize.h = height;\n\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\n\n var drawImage = data.drawImage;\n\n drawImage.x = x;\n drawImage.y = y;\n drawImage.width = width;\n drawImage.height = height;\n\n return this.updateUVs();\n },\n\n /**\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\n *\n * @method Phaser.Textures.Frame#setTrim\n * @since 3.0.0\n *\n * @param {number} actualWidth - The width of the frame before being trimmed.\n * @param {number} actualHeight - The height of the frame before being trimmed.\n * @param {number} destX - The destination X position of the trimmed frame for display.\n * @param {number} destY - The destination Y position of the trimmed frame for display.\n * @param {number} destWidth - The destination width of the trimmed frame for display.\n * @param {number} destHeight - The destination height of the trimmed frame for display.\n *\n * @return {this} This Frame object.\n */\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\n {\n var data = this.data;\n var ss = data.spriteSourceSize;\n\n // Store actual values\n\n data.trim = true;\n\n data.sourceSize.w = actualWidth;\n data.sourceSize.h = actualHeight;\n\n ss.x = destX;\n ss.y = destY;\n ss.w = destWidth;\n ss.h = destHeight;\n ss.r = destX + destWidth;\n ss.b = destY + destHeight;\n\n // Adjust properties\n this.x = destX;\n this.y = destY;\n\n this.width = destWidth;\n this.height = destHeight;\n\n this.halfWidth = destWidth * 0.5;\n this.halfHeight = destHeight * 0.5;\n\n this.centerX = Math.floor(destWidth / 2);\n this.centerY = Math.floor(destHeight / 2);\n\n return this.updateUVs();\n },\n\n /**\n * Takes a crop data object and, based on the rectangular region given, calculates the\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\n *\n * This is called directly by the Game Object Texture Components `setCrop` method.\n * Please use that method to crop a Game Object.\n *\n * @method Phaser.Textures.Frame#setCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\n {\n // Clamp the input values\n\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n var rw = this.realWidth;\n var rh = this.realHeight;\n\n x = Clamp(x, 0, rw);\n y = Clamp(y, 0, rh);\n\n width = Clamp(width, 0, rw - x);\n height = Clamp(height, 0, rh - y);\n\n var ox = cx + x;\n var oy = cy + y;\n var ow = width;\n var oh = height;\n\n var data = this.data;\n\n if (data.trim)\n {\n var ss = data.spriteSourceSize;\n\n // Need to check for intersection between the cut area and the crop area\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\n\n width = Clamp(width, 0, cw - x);\n height = Clamp(height, 0, ch - y);\n\n var cropRight = x + width;\n var cropBottom = y + height;\n\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\n\n if (intersects)\n {\n var ix = Math.max(ss.x, x);\n var iy = Math.max(ss.y, y);\n var iw = Math.min(ss.r, cropRight) - ix;\n var ih = Math.min(ss.b, cropBottom) - iy;\n\n ow = iw;\n oh = ih;\n\n if (flipX)\n {\n ox = cx + (cw - (ix - ss.x) - iw);\n }\n else\n {\n ox = cx + (ix - ss.x);\n }\n\n if (flipY)\n {\n oy = cy + (ch - (iy - ss.y) - ih);\n }\n else\n {\n oy = cy + (iy - ss.y);\n }\n\n x = ix;\n y = iy;\n\n width = iw;\n height = ih;\n }\n else\n {\n ox = 0;\n oy = 0;\n ow = 0;\n oh = 0;\n }\n }\n else\n {\n if (flipX)\n {\n ox = cx + (cw - x - width);\n }\n\n if (flipY)\n {\n oy = cy + (ch - y - height);\n }\n }\n\n var tw = this.source.width;\n var th = this.source.height;\n\n // Map the given coordinates into UV space, clamping to the 0-1 range.\n\n crop.u0 = Math.max(0, ox / tw);\n crop.v0 = Math.max(0, oy / th);\n crop.u1 = Math.min(1, (ox + ow) / tw);\n crop.v1 = Math.min(1, (oy + oh) / th);\n\n crop.x = x;\n crop.y = y;\n\n crop.cx = ox;\n crop.cy = oy;\n crop.cw = ow;\n crop.ch = oh;\n\n crop.width = width;\n crop.height = height;\n\n crop.flipX = flipX;\n crop.flipY = flipY;\n\n return crop;\n },\n\n /**\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\n * Called automatically by `setFrame`.\n *\n * @method Phaser.Textures.Frame#updateCropUVs\n * @since 3.11.0\n *\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\n *\n * @return {object} The updated crop data object.\n */\n updateCropUVs: function (crop, flipX, flipY)\n {\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\n },\n\n /**\n * Directly sets the canvas and WebGL UV data for this frame.\n *\n * Use this if you need to override the values that are generated automatically\n * when the Frame is created.\n *\n * @method Phaser.Textures.Frame#setUVs\n * @since 3.50.0\n *\n * @param {number} width - Width of this frame for the Canvas data.\n * @param {number} height - Height of this frame for the Canvas data.\n * @param {number} u0 - UV u0 value.\n * @param {number} v0 - UV v0 value.\n * @param {number} u1 - UV u1 value.\n * @param {number} v1 - UV v1 value.\n *\n * @return {this} This Frame object.\n */\n setUVs: function (width, height, u0, v0, u1, v1)\n {\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = width;\n cd.height = height;\n\n // WebGL data\n\n this.u0 = u0;\n this.v0 = v0;\n\n this.u1 = u1;\n this.v1 = v1;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache and the drawImage cache.\n *\n * @method Phaser.Textures.Frame#updateUVs\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVs: function ()\n {\n var cx = this.cutX;\n var cy = this.cutY;\n var cw = this.cutWidth;\n var ch = this.cutHeight;\n\n // Canvas data\n\n var cd = this.data.drawImage;\n\n cd.width = cw;\n cd.height = ch;\n\n // WebGL data\n\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = cx / tw;\n this.v0 = cy / th;\n\n this.u1 = (cx + cw) / tw;\n this.v1 = (cy + ch) / th;\n\n return this;\n },\n\n /**\n * Updates the internal WebGL UV cache.\n *\n * @method Phaser.Textures.Frame#updateUVsInverted\n * @since 3.0.0\n *\n * @return {this} This Frame object.\n */\n updateUVsInverted: function ()\n {\n var tw = this.source.width;\n var th = this.source.height;\n\n this.u0 = (this.cutX + this.cutHeight) / tw;\n this.v0 = this.cutY / th;\n\n this.u1 = this.cutX / tw;\n this.v1 = (this.cutY + this.cutWidth) / th;\n\n return this;\n },\n\n /**\n * Clones this Frame into a new Frame object.\n *\n * @method Phaser.Textures.Frame#clone\n * @since 3.0.0\n *\n * @return {Phaser.Textures.Frame} A clone of this Frame.\n */\n clone: function ()\n {\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\n\n clone.cutX = this.cutX;\n clone.cutY = this.cutY;\n clone.cutWidth = this.cutWidth;\n clone.cutHeight = this.cutHeight;\n\n clone.x = this.x;\n clone.y = this.y;\n\n clone.width = this.width;\n clone.height = this.height;\n\n clone.halfWidth = this.halfWidth;\n clone.halfHeight = this.halfHeight;\n\n clone.centerX = this.centerX;\n clone.centerY = this.centerY;\n\n clone.rotated = this.rotated;\n\n clone.data = Extend(true, clone.data, this.data);\n\n clone.updateUVs();\n\n return clone;\n },\n\n /**\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\n *\n * @method Phaser.Textures.Frame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.source = null;\n this.texture = null;\n this.glTexture = null;\n this.customData = null;\n this.data = null;\n },\n\n /**\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realWidth\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realWidth: {\n\n get: function ()\n {\n return this.data.sourceSize.w;\n }\n\n },\n\n /**\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\n * before being packed.\n *\n * @name Phaser.Textures.Frame#realHeight\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n realHeight: {\n\n get: function ()\n {\n return this.data.sourceSize.h;\n }\n\n },\n\n /**\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\n *\n * @name Phaser.Textures.Frame#radius\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n radius: {\n\n get: function ()\n {\n return this.data.radius;\n }\n\n },\n\n /**\n * Is the Frame trimmed or not?\n *\n * @name Phaser.Textures.Frame#trimmed\n * @type {boolean}\n * @readonly\n * @since 3.0.0\n */\n trimmed: {\n\n get: function ()\n {\n return this.data.trim;\n }\n\n },\n\n /**\n * The Canvas drawImage data object.\n *\n * @name Phaser.Textures.Frame#canvasData\n * @type {object}\n * @readonly\n * @since 3.0.0\n */\n canvasData: {\n\n get: function ()\n {\n return this.data.drawImage;\n }\n\n }\n\n});\n\nmodule.exports = Frame;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {boolean} 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Tween States.\n *\n * @namespace Phaser.Tweens.States\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\n/**\n * Phaser Tween state constants.\n *\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\n * @memberof Phaser.Tweens\n * @since 3.60.0\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.CREATED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n CREATED: 0,\n\n // 1 used to be INIT prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n DELAY: 2,\n\n // 3 used to be OFFSET_DELAY prior to 3.60\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PENDING_RENDER\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_FORWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.HOLD_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.REPEAT_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n *\n * @name Phaser.Tweens.States.COMPLETE\n * @type {number}\n * @const\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. The Tween has been created but has not yet been added to the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING: 20,\n\n /**\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\n * or was playing and is currently paused, but in both cases it's still being processed by\n * the Tween Manager, so is considered 'active'.\n *\n * @name Phaser.Tweens.States.ACTIVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n ACTIVE: 21,\n\n /**\n * Tween state. The Tween is waiting for a loop countdown to elapse.\n *\n * @name Phaser.Tweens.States.LOOP_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state. The Tween is waiting for a complete delay to elapse.\n *\n * @name Phaser.Tweens.States.COMPLETE_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n COMPLETE_DELAY: 23,\n\n /**\n * Tween state. The Tween is waiting for a starting delay to elapse.\n *\n * @name Phaser.Tweens.States.START_DELAY\n * @type {number}\n * @const\n * @since 3.0.0\n */\n START_DELAY: 24,\n\n /**\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.PENDING_REMOVE\n * @type {number}\n * @const\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state. The Tween has been removed from the Tween Manager.\n *\n * @name Phaser.Tweens.States.REMOVED\n * @type {number}\n * @const\n * @since 3.0.0\n */\n REMOVED: 26,\n\n /**\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\n * so will not be automatically removed by the Tween Manager.\n *\n * @name Phaser.Tweens.States.FINISHED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n FINISHED: 27,\n\n /**\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\n *\n * @name Phaser.Tweens.States.DESTROYED\n * @type {number}\n * @const\n * @since 3.60.0\n */\n DESTROYED: 28,\n\n /**\n * A large integer value used for 'infinite' style countdowns.\n *\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\n * supported on IE.\n *\n * @name Phaser.Tweens.States.MAX\n * @type {number}\n * @const\n * @since 3.60.0\n */\n MAX: 999999999999\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * @ignore\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 * @ignore\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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [index=0] - The index in the array where the item will be inserted.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [endIndex] - An optional end index to search to.\n *\n * @return {number} 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 2013-2023 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 2013-2023 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 {number} startIndex - The start index to search from.\n * @param {number} 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes an array and flattens it, returning a shallow-copy flattened array.\n *\n * @function Phaser.Utils.Array.Flatten\n * @since 3.60.0\n *\n * @param {array} array - The array to flatten.\n * @param {array} [output] - An array to hold the results in.\n *\n * @return {array} The flattened output array.\n */\nvar Flatten = function (array, output)\n{\n if (output === undefined) { output = []; }\n\n for (var i = 0; i < array.length; i++)\n {\n if (Array.isArray(array[i]))\n {\n Flatten(array[i], output);\n }\n else\n {\n output.push(array[i]);\n }\n }\n\n return output;\n};\n\nmodule.exports = Flatten;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 {number} [startIndex=0] - An optional start index.\n * @param {number} [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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element above another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveAbove\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move above base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveAbove = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex > baseIndex)\n {\n // item1 is already above item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === array.length - 1)\n {\n array.push(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveAbove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element below another one in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveBelow\n * @since 3.55.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The element to move below base element.\n * @param {*} item2 - The base element.\n *\n *\n * @return {array} The input array.\n */\nvar MoveBelow = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return array;\n }\n\n var currentIndex = array.indexOf(item1);\n var baseIndex = array.indexOf(item2);\n\n if (currentIndex < 0 || baseIndex < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n if (currentIndex < baseIndex)\n {\n // item1 is already below item2\n return array;\n }\n\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n if (baseIndex === 0)\n {\n array.unshift(item1);\n }\n else\n {\n array.splice(baseIndex, 0, item1);\n }\n\n return array;\n};\n\nmodule.exports = MoveBelow;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} 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 2013-2023 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 2013-2023 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 = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.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 = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.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 var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 {number} k - The k-th element index.\n * @param {number} [left=0] - The index of the left part of the range.\n * @param {number} [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 2013-2023 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 2013-2023 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 var removed = [];\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 removed.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n itemLength--;\n }\n\n return removed;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 2013-2023 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 {number} startIndex - The start index to remove from.\n * @param {number} 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 2013-2023 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 {number} [start=0] - The array index to start the search from.\n * @param {number} [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 2013-2023 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 2013-2023 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 {number} [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 2013-2023 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 {number} [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 2013-2023 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 {number} startIndex - The start index.\n * @param {number} 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 {\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 2013-2023 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 2013-2023 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 {number} [startIndex] - An optional start index to search from.\n * @param {number} [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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 {number} 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 * @author Angry Bytes (and contributors)\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Device = require('../../device');\n\n/**\n * The comparator function.\n *\n * @ignore\n *\n * @param {*} a - The first item to test.\n * @param {*} b - The second itemt to test.\n *\n * @return {boolean} True if they localCompare, otherwise false.\n */\nfunction Compare (a, b)\n{\n return String(a).localeCompare(b);\n}\n\n/**\n * Process the array contents.\n *\n * @ignore\n *\n * @param {array} array - The array to process.\n * @param {function} compare - The comparison function.\n *\n * @return {array} - The processed array.\n */\nfunction Process (array, compare)\n{\n // Short-circuit when there's nothing to sort.\n var len = array.length;\n\n if (len <= 1)\n {\n return array;\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\n for (var chk = 1; chk < len; chk *= 2)\n {\n RunPass(array, compare, chk, buffer);\n\n var tmp = array;\n\n array = buffer;\n\n buffer = tmp;\n }\n\n return array;\n}\n\n/**\n * Run a single pass with the given chunk size.\n *\n * @ignore\n *\n * @param {array} arr - The array to run the pass on.\n * @param {function} comp - The comparison function.\n * @param {number} chk - The number of iterations.\n * @param {array} result - The array to store the result in.\n */\nfunction RunPass (arr, comp, chk, result)\n{\n var len = arr.length;\n var i = 0;\n\n // Step size / double chunk size.\n var dbl = chk * 2;\n\n // Bounds of the left and right chunks.\n var l, r, e;\n\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 {\n r = l + chk;\n e = r + chk;\n\n if (r > len)\n {\n r = len;\n }\n\n if (e > len)\n {\n e = len;\n }\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n\n while (true)\n {\n // Compare the chunks.\n if (li < r && ri < e)\n {\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 {\n result[i++] = arr[li++];\n }\n else\n {\n result[i++] = arr[ri++];\n }\n }\n else if (li < r)\n {\n // Nothing to compare, just flush what's left.\n result[i++] = arr[li++];\n }\n else if (ri < e)\n {\n result[i++] = arr[ri++];\n }\n else\n {\n // Both iterators are at the chunk ends.\n break;\n }\n }\n }\n}\n\n/**\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\n *\n * This is an implementation of merge sort, without recursion.\n *\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} array - The input array to be sorted.\n * @param {function} [compare] - The comparison function.\n *\n * @return {array} The sorted result.\n */\nvar StableSort = function (array, compare)\n{\n if (compare === undefined) { compare = Compare; }\n\n // Short-circuit when there's nothing to sort.\n if (!array || array.length < 2)\n {\n return array;\n }\n\n if (Device.features.stableSort)\n {\n return array.sort(compare);\n }\n\n var result = Process(array, compare);\n\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\n if (result !== array)\n {\n RunPass(result, null, array.length, array);\n }\n\n return array;\n};\n\nmodule.exports = StableSort;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 array;\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 2013-2023 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 Flatten: require('./Flatten'),\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 MoveAbove: require('./MoveAbove'),\n MoveBelow: require('./MoveBelow'),\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 SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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)\n * have the same length. This is an example matrix:\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) || !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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateLeft = require('../RotateLeft');\nvar RotateRight = require('../RotateRight');\n\n/**\n * Translates the given Array Matrix by shifting each column and row the\n * amount specified.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.Translate\n * @since 3.50.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to translate.\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\n *\n * @return {T[][]} The translated matrix.\n */\nvar TranslateMatrix = function (matrix, x, y)\n{\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n\n // Vertical translation\n\n if (y !== 0)\n {\n if (y < 0)\n {\n // Shift Up\n RotateLeft(matrix, Math.abs(y));\n }\n else\n {\n // Shift Down\n RotateRight(matrix, y);\n }\n }\n\n // Horizontal translation\n\n if (x !== 0)\n {\n for (var i = 0; i < matrix.length; i++)\n {\n var row = matrix[i];\n\n if (x < 0)\n {\n RotateLeft(row, Math.abs(x));\n }\n else\n {\n RotateRight(row, x);\n }\n }\n }\n\n return matrix;\n};\n\nmodule.exports = TranslateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\n * have the same length. There must be at least two rows. This is an example matrix:\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.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 2013-2023 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 Translate: require('./TranslateMatrix'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Deep Copy the given object or array.\n *\n * @function Phaser.Utils.Objects.DeepCopy\n * @since 3.50.0\n *\n * @param {object} obj - The object to deep copy.\n *\n * @return {object} A deep copy of the original object.\n */\nvar DeepCopy = function (inObject)\n{\n var outObject;\n var value;\n var key;\n\n if (typeof inObject !== 'object' || inObject === null)\n {\n // inObject is not an object\n return inObject;\n }\n\n // Create an array or object to hold the values\n outObject = Array.isArray(inObject) ? [] : {};\n\n for (key in inObject)\n {\n value = inObject[key];\n\n // Recursively (deep) copy for nested objects, including arrays\n outObject[key] = DeepCopy(value);\n }\n\n return outObject;\n};\n\nmodule.exports = DeepCopy;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 2013-2023 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 2013-2023 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 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\n *\n * The key is a string, which can be split based on the use of the period character.\n *\n * For example:\n *\n * ```javascript\n * const source = {\n * lives: 3,\n * render: {\n * screen: {\n * width: 1024\n * }\n * }\n * }\n *\n * const lives = GetValue(source, 'lives', 1);\n * const width = GetValue(source, 'render.screen.width', 800);\n * const height = GetValue(source, 'render.screen.height', 600);\n * ```\n *\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\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 * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue, altSource)\n{\n if ((!source && !altSource) || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source && source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (altSource && altSource.hasOwnProperty(key))\n {\n return altSource[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parentA = source;\n var parentB = altSource;\n var valueA = defaultValue;\n var valueB = defaultValue;\n var valueAFound = true;\n var valueBFound = true;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parentA && parentA.hasOwnProperty(keys[i]))\n {\n // Yes parentA has a key property, let's carry on down\n valueA = parentA[keys[i]];\n parentA = parentA[keys[i]];\n }\n else\n {\n valueAFound = false;\n }\n\n if (parentB && parentB.hasOwnProperty(keys[i]))\n {\n // Yes parentB has a key property, let's carry on down\n valueB = parentB[keys[i]];\n parentB = parentB[keys[i]];\n }\n else\n {\n valueBFound = false;\n }\n }\n\n if (valueAFound)\n {\n return valueA;\n }\n else if (valueBFound)\n {\n return valueB;\n }\n else\n {\n return defaultValue;\n }\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 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 (!obj || 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 2013-2023 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 {number} [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 {number} [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 2022 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 = [ content[0] ];\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 = textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n if (!loader.keyExists(image))\n {\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\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 2022 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 SpineCanvas = require('SpineCanvas');\nvar SpineWebgl = require('SpineWebgl');\nvar Spine = {\n canvas: SpineCanvas,\n webgl: SpineWebgl\n};\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 * ## A note about inlined data:\n *\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\n * at all. Instead, call the functions directly as required:\n *\n * scene.cache.json.add\n * scene.cache.custom.spine.add\n * scene.textures.addBase64\n *\n * ## Using the plugin\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 * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager, pluginKey)\n {\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\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 * There is only one instance of the Scene Renderer shared across the whole plugin.\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 add = function (x, y, key, animationName, loop)\n {\n var spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var spineGO = new SpineContainer(this.scene, spinePlugin, 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 spinePlugin = this.scene.sys[pluginKey];\n var container = new SpineContainer(this.scene, spinePlugin, 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 var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (!sceneRenderer)\n {\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n this.renderer.spineSceneRenderer = sceneRenderer;\n }\n\n // All scene share the same instance\n this.sceneRenderer = sceneRenderer;\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = 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 this.runtime.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 this.runtime.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 * @param {object} [settings] - An external Settings configuration object { prefix: '' }\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\n {\n var multifile;\n settings = settings || {};\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 // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\n \n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n // Support prefix key\n multifile.prefix = multifile.prefix || settings.prefix || '';\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 this.runtime.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new this.runtime.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new this.runtime.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 this.runtime.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 var gl = this.gl;\n var i;\n var atlasPage;\n var realTextureKey;\n\n if (this.isWebGL)\n {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n }\n\n for (i = 0; i < atlas.pages.length; i ++)\n {\n atlasPage = atlas.pages[i];\n realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;\n if (this.isWebGL)\n {\n atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));\n }\n else\n {\n atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));\n }\n }\n \n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new this.runtime.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new this.runtime.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 this.runtime.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 this.runtime.AnimationStateData(skeleton.data);\n\n var state = new this.runtime.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 this.runtime.Vector2();\n var size = new this.runtime.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.setViewport(viewportWidth, 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.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n\n this.pluginManager = null;\n\n var sceneRenderer = this.renderer.spineSceneRenderer;\n\n if (sceneRenderer)\n {\n sceneRenderer.dispose();\n }\n\n this.renderer.spineSceneRenderer = null;\n this.sceneRenderer = null;\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 2022 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, or other Spine Containers, to this type of Container.\n * Although Phaser will 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 * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\n * Spine Containers. In short, if you need masking, don't mix and match the types.\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 2022 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 2022 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 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 {SpineContainer} container - The Game Object being rendered in this call.\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, 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.pipelines.rebind();\n }\n\n return;\n }\n\n camera.addToRenderList(container);\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 if (renderer.newType)\n {\n // flush + clear if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var rendererNextType = renderer.nextTypeMatch;\n\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\n renderer.nextTypeMatch = true;\n renderer.newType = false;\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (child.willRender(camera, container))\n {\n var mask = child.mask;\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.preRenderWebGL(renderer, child, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\n\n if (mask)\n {\n sceneRenderer.end();\n\n renderer.pipelines.rebind();\n\n mask.postRenderWebGL(renderer, camera);\n\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n }\n }\n\n renderer.nextTypeMatch = rendererNextType;\n\n if (!rendererNextType)\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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 2022 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. Ensure that your setup\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\n * input shape being created. 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 * @extends Phaser.GameObjects.GameObject\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 * Returns `true` if this Spine Game Object both has a skeleton and\n * also passes the render tests for the given Camera.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n *\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\n */\n willRender: function (camera, container)\n {\n var GameObjectRenderMask = 15;\n\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\n\n if (!container && !result && this.parentContainer)\n {\n var plugin = this.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\n {\n sceneRenderer.end();\n\n plugin.renderer.pipelines.rebind();\n }\n }\n\n return result;\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 {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 * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\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 if (loop === undefined) { loop = false; }\n if (delay === undefined) { delay = 0; }\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 2022 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');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Directly 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#renderDirect\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 {SpineGameObject} src - The Game Object being rendered in this call.\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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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 // 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.pipelines.rebind();\n};\n\nmodule.exports = SpineGameObjectWebGLDirect;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Clamp = require('../../../../src/math/Clamp');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\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 {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 * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (renderer.newType)\n {\n // flush + clear previous pipeline if this is a new type\n renderer.pipelines.clear();\n\n sceneRenderer.begin();\n }\n\n var scrollFactorX = src.scrollFactorX;\n var scrollFactorY = src.scrollFactorY;\n var alpha = skeleton.color.a;\n\n if (container)\n {\n src.scrollFactorX = container.scrollFactorX;\n src.scrollFactorY = container.scrollFactorY;\n\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\n }\n\n camera.addToRenderList(src);\n\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\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 // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\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 /*\n if (renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n */\n\n skeleton.updateWorldTransform();\n\n // Draw the current skeleton\n\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (container)\n {\n src.scrollFactorX = scrollFactorX;\n src.scrollFactorY = scrollFactorY;\n skeleton.color.a = alpha;\n }\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.pipelines.rebind();\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\n\"use strict\";\nvar spine = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // spine-webgl/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n AlphaTimeline: () => AlphaTimeline,\n Animation: () => Animation,\n AnimationState: () => AnimationState,\n AnimationStateAdapter: () => AnimationStateAdapter,\n AnimationStateData: () => AnimationStateData,\n AssetManager: () => AssetManager,\n AssetManagerBase: () => AssetManagerBase,\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\n Attachment: () => Attachment,\n AttachmentTimeline: () => AttachmentTimeline,\n BinaryInput: () => BinaryInput,\n BlendMode: () => BlendMode,\n Bone: () => Bone,\n BoneData: () => BoneData,\n BoundingBoxAttachment: () => BoundingBoxAttachment,\n CURRENT: () => CURRENT,\n CameraController: () => CameraController,\n ClippingAttachment: () => ClippingAttachment,\n Color: () => Color,\n Color2Attribute: () => Color2Attribute,\n ColorAttribute: () => ColorAttribute,\n ConstraintData: () => ConstraintData,\n CurveTimeline: () => CurveTimeline,\n CurveTimeline1: () => CurveTimeline1,\n CurveTimeline2: () => CurveTimeline2,\n DebugUtils: () => DebugUtils,\n DeformTimeline: () => DeformTimeline,\n Downloader: () => Downloader,\n DrawOrderTimeline: () => DrawOrderTimeline,\n Event: () => Event,\n EventData: () => EventData,\n EventQueue: () => EventQueue,\n EventTimeline: () => EventTimeline,\n EventType: () => EventType,\n FIRST: () => FIRST,\n FakeTexture: () => FakeTexture,\n GLTexture: () => GLTexture,\n HOLD_FIRST: () => HOLD_FIRST,\n HOLD_MIX: () => HOLD_MIX,\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\n IkConstraint: () => IkConstraint,\n IkConstraintData: () => IkConstraintData,\n IkConstraintTimeline: () => IkConstraintTimeline,\n Input: () => Input,\n IntSet: () => IntSet,\n Interpolation: () => Interpolation,\n LoadingScreen: () => LoadingScreen,\n M00: () => M00,\n M01: () => M01,\n M02: () => M02,\n M03: () => M03,\n M10: () => M10,\n M11: () => M11,\n M12: () => M12,\n M13: () => M13,\n M20: () => M20,\n M21: () => M21,\n M22: () => M22,\n M23: () => M23,\n M30: () => M30,\n M31: () => M31,\n M32: () => M32,\n M33: () => M33,\n ManagedWebGLRenderingContext: () => ManagedWebGLRenderingContext,\n MathUtils: () => MathUtils,\n Matrix4: () => Matrix42,\n Mesh: () => Mesh,\n MeshAttachment: () => MeshAttachment,\n MixBlend: () => MixBlend,\n MixDirection: () => MixDirection,\n OrthoCamera: () => OrthoCamera,\n PathAttachment: () => PathAttachment,\n PathConstraint: () => PathConstraint,\n PathConstraintData: () => PathConstraintData,\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\n PointAttachment: () => PointAttachment,\n PolygonBatcher: () => PolygonBatcher,\n Pool: () => Pool,\n Position2Attribute: () => Position2Attribute,\n Position3Attribute: () => Position3Attribute,\n PositionMode: () => PositionMode,\n Pow: () => Pow,\n PowOut: () => PowOut,\n RGB2Timeline: () => RGB2Timeline,\n RGBA2Timeline: () => RGBA2Timeline,\n RGBATimeline: () => RGBATimeline,\n RGBTimeline: () => RGBTimeline,\n RegionAttachment: () => RegionAttachment,\n ResizeMode: () => ResizeMode,\n RotateMode: () => RotateMode,\n RotateTimeline: () => RotateTimeline,\n SETUP: () => SETUP,\n SUBSEQUENT: () => SUBSEQUENT,\n ScaleTimeline: () => ScaleTimeline,\n ScaleXTimeline: () => ScaleXTimeline,\n ScaleYTimeline: () => ScaleYTimeline,\n SceneRenderer: () => SceneRenderer,\n SequenceTimeline: () => SequenceTimeline,\n Shader: () => Shader,\n ShapeRenderer: () => ShapeRenderer,\n ShapeType: () => ShapeType,\n ShearTimeline: () => ShearTimeline,\n ShearXTimeline: () => ShearXTimeline,\n ShearYTimeline: () => ShearYTimeline,\n Skeleton: () => Skeleton,\n SkeletonBinary: () => SkeletonBinary,\n SkeletonBounds: () => SkeletonBounds,\n SkeletonClipping: () => SkeletonClipping,\n SkeletonData: () => SkeletonData,\n SkeletonDebugRenderer: () => SkeletonDebugRenderer,\n SkeletonJson: () => SkeletonJson,\n SkeletonRenderer: () => SkeletonRenderer,\n Skin: () => Skin,\n SkinEntry: () => SkinEntry,\n Slot: () => Slot,\n SlotData: () => SlotData,\n SpacingMode: () => SpacingMode,\n SpineCanvas: () => SpineCanvas,\n StringSet: () => StringSet,\n TexCoordAttribute: () => TexCoordAttribute,\n Texture: () => Texture,\n TextureAtlas: () => TextureAtlas,\n TextureAtlasPage: () => TextureAtlasPage,\n TextureAtlasRegion: () => TextureAtlasRegion,\n TextureFilter: () => TextureFilter,\n TextureRegion: () => TextureRegion,\n TextureWrap: () => TextureWrap,\n TimeKeeper: () => TimeKeeper,\n Timeline: () => Timeline,\n Touch: () => Touch,\n TrackEntry: () => TrackEntry,\n TransformConstraint: () => TransformConstraint,\n TransformConstraintData: () => TransformConstraintData,\n TransformConstraintTimeline: () => TransformConstraintTimeline,\n TransformMode: () => TransformMode,\n TranslateTimeline: () => TranslateTimeline,\n TranslateXTimeline: () => TranslateXTimeline,\n TranslateYTimeline: () => TranslateYTimeline,\n Triangulator: () => Triangulator,\n Utils: () => Utils,\n Vector2: () => Vector2,\n Vector3: () => Vector3,\n VertexAttachment: () => VertexAttachment,\n VertexAttribute: () => VertexAttribute,\n VertexAttributeType: () => VertexAttributeType,\n WebGLBlendModeConverter: () => WebGLBlendModeConverter,\n WindowedMean: () => WindowedMean\n });\n\n // spine-core/src/Utils.ts\n var IntSet = class {\n constructor() {\n this.array = new Array();\n }\n add(value) {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n contains(value) {\n return this.array[value | 0] != void 0;\n }\n remove(value) {\n this.array[value | 0] = void 0;\n }\n clear() {\n this.array.length = 0;\n }\n };\n var StringSet = class {\n constructor() {\n this.entries = {};\n this.size = 0;\n }\n add(value) {\n let contains = this.entries[value];\n this.entries[value] = true;\n if (!contains) {\n this.size++;\n return true;\n }\n return false;\n }\n addAll(values) {\n let oldSize = this.size;\n for (var i = 0, n = values.length; i < n; i++)\n this.add(values[i]);\n return oldSize != this.size;\n }\n contains(value) {\n return this.entries[value];\n }\n clear() {\n this.entries = {};\n this.size = 0;\n }\n };\n var _Color = class {\n constructor(r = 0, g = 0, b = 0, a = 0) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n set(r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n return this.clamp();\n }\n setFromColor(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 setFromString(hex) {\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\n return this;\n }\n add(r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n return this.clamp();\n }\n clamp() {\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 static rgba8888ToColor(color, value) {\n color.r = ((value & 4278190080) >>> 24) / 255;\n color.g = ((value & 16711680) >>> 16) / 255;\n color.b = ((value & 65280) >>> 8) / 255;\n color.a = (value & 255) / 255;\n }\n static rgb888ToColor(color, value) {\n color.r = ((value & 16711680) >>> 16) / 255;\n color.g = ((value & 65280) >>> 8) / 255;\n color.b = (value & 255) / 255;\n }\n static fromString(hex) {\n return new _Color().setFromString(hex);\n }\n };\n var Color = _Color;\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 var _MathUtils = class {\n static clamp(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n }\n static cosDeg(degrees) {\n return Math.cos(degrees * _MathUtils.degRad);\n }\n static sinDeg(degrees) {\n return Math.sin(degrees * _MathUtils.degRad);\n }\n static signum(value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n static toInt(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n static cbrt(x) {\n let y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n }\n static randomTriangular(min, max) {\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n static randomTriangularWith(min, max, mode) {\n let u = Math.random();\n let 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 static isPowerOfTwo(value) {\n return value && (value & value - 1) === 0;\n }\n };\n var MathUtils = _MathUtils;\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 var Interpolation = class {\n apply(start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n }\n };\n var Pow = class extends Interpolation {\n constructor(power) {\n super();\n this.power = 2;\n this.power = power;\n }\n applyInternal(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 };\n var PowOut = class extends Pow {\n constructor(power) {\n super(power);\n }\n applyInternal(a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n };\n var _Utils = class {\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n static arrayFill(array, fromIndex, toIndex, value) {\n for (let i = fromIndex; i < toIndex; i++)\n array[i] = value;\n }\n static setArraySize(array, size, value = 0) {\n let oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n }\n static ensureArrayCapacity(array, size, value = 0) {\n if (array.length >= size)\n return array;\n return _Utils.setArraySize(array, size, value);\n }\n static newArray(size, defaultValue) {\n let array = new Array(size);\n for (let i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n }\n static newFloatArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Float32Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static newShortArray(size) {\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\n return new Int16Array(size);\n else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n }\n static toFloatArray(array) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n static toSinglePrecision(value) {\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n static webkit602BugfixHelper(alpha, blend) {\n }\n static contains(array, element, identity = true) {\n for (var i = 0; i < array.length; i++)\n if (array[i] == element)\n return true;\n return false;\n }\n static enumValue(type, name) {\n return type[name[0].toUpperCase() + name.slice(1)];\n }\n };\n var Utils = _Utils;\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\n var DebugUtils = class {\n static logBones(skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let 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 };\n var Pool = class {\n constructor(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n obtain() {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n free(item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n }\n freeAll(items) {\n for (let i = 0; i < items.length; i++)\n this.free(items[i]);\n }\n clear() {\n this.items.length = 0;\n }\n };\n var Vector2 = class {\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n length() {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n normalize() {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n };\n var TimeKeeper = class {\n constructor() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1e3;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n update() {\n let now = Date.now() / 1e3;\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 };\n var WindowedMean = class {\n constructor(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 hasEnoughData() {\n return this.addedValues >= this.values.length;\n }\n addValue(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 getMean() {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++)\n mean += this.values[i];\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n return 0;\n }\n };\n\n // spine-core/src/attachments/Attachment.ts\n var Attachment = class {\n constructor(name) {\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n };\n var _VertexAttachment = class extends Attachment {\n constructor(name) {\n super(name);\n this.id = _VertexAttachment.nextID++;\n this.bones = null;\n this.vertices = [];\n this.worldVerticesLength = 0;\n this.timelineAttachment = this;\n }\n computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (!bones) {\n if (deformArray.length > 0)\n vertices = deformArray;\n let bone = slot.bone;\n let x = bone.worldX;\n let y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\n let vx = vertices[v2], vy = vertices[v2 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let bone = skeletonBones[bones[v]];\n let 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 } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let bone = skeletonBones[bones[v]];\n let 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 copyTo(attachment) {\n if (this.bones) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n if (this.vertices) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.timelineAttachment = this.timelineAttachment;\n }\n };\n var VertexAttachment = _VertexAttachment;\n VertexAttachment.nextID = 0;\n\n // spine-core/src/attachments/Sequence.ts\n var _Sequence = class {\n constructor(count) {\n this.id = _Sequence.nextID();\n this.start = 0;\n this.digits = 0;\n this.setupIndex = 0;\n this.regions = new Array(count);\n }\n copy() {\n let copy = new _Sequence(this.regions.length);\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\n copy.start = this.start;\n copy.digits = this.digits;\n copy.setupIndex = this.setupIndex;\n return copy;\n }\n apply(slot, attachment) {\n let index = slot.sequenceIndex;\n if (index == -1)\n index = this.setupIndex;\n if (index >= this.regions.length)\n index = this.regions.length - 1;\n let region = this.regions[index];\n if (attachment.region != region) {\n attachment.region = region;\n attachment.updateRegion();\n }\n }\n getPath(basePath, index) {\n let result = basePath;\n let frame = (this.start + index).toString();\n for (let i = this.digits - frame.length; i > 0; i--)\n result += \"0\";\n result += frame;\n return result;\n }\n static nextID() {\n return _Sequence._nextID++;\n }\n };\n var Sequence = _Sequence;\n Sequence._nextID = 0;\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\n return SequenceMode2;\n })(SequenceMode || {});\n var SequenceModeValues = [\n 0 /* hold */,\n 1 /* once */,\n 2 /* loop */,\n 3 /* pingpong */,\n 4 /* onceReverse */,\n 5 /* loopReverse */,\n 6 /* pingpongReverse */\n ];\n\n // spine-core/src/Animation.ts\n var Animation = class {\n constructor(name, timelines, duration) {\n this.timelines = [];\n this.timelineIds = new StringSet();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n this.setTimelines(timelines);\n this.duration = duration;\n }\n setTimelines(timelines) {\n if (!timelines)\n throw new Error(\"timelines cannot be null.\");\n this.timelines = timelines;\n this.timelineIds.clear();\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds.addAll(timelines[i].getPropertyIds());\n }\n hasTimeline(ids) {\n for (let i = 0; i < ids.length; i++)\n if (this.timelineIds.contains(ids[i]))\n return true;\n return false;\n }\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (!skeleton)\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 let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n };\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\n return MixBlend2;\n })(MixBlend || {});\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\n return MixDirection2;\n })(MixDirection || {});\n var Property = {\n rotate: 0,\n x: 1,\n y: 2,\n scaleX: 3,\n scaleY: 4,\n shearX: 5,\n shearY: 6,\n rgb: 7,\n alpha: 8,\n rgb2: 9,\n attachment: 10,\n deform: 11,\n event: 12,\n drawOrder: 13,\n ikConstraint: 14,\n transformConstraint: 15,\n pathConstraintPosition: 16,\n pathConstraintSpacing: 17,\n pathConstraintMix: 18,\n sequence: 19\n };\n var Timeline = class {\n constructor(frameCount, propertyIds) {\n this.propertyIds = propertyIds;\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\n }\n getPropertyIds() {\n return this.propertyIds;\n }\n getFrameEntries() {\n return 1;\n }\n getFrameCount() {\n return this.frames.length / this.getFrameEntries();\n }\n getDuration() {\n return this.frames[this.frames.length - this.getFrameEntries()];\n }\n static search1(frames, time) {\n let n = frames.length;\n for (let i = 1; i < n; i++)\n if (frames[i] > time)\n return i - 1;\n return n - 1;\n }\n static search(frames, time, step) {\n let n = frames.length;\n for (let i = step; i < n; i += step)\n if (frames[i] > time)\n return i - step;\n return n - step;\n }\n };\n var CurveTimeline = class extends Timeline {\n constructor(frameCount, bezierCount, propertyIds) {\n super(frameCount, propertyIds);\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\n this.curves[frameCount - 1] = 1;\n }\n setLinear(frame) {\n this.curves[frame] = 0;\n }\n setStepped(frame) {\n this.curves[frame] = 1;\n }\n shrink(bezierCount) {\n let size = this.getFrameCount() + bezierCount * 18;\n if (this.curves.length > size) {\n let newCurves = Utils.newFloatArray(size);\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\n this.curves = newCurves;\n }\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = value1 + dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getBezierValue(time, frameIndex, valueOffset, i) {\n let curves = this.curves;\n if (curves[i] > time) {\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n frameIndex += this.getFrameEntries();\n let x = curves[n - 2], y = curves[n - 1];\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\n }\n };\n var CurveTimeline1 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId) {\n super(frameCount, bezierCount, [propertyId]);\n }\n getFrameEntries() {\n return 2;\n }\n setFrame(frame, time, value) {\n frame <<= 1;\n this.frames[frame] = time;\n this.frames[frame + 1] = value;\n }\n getCurveValue(time) {\n let frames = this.frames;\n let i = frames.length - 2;\n for (let ii = 2; ii <= i; ii += 2) {\n if (frames[ii] > time) {\n i = ii - 2;\n break;\n }\n }\n let curveType = this.curves[i >> 1];\n switch (curveType) {\n case 0:\n let before = frames[i], value = frames[i + 1];\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\n case 1:\n return frames[i + 1];\n }\n return this.getBezierValue(time, i, 1, curveType - 2);\n }\n };\n var CurveTimeline2 = class extends CurveTimeline {\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\n }\n getFrameEntries() {\n return 3;\n }\n setFrame(frame, time, value1, value2) {\n frame *= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = value1;\n this.frames[frame + 2] = value2;\n }\n };\n var RotateTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n return;\n case 1 /* first */:\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\n }\n return;\n }\n let r = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n r += bone.data.rotation - bone.rotation;\n case 3 /* add */:\n bone.rotation += r * alpha;\n }\n }\n };\n var TranslateTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.x + \"|\" + boneIndex,\n Property.y + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n };\n var TranslateXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x;\n return;\n case 1 /* first */:\n bone.x += (bone.data.x - bone.x) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.x = bone.data.x + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n break;\n case 3 /* add */:\n bone.x += x * alpha;\n }\n }\n };\n var TranslateYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y;\n return;\n case 1 /* first */:\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.y = bone.data.y + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case 3 /* add */:\n bone.y += y * alpha;\n }\n }\n };\n var ScaleTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.scaleX + \"|\" + boneIndex,\n Property.scaleY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let x, y;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n x *= bone.data.scaleX;\n y *= bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ScaleXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleX = bone.data.scaleX;\n return;\n case 1 /* first */:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time) * bone.data.scaleX;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleX += x - bone.data.scaleX;\n else\n bone.scaleX = x;\n } else {\n let bx = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n bx = bone.data.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = bone.scaleX;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n bone.scaleX = bx + (x - bx) * alpha;\n break;\n case 3 /* add */:\n bone.scaleX += (x - bone.data.scaleX) * alpha;\n }\n }\n }\n }\n };\n var ScaleYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.scaleY = bone.data.scaleY;\n return;\n case 1 /* first */:\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time) * bone.data.scaleY;\n if (alpha == 1) {\n if (blend == 3 /* add */)\n bone.scaleY += y - bone.data.scaleY;\n else\n bone.scaleY = y;\n } else {\n let by = 0;\n if (direction == 1 /* mixOut */) {\n switch (blend) {\n case 0 /* setup */:\n by = bone.data.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = bone.scaleY;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case 0 /* setup */:\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleY = by + (y - by) * alpha;\n break;\n case 3 /* add */:\n bone.scaleY += (y - bone.data.scaleY) * alpha;\n }\n }\n }\n }\n };\n var ShearTimeline = class extends CurveTimeline2 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(\n frameCount,\n bezierCount,\n Property.shearX + \"|\" + boneIndex,\n Property.shearY + \"|\" + boneIndex\n );\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let x = 0, y = 0;\n let i = Timeline.search(frames, time, 3);\n let curveType = this.curves[i / 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n x = frames[i + 1];\n y = frames[i + 2];\n let t = (time - before) / (frames[i + 3] - before);\n x += (frames[i + 3 + 1] - x) * t;\n y += (frames[i + 3 + 2] - y) * t;\n break;\n case 1:\n x = frames[i + 1];\n y = frames[i + 2];\n break;\n default:\n x = this.getBezierValue(time, i, 1, curveType - 2);\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* 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 3 /* add */:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n };\n var ShearXTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX;\n return;\n case 1 /* first */:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n }\n return;\n }\n let x = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearX = bone.data.shearX + x * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n break;\n case 3 /* add */:\n bone.shearX += x * alpha;\n }\n }\n };\n var ShearYTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, boneIndex) {\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\n this.boneIndex = 0;\n this.boneIndex = boneIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY;\n return;\n case 1 /* first */:\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n let y = this.getCurveValue(time);\n switch (blend) {\n case 0 /* setup */:\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case 1 /* first */:\n case 2 /* replace */:\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case 3 /* add */:\n bone.shearY += y * alpha;\n }\n }\n };\n var RGBATimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 5;\n }\n setFrame(frame, time, r, g, b, a) {\n frame *= 5;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.setFromColor(setup);\n return;\n case 1 /* first */:\n color.add(\n (setup.r - color.r) * alpha,\n (setup.g - color.g) * alpha,\n (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha\n );\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0;\n let i = Timeline.search(frames, time, 5);\n let curveType = this.curves[i / 5];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n let t = (time - before) / (frames[i + 5] - before);\n r += (frames[i + 5 + 1] - r) * t;\n g += (frames[i + 5 + 2] - g) * t;\n b += (frames[i + 5 + 3] - b) * t;\n a += (frames[i + 5 + 4] - a) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n }\n if (alpha == 1)\n color.set(r, g, b, a);\n else {\n if (blend == 0 /* 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 };\n var RGBTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, r, g, b) {\n frame <<= 2;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let color = slot.color;\n if (time < frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n return;\n case 1 /* first */:\n color.r += (setup.r - color.r) * alpha;\n color.g += (setup.g - color.g) * alpha;\n color.b += (setup.b - color.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n r += (frames[i + 4 + 1] - r) * t;\n g += (frames[i + 4 + 2] - g) * t;\n b += (frames[i + 4 + 3] - b) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (alpha == 1) {\n color.r = r;\n color.g = g;\n color.b = b;\n } else {\n if (blend == 0 /* setup */) {\n let setup = slot.data.color;\n color.r = setup.r;\n color.g = setup.g;\n color.b = setup.b;\n }\n color.r += (r - color.r) * alpha;\n color.g += (g - color.g) * alpha;\n color.b += (b - color.b) * alpha;\n }\n }\n };\n var AlphaTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let color = slot.color;\n if (time < this.frames[0]) {\n let setup = slot.data.color;\n switch (blend) {\n case 0 /* setup */:\n color.a = setup.a;\n return;\n case 1 /* first */:\n color.a += (setup.a - color.a) * alpha;\n }\n return;\n }\n let a = this.getCurveValue(time);\n if (alpha == 1)\n color.a = a;\n else {\n if (blend == 0 /* setup */)\n color.a = slot.data.color.a;\n color.a += (a - color.a) * alpha;\n }\n }\n };\n var RGBA2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.alpha + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 8;\n }\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\n frame <<= 3;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = a;\n this.frames[frame + 5] = r2;\n this.frames[frame + 6] = g2;\n this.frames[frame + 7] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.setFromColor(setupLight);\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.add(\n (setupLight.r - light.r) * alpha,\n (setupLight.g - light.g) * alpha,\n (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha\n );\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 8);\n let curveType = this.curves[i >> 3];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n let t = (time - before) / (frames[i + 8] - before);\n r += (frames[i + 8 + 1] - r) * t;\n g += (frames[i + 8 + 2] - g) * t;\n b += (frames[i + 8 + 3] - b) * t;\n a += (frames[i + 8 + 4] - a) * t;\n r2 += (frames[i + 8 + 5] - r2) * t;\n g2 += (frames[i + 8 + 6] - g2) * t;\n b2 += (frames[i + 8 + 7] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n a = frames[i + 4];\n r2 = frames[i + 5];\n g2 = frames[i + 6];\n b2 = frames[i + 7];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\n }\n if (alpha == 1) {\n light.set(r, g, b, a);\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n light.setFromColor(slot.data.color);\n let setupDark = slot.data.darkColor;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var RGB2Timeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex) {\n super(frameCount, bezierCount, [\n Property.rgb + \"|\" + slotIndex,\n Property.rgb2 + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, r, g, b, r2, g2, b2) {\n frame *= 7;\n this.frames[frame] = time;\n this.frames[frame + 1] = r;\n this.frames[frame + 2] = g;\n this.frames[frame + 3] = b;\n this.frames[frame + 4] = r2;\n this.frames[frame + 5] = g2;\n this.frames[frame + 6] = b2;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let frames = this.frames;\n let light = slot.color, dark = slot.darkColor;\n if (time < frames[0]) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n switch (blend) {\n case 0 /* setup */:\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n return;\n case 1 /* first */:\n light.r += (setupLight.r - light.r) * alpha;\n light.g += (setupLight.g - light.g) * alpha;\n light.b += (setupLight.b - light.b) * alpha;\n dark.r += (setupDark.r - dark.r) * alpha;\n dark.g += (setupDark.g - dark.g) * alpha;\n dark.b += (setupDark.b - dark.b) * alpha;\n }\n return;\n }\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n r += (frames[i + 7 + 1] - r) * t;\n g += (frames[i + 7 + 2] - g) * t;\n b += (frames[i + 7 + 3] - b) * t;\n r2 += (frames[i + 7 + 4] - r2) * t;\n g2 += (frames[i + 7 + 5] - g2) * t;\n b2 += (frames[i + 7 + 6] - b2) * t;\n break;\n case 1:\n r = frames[i + 1];\n g = frames[i + 2];\n b = frames[i + 3];\n r2 = frames[i + 4];\n g2 = frames[i + 5];\n b2 = frames[i + 6];\n break;\n default:\n r = this.getBezierValue(time, i, 1, curveType - 2);\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (alpha == 1) {\n light.r = r;\n light.g = g;\n light.b = b;\n dark.r = r2;\n dark.g = g2;\n dark.b = b2;\n } else {\n if (blend == 0 /* setup */) {\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.r = setupLight.r;\n light.g = setupLight.g;\n light.b = setupLight.b;\n dark.r = setupDark.r;\n dark.g = setupDark.g;\n dark.b = setupDark.b;\n }\n light.r += (r - light.r) * alpha;\n light.g += (g - light.g) * alpha;\n light.b += (b - light.b) * alpha;\n dark.r += (r2 - dark.r) * alpha;\n dark.g += (g2 - dark.g) * alpha;\n dark.b += (b2 - dark.b) * alpha;\n }\n }\n };\n var AttachmentTimeline = class extends Timeline {\n constructor(frameCount, slotIndex) {\n super(frameCount, [\n Property.attachment + \"|\" + slotIndex\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachmentNames = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, attachmentName) {\n this.frames[frame] = time;\n this.attachmentNames[frame] = attachmentName;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\n }\n setAttachment(skeleton, slot, attachmentName) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n };\n var DeformTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, slotIndex, attachment) {\n super(frameCount, bezierCount, [\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\n ]);\n this.slotIndex = 0;\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n this.vertices = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, vertices) {\n this.frames[frame] = time;\n this.vertices[frame] = vertices;\n }\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\n let curves = this.curves;\n let i = this.getFrameCount() + bezier * 18;\n if (value == 0)\n curves[frame] = 2 + i;\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\n let x = time1 + dx, y = dy;\n for (let n = i + 18; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dx += ddx;\n dy += ddy;\n ddx += dddx;\n ddy += dddy;\n x += dx;\n y += dy;\n }\n }\n getCurvePercent(time, frame) {\n let curves = this.curves;\n let i = curves[frame];\n switch (i) {\n case 0:\n let x2 = this.frames[frame];\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\n case 1:\n return 0;\n }\n i -= 2;\n if (curves[i] > time) {\n let x2 = this.frames[frame];\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\n }\n let n = i + 18;\n for (i += 2; i < n; i += 2) {\n if (curves[i] >= time) {\n let x2 = curves[i - 2], y2 = curves[i - 1];\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\n }\n }\n let x = curves[n - 2], y = curves[n - 1];\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.getAttachment();\n if (!slotAttachment)\n return;\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\n return;\n let deform = slot.deform;\n if (deform.length == 0)\n blend = 0 /* setup */;\n let vertices = this.vertices;\n let vertexCount = vertices[0].length;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n deform.length = 0;\n return;\n case 1 /* first */:\n if (alpha == 1) {\n deform.length = 0;\n return;\n }\n deform.length = vertexCount;\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n deform.length = vertexCount;\n if (time >= frames[frames.length - 1]) {\n let lastVertices = vertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] - setupVertices[i2];\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2];\n }\n } else\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let setup = setupVertices[i2];\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] = lastVertices[i2] * alpha;\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++)\n deform[i2] += lastVertices[i2] * alpha;\n }\n }\n }\n return;\n }\n let frame = Timeline.search1(frames, time);\n let percent = this.getCurvePercent(time, frame);\n let prevVertices = vertices[frame];\n let nextVertices = vertices[frame + 1];\n if (alpha == 1) {\n if (blend == 3 /* add */) {\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case 0 /* setup */: {\n let vertexAttachment2 = slotAttachment;\n if (!vertexAttachment2.bones) {\n let setupVertices = vertexAttachment2.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2], setup = setupVertices[i2];\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case 1 /* first */:\n case 2 /* replace */:\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\n }\n break;\n case 3 /* add */:\n let vertexAttachment = slotAttachment;\n if (!vertexAttachment.bones) {\n let setupVertices = vertexAttachment.vertices;\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\n }\n } else {\n for (let i2 = 0; i2 < vertexCount; i2++) {\n let prev = prevVertices[i2];\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n };\n var _EventTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _EventTimeline.propertyIds);\n this.events = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, event) {\n this.frames[frame] = event.time;\n this.events[frame] = event;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (!firedEvents)\n return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n let i = 0;\n if (lastTime < frames[0])\n i = 0;\n else {\n i = Timeline.search1(frames, lastTime) + 1;\n let frameTime = frames[i];\n while (i > 0) {\n if (frames[i - 1] != frameTime)\n break;\n i--;\n }\n }\n for (; i < frameCount && time >= frames[i]; i++)\n firedEvents.push(this.events[i]);\n }\n };\n var EventTimeline = _EventTimeline;\n EventTimeline.propertyIds = [\"\" + Property.event];\n var _DrawOrderTimeline = class extends Timeline {\n constructor(frameCount) {\n super(frameCount, _DrawOrderTimeline.propertyIds);\n this.drawOrders = new Array(frameCount);\n }\n getFrameCount() {\n return this.frames.length;\n }\n setFrame(frame, time, drawOrder) {\n this.frames[frame] = time;\n this.drawOrders[frame] = drawOrder;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (direction == 1 /* mixOut */) {\n if (blend == 0 /* setup */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n if (time < this.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n let idx = Timeline.search1(this.frames, time);\n let drawOrderToSetupIndex = this.drawOrders[idx];\n if (!drawOrderToSetupIndex)\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n else {\n let drawOrder = skeleton.drawOrder;\n let slots = skeleton.slots;\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n };\n var DrawOrderTimeline = _DrawOrderTimeline;\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\n var IkConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, ikConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.ikConstraint + \"|\" + ikConstraintIndex\n ]);\n this.ikConstraintIndex = 0;\n this.ikConstraintIndex = ikConstraintIndex;\n }\n getFrameEntries() {\n return 6;\n }\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\n frame *= 6;\n this.frames[frame] = time;\n this.frames[frame + 1] = mix;\n this.frames[frame + 2] = softness;\n this.frames[frame + 3] = bendDirection;\n this.frames[frame + 4] = compress ? 1 : 0;\n this.frames[frame + 5] = stretch ? 1 : 0;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* 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 1 /* 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 let mix = 0, softness = 0;\n let i = Timeline.search(frames, time, 6);\n let curveType = this.curves[i / 6];\n switch (curveType) {\n case 0:\n let before = frames[i];\n mix = frames[i + 1];\n softness = frames[i + 2];\n let t = (time - before) / (frames[i + 6] - before);\n mix += (frames[i + 6 + 1] - mix) * t;\n softness += (frames[i + 6 + 2] - softness) * t;\n break;\n case 1:\n mix = frames[i + 1];\n softness = frames[i + 2];\n break;\n default:\n mix = this.getBezierValue(time, i, 1, curveType - 2);\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n }\n if (blend == 0 /* setup */) {\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\n if (direction == 1 /* mixOut */) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n } else {\n constraint.mix += (mix - constraint.mix) * alpha;\n constraint.softness += (softness - constraint.softness) * alpha;\n if (direction == 0 /* mixIn */) {\n constraint.bendDirection = frames[i + 3];\n constraint.compress = frames[i + 4] != 0;\n constraint.stretch = frames[i + 5] != 0;\n }\n }\n }\n };\n var TransformConstraintTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, transformConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.transformConstraint + \"|\" + transformConstraintIndex\n ]);\n this.transformConstraintIndex = 0;\n this.transformConstraintIndex = transformConstraintIndex;\n }\n getFrameEntries() {\n return 7;\n }\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\n let frames = this.frames;\n frame *= 7;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n frames[frame + 4] = mixScaleX;\n frames[frame + 5] = mixScaleY;\n frames[frame + 6] = mixShearY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\n }\n return;\n }\n let rotate, x, y, scaleX, scaleY, shearY;\n let i = Timeline.search(frames, time, 7);\n let curveType = this.curves[i / 7];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n let t = (time - before) / (frames[i + 7] - before);\n rotate += (frames[i + 7 + 1] - rotate) * t;\n x += (frames[i + 7 + 2] - x) * t;\n y += (frames[i + 7 + 3] - y) * t;\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\n shearY += (frames[i + 7 + 6] - shearY) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n scaleX = frames[i + 4];\n scaleY = frames[i + 5];\n shearY = frames[i + 6];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\n }\n }\n };\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.position = constraint.data.position;\n return;\n case 1 /* first */:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n let position = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n };\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.spacing = constraint.data.spacing;\n return;\n case 1 /* first */:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n let spacing = this.getCurveValue(time);\n if (blend == 0 /* setup */)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n };\n var PathConstraintMixTimeline = class extends CurveTimeline {\n constructor(frameCount, bezierCount, pathConstraintIndex) {\n super(frameCount, bezierCount, [\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\n ]);\n this.pathConstraintIndex = 0;\n this.pathConstraintIndex = pathConstraintIndex;\n }\n getFrameEntries() {\n return 4;\n }\n setFrame(frame, time, mixRotate, mixX, mixY) {\n let frames = this.frames;\n frame <<= 2;\n frames[frame] = time;\n frames[frame + 1] = mixRotate;\n frames[frame + 2] = mixX;\n frames[frame + 3] = mixY;\n }\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n constraint.mixRotate = constraint.data.mixRotate;\n constraint.mixX = constraint.data.mixX;\n constraint.mixY = constraint.data.mixY;\n return;\n case 1 /* first */:\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\n }\n return;\n }\n let rotate, x, y;\n let i = Timeline.search(frames, time, 4);\n let curveType = this.curves[i >> 2];\n switch (curveType) {\n case 0:\n let before = frames[i];\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n let t = (time - before) / (frames[i + 4] - before);\n rotate += (frames[i + 4 + 1] - rotate) * t;\n x += (frames[i + 4 + 2] - x) * t;\n y += (frames[i + 4 + 3] - y) * t;\n break;\n case 1:\n rotate = frames[i + 1];\n x = frames[i + 2];\n y = frames[i + 3];\n break;\n default:\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\n }\n if (blend == 0 /* setup */) {\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\n } else {\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\n constraint.mixX += (x - constraint.mixX) * alpha;\n constraint.mixY += (y - constraint.mixY) * alpha;\n }\n }\n };\n var _SequenceTimeline = class extends Timeline {\n constructor(frameCount, slotIndex, attachment) {\n super(frameCount, [\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\n ]);\n this.slotIndex = slotIndex;\n this.attachment = attachment;\n }\n getFrameEntries() {\n return _SequenceTimeline.ENTRIES;\n }\n getSlotIndex() {\n return this.slotIndex;\n }\n getAttachment() {\n return this.attachment;\n }\n setFrame(frame, time, mode, index, delay) {\n let frames = this.frames;\n frame *= _SequenceTimeline.ENTRIES;\n frames[frame] = time;\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\n frames[frame + _SequenceTimeline.DELAY] = delay;\n }\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n let slotAttachment = slot.attachment;\n let attachment = this.attachment;\n if (slotAttachment != attachment) {\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\n return;\n }\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n slot.sequenceIndex = -1;\n return;\n }\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\n let before = frames[i];\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\n let delay = frames[i + _SequenceTimeline.DELAY];\n if (!this.attachment.sequence)\n return;\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\n let mode = SequenceModeValues[modeAndIndex & 15];\n if (mode != 0 /* hold */) {\n index += (time - before) / delay + 1e-5 | 0;\n switch (mode) {\n case 1 /* once */:\n index = Math.min(count - 1, index);\n break;\n case 2 /* loop */:\n index %= count;\n break;\n case 3 /* pingpong */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : index % n;\n if (index >= count)\n index = n - index;\n break;\n }\n case 4 /* onceReverse */:\n index = Math.max(count - 1 - index, 0);\n break;\n case 5 /* loopReverse */:\n index = count - 1 - index % count;\n break;\n case 6 /* pingpongReverse */: {\n let n = (count << 1) - 2;\n index = n == 0 ? 0 : (index + count - 1) % n;\n if (index >= count)\n index = n - index;\n }\n }\n }\n slot.sequenceIndex = index;\n }\n };\n var SequenceTimeline = _SequenceTimeline;\n SequenceTimeline.ENTRIES = 3;\n SequenceTimeline.MODE = 1;\n SequenceTimeline.DELAY = 2;\n\n // spine-core/src/AnimationState.ts\n var _AnimationState = class {\n constructor(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 StringSet();\n this.animationsChanged = false;\n this.trackEntryPool = new Pool(() => new TrackEntry());\n this.data = data;\n }\n static emptyAnimation() {\n return _AnimationState._emptyAnimation;\n }\n update(delta) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (!current)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n let 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 let next = current.next;\n if (next) {\n let 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) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\n tracks[i] = null;\n this.queue.end(current);\n this.clearNext(current);\n continue;\n }\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from)\n from.mixingTo = null;\n while (from) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n }\n updateMixingFrom(to, delta) {\n let from = to.mixingFrom;\n if (!from)\n return true;\n let 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)\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 apply(skeleton) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\n let current = tracks[i2];\n if (!current || current.delay > 0)\n continue;\n applied = true;\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\n let mix = current.alpha;\n if (current.mixingFrom)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && !current.next)\n mix = 0;\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\n let applyEvents = events;\n if (current.reverse) {\n applyTime = current.animation.duration - applyTime;\n applyEvents = null;\n }\n let timelines = current.animation.timelines;\n let timelineCount = timelines.length;\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\n for (let ii = 0; ii < timelineCount; ii++) {\n Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\n }\n } else {\n let timelineMode = current.timelineMode;\n let shortestRotation = current.shortestRotation;\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n current.timelinesRotation.length = timelineCount << 1;\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline2 = timelines[ii];\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\n } else if (timeline2 instanceof AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\n } else {\n Utils.webkit602BugfixHelper(mix, blend);\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* 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 + 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.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n }\n applyMixingFrom(to, skeleton, blend) {\n let from = to.mixingFrom;\n if (from.mixingFrom)\n this.applyMixingFrom(from, skeleton, blend);\n let mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == 1 /* first */)\n blend = 0 /* setup */;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != 1 /* first */)\n blend = from.mixBlend;\n }\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let timelines = from.animation.timelines;\n let timelineCount = timelines.length;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\n let events = null;\n if (from.reverse)\n applyTime = from.animation.duration - applyTime;\n else if (mix < from.eventThreshold)\n events = this.events;\n if (blend == 3 /* add */) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n let shortestRotation = from.shortestRotation;\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\n if (firstFrame)\n from.timelinesRotation.length = timelineCount << 1;\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = 1 /* mixOut */;\n let timelineBlend;\n let alpha = 0;\n switch (timelineMode[i]) {\n case SUBSEQUENT:\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaMix;\n break;\n case HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case HOLD_FIRST:\n timelineBlend = 0 /* setup */;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = 0 /* setup */;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (!shortestRotation && timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\n else {\n Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\n direction = 0 /* mixIn */;\n timeline.apply(skeleton, animationLast, applyTime, 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 applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n if (time < timeline.frames[0]) {\n if (blend == 0 /* setup */ || blend == 1 /* first */)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n } else\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + SETUP;\n }\n setAttachment(skeleton, slot, attachmentName, attachments) {\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n if (attachments)\n slot.attachmentState = this.unkeyedState + CURRENT;\n }\n applyRotateTimeline(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, 0 /* mixIn */);\n return;\n }\n let bone = skeleton.bones[timeline.boneIndex];\n if (!bone.active)\n return;\n let frames = timeline.frames;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case 0 /* setup */:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case 1 /* first */:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\n r2 = bone.data.rotation + timeline.getCurveValue(time);\n }\n let total = 0, diff = r2 - r1;\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n let current = diff > 0, dir = lastTotal >= 0;\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n bone.rotation = r1 + total * alpha;\n }\n queueEvents(entry, animationTime) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped)\n break;\n if (event.time > animationEnd)\n continue;\n this.queue.event(entry, event);\n }\n let 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 let event = events[i];\n if (event.time < animationStart)\n continue;\n this.queue.event(entry, event);\n }\n }\n clearTracks() {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let 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 clearTrack(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n let current = this.tracks[trackIndex];\n if (!current)\n return;\n this.queue.end(current);\n this.clearNext(current);\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (!from)\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 setCurrent(index, current, interrupt) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n current.previous = null;\n if (from) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom && 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 setAnimation(trackIndex, animationName, loop = false) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n setAnimationWith(trackIndex, animation, loop = false) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.clearNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.clearNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (!animation)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\n if (!animation)\n throw new Error(\"animation cannot be null.\");\n let last = this.expandToIndex(trackIndex);\n if (last) {\n while (last.next)\n last = last.next;\n }\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n if (!last) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n entry.previous = last;\n if (delay <= 0)\n delay += last.getTrackComplete() - entry.mixDuration;\n }\n entry.delay = delay;\n return entry;\n }\n setEmptyAnimation(trackIndex, mixDuration = 0) {\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\n if (delay <= 0)\n entry.delay += entry.mixDuration - mixDuration;\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n setEmptyAnimations(mixDuration = 0) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n expandToIndex(index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n trackEntry(trackIndex, animation, loop, last) {\n let entry = this.trackEntryPool.obtain();\n entry.reset();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.reverse = false;\n entry.shortestRotation = 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.mixTime = 0;\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\n entry.interruptAlpha = 1;\n entry.totalAlpha = 0;\n entry.mixBlend = 2 /* replace */;\n return entry;\n }\n clearNext(entry) {\n let next = entry.next;\n while (next) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n _animationsChanged() {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let entry = tracks[i];\n if (!entry)\n continue;\n while (entry.mixingFrom)\n entry = entry.mixingFrom;\n do {\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry);\n }\n }\n computeHold(entry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n timelineMode.length = timelinesCount;\n let timelineHoldMix = entry.timelineHoldMix;\n timelineHoldMix.length = 0;\n let propertyIDs = this.propertyIDs;\n if (to && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++)\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\n return;\n }\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let ids = timeline.getPropertyIds();\n if (!propertyIDs.addAll(ids))\n timelineMode[i] = SUBSEQUENT;\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\n timelineMode[i] = FIRST;\n } else {\n for (let next = to.mixingTo; next; next = next.mixingTo) {\n if (next.animation.hasTimeline(ids))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = HOLD_MIX;\n timelineHoldMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = HOLD_FIRST;\n }\n }\n }\n getCurrent(trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n }\n addListener(listener) {\n if (!listener)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n }\n clearListeners() {\n this.listeners.length = 0;\n }\n clearListenerNotifications() {\n this.queue.clear();\n }\n };\n var AnimationState = _AnimationState;\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\n var TrackEntry = class {\n constructor() {\n this.animation = null;\n this.previous = null;\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.listener = null;\n this.trackIndex = 0;\n this.loop = false;\n this.holdPrevious = false;\n this.reverse = false;\n this.shortestRotation = false;\n this.eventThreshold = 0;\n this.attachmentThreshold = 0;\n this.drawOrderThreshold = 0;\n this.animationStart = 0;\n this.animationEnd = 0;\n this.animationLast = 0;\n this.nextAnimationLast = 0;\n this.delay = 0;\n this.trackTime = 0;\n this.trackLast = 0;\n this.nextTrackLast = 0;\n this.trackEnd = 0;\n this.timeScale = 0;\n this.alpha = 0;\n this.mixTime = 0;\n this.mixDuration = 0;\n this.interruptAlpha = 0;\n this.totalAlpha = 0;\n this.mixBlend = 2 /* replace */;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n reset() {\n this.next = null;\n this.previous = 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 getAnimationTime() {\n if (this.loop) {\n let 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 setAnimationLast(animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n isComplete() {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n resetRotationDirections() {\n this.timelinesRotation.length = 0;\n }\n getTrackComplete() {\n let duration = this.animationEnd - this.animationStart;\n if (duration != 0) {\n if (this.loop)\n return duration * (1 + (this.trackTime / duration | 0));\n if (this.trackTime < duration)\n return duration;\n }\n return this.trackTime;\n }\n };\n var EventQueue = class {\n constructor(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n start(entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n interrupt(entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n end(entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n dispose(entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n complete(entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n event(entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n drain() {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n let objects = this.objects;\n let listeners = this.animState.listeners;\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i];\n let entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener && entry.listener.start)\n entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.start)\n listener.start(entry);\n }\n break;\n case EventType.interrupt:\n if (entry.listener && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.interrupt)\n listener.interrupt(entry);\n }\n break;\n case EventType.end:\n if (entry.listener && entry.listener.end)\n entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.end)\n listener.end(entry);\n }\n case EventType.dispose:\n if (entry.listener && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.dispose)\n listener.dispose(entry);\n }\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener && entry.listener.complete)\n entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.complete)\n listener.complete(entry);\n }\n break;\n case EventType.event:\n let event = objects[i++ + 2];\n if (entry.listener && entry.listener.event)\n entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++) {\n let listener = listeners[ii];\n if (listener.event)\n listener.event(entry, event);\n }\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n }\n clear() {\n this.objects.length = 0;\n }\n };\n var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"start\"] = 0] = \"start\";\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\n EventType2[EventType2[\"end\"] = 2] = \"end\";\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\n EventType2[EventType2[\"event\"] = 5] = \"event\";\n return EventType2;\n })(EventType || {});\n var AnimationStateAdapter = class {\n start(entry) {\n }\n interrupt(entry) {\n }\n end(entry) {\n }\n dispose(entry) {\n }\n complete(entry) {\n }\n event(entry, event) {\n }\n };\n var SUBSEQUENT = 0;\n var FIRST = 1;\n var HOLD_SUBSEQUENT = 2;\n var HOLD_FIRST = 3;\n var HOLD_MIX = 4;\n var SETUP = 1;\n var CURRENT = 2;\n\n // spine-core/src/AnimationStateData.ts\n var AnimationStateData = class {\n constructor(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (!skeletonData)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n setMix(fromName, toName, duration) {\n let from = this.skeletonData.findAnimation(fromName);\n if (!from)\n throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (!to)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n setMixWith(from, to, duration) {\n if (!from)\n throw new Error(\"from cannot be null.\");\n if (!to)\n throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n getMix(from, to) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === void 0 ? this.defaultMix : value;\n }\n };\n\n // spine-core/src/attachments/BoundingBoxAttachment.ts\n var BoundingBoxAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new BoundingBoxAttachment(this.name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/attachments/ClippingAttachment.ts\n var ClippingAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.endSlot = null;\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\n }\n copy() {\n let copy = new ClippingAttachment(this.name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n };\n\n // spine-core/src/Texture.ts\n var Texture = class {\n constructor(image) {\n this._image = image;\n }\n getImage() {\n return this._image;\n }\n };\n var TextureFilter = /* @__PURE__ */ ((TextureFilter2) => {\n TextureFilter2[TextureFilter2[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter2[TextureFilter2[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter2[TextureFilter2[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter2[TextureFilter2[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter2[TextureFilter2[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter2[TextureFilter2[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter2[TextureFilter2[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n return TextureFilter2;\n })(TextureFilter || {});\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\n return TextureWrap3;\n })(TextureWrap || {});\n var TextureRegion = class {\n constructor() {\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.degrees = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n };\n var FakeTexture = class extends Texture {\n setFilters(minFilter, magFilter) {\n }\n setWraps(uWrap, vWrap) {\n }\n dispose() {\n }\n };\n\n // spine-core/src/TextureAtlas.ts\n var TextureAtlas = class {\n constructor(atlasText) {\n this.pages = new Array();\n this.regions = new Array();\n let reader = new TextureAtlasReader(atlasText);\n let entry = new Array(4);\n let pageFields = {};\n pageFields[\"size\"] = (page2) => {\n page2.width = parseInt(entry[1]);\n page2.height = parseInt(entry[2]);\n };\n pageFields[\"format\"] = () => {\n };\n pageFields[\"filter\"] = (page2) => {\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\n };\n pageFields[\"repeat\"] = (page2) => {\n if (entry[1].indexOf(\"x\") != -1)\n page2.uWrap = 10497 /* Repeat */;\n if (entry[1].indexOf(\"y\") != -1)\n page2.vWrap = 10497 /* Repeat */;\n };\n pageFields[\"pma\"] = (page2) => {\n page2.pma = entry[1] == \"true\";\n };\n var regionFields = {};\n regionFields[\"xy\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n };\n regionFields[\"size\"] = (region) => {\n region.width = parseInt(entry[1]);\n region.height = parseInt(entry[2]);\n };\n regionFields[\"bounds\"] = (region) => {\n region.x = parseInt(entry[1]);\n region.y = parseInt(entry[2]);\n region.width = parseInt(entry[3]);\n region.height = parseInt(entry[4]);\n };\n regionFields[\"offset\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n };\n regionFields[\"orig\"] = (region) => {\n region.originalWidth = parseInt(entry[1]);\n region.originalHeight = parseInt(entry[2]);\n };\n regionFields[\"offsets\"] = (region) => {\n region.offsetX = parseInt(entry[1]);\n region.offsetY = parseInt(entry[2]);\n region.originalWidth = parseInt(entry[3]);\n region.originalHeight = parseInt(entry[4]);\n };\n regionFields[\"rotate\"] = (region) => {\n let value = entry[1];\n if (value == \"true\")\n region.degrees = 90;\n else if (value != \"false\")\n region.degrees = parseInt(value);\n };\n regionFields[\"index\"] = (region) => {\n region.index = parseInt(entry[1]);\n };\n let line = reader.readLine();\n while (line && line.trim().length == 0)\n line = reader.readLine();\n while (true) {\n if (!line || line.trim().length == 0)\n break;\n if (reader.readEntry(entry, line) == 0)\n break;\n line = reader.readLine();\n }\n let page = null;\n let names = null;\n let values = null;\n while (true) {\n if (line === null)\n break;\n if (line.trim().length == 0) {\n page = null;\n line = reader.readLine();\n } else if (!page) {\n page = new TextureAtlasPage(line.trim());\n while (true) {\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\n break;\n let field = pageFields[entry[0]];\n if (field)\n field(page);\n }\n this.pages.push(page);\n } else {\n let region = new TextureAtlasRegion(page, line);\n while (true) {\n let count = reader.readEntry(entry, line = reader.readLine());\n if (count == 0)\n break;\n let field = regionFields[entry[0]];\n if (field)\n field(region);\n else {\n if (!names)\n names = [];\n if (!values)\n values = [];\n names.push(entry[0]);\n let entryValues = [];\n for (let i = 0; i < count; i++)\n entryValues.push(parseInt(entry[i + 1]));\n values.push(entryValues);\n }\n }\n if (region.originalWidth == 0 && region.originalHeight == 0) {\n region.originalWidth = region.width;\n region.originalHeight = region.height;\n }\n if (names && names.length > 0 && values && values.length > 0) {\n region.names = names;\n region.values = values;\n names = null;\n values = null;\n }\n region.u = region.x / page.width;\n region.v = region.y / page.height;\n if (region.degrees == 90) {\n region.u2 = (region.x + region.height) / page.width;\n region.v2 = (region.y + region.width) / page.height;\n } else {\n region.u2 = (region.x + region.width) / page.width;\n region.v2 = (region.y + region.height) / page.height;\n }\n this.regions.push(region);\n }\n }\n }\n findRegion(name) {\n for (let 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 setTextures(assetManager, pathPrefix = \"\") {\n for (let page of this.pages)\n page.setTexture(assetManager.get(pathPrefix + page.name));\n }\n dispose() {\n var _a;\n for (let i = 0; i < this.pages.length; i++) {\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\n }\n }\n };\n var TextureAtlasReader = class {\n constructor(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n readLine() {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n readEntry(entry, line) {\n if (!line)\n return 0;\n line = line.trim();\n if (line.length == 0)\n return 0;\n let colon = line.indexOf(\":\");\n if (colon == -1)\n return 0;\n entry[0] = line.substr(0, colon).trim();\n for (let i = 1, lastMatch = colon + 1; ; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) {\n entry[i] = line.substr(lastMatch).trim();\n return i;\n }\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n if (i == 4)\n return 4;\n }\n }\n };\n var TextureAtlasPage = class {\n constructor(name) {\n this.minFilter = 9728 /* Nearest */;\n this.magFilter = 9728 /* Nearest */;\n this.uWrap = 33071 /* ClampToEdge */;\n this.vWrap = 33071 /* ClampToEdge */;\n this.texture = null;\n this.width = 0;\n this.height = 0;\n this.pma = false;\n this.name = name;\n }\n setTexture(texture) {\n this.texture = texture;\n texture.setFilters(this.minFilter, this.magFilter);\n texture.setWraps(this.uWrap, this.vWrap);\n }\n };\n var TextureAtlasRegion = class extends TextureRegion {\n constructor(page, name) {\n super();\n this.x = 0;\n this.y = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n this.index = 0;\n this.degrees = 0;\n this.names = null;\n this.values = null;\n this.page = page;\n this.name = name;\n }\n };\n\n // spine-core/src/attachments/MeshAttachment.ts\n var MeshAttachment = class extends VertexAttachment {\n constructor(name, path) {\n super(name);\n this.region = null;\n this.regionUVs = [];\n this.uvs = [];\n this.triangles = [];\n this.color = new Color(1, 1, 1, 1);\n this.width = 0;\n this.height = 0;\n this.hullLength = 0;\n this.edges = [];\n this.parentMesh = null;\n this.sequence = null;\n this.tempColor = new Color(0, 0, 0, 0);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let regionUVs = this.regionUVs;\n if (!this.uvs || this.uvs.length != regionUVs.length)\n this.uvs = Utils.newFloatArray(regionUVs.length);\n let uvs = this.uvs;\n let n = this.uvs.length;\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof TextureAtlasRegion) {\n let region = this.region, image = region.page.texture.getImage();\n let textureWidth = image.width, textureHeight = image.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 (let 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 (let 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 (let 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 } else if (!this.region) {\n u = v = 0;\n width = height = 1;\n } else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (let 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 getParentMesh() {\n return this.parentMesh;\n }\n setParentMesh(parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh) {\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 copy() {\n if (this.parentMesh)\n return this.newLinkedMesh();\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n if (this.edges) {\n copy.edges = new Array(this.edges.length);\n 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 computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n super.computeWorldVertices(slot, start, count, worldVertices, offset, stride);\n }\n newLinkedMesh() {\n let copy = new MeshAttachment(this.name, this.path);\n copy.region = this.region;\n copy.color.setFromColor(this.color);\n copy.timelineAttachment = this.timelineAttachment;\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\n if (copy.region != null)\n copy.updateRegion();\n return copy;\n }\n };\n\n // spine-core/src/attachments/PathAttachment.ts\n var PathAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.lengths = [];\n this.closed = false;\n this.constantSpeed = false;\n this.color = new Color(1, 1, 1, 1);\n }\n copy() {\n let copy = new PathAttachment(this.name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n 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 };\n\n // spine-core/src/attachments/PointAttachment.ts\n var PointAttachment = class extends VertexAttachment {\n constructor(name) {\n super(name);\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.color = new Color(0.38, 0.94, 0, 1);\n }\n computeWorldPosition(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 computeWorldRotation(bone) {\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * bone.a + sin * bone.b;\n let y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n copy() {\n let copy = new PointAttachment(this.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 };\n\n // spine-core/src/attachments/RegionAttachment.ts\n var _RegionAttachment = class extends Attachment {\n constructor(name, path) {\n super(name);\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 Color(1, 1, 1, 1);\n this.rendererObject = null;\n this.region = null;\n this.sequence = null;\n this.offset = Utils.newFloatArray(8);\n this.uvs = Utils.newFloatArray(8);\n this.tempColor = new Color(1, 1, 1, 1);\n this.path = path;\n }\n updateRegion() {\n if (!this.region)\n throw new Error(\"Region not set.\");\n let region = this.region;\n let uvs = this.uvs;\n if (region == null) {\n uvs[0] = 0;\n uvs[1] = 0;\n uvs[2] = 0;\n uvs[3] = 1;\n uvs[4] = 1;\n uvs[5] = 1;\n uvs[6] = 1;\n uvs[7] = 0;\n return;\n }\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let x = this.x, y = this.y;\n let localXCos = localX * cos + x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[0] = localXCos - localYSin;\n offset[1] = localYCos + localXSin;\n offset[2] = localXCos - localY2Sin;\n offset[3] = localY2Cos + localXSin;\n offset[4] = localX2Cos - localY2Sin;\n offset[5] = localY2Cos + localX2Sin;\n offset[6] = localX2Cos - localYSin;\n offset[7] = localYCos + localX2Sin;\n if (region.degrees == 90) {\n uvs[0] = region.u2;\n uvs[1] = region.v2;\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 } 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 computeWorldVertices(slot, worldVertices, offset, stride) {\n if (this.sequence != null)\n this.sequence.apply(slot, this);\n let bone = slot.bone;\n let vertexOffset = this.offset;\n let x = bone.worldX, y = bone.worldY;\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[0];\n offsetY = vertexOffset[1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[2];\n offsetY = vertexOffset[3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[4];\n offsetY = vertexOffset[5];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[6];\n offsetY = vertexOffset[7];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n }\n copy() {\n let copy = new _RegionAttachment(this.name, this.path);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\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 Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\n return copy;\n }\n };\n var RegionAttachment = _RegionAttachment;\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\n // spine-core/src/AtlasAttachmentLoader.ts\n var AtlasAttachmentLoader = class {\n constructor(atlas) {\n this.atlas = atlas;\n }\n loadSequence(name, basePath, sequence) {\n let regions = sequence.regions;\n for (let i = 0, n = regions.length; i < n; i++) {\n let path = sequence.getPath(basePath, i);\n let region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\n regions[i] = region;\n regions[i].renderObject = regions[i];\n }\n }\n newRegionAttachment(skin, name, path, sequence) {\n let attachment = new RegionAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newMeshAttachment(skin, name, path, sequence) {\n let attachment = new MeshAttachment(name, path);\n if (sequence != null) {\n this.loadSequence(name, path, sequence);\n } else {\n let region = this.atlas.findRegion(path);\n if (!region)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n attachment.region = region;\n }\n return attachment;\n }\n newBoundingBoxAttachment(skin, name) {\n return new BoundingBoxAttachment(name);\n }\n newPathAttachment(skin, name) {\n return new PathAttachment(name);\n }\n newPointAttachment(skin, name) {\n return new PointAttachment(name);\n }\n newClippingAttachment(skin, name) {\n return new ClippingAttachment(name);\n }\n };\n\n // spine-core/src/BoneData.ts\n var BoneData = class {\n constructor(index, name, parent) {\n this.index = 0;\n this.parent = null;\n this.length = 0;\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 Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n };\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n return TransformMode2;\n })(TransformMode || {});\n\n // spine-core/src/Bone.ts\n var Bone = class {\n constructor(data, skeleton, parent) {\n this.parent = null;\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.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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 isActive() {\n return this.active;\n }\n update() {\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\n }\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n updateWorldTransformWith(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 let parent = this.parent;\n if (!parent) {\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n let sx = skeleton.scaleX;\n let sy = skeleton.scaleY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n let 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 0 /* Normal */: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = 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 1 /* OnlyTranslation */: {\n let rotationY = rotation + 90 + shearY;\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case 2 /* NoRotationOrReflection */: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 1e-4) {\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) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = 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 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 1e-5)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = 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 setToSetupPose() {\n let 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 getWorldRotationX() {\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\n }\n getWorldRotationY() {\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\n }\n getWorldScaleX() {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n }\n getWorldScaleY() {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n }\n updateAppliedTransform() {\n let parent = this.parent;\n if (!parent) {\n this.ax = this.worldX - this.skeleton.x;\n this.ay = this.worldY - this.skeleton.y;\n this.arotation = Math.atan2(this.c, this.a) * 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) * MathUtils.radDeg;\n return;\n }\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n let pid = 1 / (pa * pd - pb * pc);\n let 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 let ia = pid * pd;\n let id = pid * pa;\n let ib = pid * pb;\n let ic = pid * pc;\n let ra = ia * this.a - ib * this.c;\n let rb = ia * this.b - ib * this.d;\n let rc = id * this.c - ic * this.a;\n let rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 1e-4) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\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) * MathUtils.radDeg;\n }\n }\n worldToLocal(world) {\n let invDet = 1 / (this.a * this.d - this.b * this.c);\n let x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = x * this.d * invDet - y * this.b * invDet;\n world.y = y * this.a * invDet - x * this.c * invDet;\n return world;\n }\n localToWorld(local) {\n let 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 worldToLocalRotation(worldRotation) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\n }\n localToWorldRotation(localRotation) {\n localRotation -= this.rotation - this.shearX;\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\n }\n rotateWorld(degrees) {\n let a = this.a, b = this.b, c = this.c, d = this.d;\n let cos = MathUtils.cosDeg(degrees), sin = 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 }\n };\n\n // spine-core/src/ConstraintData.ts\n var ConstraintData = class {\n constructor(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n };\n\n // spine-core/src/AssetManagerBase.ts\n var AssetManagerBase = class {\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\n this.pathPrefix = \"\";\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n this.downloader = downloader;\n }\n start(path) {\n this.toLoad++;\n return this.pathPrefix + path;\n }\n success(callback, path, asset) {\n this.toLoad--;\n this.loaded++;\n this.assets[path] = asset;\n if (callback)\n callback(path, asset);\n }\n error(callback, path, message) {\n this.toLoad--;\n this.loaded++;\n this.errors[path] = message;\n if (callback)\n callback(path, message);\n }\n loadAll() {\n let promise = new Promise((resolve, reject) => {\n let check = () => {\n if (this.isLoadingComplete()) {\n if (this.hasErrors())\n reject(this.errors);\n else\n resolve(this);\n return;\n }\n requestAnimationFrame(check);\n };\n requestAnimationFrame(check);\n });\n return promise;\n }\n setRawDataURI(path, data) {\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\n }\n loadBinary(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadBinary(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\n });\n }\n loadText(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadText(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\n });\n }\n loadJson(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n this.downloader.downloadJson(path, (data) => {\n this.success(success, path, data);\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\n });\n }\n loadTexture(path, success = () => {\n }, error = () => {\n }) {\n path = this.start(path);\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\n let isWebWorker = !isBrowser;\n if (isWebWorker) {\n fetch(path, { mode: \"cors\" }).then((response) => {\n if (response.ok)\n return response.blob();\n this.error(error, path, `Couldn't load image: ${path}`);\n return null;\n }).then((blob) => {\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\n }).then((bitmap) => {\n if (bitmap)\n this.success(success, path, this.textureLoader(bitmap));\n });\n } else {\n let image = new Image();\n image.crossOrigin = \"anonymous\";\n image.onload = () => {\n this.success(success, path, this.textureLoader(image));\n };\n image.onerror = () => {\n this.error(error, path, `Couldn't load image: ${path}`);\n };\n if (this.downloader.rawDataUris[path])\n path = this.downloader.rawDataUris[path];\n image.src = path;\n }\n }\n loadTextureAtlas(path, success = () => {\n }, error = () => {\n }, fileAlias) {\n let index = path.lastIndexOf(\"/\");\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\n path = this.start(path);\n this.downloader.downloadText(path, (atlasText) => {\n try {\n let atlas = new TextureAtlas(atlasText);\n let toLoad = atlas.pages.length, abort = false;\n for (let page of atlas.pages) {\n this.loadTexture(\n !fileAlias ? parent + page.name : fileAlias[page.name],\n (imagePath, texture) => {\n if (!abort) {\n page.setTexture(texture);\n if (--toLoad == 0)\n this.success(success, path, atlas);\n }\n },\n (imagePath, message) => {\n if (!abort)\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\n abort = true;\n }\n );\n }\n } catch (e) {\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\n }\n }, (status, responseText) => {\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\n });\n }\n get(path) {\n return this.assets[this.pathPrefix + path];\n }\n require(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset)\n return asset;\n let error = this.errors[path];\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\n }\n remove(path) {\n path = this.pathPrefix + path;\n let asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n delete this.assets[path];\n return asset;\n }\n removeAll() {\n for (let key in this.assets) {\n let asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n }\n isLoadingComplete() {\n return this.toLoad == 0;\n }\n getToLoad() {\n return this.toLoad;\n }\n getLoaded() {\n return this.loaded;\n }\n dispose() {\n this.removeAll();\n }\n hasErrors() {\n return Object.keys(this.errors).length > 0;\n }\n getErrors() {\n return this.errors;\n }\n };\n var Downloader = class {\n constructor() {\n this.callbacks = {};\n this.rawDataUris = {};\n }\n dataUriToString(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx != -1) {\n base64Idx += \"base64,\".length;\n return atob(dataUri.substr(base64Idx));\n } else {\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\n }\n }\n base64ToUint8Array(base64) {\n var binary_string = window.atob(base64);\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n }\n dataUriToUint8Array(dataUri) {\n if (!dataUri.startsWith(\"data:\")) {\n throw new Error(\"Not a data URI.\");\n }\n let base64Idx = dataUri.indexOf(\"base64,\");\n if (base64Idx == -1)\n throw new Error(\"Not a binary data URI.\");\n base64Idx += \"base64,\".length;\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\n }\n downloadText(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToString(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.open(\"GET\", url, true);\n let done = () => {\n this.finish(url, request.status, request.responseText);\n };\n request.onload = done;\n request.onerror = done;\n request.send();\n }\n downloadJson(url, success, error) {\n this.downloadText(url, (data) => {\n success(JSON.parse(data));\n }, error);\n }\n downloadBinary(url, success, error) {\n if (this.start(url, success, error))\n return;\n if (this.rawDataUris[url]) {\n try {\n let dataUri = this.rawDataUris[url];\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\n } catch (e) {\n this.finish(url, 400, JSON.stringify(e));\n }\n return;\n }\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n let onerror = () => {\n this.finish(url, request.status, request.response);\n };\n request.onload = () => {\n if (request.status == 200 || request.status == 0)\n this.finish(url, 200, new Uint8Array(request.response));\n else\n onerror();\n };\n request.onerror = onerror;\n request.send();\n }\n start(url, success, error) {\n let callbacks = this.callbacks[url];\n try {\n if (callbacks)\n return true;\n this.callbacks[url] = callbacks = [];\n } finally {\n callbacks.push(success, error);\n }\n }\n finish(url, status, data) {\n let callbacks = this.callbacks[url];\n delete this.callbacks[url];\n let args = status == 200 || status == 0 ? [data] : [status, data];\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\n callbacks[i].apply(null, args);\n }\n };\n\n // spine-core/src/Event.ts\n var Event = class {\n constructor(time, data) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.time = 0;\n this.volume = 0;\n this.balance = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n };\n\n // spine-core/src/EventData.ts\n var EventData = class {\n constructor(name) {\n this.intValue = 0;\n this.floatValue = 0;\n this.stringValue = null;\n this.audioPath = null;\n this.volume = 0;\n this.balance = 0;\n this.name = name;\n }\n };\n\n // spine-core/src/IkConstraint.ts\n var IkConstraint = class {\n constructor(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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\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 (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find bone ${data.target.name}`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mix == 0)\n return;\n let target = this.target;\n let 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.data.uniform, this.softness, this.mix);\n break;\n }\n }\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\n let p = bone.parent;\n if (!p)\n throw new Error(\"IK bone must have parent.\");\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case 1 /* OnlyTranslation */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case 2 /* NoRotationOrReflection */:\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n let sa = pa / bone.skeleton.scaleX;\n let 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) * MathUtils.radDeg;\n default:\n let x = targetX - p.worldX, y = targetY - p.worldY;\n let 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) * 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 let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case 3 /* NoScale */:\n case 4 /* NoScaleOrReflection */:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(\n bone.ax,\n bone.ay,\n bone.arotation + rotationIK * alpha,\n sx,\n sy,\n bone.ashearX,\n bone.ashearY\n );\n }\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\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 } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n let u = Math.abs(psx - psy) <= 1e-4;\n if (!u || stretch) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n let pp = parent.parent;\n if (!pp)\n throw new Error(\"IK parent must itself have a parent.\");\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 1e-4) {\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 let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) * 0.5;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let 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:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1) {\n cos = -1;\n a2 = Math.PI * bendDir;\n } else if (cos > 1) {\n cos = 1;\n a2 = 0;\n if (stretch) {\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n sx *= a;\n if (uniform)\n sy *= a;\n }\n } else\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 } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) * 0.5;\n let r0 = q / c2, r1 = c / q;\n let 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 let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let 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) * 0.5) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * 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, sy, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * 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 };\n\n // spine-core/src/IkConstraintData.ts\n var IkConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/PathConstraintData.ts\n var PathConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.positionMode = PositionMode.Fixed;\n this.spacingMode = SpacingMode.Fixed;\n this.rotateMode = RotateMode.Chain;\n this.offsetRotation = 0;\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n }\n set target(slotData) {\n this._target = slotData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"SlotData not set.\");\n else\n return this._target;\n }\n };\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\n return PositionMode2;\n })(PositionMode || {});\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\n return SpacingMode2;\n })(SpacingMode || {});\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\n return RotateMode2;\n })(RotateMode || {});\n\n // spine-core/src/PathConstraint.ts\n var _PathConstraint = class {\n constructor(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 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)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findSlot(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}`);\n this.target = target;\n this.position = data.position;\n this.spacing = data.spacing;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n }\n isActive() {\n return this.active;\n }\n update() {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment))\n return;\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\n return;\n let data = this.data;\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\n let bones = this.bones;\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\n let spacing = this.spacing;\n switch (data.spacingMode) {\n case 2 /* Percent */:\n if (scale) {\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon)\n lengths[i] = 0;\n else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n lengths[i] = Math.sqrt(x * x + y * y);\n }\n }\n }\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\n break;\n case 3 /* Proportional */:\n let sum = 0;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = length;\n sum += length;\n }\n }\n if (sum > 0) {\n sum = spacesCount / sum * spacing;\n for (let i = 1; i < spacesCount; i++)\n spaces[i] *= sum;\n }\n break;\n default:\n let lengthSpacing = data.spacingMode == 0 /* Length */;\n for (let i = 0, n = spacesCount - 1; i < n; ) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < _PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = spacing;\n } else {\n let x = setupLength * bone.a, y = setupLength * bone.c;\n let length = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n }\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = data.rotateMode == 1 /* Chain */;\n else {\n tip = false;\n let p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * mixX;\n bone.worldY += (boneY - bone.worldY) * mixY;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (mixRotate > 0) {\n let 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 let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\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.updateAppliedTransform();\n }\n }\n computeWorldPositions(path, spacesCount, tangents) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\n let closed2 = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed2 ? 1 : 2;\n let pathLength2 = lengths[curveCount];\n if (this.data.positionMode == 1 /* Percent */)\n position *= pathLength2;\n let multiplier2;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier2 = pathLength2;\n break;\n case 3 /* Proportional */:\n multiplier2 = pathLength2 / spacesCount;\n break;\n default:\n multiplier2 = 1;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier2;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength2;\n if (p < 0)\n p += pathLength2;\n curve = 0;\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 } else if (p > pathLength2) {\n if (prevCurve != _PathConstraint.AFTER) {\n prevCurve = _PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = lengths[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed2 && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(\n p,\n world[0],\n world[1],\n world[2],\n world[3],\n world[4],\n world[5],\n world[6],\n world[7],\n out,\n o,\n tangents || i > 0 && space == 0\n );\n }\n return out;\n }\n if (closed2) {\n verticesLength += 2;\n world = 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 } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let 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 (this.data.positionMode == 1 /* Percent */)\n position *= pathLength;\n let multiplier;\n switch (this.data.spacingMode) {\n case 2 /* Percent */:\n multiplier = pathLength;\n break;\n case 3 /* Proportional */:\n multiplier = pathLength / spacesCount;\n break;\n default:\n multiplier = 1;\n }\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i] * multiplier;\n position += space;\n let p = position;\n if (closed2) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (; ; curve++) {\n let length = curves[curve];\n if (p > length)\n continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n let 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) * 6e-3;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\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 let length = segments[segment];\n if (p > length)\n continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - 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 addBeforePosition(p, temp, i, out, o) {\n let 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 addAfterPosition(p, temp, i, out, o) {\n let 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 addCurvePosition(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 let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let 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 < 1e-3)\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 };\n var PathConstraint = _PathConstraint;\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 1e-5;\n\n // spine-core/src/Slot.ts\n var Slot = class {\n constructor(data, bone) {\n this.darkColor = null;\n this.attachment = null;\n this.attachmentState = 0;\n this.sequenceIndex = -1;\n this.deform = new Array();\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!bone)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = !data.darkColor ? null : new Color();\n this.setToSetupPose();\n }\n getSkeleton() {\n return this.bone.skeleton;\n }\n getAttachment() {\n return this.attachment;\n }\n setAttachment(attachment) {\n if (this.attachment == attachment)\n return;\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\n this.deform.length = 0;\n }\n this.attachment = attachment;\n this.sequenceIndex = -1;\n }\n setToSetupPose() {\n this.color.setFromColor(this.data.color);\n if (this.darkColor)\n this.darkColor.setFromColor(this.data.darkColor);\n if (!this.data.attachmentName)\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 };\n\n // spine-core/src/TransformConstraint.ts\n var TransformConstraint = class {\n constructor(data, skeleton) {\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 0;\n this.temp = new Vector2();\n this.active = false;\n if (!data)\n throw new Error(\"data cannot be null.\");\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mixRotate = data.mixRotate;\n this.mixX = data.mixX;\n this.mixY = data.mixY;\n this.mixScaleX = data.mixScaleX;\n this.mixScaleY = data.mixScaleY;\n this.mixShearY = data.mixShearY;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let bone = skeleton.findBone(data.bones[i].name);\n if (!bone)\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\n this.bones.push(bone);\n }\n let target = skeleton.findBone(data.target.name);\n if (!target)\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\n this.target = target;\n }\n isActive() {\n return this.active;\n }\n update() {\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\n return;\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n applyAbsoluteWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * mixX;\n bone.worldY += (temp.y - bone.worldY) * mixY;\n }\n if (mixScaleX != 0) {\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n if (s != 0)\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n if (s != 0)\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let b = bone.b, d = bone.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyRelativeWorld() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let translate = mixX != 0 || mixY != 0;\n let target = this.target;\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (mixRotate != 0) {\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= mixRotate;\n let 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 }\n if (translate) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * mixX;\n bone.worldY += temp.y * mixY;\n }\n if (mixScaleX != 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\n bone.a *= s;\n bone.c *= s;\n }\n if (mixScaleY != 0) {\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\n bone.b *= s;\n bone.d *= s;\n }\n if (mixShearY > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n let b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\n let s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n }\n bone.updateAppliedTransform();\n }\n }\n applyAbsoluteLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation;\n if (mixRotate != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n rotation += r * mixRotate;\n }\n let x = bone.ax, y = bone.ay;\n x += (target.ax - x + this.data.offsetX) * mixX;\n y += (target.ay - y + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (mixScaleX != 0 && scaleX != 0)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\n if (mixScaleY != 0 && scaleY != 0)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\n let shearY = bone.ashearY;\n if (mixShearY != 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\n shearY += r * mixShearY;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n applyRelativeLocal() {\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\n let target = this.target;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n };\n\n // spine-core/src/Skeleton.ts\n var _Skeleton = class {\n constructor(data) {\n this._updateCache = new Array();\n this.skin = null;\n this.scaleX = 1;\n this._scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (!data)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone;\n if (!boneData.parent)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n get scaleY() {\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\n }\n set scaleY(scaleY) {\n this._scaleY = scaleY;\n }\n updateCache() {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone);\n }\n }\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n sortIkConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let target = constraint.target;\n this.sortBone(target);\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length == 1) {\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n } else {\n let child = constrained[constrained.length - 1];\n this.sortBone(child);\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n child.sorted = true;\n }\n }\n sortPathConstraint(constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortTransformConstraint(constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n this.sortBone(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n sortPathConstraintAttachmentWith(attachment, slotBone) {\n if (!(attachment instanceof PathAttachment))\n return;\n let pathBones = attachment.bones;\n if (!pathBones)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n for (let i = 0, n = pathBones.length; i < n; ) {\n let nn = pathBones[i++];\n nn += i;\n while (i < nn)\n this.sortBone(bones[pathBones[i++]]);\n }\n }\n }\n sortBone(bone) {\n if (!bone)\n return;\n if (bone.sorted)\n return;\n let parent = bone.parent;\n if (parent)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n sortReset(bones) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let 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 updateWorldTransform() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[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 }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n updateWorldTransformWith(parent) {\n let rootBone = this.getRootBone();\n if (!rootBone)\n throw new Error(\"Root bone must not be null.\");\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++) {\n let updatable = updateCache[i];\n if (updatable != rootBone)\n updatable.update();\n }\n }\n setToSetupPose() {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n setBonesToSetupPose() {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let 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 let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n constraint.mixScaleX = data.mixScaleX;\n constraint.mixScaleY = data.mixScaleY;\n constraint.mixShearY = data.mixShearY;\n }\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.mixRotate = data.mixRotate;\n constraint.mixX = data.mixX;\n constraint.mixY = data.mixY;\n }\n }\n setSlotsToSetupPose() {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n getRootBone() {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n }\n setSkinByName(skinName) {\n let skin = this.data.findSkin(skinName);\n if (!skin)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n setSkin(newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin) {\n if (this.skin)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name) {\n let attachment = newSkin.getAttachment(i, name);\n if (attachment)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n getAttachmentByName(slotName, attachmentName) {\n let slot = this.data.findSlot(slotName);\n if (!slot)\n throw new Error(`Can't find slot with name ${slotName}`);\n return this.getAttachment(slot.index, attachmentName);\n }\n getAttachment(slotIndex, attachmentName) {\n if (!attachmentName)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin) {\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment)\n return attachment;\n }\n if (this.data.defaultSkin)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n setAttachment(slotName, attachmentName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment = null;\n if (attachmentName) {\n attachment = this.getAttachment(i, attachmentName);\n if (!attachment)\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 findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n }\n getBoundsRect() {\n let offset = new Vector2();\n let size = new Vector2();\n this.getBounds(offset, size);\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\n }\n getBounds(offset, size, temp = new Array(2)) {\n if (!offset)\n throw new Error(\"offset cannot be null.\");\n if (!size)\n throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n let verticesLength = 0;\n let vertices = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let 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 };\n var Skeleton = _Skeleton;\n Skeleton.yDown = false;\n\n // spine-core/src/SkeletonData.ts\n var SkeletonData = class {\n constructor() {\n this.name = null;\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.defaultSkin = null;\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.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n this.version = null;\n this.hash = null;\n this.fps = 0;\n this.imagesPath = null;\n this.audioPath = null;\n }\n findBone(boneName) {\n if (!boneName)\n throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n }\n findSlot(slotName) {\n if (!slotName)\n throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n }\n findSkin(skinName) {\n if (!skinName)\n throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n }\n findEvent(eventDataName) {\n if (!eventDataName)\n throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName)\n return event;\n }\n return null;\n }\n findAnimation(animationName) {\n if (!animationName)\n throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n }\n findIkConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findTransformConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n findPathConstraint(constraintName) {\n if (!constraintName)\n throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n }\n };\n\n // spine-core/src/Skin.ts\n var SkinEntry = class {\n constructor(slotIndex = 0, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n };\n var Skin = class {\n constructor(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (!name)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n setAttachment(slotIndex, name, attachment) {\n if (!attachment)\n throw new Error(\"attachment cannot be null.\");\n let 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 addSkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n copySkin(skin) {\n for (let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let ii = 0; ii < this.bones.length; ii++) {\n if (this.bones[ii] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let ii = 0; ii < this.constraints.length; ii++) {\n if (this.constraints[ii] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (!attachment.attachment)\n continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n getAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n removeAttachment(slotIndex, name) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary)\n delete dictionary[name];\n }\n getAttachments() {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n getAttachmentsForSlot(slotIndex, attachments) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n clear() {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n attachAll(skeleton, oldSkin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n }\n };\n\n // spine-core/src/SlotData.ts\n var SlotData = class {\n constructor(index, name, boneData) {\n this.index = 0;\n this.color = new Color(1, 1, 1, 1);\n this.darkColor = null;\n this.attachmentName = null;\n this.blendMode = BlendMode.Normal;\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (!name)\n throw new Error(\"name cannot be null.\");\n if (!boneData)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n };\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\n return BlendMode3;\n })(BlendMode || {});\n\n // spine-core/src/TransformConstraintData.ts\n var TransformConstraintData = class extends ConstraintData {\n constructor(name) {\n super(name, 0, false);\n this.bones = new Array();\n this._target = null;\n this.mixRotate = 0;\n this.mixX = 0;\n this.mixY = 0;\n this.mixScaleX = 0;\n this.mixScaleY = 0;\n this.mixShearY = 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 }\n set target(boneData) {\n this._target = boneData;\n }\n get target() {\n if (!this._target)\n throw new Error(\"BoneData not set.\");\n else\n return this._target;\n }\n };\n\n // spine-core/src/SkeletonBinary.ts\n var SkeletonBinary = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(binary) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n skeletonData.name = \"\";\n let input = new BinaryInput(binary);\n let lowHash = input.readInt32();\n let highHash = input.readInt32();\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n let nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n let n = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let str = input.readString();\n if (!str)\n throw new Error(\"String in string table must not be null.\");\n input.strings.push(str);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Bone name must not be null.\");\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n let data = new BoneData(i, name, parent);\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 = input.readInt(true);\n data.skinRequired = input.readBoolean();\n if (nonessential)\n Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let slotName = input.readString();\n if (!slotName)\n throw new Error(\"Slot name must not be null.\");\n let boneData = skeletonData.bones[input.readInt(true)];\n let data = new SlotData(i, slotName, boneData);\n Color.rgba8888ToColor(data.color, input.readInt32());\n let darkColor = input.readInt32();\n if (darkColor != -1)\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = input.readInt(true);\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"IK constraint data name must not be null.\");\n let data = new IkConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Transform constraint data name must not be null.\");\n let data = new TransformConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n data.mixScaleX = input.readFloat();\n data.mixScaleY = input.readFloat();\n data.mixShearY = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (let i = 0, nn; i < n; i++) {\n let name = input.readString();\n if (!name)\n throw new Error(\"Path constraint data name must not be null.\");\n let data = new PathConstraintData(name);\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (let 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 = input.readInt(true);\n data.spacingMode = input.readInt(true);\n data.rotateMode = input.readInt(true);\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = input.readFloat();\n data.mixX = input.readFloat();\n data.mixY = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n let i = skeletonData.skins.length;\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++) {\n let skin = this.readSkin(input, skeletonData, false, nonessential);\n if (!skin)\n throw new Error(\"readSkin() should not have returned null.\");\n skeletonData.skins[i] = skin;\n }\n }\n n = this.linkedMeshes.length;\n for (let i = 0; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(\"Not skin found for linked mesh.\");\n if (!linkedMesh.parent)\n throw new Error(\"Linked mesh parent must not be null\");\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let eventName = input.readStringRef();\n if (!eventName)\n throw new Error();\n let data = new EventData(eventName);\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) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (let i = 0; i < n; i++) {\n let animationName = input.readString();\n if (!animationName)\n throw new Error(\"Animatio name must not be null.\");\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\n }\n return skeletonData;\n }\n readSkin(input, skeletonData, defaultSkin, nonessential) {\n let skin = null;\n let slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new Skin(\"default\");\n } else {\n let skinName = input.readStringRef();\n if (!skinName)\n throw new Error(\"Skin name must not be null.\");\n skin = new Skin(skinName);\n skin.bones.length = input.readInt(true);\n for (let i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (let i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (let 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 (let i = 0; i < slotCount; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let name = input.readStringRef();\n if (!name)\n throw new Error(\"Attachment name must not be null\");\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n if (attachment)\n skin.setAttachment(slotIndex, name, attachment);\n }\n }\n return skin;\n }\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n let scale = this.scale;\n let name = input.readStringRef();\n if (!name)\n name = attachmentName;\n switch (input.readByte()) {\n case AttachmentType.Region: {\n let path = input.readStringRef();\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let scaleX = input.readFloat();\n let scaleY = input.readFloat();\n let width = input.readFloat();\n let height = input.readFloat();\n let color = input.readInt32();\n let sequence = this.readSequence(input);\n if (!path)\n path = name;\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\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 Color.rgba8888ToColor(region.color, color);\n region.sequence = sequence;\n if (sequence == null)\n region.updateRegion();\n return region;\n }\n case AttachmentType.BoundingBox: {\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case AttachmentType.Mesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let vertexCount = input.readInt(true);\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\n let triangles = this.readShortArray(input);\n let vertices = this.readVertices(input, vertexCount);\n let hullLength = input.readInt(true);\n let sequence = this.readSequence(input);\n let edges = [];\n let width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n 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 if (sequence == null)\n mesh.updateRegion();\n mesh.hullLength = hullLength << 1;\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case AttachmentType.LinkedMesh: {\n let path = input.readStringRef();\n let color = input.readInt32();\n let skinName = input.readStringRef();\n let parent = input.readStringRef();\n let inheritTimelines = input.readBoolean();\n let sequence = this.readSequence(input);\n let width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (!path)\n path = name;\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n Color.rgba8888ToColor(mesh.color, color);\n mesh.sequence = sequence;\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\n return mesh;\n }\n case AttachmentType.Path: {\n let closed2 = input.readBoolean();\n let constantSpeed = input.readBoolean();\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n let color = nonessential ? input.readInt32() : 0;\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = closed2;\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 Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case AttachmentType.Point: {\n let rotation = input.readFloat();\n let x = input.readFloat();\n let y = input.readFloat();\n let color = nonessential ? input.readInt32() : 0;\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case AttachmentType.Clipping: {\n let endSlotIndex = input.readInt(true);\n let vertexCount = input.readInt(true);\n let vertices = this.readVertices(input, vertexCount);\n let color = nonessential ? input.readInt32() : 0;\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\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 Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n }\n readSequence(input) {\n if (!input.readBoolean())\n return null;\n let sequence = new Sequence(input.readInt(true));\n sequence.start = input.readInt(true);\n sequence.digits = input.readInt(true);\n sequence.setupIndex = input.readInt(true);\n return sequence;\n }\n readVertices(input, vertexCount) {\n let scale = this.scale;\n let verticesLength = vertexCount << 1;\n let vertices = new Vertices();\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n let weights = new Array();\n let bonesArray = new Array();\n for (let i = 0; i < vertexCount; i++) {\n let boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n }\n readFloatArray(input, n, scale) {\n let array = new Array(n);\n if (scale == 1) {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat();\n } else {\n for (let i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n }\n readShortArray(input) {\n let n = input.readInt(true);\n let array = new Array(n);\n for (let i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n }\n readAnimation(input, name, skeletonData) {\n input.readInt(true);\n let timelines = new Array();\n let scale = this.scale;\n let tempColor1 = new Color();\n let tempColor2 = new Color();\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let slotIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case SLOT_ATTACHMENT: {\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\n for (let frame = 0; frame < frameCount; frame++)\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n a = a2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\n }\n time = time2;\n r = r2;\n g = g2;\n b = b2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGBA2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let a = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let na = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n a = na;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_RGB2: {\n let bezierCount = input.readInt(true);\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\n let time = input.readFloat();\n let r = input.readUnsignedByte() / 255;\n let g = input.readUnsignedByte() / 255;\n let b = input.readUnsignedByte() / 255;\n let r2 = input.readUnsignedByte() / 255;\n let g2 = input.readUnsignedByte() / 255;\n let b2 = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let nr = input.readUnsignedByte() / 255;\n let ng = input.readUnsignedByte() / 255;\n let nb = input.readUnsignedByte() / 255;\n let nr2 = input.readUnsignedByte() / 255;\n let ng2 = input.readUnsignedByte() / 255;\n let nb2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\n }\n time = time2;\n r = nr;\n g = ng;\n b = nb;\n r2 = nr2;\n g2 = ng2;\n b2 = nb2;\n }\n timelines.push(timeline);\n break;\n }\n case SLOT_ALPHA: {\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, a);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n let a2 = input.readUnsignedByte() / 255;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\n }\n time = time2;\n a = a2;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let boneIndex = input.readInt(true);\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\n switch (type) {\n case BONE_ROTATE:\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_TRANSLATE:\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEX:\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_TRANSLATEY:\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\n break;\n case BONE_SCALE:\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEX:\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SCALEY:\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEAR:\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARX:\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\n break;\n case BONE_SHEARY:\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixShearY = mixShearY2;\n }\n timelines.push(timeline);\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let index = input.readInt(true);\n let data = skeletonData.pathConstraints[index];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n switch (input.readByte()) {\n case PATH_POSITION:\n timelines.push(readTimeline1(\n input,\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\n data.positionMode == 0 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_SPACING:\n timelines.push(readTimeline1(\n input,\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\n ));\n break;\n case PATH_MIX:\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n }\n timelines.push(timeline);\n }\n }\n }\n for (let i = 0, n = input.readInt(true); i < n; i++) {\n let skin = skeletonData.skins[input.readInt(true)];\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n let slotIndex = input.readInt(true);\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n let attachmentName = input.readStringRef();\n if (!attachmentName)\n throw new Error(\"attachmentName must not be null.\");\n let attachment = skin.getAttachment(slotIndex, attachmentName);\n let timelineType = input.readByte();\n let frameCount = input.readInt(true);\n let frameLast = frameCount - 1;\n switch (timelineType) {\n case ATTACHMENT_DEFORM: {\n let vertexAttachment = attachment;\n let weighted = vertexAttachment.bones;\n let vertices = vertexAttachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let bezierCount = input.readInt(true);\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\n let time = input.readFloat();\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let end = input.readInt(true);\n if (end == 0)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat();\n } else {\n for (let v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (let v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frame, time, deform);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat();\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\n }\n time = time2;\n }\n timelines.push(timeline);\n break;\n }\n case ATTACHMENT_SEQUENCE: {\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\n for (let frame = 0; frame < frameCount; frame++) {\n let time = input.readFloat();\n let modeAndIndex = input.readInt32();\n timeline.setFrame(\n frame,\n time,\n SequenceModeValues[modeAndIndex & 15],\n modeAndIndex >> 4,\n input.readFloat()\n );\n }\n timelines.push(timeline);\n break;\n }\n }\n }\n }\n }\n let drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n let timeline = new DrawOrderTimeline(drawOrderCount);\n let slotCount = skeletonData.slots.length;\n for (let i = 0; i < drawOrderCount; i++) {\n let time = input.readFloat();\n let offsetCount = input.readInt(true);\n let drawOrder = Utils.newArray(slotCount, 0);\n for (let ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsetCount; ii++) {\n let 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 (let 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 }\n let eventCount = input.readInt(true);\n if (eventCount > 0) {\n let timeline = new EventTimeline(eventCount);\n for (let i = 0; i < eventCount; i++) {\n let time = input.readFloat();\n let eventData = skeletonData.events[input.readInt(true)];\n let event = new Event(time, eventData);\n event.intValue = input.readInt(false);\n event.floatValue = input.readFloat();\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event.data.audioPath) {\n event.volume = input.readFloat();\n event.balance = input.readFloat();\n }\n timeline.setFrame(i, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n return new Animation(name, timelines, duration);\n }\n };\n var BinaryInput = class {\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n readByte() {\n return this.buffer.getInt8(this.index++);\n }\n readUnsignedByte() {\n return this.buffer.getUint8(this.index++);\n }\n readShort() {\n let value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n }\n readInt32() {\n let value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n }\n readInt(optimizePositive) {\n let b = this.readByte();\n let result = b & 127;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 7;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 14;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 21;\n if ((b & 128) != 0) {\n b = this.readByte();\n result |= (b & 127) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\n }\n readStringRef() {\n let index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n }\n readString() {\n let byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n let chars = \"\";\n let charCount = 0;\n for (let i = 0; i < byteCount; ) {\n let b = this.readUnsignedByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n }\n readFloat() {\n let value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n }\n readBoolean() {\n return this.readByte() != 0;\n }\n };\n var LinkedMesh = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n var Vertices = class {\n constructor(bones = null, vertices = null) {\n this.bones = bones;\n this.vertices = vertices;\n }\n };\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\n return AttachmentType2;\n })(AttachmentType || {});\n function readTimeline1(input, timeline, scale) {\n let time = input.readFloat(), value = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\n }\n time = time2;\n value = value2;\n }\n return timeline;\n }\n function readTimeline2(input, timeline, scale) {\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n if (frame == frameLast)\n break;\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\n switch (input.readByte()) {\n case CURVE_STEPPED:\n timeline.setStepped(frame);\n break;\n case CURVE_BEZIER:\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n }\n return timeline;\n }\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\n }\n var BONE_ROTATE = 0;\n var BONE_TRANSLATE = 1;\n var BONE_TRANSLATEX = 2;\n var BONE_TRANSLATEY = 3;\n var BONE_SCALE = 4;\n var BONE_SCALEX = 5;\n var BONE_SCALEY = 6;\n var BONE_SHEAR = 7;\n var BONE_SHEARX = 8;\n var BONE_SHEARY = 9;\n var SLOT_ATTACHMENT = 0;\n var SLOT_RGBA = 1;\n var SLOT_RGB = 2;\n var SLOT_RGBA2 = 3;\n var SLOT_RGB2 = 4;\n var SLOT_ALPHA = 5;\n var ATTACHMENT_DEFORM = 0;\n var ATTACHMENT_SEQUENCE = 1;\n var PATH_POSITION = 0;\n var PATH_SPACING = 1;\n var PATH_MIX = 2;\n var CURVE_STEPPED = 1;\n var CURVE_BEZIER = 2;\n\n // spine-core/src/SkeletonBounds.ts\n var SkeletonBounds = class {\n constructor() {\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 Pool(() => {\n return Utils.newFloatArray(16);\n });\n }\n update(skeleton, updateAabb) {\n if (!skeleton)\n throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = 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 } 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 aabbCompute() {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let 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 aabbContainsPoint(x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n aabbIntersectsSegment(x1, y1, x2, y2) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let 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 let m = (y2 - y1) / (x2 - x1);\n let 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 let 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 aabbIntersectsSkeleton(bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n containsPoint(x, y) {\n let polygons = this.polygons;\n for (let 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 containsPointPolygon(polygon, x, y) {\n let vertices = polygon;\n let nn = polygon.length;\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\n let 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 intersectsSegment(x1, y1, x2, y2) {\n let polygons = this.polygons;\n for (let 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 intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\n let vertices = polygon;\n let nn = polygon.length;\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let 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 let 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 getPolygon(boundingBox) {\n if (!boundingBox)\n throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n getWidth() {\n return this.maxX - this.minX;\n }\n getHeight() {\n return this.maxY - this.minY;\n }\n };\n\n // spine-core/src/Triangulator.ts\n var Triangulator = class {\n constructor() {\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 Pool(() => {\n return new Array();\n });\n this.polygonIndicesPool = new Pool(() => {\n return new Array();\n });\n }\n triangulate(verticesArray) {\n let vertices = verticesArray;\n let vertexCount = verticesArray.length >> 1;\n let indices = this.indicesArray;\n indices.length = 0;\n for (let i = 0; i < vertexCount; i++)\n indices[i] = i;\n let isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (let i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n let triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n let previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer:\n if (!isConcave[i]) {\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n let v = indices[ii] << 1;\n let 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 let previousIndex = (vertexCount + i - 1) % vertexCount;\n let 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 decompose(verticesArray, triangles) {\n let vertices = verticesArray;\n let convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n let convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n let polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n let polygon = this.polygonPool.obtain();\n polygon.length = 0;\n let fanBaseIndex = -1, lastWinding = 0;\n for (let i = 0, n = triangles.length; i < n; i += 3) {\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\n let merged = false;\n if (fanBaseIndex == t1) {\n let o = polygon.length - 4;\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n let 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 } 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 (let i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n let firstIndex = polygonIndices[0];\n let lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n let o = polygon.length - 4;\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\n let firstX = polygon[0], firstY = polygon[1];\n let secondX = polygon[2], secondY = polygon[3];\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (let ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n let otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n let otherFirstIndex = otherIndices[0];\n let otherSecondIndex = otherIndices[1];\n let otherLastIndex = otherIndices[2];\n let otherPoly = convexPolygons[ii];\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n let 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 (let 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 static isConcave(index, vertexCount, vertices, indices) {\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n let current = indices[index] << 1;\n let next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(\n vertices[previous],\n vertices[previous + 1],\n vertices[current],\n vertices[current + 1],\n vertices[next],\n vertices[next + 1]\n );\n }\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n }\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\n let px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n }\n };\n\n // spine-core/src/SkeletonClipping.ts\n var SkeletonClipping = class {\n constructor() {\n this.triangulator = new 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 this.clipAttachment = null;\n this.clippingPolygons = null;\n }\n clipStart(slot, clip) {\n if (this.clipAttachment)\n return 0;\n this.clipAttachment = clip;\n let n = clip.worldVerticesLength;\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n let clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\n let polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n }\n clipEndWithSlot(slot) {\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n }\n clipEnd() {\n if (!this.clipAttachment)\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 isClipping() {\n return this.clipAttachment != null;\n }\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n let clippedTriangles = this.clippedTriangles;\n let polygons = this.clippingPolygons;\n let polygonsCount = polygons.length;\n let vertexSize = twoColor ? 12 : 8;\n let index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer:\n for (let i = 0; i < trianglesLength; i += 3) {\n let vertexOffset = triangles[i] << 1;\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (let p = 0; p < polygonsCount; p++) {\n let s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n let clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\n let clipOutputCount = clipOutputLength >> 1;\n let clipOutputItems = this.clipOutput;\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\n let 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 let c0 = x - x3, c1 = y - y3;\n let a = (d0 * c0 + d1 * c1) * d;\n let b = (d4 * c0 + d2 * c1) * d;\n let 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 let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (let 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 } else {\n let clippedVerticesItems = 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 } 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 let clippedTrianglesItems = 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 clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\n let originalOutput = output;\n let clipped = false;\n let input;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\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 let clippingVertices = clippingArea;\n let clippingVerticesLast = clippingArea.length - 4;\n for (let i = 0; ; i += 2) {\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n let inputVertices = input;\n let inputVerticesLength = input.length - 2, outputStart = output.length;\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n let 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 let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n } else {\n output.push(edgeX);\n output.push(edgeY);\n }\n } else if (side2) {\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 1e-6) {\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\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 let temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (let i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n } else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n }\n static makeClockwise(polygon) {\n let vertices = polygon;\n let verticeslength = polygon.length;\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (let 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 (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n let x = vertices[i], y = vertices[i + 1];\n let 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 };\n\n // spine-core/src/SkeletonJson.ts\n var SkeletonJson = class {\n constructor(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n readSkeletonData(json) {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\n let skeletonMap = root.skeleton;\n if (skeletonMap) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.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 (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n let parent = null;\n let parentName = getValue(boneMap, \"parent\", null);\n if (parentName)\n parent = skeletonData.findBone(parentName);\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = getValue(boneMap, \"length\", 0) * scale;\n data.x = getValue(boneMap, \"x\", 0) * scale;\n data.y = getValue(boneMap, \"y\", 0) * scale;\n data.rotation = getValue(boneMap, \"rotation\", 0);\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\n data.shearX = getValue(boneMap, \"shearX\", 0);\n data.shearY = getValue(boneMap, \"shearY\", 0);\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\n data.skinRequired = getValue(boneMap, \"skin\", false);\n let color = getValue(boneMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let boneData = skeletonData.findBone(slotMap.bone);\n if (!boneData)\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\n let color = getValue(slotMap, \"color\", null);\n if (color)\n data.color.setFromString(color);\n let dark = getValue(slotMap, \"dark\", null);\n if (dark)\n data.darkColor = Color.fromString(dark);\n data.attachmentName = getValue(slotMap, \"attachment\", null);\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\n if (!bone)\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let target = skeletonData.findBone(constraintMap.target);\n ;\n if (!target)\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\n data.target = target;\n data.mix = getValue(constraintMap, \"mix\", 1);\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = getValue(constraintMap, \"compress\", false);\n data.stretch = getValue(constraintMap, \"stretch\", false);\n data.uniform = getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findBone(targetName);\n if (!target)\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\n data.target = target;\n data.local = getValue(constraintMap, \"local\", false);\n data.relative = getValue(constraintMap, \"relative\", false);\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = getValue(constraintMap, \"order\", 0);\n data.skinRequired = getValue(constraintMap, \"skin\", false);\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\n let boneName = constraintMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\n data.bones.push(bone);\n }\n let targetName = constraintMap.target;\n let target = skeletonData.findSlot(targetName);\n if (!target)\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\n data.target = target;\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\n data.position = getValue(constraintMap, \"position\", 0);\n if (data.positionMode == 0 /* Fixed */)\n data.position *= scale;\n data.spacing = getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\n data.spacing *= scale;\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\n data.mixX = getValue(constraintMap, \"mixX\", 1);\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i];\n let skin = new Skin(skinMap.name);\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let boneName = skinMap.bones[ii];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraintName = skinMap.ik[ii];\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraintName = skinMap.transform[ii];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraintName = skinMap.path[ii];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\n skin.constraints.push(constraint);\n }\n }\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment)\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 (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (!skin)\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (!parent)\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent);\n if (linkedMesh.mesh.region != null)\n linkedMesh.mesh.updateRegion();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = getValue(eventMap, \"int\", 0);\n data.floatValue = getValue(eventMap, \"float\", 0);\n data.stringValue = getValue(eventMap, \"string\", \"\");\n data.audioPath = getValue(eventMap, \"audio\", null);\n if (data.audioPath) {\n data.volume = getValue(eventMap, \"volume\", 1);\n data.balance = getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n }\n readAttachment(map, skin, slotIndex, name, skeletonData) {\n let scale = this.scale;\n name = getValue(map, \"name\", name);\n switch (getValue(map, \"type\", \"region\")) {\n case \"region\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\n if (!region)\n return null;\n region.path = path;\n region.x = getValue(map, \"x\", 0) * scale;\n region.y = getValue(map, \"y\", 0) * scale;\n region.scaleX = getValue(map, \"scaleX\", 1);\n region.scaleY = getValue(map, \"scaleY\", 1);\n region.rotation = getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n region.sequence = sequence;\n let color = getValue(map, \"color\", null);\n if (color)\n region.color.setFromString(color);\n if (region.region != null)\n region.updateRegion();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (!box)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = getValue(map, \"path\", name);\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\n if (!mesh)\n return null;\n mesh.path = path;\n let color = getValue(map, \"color\", null);\n if (color)\n mesh.color.setFromString(color);\n mesh.width = getValue(map, \"width\", 0) * scale;\n mesh.height = getValue(map, \"height\", 0) * scale;\n mesh.sequence = sequence;\n let parent = getValue(map, \"parent\", null);\n if (parent) {\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\n return mesh;\n }\n let uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n if (mesh.region != null)\n mesh.updateRegion();\n mesh.edges = getValue(map, \"edges\", null);\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (!path)\n return null;\n path.closed = getValue(map, \"closed\", false);\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n let lengths = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n let color = getValue(map, \"color\", null);\n if (color)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (!point)\n return null;\n point.x = getValue(map, \"x\", 0) * scale;\n point.y = getValue(map, \"y\", 0) * scale;\n point.rotation = getValue(map, \"rotation\", 0);\n let color = getValue(map, \"color\", null);\n if (color)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (!clip)\n return null;\n let end = getValue(map, \"end\", null);\n if (end)\n clip.endSlot = skeletonData.findSlot(end);\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n let color = getValue(map, \"color\", null);\n if (color)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n readSequence(map) {\n if (map == null)\n return null;\n let sequence = new Sequence(getValue(map, \"count\", 0));\n sequence.start = getValue(map, \"start\", 1);\n sequence.digits = getValue(map, \"digits\", 0);\n sequence.setupIndex = getValue(map, \"setup\", 0);\n return sequence;\n }\n readVertices(map, attachment, verticesLength) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n; ) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let 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 = Utils.toFloatArray(weights);\n }\n readAnimation(map, name, skeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slot = skeletonData.findSlot(slotName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotName);\n let slotIndex = slot.index;\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (!timelineMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(frames, slotIndex);\n for (let frame = 0; frame < frames; frame++) {\n let keyMap = timelineMap[frame];\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgba\") {\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb\") {\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.color);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.color);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n }\n time = time2;\n color = newColor;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"alpha\") {\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\n } else if (timelineName == \"rgba2\") {\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineName == \"rgb2\") {\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\n let keyMap = timelineMap[0];\n let time = getValue(keyMap, \"time\", 0);\n let color = Color.fromString(keyMap.light);\n let color2 = Color.fromString(keyMap.dark);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let newColor = Color.fromString(nextMap.light);\n let newColor2 = Color.fromString(nextMap.dark);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\n }\n time = time2;\n color = newColor;\n color2 = newColor2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let bone = skeletonData.findBone(boneName);\n if (!bone)\n throw new Error(\"Bone not found: \" + boneName);\n let boneIndex = bone.index;\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n let frames = timelineMap.length;\n if (frames == 0)\n continue;\n if (timelineName === \"rotate\") {\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\n } else if (timelineName === \"translate\") {\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\n } else if (timelineName === \"translatex\") {\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"translatey\") {\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\n } else if (timelineName === \"scale\") {\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\n } else if (timelineName === \"scalex\") {\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"scaley\") {\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\n } else if (timelineName === \"shear\") {\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\n } else if (timelineName === \"shearx\") {\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n } else if (timelineName === \"sheary\") {\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\n }\n }\n }\n }\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let keyMap = constraintMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findIkConstraint(constraintName);\n if (!constraint)\n throw new Error(\"IK Constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mix = getValue(keyMap, \"mix\", 1);\n let softness = getValue(keyMap, \"softness\", 0) * scale;\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\n let nextMap = constraintMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mix2 = getValue(nextMap, \"mix\", 1);\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\n }\n time = time2;\n mix = mix2;\n softness = softness2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.transform) {\n for (let constraintName in map.transform) {\n let timelineMap = map.transform[constraintName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let constraint = skeletonData.findTransformConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Transform constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n mixScaleX = mixScaleX2;\n mixScaleY = mixScaleY2;\n mixScaleX = mixScaleX2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let constraint = skeletonData.findPathConstraint(constraintName);\n if (!constraint)\n throw new Error(\"Path constraint not found: \" + constraintName);\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n let frames = timelineMap.length;\n if (timelineName === \"position\") {\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"spacing\") {\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\n let time = getValue(keyMap, \"time\", 0);\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\n let mixX = getValue(keyMap, \"mixX\", 1);\n let mixY = getValue(keyMap, \"mixY\", mixX);\n for (let frame = 0, bezier = 0; ; frame++) {\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\n let mixX2 = getValue(nextMap, \"mixX\", 1);\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\n }\n time = time2;\n mixRotate = mixRotate2;\n mixX = mixX2;\n mixY = mixY2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n }\n }\n }\n }\n if (map.attachments) {\n for (let attachmentsName in map.attachments) {\n let attachmentsMap = map.attachments[attachmentsName];\n let skin = skeletonData.findSkin(attachmentsName);\n if (!skin)\n throw new Error(\"Skin not found: \" + attachmentsName);\n for (let slotMapName in attachmentsMap) {\n let slotMap = attachmentsMap[slotMapName];\n let slot = skeletonData.findSlot(slotMapName);\n if (!slot)\n throw new Error(\"Slot not found: \" + slotMapName);\n let slotIndex = slot.index;\n for (let attachmentMapName in slotMap) {\n let attachmentMap = slotMap[attachmentMapName];\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\n for (let timelineMapName in attachmentMap) {\n let timelineMap = attachmentMap[timelineMapName];\n let keyMap = timelineMap[0];\n if (!keyMap)\n continue;\n if (timelineMapName == \"deform\") {\n let weighted = attachment.bones;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\n let time = getValue(keyMap, \"time\", 0);\n for (let frame = 0, bezier = 0; ; frame++) {\n let deform;\n let verticesValue = getValue(keyMap, \"vertices\", null);\n if (!verticesValue)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = getValue(keyMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frame, time, deform);\n let nextMap = timelineMap[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n break;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let curve = keyMap.curve;\n if (curve)\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\n time = time2;\n keyMap = nextMap;\n }\n timelines.push(timeline);\n } else if (timelineMapName == \"sequence\") {\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\n let lastDelay = 0;\n for (let frame = 0; frame < timelineMap.length; frame++) {\n let delay = getValue(keyMap, \"delay\", lastDelay);\n let time = getValue(keyMap, \"time\", 0);\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\n let index = getValue(keyMap, \"index\", 0);\n timeline.setFrame(frame, time, mode, index, delay);\n lastDelay = delay;\n keyMap = timelineMap[frame + 1];\n }\n timelines.push(timeline);\n }\n }\n }\n }\n }\n }\n if (map.drawOrder) {\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\n let slotCount = skeletonData.slots.length;\n let frame = 0;\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\n let drawOrderMap = map.drawOrder[i];\n let drawOrder = null;\n let offsets = getValue(drawOrderMap, \"offsets\", null);\n if (offsets) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let ii = 0; ii < offsets.length; ii++) {\n let offsetMap = offsets[ii];\n let slot = skeletonData.findSlot(offsetMap.slot);\n if (!slot)\n throw new Error(\"Slot not found: \" + slot);\n let slotIndex = slot.index;\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 (let ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n }\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frame = 0;\n for (let i = 0; i < map.events.length; i++, frame++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (!eventData)\n throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath) {\n event.volume = getValue(eventMap, \"volume\", 1);\n event.balance = getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frame, event);\n }\n timelines.push(timeline);\n }\n let duration = 0;\n for (let i = 0, n = timelines.length; i < n; i++)\n duration = Math.max(duration, timelines[i].getDuration());\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n };\n var LinkedMesh2 = class {\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritTimeline = inheritDeform;\n }\n };\n function readTimeline12(keys, timeline, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\n if (keyMap.curve)\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\n time = time2;\n value = value2;\n keyMap = nextMap;\n }\n }\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\n let keyMap = keys[0];\n let time = getValue(keyMap, \"time\", 0);\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\n let bezier = 0;\n for (let frame = 0; ; frame++) {\n timeline.setFrame(frame, time, value1, value2);\n let nextMap = keys[frame + 1];\n if (!nextMap) {\n timeline.shrink(bezier);\n return timeline;\n }\n let time2 = getValue(nextMap, \"time\", 0);\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\n let curve = keyMap.curve;\n if (curve) {\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\n }\n time = time2;\n value1 = nvalue1;\n value2 = nvalue2;\n keyMap = nextMap;\n }\n }\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\n if (curve == \"stepped\") {\n timeline.setStepped(frame);\n return bezier;\n }\n let i = value << 2;\n let cx1 = curve[i];\n let cy1 = curve[i + 1] * scale;\n let cx2 = curve[i + 2];\n let cy2 = curve[i + 3] * scale;\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\n return bezier + 1;\n }\n function getValue(map, property, defaultValue) {\n return map[property] !== void 0 ? map[property] : defaultValue;\n }\n\n // spine-core/src/polyfills.ts\n (() => {\n if (typeof Math.fround === \"undefined\") {\n Math.fround = function(array) {\n return function(x) {\n return array[0] = x, array[0];\n };\n }(new Float32Array(1));\n }\n })();\n\n // spine-webgl/src/WebGL.ts\n var ManagedWebGLRenderingContext = class {\n constructor(canvasOrContext, contextConfig = { alpha: \"true\" }) {\n this.restorables = new Array();\n if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== \"undefined\" && canvasOrContext instanceof WebGL2RenderingContext)) {\n let canvas = canvasOrContext;\n this.gl = canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig);\n this.canvas = canvas;\n canvas.addEventListener(\"webglcontextlost\", (e) => {\n let event = e;\n if (e)\n e.preventDefault();\n });\n canvas.addEventListener(\"webglcontextrestored\", (e) => {\n for (let i = 0, n = this.restorables.length; i < n; i++)\n this.restorables[i].restore();\n });\n } else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n addRestorable(restorable) {\n this.restorables.push(restorable);\n }\n removeRestorable(restorable) {\n let index = this.restorables.indexOf(restorable);\n if (index > -1)\n this.restorables.splice(index, 1);\n }\n };\n var ONE = 1;\n var ONE_MINUS_SRC_COLOR = 769;\n var SRC_ALPHA = 770;\n var ONE_MINUS_SRC_ALPHA = 771;\n var DST_COLOR = 774;\n var WebGLBlendModeConverter = class {\n static getDestGLBlendMode(blendMode) {\n switch (blendMode) {\n case 0 /* Normal */:\n return ONE_MINUS_SRC_ALPHA;\n case 1 /* Additive */:\n return ONE;\n case 2 /* Multiply */:\n return ONE_MINUS_SRC_ALPHA;\n case 3 /* Screen */:\n return ONE_MINUS_SRC_ALPHA;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n static getSourceColorGLBlendMode(blendMode, premultipliedAlpha = false) {\n switch (blendMode) {\n case 0 /* Normal */:\n return premultipliedAlpha ? ONE : SRC_ALPHA;\n case 1 /* Additive */:\n return premultipliedAlpha ? ONE : SRC_ALPHA;\n case 2 /* Multiply */:\n return DST_COLOR;\n case 3 /* Screen */:\n return ONE;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n static getSourceAlphaGLBlendMode(blendMode) {\n switch (blendMode) {\n case 0 /* Normal */:\n return ONE;\n case 1 /* Additive */:\n return ONE;\n case 2 /* Multiply */:\n return ONE_MINUS_SRC_ALPHA;\n case 3 /* Screen */:\n return ONE_MINUS_SRC_COLOR;\n default:\n throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n }\n };\n\n // spine-webgl/src/GLTexture.ts\n var _GLTexture = class extends Texture {\n constructor(context, image, useMipMaps = false) {\n super(image);\n this.texture = null;\n this.boundUnit = 0;\n this.useMipMaps = false;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.useMipMaps = useMipMaps;\n this.restore();\n this.context.addRestorable(this);\n }\n setFilters(minFilter, magFilter) {\n let 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 this.useMipMaps = _GLTexture.usesMipMaps(minFilter);\n if (this.useMipMaps)\n gl.generateMipmap(gl.TEXTURE_2D);\n }\n static validateMagFilter(magFilter) {\n switch (magFilter) {\n case 9987 /* MipMap */:\n case 9987 /* MipMapLinearLinear */:\n case 9985 /* MipMapLinearNearest */:\n case 9986 /* MipMapNearestLinear */:\n case 9984 /* MipMapNearestNearest */:\n return 9729 /* Linear */;\n default:\n return magFilter;\n }\n }\n static usesMipMaps(filter) {\n switch (filter) {\n case 9987 /* MipMap */:\n case 9987 /* MipMapLinearLinear */:\n case 9985 /* MipMapLinearNearest */:\n case 9986 /* MipMapNearestLinear */:\n case 9984 /* MipMapNearestNearest */:\n return true;\n default:\n return false;\n }\n }\n setWraps(uWrap, vWrap) {\n let 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 update(useMipMaps) {\n let gl = this.context.gl;\n if (!this.texture)\n this.texture = this.context.gl.createTexture();\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 restore() {\n this.texture = null;\n this.update(this.useMipMaps);\n }\n bind(unit = 0) {\n let gl = this.context.gl;\n this.boundUnit = unit;\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n }\n unbind() {\n let gl = this.context.gl;\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n dispose() {\n this.context.removeRestorable(this);\n let gl = this.context.gl;\n gl.deleteTexture(this.texture);\n }\n };\n var GLTexture = _GLTexture;\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\n\n // spine-webgl/src/AssetManager.ts\n var AssetManager = class extends AssetManagerBase {\n constructor(context, pathPrefix = \"\", downloader = new Downloader()) {\n super((image) => {\n return new GLTexture(context, image);\n }, pathPrefix, downloader);\n }\n };\n\n // spine-webgl/src/Vector3.ts\n var Vector3 = class {\n constructor(x = 0, y = 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 setFrom(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n }\n set(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n }\n scale(s) {\n this.x *= s;\n this.y *= s;\n this.z *= s;\n return this;\n }\n normalize() {\n let 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 cross(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 multiply(matrix) {\n let l_mat = matrix.values;\n return this.set(\n this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03],\n this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13],\n this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]\n );\n }\n project(matrix) {\n let l_mat = matrix.values;\n let l_w = 1 / (this.x * l_mat[M30] + this.y * l_mat[M31] + this.z * l_mat[M32] + l_mat[M33]);\n return this.set(\n (this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03]) * l_w,\n (this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13]) * l_w,\n (this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]) * l_w\n );\n }\n dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n distance(v) {\n let a = v.x - this.x;\n let b = v.y - this.y;\n let c = v.z - this.z;\n return Math.sqrt(a * a + b * b + c * c);\n }\n };\n\n // spine-webgl/src/Matrix4.ts\n var M00 = 0;\n var M01 = 4;\n var M02 = 8;\n var M03 = 12;\n var M10 = 1;\n var M11 = 5;\n var M12 = 9;\n var M13 = 13;\n var M20 = 2;\n var M21 = 6;\n var M22 = 10;\n var M23 = 14;\n var M30 = 3;\n var M31 = 7;\n var M32 = 11;\n var M33 = 15;\n var _Matrix4 = class {\n constructor() {\n this.temp = new Float32Array(16);\n this.values = new Float32Array(16);\n let v = this.values;\n v[M00] = 1;\n v[M11] = 1;\n v[M22] = 1;\n v[M33] = 1;\n }\n set(values) {\n this.values.set(values);\n return this;\n }\n transpose() {\n let t = this.temp;\n let v = this.values;\n t[M00] = v[M00];\n t[M01] = v[M10];\n t[M02] = v[M20];\n t[M03] = v[M30];\n t[M10] = v[M01];\n t[M11] = v[M11];\n t[M12] = v[M21];\n t[M13] = v[M31];\n t[M20] = v[M02];\n t[M21] = v[M12];\n t[M22] = v[M22];\n t[M23] = v[M32];\n t[M30] = v[M03];\n t[M31] = v[M13];\n t[M32] = v[M23];\n t[M33] = v[M33];\n return this.set(t);\n }\n identity() {\n let v = this.values;\n v[M00] = 1;\n v[M01] = 0;\n v[M02] = 0;\n v[M03] = 0;\n v[M10] = 0;\n v[M11] = 1;\n v[M12] = 0;\n v[M13] = 0;\n v[M20] = 0;\n v[M21] = 0;\n v[M22] = 1;\n v[M23] = 0;\n v[M30] = 0;\n v[M31] = 0;\n v[M32] = 0;\n v[M33] = 1;\n return this;\n }\n invert() {\n let v = this.values;\n let t = this.temp;\n let l_det = v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\n if (l_det == 0)\n throw new Error(\"non-invertible matrix\");\n let inv_det = 1 / l_det;\n t[M00] = v[M12] * v[M23] * v[M31] - v[M13] * v[M22] * v[M31] + v[M13] * v[M21] * v[M32] - v[M11] * v[M23] * v[M32] - v[M12] * v[M21] * v[M33] + v[M11] * v[M22] * v[M33];\n t[M01] = v[M03] * v[M22] * v[M31] - v[M02] * v[M23] * v[M31] - v[M03] * v[M21] * v[M32] + v[M01] * v[M23] * v[M32] + v[M02] * v[M21] * v[M33] - v[M01] * v[M22] * v[M33];\n t[M02] = v[M02] * v[M13] * v[M31] - v[M03] * v[M12] * v[M31] + v[M03] * v[M11] * v[M32] - v[M01] * v[M13] * v[M32] - v[M02] * v[M11] * v[M33] + v[M01] * v[M12] * v[M33];\n t[M03] = v[M03] * v[M12] * v[M21] - v[M02] * v[M13] * v[M21] - v[M03] * v[M11] * v[M22] + v[M01] * v[M13] * v[M22] + v[M02] * v[M11] * v[M23] - v[M01] * v[M12] * v[M23];\n t[M10] = v[M13] * v[M22] * v[M30] - v[M12] * v[M23] * v[M30] - v[M13] * v[M20] * v[M32] + v[M10] * v[M23] * v[M32] + v[M12] * v[M20] * v[M33] - v[M10] * v[M22] * v[M33];\n t[M11] = v[M02] * v[M23] * v[M30] - v[M03] * v[M22] * v[M30] + v[M03] * v[M20] * v[M32] - v[M00] * v[M23] * v[M32] - v[M02] * v[M20] * v[M33] + v[M00] * v[M22] * v[M33];\n t[M12] = v[M03] * v[M12] * v[M30] - v[M02] * v[M13] * v[M30] - v[M03] * v[M10] * v[M32] + v[M00] * v[M13] * v[M32] + v[M02] * v[M10] * v[M33] - v[M00] * v[M12] * v[M33];\n t[M13] = v[M02] * v[M13] * v[M20] - v[M03] * v[M12] * v[M20] + v[M03] * v[M10] * v[M22] - v[M00] * v[M13] * v[M22] - v[M02] * v[M10] * v[M23] + v[M00] * v[M12] * v[M23];\n t[M20] = v[M11] * v[M23] * v[M30] - v[M13] * v[M21] * v[M30] + v[M13] * v[M20] * v[M31] - v[M10] * v[M23] * v[M31] - v[M11] * v[M20] * v[M33] + v[M10] * v[M21] * v[M33];\n t[M21] = v[M03] * v[M21] * v[M30] - v[M01] * v[M23] * v[M30] - v[M03] * v[M20] * v[M31] + v[M00] * v[M23] * v[M31] + v[M01] * v[M20] * v[M33] - v[M00] * v[M21] * v[M33];\n t[M22] = v[M01] * v[M13] * v[M30] - v[M03] * v[M11] * v[M30] + v[M03] * v[M10] * v[M31] - v[M00] * v[M13] * v[M31] - v[M01] * v[M10] * v[M33] + v[M00] * v[M11] * v[M33];\n t[M23] = v[M03] * v[M11] * v[M20] - v[M01] * v[M13] * v[M20] - v[M03] * v[M10] * v[M21] + v[M00] * v[M13] * v[M21] + v[M01] * v[M10] * v[M23] - v[M00] * v[M11] * v[M23];\n t[M30] = v[M12] * v[M21] * v[M30] - v[M11] * v[M22] * v[M30] - v[M12] * v[M20] * v[M31] + v[M10] * v[M22] * v[M31] + v[M11] * v[M20] * v[M32] - v[M10] * v[M21] * v[M32];\n t[M31] = v[M01] * v[M22] * v[M30] - v[M02] * v[M21] * v[M30] + v[M02] * v[M20] * v[M31] - v[M00] * v[M22] * v[M31] - v[M01] * v[M20] * v[M32] + v[M00] * v[M21] * v[M32];\n t[M32] = v[M02] * v[M11] * v[M30] - v[M01] * v[M12] * v[M30] - v[M02] * v[M10] * v[M31] + v[M00] * v[M12] * v[M31] + v[M01] * v[M10] * v[M32] - v[M00] * v[M11] * v[M32];\n t[M33] = v[M01] * v[M12] * v[M20] - v[M02] * v[M11] * v[M20] + v[M02] * v[M10] * v[M21] - v[M00] * v[M12] * v[M21] - v[M01] * v[M10] * v[M22] + v[M00] * v[M11] * v[M22];\n v[M00] = t[M00] * inv_det;\n v[M01] = t[M01] * inv_det;\n v[M02] = t[M02] * inv_det;\n v[M03] = t[M03] * inv_det;\n v[M10] = t[M10] * inv_det;\n v[M11] = t[M11] * inv_det;\n v[M12] = t[M12] * inv_det;\n v[M13] = t[M13] * inv_det;\n v[M20] = t[M20] * inv_det;\n v[M21] = t[M21] * inv_det;\n v[M22] = t[M22] * inv_det;\n v[M23] = t[M23] * inv_det;\n v[M30] = t[M30] * inv_det;\n v[M31] = t[M31] * inv_det;\n v[M32] = t[M32] * inv_det;\n v[M33] = t[M33] * inv_det;\n return this;\n }\n determinant() {\n let v = this.values;\n return v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\n }\n translate(x, y, z) {\n let v = this.values;\n v[M03] += x;\n v[M13] += y;\n v[M23] += z;\n return this;\n }\n copy() {\n return new _Matrix4().set(this.values);\n }\n projection(near, far, fovy, aspectRatio) {\n this.identity();\n let l_fd = 1 / Math.tan(fovy * (Math.PI / 180) / 2);\n let l_a1 = (far + near) / (near - far);\n let l_a2 = 2 * far * near / (near - far);\n let v = this.values;\n v[M00] = l_fd / aspectRatio;\n v[M10] = 0;\n v[M20] = 0;\n v[M30] = 0;\n v[M01] = 0;\n v[M11] = l_fd;\n v[M21] = 0;\n v[M31] = 0;\n v[M02] = 0;\n v[M12] = 0;\n v[M22] = l_a1;\n v[M32] = -1;\n v[M03] = 0;\n v[M13] = 0;\n v[M23] = l_a2;\n v[M33] = 0;\n return this;\n }\n ortho2d(x, y, width, height) {\n return this.ortho(x, x + width, y, y + height, 0, 1);\n }\n ortho(left, right, bottom, top, near, far) {\n this.identity();\n let x_orth = 2 / (right - left);\n let y_orth = 2 / (top - bottom);\n let z_orth = -2 / (far - near);\n let tx = -(right + left) / (right - left);\n let ty = -(top + bottom) / (top - bottom);\n let tz = -(far + near) / (far - near);\n let v = this.values;\n v[M00] = x_orth;\n v[M10] = 0;\n v[M20] = 0;\n v[M30] = 0;\n v[M01] = 0;\n v[M11] = y_orth;\n v[M21] = 0;\n v[M31] = 0;\n v[M02] = 0;\n v[M12] = 0;\n v[M22] = z_orth;\n v[M32] = 0;\n v[M03] = tx;\n v[M13] = ty;\n v[M23] = tz;\n v[M33] = 1;\n return this;\n }\n multiply(matrix) {\n let t = this.temp;\n let v = this.values;\n let m = matrix.values;\n t[M00] = v[M00] * m[M00] + v[M01] * m[M10] + v[M02] * m[M20] + v[M03] * m[M30];\n t[M01] = v[M00] * m[M01] + v[M01] * m[M11] + v[M02] * m[M21] + v[M03] * m[M31];\n t[M02] = v[M00] * m[M02] + v[M01] * m[M12] + v[M02] * m[M22] + v[M03] * m[M32];\n t[M03] = v[M00] * m[M03] + v[M01] * m[M13] + v[M02] * m[M23] + v[M03] * m[M33];\n t[M10] = v[M10] * m[M00] + v[M11] * m[M10] + v[M12] * m[M20] + v[M13] * m[M30];\n t[M11] = v[M10] * m[M01] + v[M11] * m[M11] + v[M12] * m[M21] + v[M13] * m[M31];\n t[M12] = v[M10] * m[M02] + v[M11] * m[M12] + v[M12] * m[M22] + v[M13] * m[M32];\n t[M13] = v[M10] * m[M03] + v[M11] * m[M13] + v[M12] * m[M23] + v[M13] * m[M33];\n t[M20] = v[M20] * m[M00] + v[M21] * m[M10] + v[M22] * m[M20] + v[M23] * m[M30];\n t[M21] = v[M20] * m[M01] + v[M21] * m[M11] + v[M22] * m[M21] + v[M23] * m[M31];\n t[M22] = v[M20] * m[M02] + v[M21] * m[M12] + v[M22] * m[M22] + v[M23] * m[M32];\n t[M23] = v[M20] * m[M03] + v[M21] * m[M13] + v[M22] * m[M23] + v[M23] * m[M33];\n t[M30] = v[M30] * m[M00] + v[M31] * m[M10] + v[M32] * m[M20] + v[M33] * m[M30];\n t[M31] = v[M30] * m[M01] + v[M31] * m[M11] + v[M32] * m[M21] + v[M33] * m[M31];\n t[M32] = v[M30] * m[M02] + v[M31] * m[M12] + v[M32] * m[M22] + v[M33] * m[M32];\n t[M33] = v[M30] * m[M03] + v[M31] * m[M13] + v[M32] * m[M23] + v[M33] * m[M33];\n return this.set(this.temp);\n }\n multiplyLeft(matrix) {\n let t = this.temp;\n let v = this.values;\n let m = matrix.values;\n t[M00] = m[M00] * v[M00] + m[M01] * v[M10] + m[M02] * v[M20] + m[M03] * v[M30];\n t[M01] = m[M00] * v[M01] + m[M01] * v[M11] + m[M02] * v[M21] + m[M03] * v[M31];\n t[M02] = m[M00] * v[M02] + m[M01] * v[M12] + m[M02] * v[M22] + m[M03] * v[M32];\n t[M03] = m[M00] * v[M03] + m[M01] * v[M13] + m[M02] * v[M23] + m[M03] * v[M33];\n t[M10] = m[M10] * v[M00] + m[M11] * v[M10] + m[M12] * v[M20] + m[M13] * v[M30];\n t[M11] = m[M10] * v[M01] + m[M11] * v[M11] + m[M12] * v[M21] + m[M13] * v[M31];\n t[M12] = m[M10] * v[M02] + m[M11] * v[M12] + m[M12] * v[M22] + m[M13] * v[M32];\n t[M13] = m[M10] * v[M03] + m[M11] * v[M13] + m[M12] * v[M23] + m[M13] * v[M33];\n t[M20] = m[M20] * v[M00] + m[M21] * v[M10] + m[M22] * v[M20] + m[M23] * v[M30];\n t[M21] = m[M20] * v[M01] + m[M21] * v[M11] + m[M22] * v[M21] + m[M23] * v[M31];\n t[M22] = m[M20] * v[M02] + m[M21] * v[M12] + m[M22] * v[M22] + m[M23] * v[M32];\n t[M23] = m[M20] * v[M03] + m[M21] * v[M13] + m[M22] * v[M23] + m[M23] * v[M33];\n t[M30] = m[M30] * v[M00] + m[M31] * v[M10] + m[M32] * v[M20] + m[M33] * v[M30];\n t[M31] = m[M30] * v[M01] + m[M31] * v[M11] + m[M32] * v[M21] + m[M33] * v[M31];\n t[M32] = m[M30] * v[M02] + m[M31] * v[M12] + m[M32] * v[M22] + m[M33] * v[M32];\n t[M33] = m[M30] * v[M03] + m[M31] * v[M13] + m[M32] * v[M23] + m[M33] * v[M33];\n return this.set(this.temp);\n }\n lookAt(position, direction, up) {\n let 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 let val = this.values;\n val[M00] = xAxis.x;\n val[M01] = xAxis.y;\n val[M02] = xAxis.z;\n val[M10] = yAxis.x;\n val[M11] = yAxis.y;\n val[M12] = yAxis.z;\n val[M20] = -zAxis.x;\n val[M21] = -zAxis.y;\n val[M22] = -zAxis.z;\n _Matrix4.tmpMatrix.identity();\n _Matrix4.tmpMatrix.values[M03] = -position.x;\n _Matrix4.tmpMatrix.values[M13] = -position.y;\n _Matrix4.tmpMatrix.values[M23] = -position.z;\n this.multiply(_Matrix4.tmpMatrix);\n return this;\n }\n };\n var Matrix42 = _Matrix4;\n Matrix42.xAxis = new Vector3();\n Matrix42.yAxis = new Vector3();\n Matrix42.zAxis = new Vector3();\n Matrix42.tmpMatrix = new _Matrix4();\n\n // spine-webgl/src/Camera.ts\n var OrthoCamera = class {\n constructor(viewportWidth, viewportHeight) {\n this.position = new Vector3(0, 0, 0);\n this.direction = new Vector3(0, 0, -1);\n this.up = new 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 Matrix42();\n this.inverseProjectionView = new Matrix42();\n this.projection = new Matrix42();\n this.view = new Matrix42();\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.update();\n }\n update() {\n let projection = this.projection;\n let view = this.view;\n let projectionView = this.projectionView;\n let inverseProjectionView = this.inverseProjectionView;\n let zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\n projection.ortho(\n zoom * (-viewportWidth / 2),\n zoom * (viewportWidth / 2),\n zoom * (-viewportHeight / 2),\n zoom * (viewportHeight / 2),\n this.near,\n this.far\n );\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 screenToWorld(screenCoords, screenWidth, screenHeight) {\n let x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\n screenCoords.x = 2 * x / screenWidth - 1;\n screenCoords.y = 2 * y / screenHeight - 1;\n screenCoords.z = 2 * screenCoords.z - 1;\n screenCoords.project(this.inverseProjectionView);\n return screenCoords;\n }\n worldToScreen(worldCoords, screenWidth, screenHeight) {\n worldCoords.project(this.projectionView);\n worldCoords.x = screenWidth * (worldCoords.x + 1) / 2;\n worldCoords.y = screenHeight * (worldCoords.y + 1) / 2;\n worldCoords.z = (worldCoords.z + 1) / 2;\n return worldCoords;\n }\n setViewport(viewportWidth, viewportHeight) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n }\n };\n\n // spine-webgl/src/Input.ts\n var Input = class {\n constructor(element) {\n this.mouseX = 0;\n this.mouseY = 0;\n this.buttonDown = false;\n this.touch0 = null;\n this.touch1 = null;\n this.initialPinchDistance = 0;\n this.listeners = new Array();\n this.eventListeners = [];\n this.element = element;\n this.setupCallbacks(element);\n }\n setupCallbacks(element) {\n let mouseDown = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.buttonDown = true;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(this.mouseX, this.mouseY);\n });\n document.addEventListener(\"mousemove\", mouseMove);\n document.addEventListener(\"mouseup\", mouseUp);\n }\n };\n let mouseMove = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.listeners.map((listener) => {\n if (this.buttonDown) {\n if (listener.dragged)\n listener.dragged(this.mouseX, this.mouseY);\n } else {\n if (listener.moved)\n listener.moved(this.mouseX, this.mouseY);\n }\n });\n }\n };\n let mouseUp = (ev) => {\n if (ev instanceof MouseEvent) {\n let rect = element.getBoundingClientRect();\n this.mouseX = ev.clientX - rect.left;\n ;\n this.mouseY = ev.clientY - rect.top;\n this.buttonDown = false;\n this.listeners.map((listener) => {\n if (listener.up)\n listener.up(this.mouseX, this.mouseY);\n });\n document.removeEventListener(\"mousemove\", mouseMove);\n document.removeEventListener(\"mouseup\", mouseUp);\n }\n };\n let mouseWheel = (e) => {\n e.preventDefault();\n let deltaY = e.deltaY;\n if (e.deltaMode == WheelEvent.DOM_DELTA_LINE)\n deltaY *= 8;\n if (e.deltaMode == WheelEvent.DOM_DELTA_PAGE)\n deltaY *= 24;\n this.listeners.map((listener) => {\n if (listener.wheel)\n listener.wheel(e.deltaY);\n });\n };\n element.addEventListener(\"mousedown\", mouseDown, true);\n element.addEventListener(\"mousemove\", mouseMove, true);\n element.addEventListener(\"mouseup\", mouseUp, true);\n element.addEventListener(\"wheel\", mouseWheel, true);\n element.addEventListener(\"touchstart\", (ev) => {\n if (!this.touch0 || !this.touch1) {\n var touches = ev.changedTouches;\n let nativeTouch = touches.item(0);\n if (!nativeTouch)\n return;\n let rect = element.getBoundingClientRect();\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n let touch = new Touch(nativeTouch.identifier, x, y);\n this.mouseX = x;\n this.mouseY = y;\n this.buttonDown = true;\n if (!this.touch0) {\n this.touch0 = touch;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(touch.x, touch.y);\n });\n } else if (!this.touch1) {\n this.touch1 = touch;\n let dx = this.touch1.x - this.touch0.x;\n let dy = this.touch1.x - this.touch0.x;\n this.initialPinchDistance = Math.sqrt(dx * dx + dy * dy);\n this.listeners.map((listener) => {\n if (listener.zoom)\n listener.zoom(this.initialPinchDistance, this.initialPinchDistance);\n });\n }\n }\n ev.preventDefault();\n }, false);\n element.addEventListener(\"touchmove\", (ev) => {\n if (this.touch0) {\n var touches = ev.changedTouches;\n let rect = element.getBoundingClientRect();\n for (var i = 0; i < touches.length; i++) {\n var nativeTouch = touches[i];\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n if (this.touch0.identifier === nativeTouch.identifier) {\n this.touch0.x = this.mouseX = x;\n this.touch0.y = this.mouseY = y;\n this.listeners.map((listener) => {\n if (listener.dragged)\n listener.dragged(x, y);\n });\n }\n if (this.touch1 && this.touch1.identifier === nativeTouch.identifier) {\n this.touch1.x = this.mouseX = x;\n this.touch1.y = this.mouseY = y;\n }\n }\n if (this.touch0 && this.touch1) {\n let dx = this.touch1.x - this.touch0.x;\n let dy = this.touch1.x - this.touch0.x;\n let distance = Math.sqrt(dx * dx + dy * dy);\n this.listeners.map((listener) => {\n if (listener.zoom)\n listener.zoom(this.initialPinchDistance, distance);\n });\n }\n }\n ev.preventDefault();\n }, false);\n let touchEnd = (ev) => {\n if (this.touch0) {\n var touches = ev.changedTouches;\n let rect = element.getBoundingClientRect();\n for (var i = 0; i < touches.length; i++) {\n var nativeTouch = touches[i];\n let x = nativeTouch.clientX - rect.left;\n let y = nativeTouch.clientY - rect.top;\n if (this.touch0.identifier === nativeTouch.identifier) {\n this.touch0 = null;\n this.mouseX = x;\n this.mouseY = y;\n this.listeners.map((listener) => {\n if (listener.up)\n listener.up(x, y);\n });\n if (!this.touch1) {\n this.buttonDown = false;\n break;\n } else {\n this.touch0 = this.touch1;\n this.touch1 = null;\n this.mouseX = this.touch0.x;\n this.mouseX = this.touch0.x;\n this.buttonDown = true;\n this.listeners.map((listener) => {\n if (listener.down)\n listener.down(this.touch0.x, this.touch0.y);\n });\n }\n }\n if (this.touch1 && this.touch1.identifier) {\n this.touch1 = null;\n }\n }\n }\n ev.preventDefault();\n };\n element.addEventListener(\"touchend\", touchEnd, false);\n element.addEventListener(\"touchcancel\", touchEnd);\n }\n addListener(listener) {\n this.listeners.push(listener);\n }\n removeListener(listener) {\n let idx = this.listeners.indexOf(listener);\n if (idx > -1) {\n this.listeners.splice(idx, 1);\n }\n }\n };\n var Touch = class {\n constructor(identifier, x, y) {\n this.identifier = identifier;\n this.x = x;\n this.y = y;\n }\n };\n\n // spine-webgl/src/CameraController.ts\n var CameraController = class {\n constructor(canvas, camera) {\n this.canvas = canvas;\n this.camera = camera;\n let cameraX = 0, cameraY = 0, cameraZoom = 0;\n let mouseX = 0, mouseY = 0;\n let lastX = 0, lastY = 0;\n let initialZoom = 0;\n new Input(canvas).addListener({\n down: (x, y) => {\n cameraX = camera.position.x;\n cameraY = camera.position.y;\n mouseX = lastX = x;\n mouseY = lastY = y;\n initialZoom = camera.zoom;\n },\n dragged: (x, y) => {\n let deltaX = x - mouseX;\n let deltaY = y - mouseY;\n let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight);\n let deltaWorld = camera.screenToWorld(new Vector3(deltaX, deltaY), canvas.clientWidth, canvas.clientHeight).sub(originWorld);\n camera.position.set(cameraX - deltaWorld.x, cameraY - deltaWorld.y, 0);\n camera.update();\n lastX = x;\n lastY = y;\n },\n wheel: (delta) => {\n let zoomAmount = delta / 200 * camera.zoom;\n let newZoom = camera.zoom + zoomAmount;\n if (newZoom > 0) {\n let x = 0, y = 0;\n if (delta < 0) {\n x = lastX;\n y = lastY;\n } else {\n let viewCenter = new Vector3(canvas.clientWidth / 2 + 15, canvas.clientHeight / 2);\n let mouseToCenterX = lastX - viewCenter.x;\n let mouseToCenterY = canvas.clientHeight - 1 - lastY - viewCenter.y;\n x = viewCenter.x - mouseToCenterX;\n y = canvas.clientHeight - 1 - viewCenter.y + mouseToCenterY;\n }\n let oldDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\n camera.zoom = newZoom;\n camera.update();\n let newDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\n camera.position.add(oldDistance.sub(newDistance));\n camera.update();\n }\n },\n zoom: (initialDistance, distance) => {\n let newZoom = initialDistance / distance;\n camera.zoom = initialZoom * newZoom;\n },\n up: (x, y) => {\n lastX = x;\n lastY = y;\n },\n moved: (x, y) => {\n lastX = x;\n lastY = y;\n }\n });\n }\n };\n\n // spine-webgl/src/Shader.ts\n var _Shader = class {\n constructor(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 ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.context.addRestorable(this);\n this.compile();\n }\n getProgram() {\n return this.program;\n }\n getVertexShader() {\n return this.vertexShader;\n }\n getFragmentShader() {\n return this.fragmentShader;\n }\n getVertexShaderSource() {\n return this.vsSource;\n }\n getFragmentSource() {\n return this.fsSource;\n }\n compile() {\n let gl = this.context.gl;\n try {\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\n if (!this.vs)\n throw new Error(\"Couldn't compile vertex shader.\");\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\n if (!this.fs)\n throw new Error(\"Couldn#t compile fragment shader.\");\n this.program = this.compileProgram(this.vs, this.fs);\n } catch (e) {\n this.dispose();\n throw e;\n }\n }\n compileShader(type, source) {\n let gl = this.context.gl;\n let shader = gl.createShader(type);\n if (!shader)\n throw new Error(\"Couldn't create shader.\");\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n let 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 compileProgram(vs, fs) {\n let gl = this.context.gl;\n let program = gl.createProgram();\n if (!program)\n throw new Error(\"Couldn't compile program.\");\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n let 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 restore() {\n this.compile();\n }\n bind() {\n this.context.gl.useProgram(this.program);\n }\n unbind() {\n this.context.gl.useProgram(null);\n }\n setUniformi(uniform, value) {\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\n }\n setUniformf(uniform, value) {\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\n }\n setUniform2f(uniform, value, value2) {\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\n }\n setUniform3f(uniform, value, value2, value3) {\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\n }\n setUniform4f(uniform, value, value2, value3, value4) {\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\n }\n setUniform2x2f(uniform, value) {\n let gl = this.context.gl;\n this.tmp2x2.set(value);\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\n }\n setUniform3x3f(uniform, value) {\n let gl = this.context.gl;\n this.tmp3x3.set(value);\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\n }\n setUniform4x4f(uniform, value) {\n let gl = this.context.gl;\n this.tmp4x4.set(value);\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\n }\n getUniformLocation(uniform) {\n let gl = this.context.gl;\n if (!this.program)\n throw new Error(\"Shader not compiled.\");\n let 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 getAttributeLocation(attribute) {\n let gl = this.context.gl;\n if (!this.program)\n throw new Error(\"Shader not compiled.\");\n let 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 dispose() {\n this.context.removeRestorable(this);\n let 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 static newColoredTextured(context) {\n let 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 let 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 static newTwoColoredTextured(context) {\n let 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 let 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 static newColored(context) {\n let 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 let 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 };\n var Shader = _Shader;\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\n // spine-webgl/src/Mesh.ts\n var Mesh = class {\n constructor(context, attributes, maxVertices, maxIndices) {\n this.attributes = attributes;\n this.verticesBuffer = null;\n this.verticesLength = 0;\n this.dirtyVertices = false;\n this.indicesBuffer = null;\n this.indicesLength = 0;\n this.dirtyIndices = false;\n this.elementsPerVertex = 0;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.elementsPerVertex = 0;\n for (let 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 getAttributes() {\n return this.attributes;\n }\n maxVertices() {\n return this.vertices.length / this.elementsPerVertex;\n }\n numVertices() {\n return this.verticesLength / this.elementsPerVertex;\n }\n setVerticesLength(length) {\n this.dirtyVertices = true;\n this.verticesLength = length;\n }\n getVertices() {\n return this.vertices;\n }\n maxIndices() {\n return this.indices.length;\n }\n numIndices() {\n return this.indicesLength;\n }\n setIndicesLength(length) {\n this.dirtyIndices = true;\n this.indicesLength = length;\n }\n getIndices() {\n return this.indices;\n }\n getVertexSizeInFloats() {\n let size = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n let attribute = this.attributes[i];\n size += attribute.numElements;\n }\n return size;\n }\n setVertices(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 setIndices(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 draw(shader, primitiveType) {\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\n }\n drawWithOffset(shader, primitiveType, offset, count) {\n let 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 } else {\n gl.drawArrays(primitiveType, offset, count);\n }\n this.unbind(shader);\n }\n bind(shader) {\n let gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n let offset = 0;\n for (let i = 0; i < this.attributes.length; i++) {\n let attrib = this.attributes[i];\n let location = shader.getAttributeLocation(attrib.name);\n gl.enableVertexAttribArray(location);\n gl.vertexAttribPointer(location, 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 unbind(shader) {\n let gl = this.context.gl;\n for (let i = 0; i < this.attributes.length; i++) {\n let attrib = this.attributes[i];\n let location = shader.getAttributeLocation(attrib.name);\n gl.disableVertexAttribArray(location);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n }\n update() {\n let 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 restore() {\n this.verticesBuffer = null;\n this.indicesBuffer = null;\n this.update();\n }\n dispose() {\n this.context.removeRestorable(this);\n let gl = this.context.gl;\n gl.deleteBuffer(this.verticesBuffer);\n gl.deleteBuffer(this.indicesBuffer);\n }\n };\n var VertexAttribute = class {\n constructor(name, type, numElements) {\n this.name = name;\n this.type = type;\n this.numElements = numElements;\n }\n };\n var Position2Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.POSITION, VertexAttributeType.Float, 2);\n }\n };\n var Position3Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.POSITION, VertexAttributeType.Float, 3);\n }\n };\n var TexCoordAttribute = class extends VertexAttribute {\n constructor(unit = 0) {\n super(Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2);\n }\n };\n var ColorAttribute = class extends VertexAttribute {\n constructor() {\n super(Shader.COLOR, VertexAttributeType.Float, 4);\n }\n };\n var Color2Attribute = class extends VertexAttribute {\n constructor() {\n super(Shader.COLOR2, VertexAttributeType.Float, 4);\n }\n };\n var VertexAttributeType = /* @__PURE__ */ ((VertexAttributeType2) => {\n VertexAttributeType2[VertexAttributeType2[\"Float\"] = 0] = \"Float\";\n return VertexAttributeType2;\n })(VertexAttributeType || {});\n\n // spine-webgl/src/PolygonBatcher.ts\n var _PolygonBatcher = class {\n constructor(context, twoColorTint = true, maxVertices = 10920) {\n this.drawCalls = 0;\n this.isDrawing = false;\n this.shader = null;\n this.lastTexture = null;\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.cullWasEnabled = false;\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n let attributes = twoColorTint ? [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute(), new Color2Attribute()] : [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute()];\n this.mesh = new Mesh(context, attributes, maxVertices, maxVertices * 3);\n let gl = this.context.gl;\n this.srcColorBlend = gl.SRC_ALPHA;\n this.srcAlphaBlend = gl.ONE;\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\n }\n begin(shader) {\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 let gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\n this.cullWasEnabled = gl.isEnabled(gl.CULL_FACE);\n if (this.cullWasEnabled)\n gl.disable(gl.CULL_FACE);\n }\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\n if (this.srcColorBlend == srcColorBlend && this.srcAlphaBlend == srcAlphaBlend && this.dstBlend == dstBlend)\n return;\n this.srcColorBlend = srcColorBlend;\n this.srcAlphaBlend = srcAlphaBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n let gl = this.context.gl;\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\n }\n }\n draw(texture, vertices, indices) {\n if (texture != this.lastTexture) {\n this.flush();\n this.lastTexture = texture;\n } else if (this.verticesLength + vertices.length > this.mesh.getVertices().length || this.indicesLength + indices.length > this.mesh.getIndices().length) {\n this.flush();\n }\n let indexStart = this.mesh.numVertices();\n this.mesh.getVertices().set(vertices, this.verticesLength);\n this.verticesLength += vertices.length;\n this.mesh.setVerticesLength(this.verticesLength);\n let indicesArray = this.mesh.getIndices();\n for (let 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 flush() {\n if (this.verticesLength == 0)\n return;\n if (!this.lastTexture)\n throw new Error(\"No texture set.\");\n if (!this.shader)\n throw new Error(\"No shader set.\");\n this.lastTexture.bind();\n this.mesh.draw(this.shader, this.context.gl.TRIANGLES);\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.mesh.setVerticesLength(0);\n this.mesh.setIndicesLength(0);\n this.drawCalls++;\n _PolygonBatcher.globalDrawCalls++;\n }\n end() {\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 let gl = this.context.gl;\n gl.disable(gl.BLEND);\n if (this.cullWasEnabled)\n gl.enable(gl.CULL_FACE);\n }\n getDrawCalls() {\n return this.drawCalls;\n }\n static getAndResetGlobalDrawCalls() {\n let result = _PolygonBatcher.globalDrawCalls;\n _PolygonBatcher.globalDrawCalls = 0;\n return result;\n }\n dispose() {\n this.mesh.dispose();\n }\n };\n var PolygonBatcher = _PolygonBatcher;\n PolygonBatcher.globalDrawCalls = 0;\n\n // spine-webgl/src/ShapeRenderer.ts\n var ShapeRenderer = class {\n constructor(context, maxVertices = 10920) {\n this.isDrawing = false;\n this.shapeType = ShapeType.Filled;\n this.color = new Color(1, 1, 1, 1);\n this.shader = null;\n this.vertexIndex = 0;\n this.tmp = new Vector2();\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.mesh = new Mesh(context, [new Position2Attribute(), new ColorAttribute()], maxVertices, 0);\n let gl = this.context.gl;\n this.srcColorBlend = gl.SRC_ALPHA;\n this.srcAlphaBlend = gl.ONE;\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\n }\n begin(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 let gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\n }\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\n this.srcColorBlend = srcColorBlend;\n this.srcAlphaBlend = srcAlphaBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n let gl = this.context.gl;\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\n }\n }\n setColor(color) {\n this.color.setFromColor(color);\n }\n setColorWith(r, g, b, a) {\n this.color.set(r, g, b, a);\n }\n point(x, y, color) {\n this.check(ShapeType.Point, 1);\n if (!color)\n color = this.color;\n this.vertex(x, y, color);\n }\n line(x, y, x2, y2, color) {\n this.check(ShapeType.Line, 2);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n this.vertex(x, y, color);\n this.vertex(x2, y2, color);\n }\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n if (!color2)\n color2 = this.color;\n if (!color3)\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 } 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 quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n if (!color)\n color = this.color;\n if (!color2)\n color2 = this.color;\n if (!color3)\n color3 = this.color;\n if (!color4)\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 } 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 rect(filled, x, y, width, height, color) {\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\n }\n rectLine(filled, x1, y1, x2, y2, width, color) {\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\n if (!color)\n color = this.color;\n let t = this.tmp.set(y2 - y1, x1 - x2);\n t.normalize();\n width *= 0.5;\n let tx = t.x * width;\n let 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 } 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 x(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 polygon(polygonVertices, offset, count, color) {\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)\n color = this.color;\n let vertices = this.mesh.getVertices();\n let idx = this.vertexIndex;\n offset <<= 1;\n count <<= 1;\n let firstX = polygonVertices[offset];\n let firstY = polygonVertices[offset + 1];\n let last = offset + count;\n for (let i = offset, n = offset + count - 2; i < n; i += 2) {\n let x1 = polygonVertices[i];\n let y1 = polygonVertices[i + 1];\n let x2 = 0;\n let y2 = 0;\n if (i + 2 >= last) {\n x2 = firstX;\n y2 = firstY;\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 circle(filled, x, y, radius, color, segments = 0) {\n if (segments == 0)\n segments = Math.max(1, 6 * MathUtils.cbrt(radius) | 0);\n if (segments <= 0)\n throw new Error(\"segments must be > 0.\");\n if (!color)\n color = this.color;\n let angle = 2 * MathUtils.PI / segments;\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n let cx = radius, cy = 0;\n if (!filled) {\n this.check(ShapeType.Line, segments * 2 + 2);\n for (let i = 0; i < segments; i++) {\n this.vertex(x + cx, y + cy, color);\n let temp2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp2 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x + cx, y + cy, color);\n } else {\n this.check(ShapeType.Filled, segments * 3 + 3);\n segments--;\n for (let i = 0; i < segments; i++) {\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n let temp2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp2 + 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 let temp = cx;\n cx = radius;\n cy = 0;\n this.vertex(x + cx, y + cy, color);\n }\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n this.check(ShapeType.Line, segments * 2 + 2);\n if (!color)\n color = this.color;\n let subdiv_step = 1 / segments;\n let subdiv_step2 = subdiv_step * subdiv_step;\n let subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\n let pre1 = 3 * subdiv_step;\n let pre2 = 3 * subdiv_step2;\n let pre4 = 6 * subdiv_step2;\n let pre5 = 6 * subdiv_step3;\n let tmp1x = x1 - cx1 * 2 + cx2;\n let tmp1y = y1 - cy1 * 2 + cy2;\n let tmp2x = (cx1 - cx2) * 3 - x1 + x2;\n let tmp2y = (cy1 - cy2) * 3 - y1 + y2;\n let fx = x1;\n let fy = y1;\n let dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\n let dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\n let ddfx = tmp1x * pre4 + tmp2x * pre5;\n let ddfy = tmp1y * pre4 + tmp2y * pre5;\n let dddfx = tmp2x * pre5;\n let 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 vertex(x, y, color) {\n let idx = this.vertexIndex;\n let 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 end() {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n this.flush();\n let gl = this.context.gl;\n gl.disable(gl.BLEND);\n this.isDrawing = false;\n }\n flush() {\n if (this.vertexIndex == 0)\n return;\n if (!this.shader)\n throw new Error(\"No shader set.\");\n this.mesh.setVerticesLength(this.vertexIndex);\n this.mesh.draw(this.shader, this.shapeType);\n this.vertexIndex = 0;\n }\n check(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 } else {\n this.flush();\n this.shapeType = shapeType;\n }\n }\n dispose() {\n this.mesh.dispose();\n }\n };\n var ShapeType = /* @__PURE__ */ ((ShapeType2) => {\n ShapeType2[ShapeType2[\"Point\"] = 0] = \"Point\";\n ShapeType2[ShapeType2[\"Line\"] = 1] = \"Line\";\n ShapeType2[ShapeType2[\"Filled\"] = 4] = \"Filled\";\n return ShapeType2;\n })(ShapeType || {});\n\n // spine-webgl/src/SkeletonDebugRenderer.ts\n var _SkeletonDebugRenderer = class {\n constructor(context) {\n this.boneLineColor = new Color(1, 0, 0, 1);\n this.boneOriginColor = new Color(0, 1, 0, 1);\n this.attachmentLineColor = new Color(0, 0, 1, 0.5);\n this.triangleLineColor = new Color(1, 0.64, 0, 0.5);\n this.pathColor = new Color().setFromString(\"FF7F00\");\n this.clipColor = new Color(0.8, 0, 0, 2);\n this.aabbColor = new 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 SkeletonBounds();\n this.temp = new Array();\n this.vertices = Utils.newFloatArray(2 * 1024);\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n }\n draw(shapes, skeleton, ignoredBones) {\n let skeletonX = skeleton.x;\n let skeletonY = skeleton.y;\n let gl = this.context.gl;\n let srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\n shapes.setBlendMode(srcFunc, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n let bones = skeleton.bones;\n if (this.drawBones) {\n shapes.setColor(this.boneLineColor);\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n if (!bone.parent)\n continue;\n let x = bone.data.length * bone.a + bone.worldX;\n let y = bone.data.length * bone.c + bone.worldY;\n shapes.rectLine(true, bone.worldX, 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 let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n let regionAttachment = attachment;\n let vertices = this.vertices;\n regionAttachment.computeWorldVertices(slot, 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 let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof MeshAttachment))\n continue;\n let mesh = attachment;\n let vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\n let triangles = mesh.triangles;\n let hullLength = mesh.hullLength;\n if (this.drawMeshTriangles) {\n shapes.setColor(this.triangleLineColor);\n for (let ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n let v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\n shapes.triangle(\n false,\n vertices[v1],\n vertices[v1 + 1],\n vertices[v2],\n vertices[v2 + 1],\n vertices[v3],\n vertices[v3 + 1]\n );\n }\n }\n if (this.drawMeshHull && hullLength > 0) {\n shapes.setColor(this.attachmentLineColor);\n hullLength = (hullLength >> 1) * 2;\n let lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\n for (let ii = 0, nn = hullLength; ii < nn; ii += 2) {\n let 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 let 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 let polygons = bounds.polygons;\n let boxes = bounds.boundingBoxes;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n shapes.setColor(boxes[i].color);\n shapes.polygon(polygon, 0, polygon.length);\n }\n }\n if (this.drawPaths) {\n let slots = skeleton.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof PathAttachment))\n continue;\n let path = attachment;\n let nn = path.worldVerticesLength;\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\n let color = this.pathColor;\n let x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\n if (path.closed) {\n shapes.setColor(color);\n let 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 (let ii = 4; ii < nn; ii += 6) {\n let 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 (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n shapes.circle(true, bone.worldX, bone.worldY, 3 * this.scale, this.boneOriginColor, 8);\n }\n }\n if (this.drawClipping) {\n let slots = skeleton.slots;\n shapes.setColor(this.clipColor);\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (!slot.bone.active)\n continue;\n let attachment = slot.getAttachment();\n if (!(attachment instanceof ClippingAttachment))\n continue;\n let clip = attachment;\n let nn = clip.worldVerticesLength;\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\n for (let i2 = 0, n2 = world.length; i2 < n2; i2 += 2) {\n let x = world[i2];\n let y = world[i2 + 1];\n let x2 = world[(i2 + 2) % world.length];\n let y2 = world[(i2 + 3) % world.length];\n shapes.line(x, y, x2, y2);\n }\n }\n }\n }\n dispose() {\n }\n };\n var SkeletonDebugRenderer = _SkeletonDebugRenderer;\n SkeletonDebugRenderer.LIGHT_GRAY = new Color(192 / 255, 192 / 255, 192 / 255, 1);\n SkeletonDebugRenderer.GREEN = new Color(0, 1, 0, 1);\n\n // spine-webgl/src/SkeletonRenderer.ts\n var Renderable = class {\n constructor(vertices, numVertices, numFloats) {\n this.vertices = vertices;\n this.numVertices = numVertices;\n this.numFloats = numFloats;\n }\n };\n var _SkeletonRenderer = class {\n constructor(context, twoColorTint = true) {\n this.premultipliedAlpha = false;\n this.tempColor = new Color();\n this.tempColor2 = new Color();\n this.vertexSize = 2 + 2 + 4;\n this.twoColorTint = false;\n this.renderable = new Renderable([], 0, 0);\n this.clipper = new SkeletonClipping();\n this.temp = new Vector2();\n this.temp2 = new Vector2();\n this.temp3 = new Color();\n this.temp4 = new Color();\n this.twoColorTint = twoColorTint;\n if (twoColorTint)\n this.vertexSize += 4;\n this.vertices = Utils.newFloatArray(this.vertexSize * 1024);\n }\n draw(batcher, skeleton, slotRangeStart = -1, slotRangeEnd = -1, transformer = null) {\n let clipper = this.clipper;\n let premultipliedAlpha = this.premultipliedAlpha;\n let twoColorTint = this.twoColorTint;\n let blendMode = null;\n let tempPos = this.temp;\n let tempUv = this.temp2;\n let tempLight = this.temp3;\n let tempDark = this.temp4;\n let renderable = this.renderable;\n let uvs;\n let triangles;\n let drawOrder = skeleton.drawOrder;\n let attachmentColor;\n let skeletonColor = skeleton.color;\n let vertexSize = twoColorTint ? 12 : 8;\n let inRange = false;\n if (slotRangeStart == -1)\n inRange = true;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\n let 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 let attachment = slot.getAttachment();\n let texture;\n if (attachment instanceof RegionAttachment) {\n let region = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = 4;\n renderable.numFloats = clippedVertexSize << 2;\n region.computeWorldVertices(slot, renderable.vertices, 0, clippedVertexSize);\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\n uvs = region.uvs;\n texture = region.region.renderObject.page.texture;\n attachmentColor = region.color;\n } else if (attachment instanceof MeshAttachment) {\n let 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 = 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.page.texture;\n uvs = mesh.uvs;\n attachmentColor = mesh.color;\n } else if (attachment instanceof ClippingAttachment) {\n let clip = attachment;\n clipper.clipStart(slot, clip);\n continue;\n } else {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (texture) {\n let slotColor = slot.color;\n let 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 let darkColor = this.tempColor2;\n if (!slot.darkColor)\n darkColor.set(0, 0, 0, 1);\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 } else {\n darkColor.setFromColor(slot.darkColor);\n }\n darkColor.a = premultipliedAlpha ? 1 : 0;\n }\n let slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n batcher.setBlendMode(\n WebGLBlendModeConverter.getSourceColorGLBlendMode(blendMode, premultipliedAlpha),\n WebGLBlendModeConverter.getSourceAlphaGLBlendMode(blendMode),\n WebGLBlendModeConverter.getDestGLBlendMode(blendMode)\n );\n }\n if (clipper.isClipping()) {\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\n let clippedVertices = new Float32Array(clipper.clippedVertices);\n let clippedTriangles = clipper.clippedTriangles;\n if (transformer)\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\n batcher.draw(texture, clippedVertices, clippedTriangles);\n } else {\n let verts = renderable.vertices;\n if (!twoColorTint) {\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; 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 } else {\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; 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 let view = renderable.vertices.subarray(0, renderable.numFloats);\n if (transformer)\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\n batcher.draw(texture, view, triangles);\n }\n }\n clipper.clipEndWithSlot(slot);\n }\n clipper.clipEnd();\n }\n };\n var SkeletonRenderer = _SkeletonRenderer;\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n\n // spine-webgl/src/SceneRenderer.ts\n var quad = [\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0\n ];\n var QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n var WHITE = new Color(1, 1, 1, 1);\n var SceneRenderer = class {\n constructor(canvas, context, twoColorTint = true) {\n this.twoColorTint = false;\n this.activeRenderer = null;\n this.canvas = canvas;\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\n this.twoColorTint = twoColorTint;\n this.camera = new OrthoCamera(canvas.width, canvas.height);\n this.batcherShader = twoColorTint ? Shader.newTwoColoredTextured(this.context) : Shader.newColoredTextured(this.context);\n this.batcher = new PolygonBatcher(this.context, twoColorTint);\n this.shapesShader = Shader.newColored(this.context);\n this.shapes = new ShapeRenderer(this.context);\n this.skeletonRenderer = new SkeletonRenderer(this.context, twoColorTint);\n this.skeletonDebugRenderer = new SkeletonDebugRenderer(this.context);\n }\n dispose() {\n this.batcher.dispose();\n this.batcherShader.dispose();\n this.shapes.dispose();\n this.shapesShader.dispose();\n this.skeletonDebugRenderer.dispose();\n }\n begin() {\n this.camera.update();\n this.enableRenderer(this.batcher);\n }\n drawSkeleton(skeleton, premultipliedAlpha = false, slotRangeStart = -1, slotRangeEnd = -1, transform = null) {\n this.enableRenderer(this.batcher);\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd, transform);\n }\n drawSkeletonDebug(skeleton, premultipliedAlpha = false, ignoredBones) {\n this.enableRenderer(this.shapes);\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\n }\n drawTexture(texture, x, y, width, height, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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, QUAD_TRIANGLES);\n }\n drawTextureUV(texture, x, y, width, height, u, v, u2, v2, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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, QUAD_TRIANGLES);\n }\n drawTextureRotated(texture, x, y, width, height, pivotX, pivotY, angle, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\n let worldOriginX = x + pivotX;\n let worldOriginY = y + pivotY;\n let fx = -pivotX;\n let fy = -pivotY;\n let fx2 = width - pivotX;\n let fy2 = height - pivotY;\n let p1x = fx;\n let p1y = fy;\n let p2x = fx;\n let p2y = fy2;\n let p3x = fx2;\n let p3y = fy2;\n let p4x = fx2;\n let p4y = fy;\n let x1 = 0;\n let y1 = 0;\n let x2 = 0;\n let y2 = 0;\n let x3 = 0;\n let y3 = 0;\n let x4 = 0;\n let y4 = 0;\n if (angle != 0) {\n let cos = MathUtils.cosDeg(angle);\n let sin = 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 } 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, QUAD_TRIANGLES);\n }\n drawRegion(region, x, y, width, height, color) {\n this.enableRenderer(this.batcher);\n if (!color)\n color = WHITE;\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.page.texture, quad, QUAD_TRIANGLES);\n }\n line(x, y, x2, y2, color, color2) {\n this.enableRenderer(this.shapes);\n this.shapes.line(x, y, x2, y2, color);\n }\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n this.enableRenderer(this.shapes);\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\n }\n quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n this.enableRenderer(this.shapes);\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\n }\n rect(filled, x, y, width, height, color) {\n this.enableRenderer(this.shapes);\n this.shapes.rect(filled, x, y, width, height, color);\n }\n rectLine(filled, x1, y1, x2, y2, width, color) {\n this.enableRenderer(this.shapes);\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\n }\n polygon(polygonVertices, offset, count, color) {\n this.enableRenderer(this.shapes);\n this.shapes.polygon(polygonVertices, offset, count, color);\n }\n circle(filled, x, y, radius, color, segments = 0) {\n this.enableRenderer(this.shapes);\n this.shapes.circle(filled, x, y, radius, color, segments);\n }\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n this.enableRenderer(this.shapes);\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\n }\n end() {\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 resize(resizeMode) {\n let canvas = this.canvas;\n var dpr = window.devicePixelRatio || 1;\n var w = Math.round(canvas.clientWidth * dpr);\n var h = Math.round(canvas.clientHeight * dpr);\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.Expand)\n this.camera.setViewport(w, h);\n else if (resizeMode === ResizeMode.Fit) {\n let sourceWidth = canvas.width, sourceHeight = canvas.height;\n let targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\n let targetRatio = targetHeight / targetWidth;\n let sourceRatio = sourceHeight / sourceWidth;\n let scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\n this.camera.setViewport(sourceWidth * scale, sourceHeight * scale);\n }\n this.camera.update();\n }\n enableRenderer(renderer) {\n if (this.activeRenderer === renderer)\n return;\n this.end();\n if (renderer instanceof PolygonBatcher) {\n this.batcherShader.bind();\n this.batcherShader.setUniform4x4f(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 } else if (renderer instanceof ShapeRenderer) {\n this.shapesShader.bind();\n this.shapesShader.setUniform4x4f(Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.shapes.begin(this.shapesShader);\n this.activeRenderer = this.shapes;\n } else\n this.activeRenderer = this.skeletonDebugRenderer;\n }\n };\n var ResizeMode = /* @__PURE__ */ ((ResizeMode2) => {\n ResizeMode2[ResizeMode2[\"Stretch\"] = 0] = \"Stretch\";\n ResizeMode2[ResizeMode2[\"Expand\"] = 1] = \"Expand\";\n ResizeMode2[ResizeMode2[\"Fit\"] = 2] = \"Fit\";\n return ResizeMode2;\n })(ResizeMode || {});\n\n // spine-webgl/src/LoadingScreen.ts\n var spinnerImage;\n var logoImage;\n var loaded = 0;\n var FADE_IN = 1;\n var FADE_OUT = 1;\n var logoWidth = 165;\n var logoHeight = 108;\n var spinnerSize = 163;\n var LoadingScreen = class {\n constructor(renderer) {\n this.logo = null;\n this.spinner = null;\n this.angle = 0;\n this.fadeOut = 0;\n this.fadeIn = 0;\n this.timeKeeper = new TimeKeeper();\n this.backgroundColor = new Color(0.135, 0.135, 0.135, 1);\n this.tempColor = new Color();\n this.renderer = renderer;\n this.timeKeeper.maxDelta = 9;\n if (!logoImage) {\n let isSafari = navigator.userAgent.indexOf(\"Safari\") > -1;\n let onload = () => loaded++;\n logoImage = new Image();\n logoImage.src = SPINE_LOGO_DATA;\n if (!isSafari)\n logoImage.crossOrigin = \"anonymous\";\n logoImage.onload = onload;\n spinnerImage = new Image();\n spinnerImage.src = SPINNER_DATA;\n if (!isSafari)\n spinnerImage.crossOrigin = \"anonymous\";\n spinnerImage.onload = onload;\n }\n }\n dispose() {\n var _a, _b;\n (_a = this.logo) == null ? void 0 : _a.dispose();\n (_b = this.spinner) == null ? void 0 : _b.dispose();\n }\n draw(complete = false) {\n if (loaded < 2 || complete && this.fadeOut > FADE_OUT)\n return;\n this.timeKeeper.update();\n let a = Math.abs(Math.sin(this.timeKeeper.totalTime + 0.25));\n this.angle -= this.timeKeeper.delta * 200 * (1 + 1.5 * Math.pow(a, 5));\n let tempColor = this.tempColor;\n let renderer = this.renderer;\n let canvas = renderer.canvas;\n let gl = renderer.context.gl;\n renderer.resize(1 /* Expand */);\n renderer.camera.position.set(canvas.width / 2, canvas.height / 2, 0);\n renderer.batcher.setBlendMode(gl.ONE, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n if (complete) {\n this.fadeOut += this.timeKeeper.delta * (this.timeKeeper.totalTime < 1 ? 2 : 1);\n if (this.fadeOut > FADE_OUT)\n return;\n tempColor.setFromColor(this.backgroundColor);\n a = 1 - this.fadeOut / FADE_OUT;\n a = 1 - (a - 1) * (a - 1);\n tempColor.a *= a;\n if (tempColor.a > 0) {\n renderer.camera.zoom = 1;\n renderer.begin();\n renderer.quad(\n true,\n 0,\n 0,\n canvas.width,\n 0,\n canvas.width,\n canvas.height,\n 0,\n canvas.height,\n tempColor,\n tempColor,\n tempColor,\n tempColor\n );\n renderer.end();\n }\n } else {\n this.fadeIn += this.timeKeeper.delta;\n if (this.backgroundColor.a > 0) {\n gl.clearColor(this.backgroundColor.r, this.backgroundColor.g, this.backgroundColor.b, this.backgroundColor.a);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n a = 1;\n }\n a *= Math.min(this.fadeIn / FADE_IN, 1);\n tempColor.set(a, a, a, a);\n if (!this.logo) {\n this.logo = new GLTexture(renderer.context, logoImage);\n this.spinner = new GLTexture(renderer.context, spinnerImage);\n }\n renderer.camera.zoom = Math.max(1, spinnerSize / canvas.height);\n renderer.begin();\n renderer.drawTexture(this.logo, (canvas.width - logoWidth) / 2, (canvas.height - logoHeight) / 2, logoWidth, logoHeight, tempColor);\n if (this.spinner)\n renderer.drawTextureRotated(this.spinner, (canvas.width - spinnerSize) / 2, (canvas.height - spinnerSize) / 2, spinnerSize, spinnerSize, spinnerSize / 2, spinnerSize / 2, this.angle, tempColor);\n renderer.end();\n }\n };\n var SPINNER_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC\";\n var SPINE_LOGO_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=\";\n\n // spine-webgl/src/SpineCanvas.ts\n var SpineCanvas = class {\n constructor(canvas, config) {\n this.time = new TimeKeeper();\n if (!config.pathPrefix)\n config.pathPrefix = \"\";\n if (!config.app)\n config.app = {\n loadAssets: () => {\n },\n initialize: () => {\n },\n update: () => {\n },\n render: () => {\n },\n error: () => {\n }\n };\n if (config.webglConfig)\n config.webglConfig = { alpha: true };\n this.htmlCanvas = canvas;\n this.context = new ManagedWebGLRenderingContext(canvas, config.webglConfig);\n this.renderer = new SceneRenderer(canvas, this.context);\n this.gl = this.context.gl;\n this.assetManager = new AssetManager(this.context, config.pathPrefix);\n this.input = new Input(canvas);\n if (config.app.loadAssets)\n config.app.loadAssets(this);\n let loop = () => {\n requestAnimationFrame(loop);\n this.time.update();\n if (config.app.update)\n config.app.update(this, this.time.delta);\n if (config.app.render)\n config.app.render(this);\n };\n let waitForAssets = () => {\n if (this.assetManager.isLoadingComplete()) {\n if (this.assetManager.hasErrors()) {\n if (config.app.error)\n config.app.error(this, this.assetManager.getErrors());\n } else {\n if (config.app.initialize)\n config.app.initialize(this);\n loop();\n }\n return;\n }\n requestAnimationFrame(waitForAssets);\n };\n requestAnimationFrame(waitForAssets);\n }\n clear(r, g, b, a) {\n this.gl.clearColor(r, g, b, a);\n this.gl.clear(this.gl.COLOR_BUFFER_BIT);\n }\n };\n return __toCommonJS(src_exports);\n})();\n//# sourceMappingURL=spine-webgl.js.map\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine4.1/src/SpinePlugin.js b/plugins/spine4.1/src/SpinePlugin.js index 33d5eaf56..14916d79e 100644 --- a/plugins/spine4.1/src/SpinePlugin.js +++ b/plugins/spine4.1/src/SpinePlugin.js @@ -638,6 +638,7 @@ var SpinePlugin = new Class({ * @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. * @param {object} [settings] - An external Settings configuration object { prefix: '' } + * * @return {Phaser.Loader.LoaderPlugin} The Loader instance. */ spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings) @@ -971,35 +972,33 @@ var SpinePlugin = new Class({ return null; } - var gl = this.gl; - var i; - var atlasPage; - var realTextureKey; - - if (this.isWebGL) + if (!this.spineTextures.has(atlasKey)) { - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); - } + var gl = this.gl; + var i; + var atlasPage; + var realTextureKey; - for (i = 0; i < atlas.pages.length; i ++) - { - atlasPage = atlas.pages[i]; - realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; if (this.isWebGL) { - atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); } - else + + for (i = 0; i < atlas.pages.length; i ++) { - atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + atlasPage = atlas.pages[i]; + realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name; + if (this.isWebGL) + { + atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false)); + } + else + { + atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage())); + } } - } - - var spineTextureKey = atlasData.prefix ? atlasData.prefix + atlasKey : atlasKey; - - if (!this.spineTextures.has(spineTextureKey)) - { - this.spineTextures.add(spineTextureKey, atlas); + + this.spineTextures.add(atlasKey, atlas); } var preMultipliedAlpha = atlasData.preMultipliedAlpha;